Loading apps/encoder.c +4 −5 Original line number Diff line number Diff line Loading @@ -1648,18 +1648,17 @@ static void usage_enc( void ) fprintf( stdout, "Options:\n" ); fprintf( stdout, "--------\n" ); fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" ); fprintf( stdout, "-stereo [Mode] : Stereo format, default is unified stereo \n" ); fprintf( stdout, " optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo\n" ); fprintf( stdout, "-stereo : Stereo format \n" ); fprintf( stdout, "-ism (+)Ch Files : ISM format \n" ); fprintf( stdout, " where Ch specifies the number of ISMs (1-4)\n" ); fprintf( stdout, " where positive (+) means extended metadata format is used (including orientation and radius) \n" ); fprintf( stdout, " where positive (+) indicates extended metadata (only 64 kbps and up) \n" ); fprintf( stdout, " and Files specify input files containing metadata, one file per object\n" ); fprintf( stdout, " (use NULL for no input metadata)\n" ); fprintf( stdout, "-sba +/-Order : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" ); fprintf( stdout, " where Order specifies the Ambisionics order (1-3),\n" ); fprintf( stdout, " where positive (+) means full 3D and negative (-) only 2D/planar components to be coded\n" ); fprintf( stdout, "-masa Channels File : MASA format \n" ); fprintf( stdout, " where Channels specifies the number of input/transport channels (1 or 2): \n" ); fprintf( stdout, "-masa Ch File : MASA format \n" ); fprintf( stdout, " where Ch specifies the number of input/transport channels (1 or 2): \n" ); fprintf( stdout, " and File specifies input file containing parametric MASA metadata \n" ); fprintf( stdout, "-mc InputConf : Multi-channel format\n" ); fprintf( stdout, " where InputConf specifies the channel configuration: 5_1, 7_1, 5_1_2, 5_1_4, 7_1_4\n" ); Loading lib_com/bits_alloc.c +21 −53 Original line number Diff line number Diff line Loading @@ -536,9 +536,7 @@ ivas_error config_acelp1( const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t idchan, /* i : stereo channel ID */ #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE const int16_t active_cnt, /* i : Active frame counter */ #endif const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ Loading Loading @@ -756,12 +754,10 @@ ivas_error config_acelp1( bits -= acelp_cfg->mid_lsf_bits; } #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) { bits -= TDM_IC_LSF_PRED_BITS; } #endif /* gain Q bit-budget - part 1 */ if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) ) Loading Loading @@ -1318,7 +1314,6 @@ ivas_error config_acelp1( { if ( idchan > 0 && element_mode == IVAS_CPE_TD ) { #ifdef LSF_RE_USE_SECONDARY_CHANNEL if ( !tdm_lp_reuse_flag ) { acelp_cfg->lsf_bits += bits; /* increase LSF Q bits */ Loading Loading @@ -1348,33 +1343,6 @@ ivas_error config_acelp1( bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } } #else int16_t nb_prm = 4; if ( tdm_low_rate_mode == 1 ) { nb_prm = 2; } /* First add remaining bits on gains */ if ( !( *uc_two_stage_flag ) ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, GAINSPRM, acelp_cfg->gains_mode ); } /* Then, Increase pitch bit budget */ if ( tdm_Pitch_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, PITCHPRM, acelp_cfg->pitch_bits ); } /* Increase mid-lsf bit budget */ if ( tdm_lp_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, MID_LSFSPRM, &acelp_cfg->mid_lsf_bits ); bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } #endif #ifdef DEBUGGING if ( idchan > 0 && bits > 0 && ( coder_type > UNVOICED || tdm_low_rate_mode == 0 ) ) { Loading lib_com/bitstream.c +0 −4 Original line number Diff line number Diff line Loading @@ -1801,11 +1801,7 @@ ivas_error preview_indices( if ( bit_stream[2] == 0 ) { st_ivas->ivas_format = SBA_FORMAT; #ifndef LBR_SBA st_ivas->sba_mode = ivas_sba_mode_select( total_brate ); #else st_ivas->sba_mode = ivas_sba_mode_select(); #endif } else { Loading lib_com/cnst.h +0 −4 Original line number Diff line number Diff line Loading @@ -294,9 +294,7 @@ enum IND_ISF_1_2, IND_ISF_1_3, IND_ISF_1_4, #ifdef LSF_RE_USE_SECONDARY_CHANNEL IND_IC_LSF_PRED, #endif IND_GSC_ATTACK, IND_GSC_SWB_SPEECH, IND_NOISE_LEVEL, Loading Loading @@ -1391,7 +1389,6 @@ enum #define NPARTCLDFB 10 #define NPART_SHAPING 62 #ifdef ERI_FDCNGVQ_LOW_ROM #define FDCNG_VQ_MAX_LEN FD_CNG_maxN_37bits #define FDCNG_VQ_DCT_NSEGM 4 #define FDCNG_VQ_DCT_MINTRUNC 8 Loading @@ -1408,7 +1405,6 @@ typedef enum _DCTTYPE IDCT_T2_XX_21 = 3 } DCTTYPE; #endif #define MSSUBFRLEN 12 #define MSNUMSUBFR 6 Loading lib_com/ivas_cnst.h +14 −10 Original line number Diff line number Diff line Loading @@ -791,11 +791,7 @@ enum fea_names #define TDM_LP_REUSE_BITS 1 /* number of bits to code LP reuse flag for secondary channel */ #define TDM_LR_CONTENT_BITS 1 /* number of bits to code flag when the content is LR or not */ #define TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS ( TDM_SECONDARY_SIGNALLING + TDM_RATIO_BITS + TDM_LP_REUSE_BITS + TDM_LR_CONTENT_BITS + STEREO_BITS_TCA ) #ifdef LSF_RE_USE_SECONDARY_CHANNEL #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE #define TDM_IC_LSF_PRED_BITS 1 /* number of bits to code the inter channel LSF prediction mode */ #endif #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -986,9 +982,7 @@ typedef enum /* Common SPAR metadata constants */ #define IVAS_ACTIVEW_DM_F_SCALE 0.5f #define IVAS_ACTIVEW_DM_F_SCALE_DTX 0.25f #ifdef LBR_SBA #define IVAS_ACTIVEW_DM_F_SCALE_VLBR 0.25f #endif #define IVAS_SPAR_FOA_DFLT_FREQ_PER_CHAN 24000 #define MAX_QUANT_STRATS 3 Loading Loading @@ -1021,11 +1015,7 @@ typedef enum DECX_COEFF } ivas_coeffs_type_t; #ifdef LBR_SBA #define IVAS_SPAR_BR_TABLE_LEN 20 #else #define IVAS_SPAR_BR_TABLE_LEN 18 #endif /* TD decorr */ // VE: not all 16CH are currently supported -> t be revisited later enum Loading Loading @@ -1147,6 +1137,9 @@ enum #define MASA_DIRECTION_MAX_BITS 11 #define MASA_NO_INDEX 32767 #define MASA_BITS_ER 3 #ifdef HR_METADATA #define MASA_BITS_ER_HR 4 #endif #define MASA_MIN_BITS_TF 4 #define MASA_LIMIT_2D 2 #define MASA_NO_CV_COH 8 Loading @@ -1165,6 +1158,12 @@ enum #define MASA_COH_LIMIT_2IDX 144 /* limit for sum of values across components for having two joint indexes */ #define QMETADATA_MAX_NO_DIRECTIONS 2 #define MASA_MAX_BITS 1300 /* max. bit-budget for MASA metadata */ #ifdef HR_METADATA #define MASA_MAX_BITS_HR 2000 /* max. bit-budget for MASA metadata in HR mode*/ #define HR_MASA_ER_LEVELS 16 #endif #define LIMIT_ER_ELEVATION_ENC 4 #define LIMIT_ER_SIMPLE_ENC 6 #define LIMIT_USE_COMMON 3 Loading Loading @@ -1193,7 +1192,12 @@ enum #define MASA_STEREO_MIN_BITRATE IVAS_24k4 #define MASA_BIT_REDUCT_PARAM 10 #ifdef HR_METADATA #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 #else #define MASA_MAXIMUM_TWO_DIR_BANDS 18 #endif typedef enum { MASA_STEREO_NOT_DEFINED, Loading Loading
apps/encoder.c +4 −5 Original line number Diff line number Diff line Loading @@ -1648,18 +1648,17 @@ static void usage_enc( void ) fprintf( stdout, "Options:\n" ); fprintf( stdout, "--------\n" ); fprintf( stdout, "EVS mono is default, for IVAS choose one of the following: -stereo, -ism, -sba, -masa, -mc\n" ); fprintf( stdout, "-stereo [Mode] : Stereo format, default is unified stereo \n" ); fprintf( stdout, " optional for Mode: 1: DFT Stereo, 2: TD Stereo, 3: MDCT Stereo\n" ); fprintf( stdout, "-stereo : Stereo format \n" ); fprintf( stdout, "-ism (+)Ch Files : ISM format \n" ); fprintf( stdout, " where Ch specifies the number of ISMs (1-4)\n" ); fprintf( stdout, " where positive (+) means extended metadata format is used (including orientation and radius) \n" ); fprintf( stdout, " where positive (+) indicates extended metadata (only 64 kbps and up) \n" ); fprintf( stdout, " and Files specify input files containing metadata, one file per object\n" ); fprintf( stdout, " (use NULL for no input metadata)\n" ); fprintf( stdout, "-sba +/-Order : Scene Based Audio input format (Ambisonics ACN/SN3D),\n" ); fprintf( stdout, " where Order specifies the Ambisionics order (1-3),\n" ); fprintf( stdout, " where positive (+) means full 3D and negative (-) only 2D/planar components to be coded\n" ); fprintf( stdout, "-masa Channels File : MASA format \n" ); fprintf( stdout, " where Channels specifies the number of input/transport channels (1 or 2): \n" ); fprintf( stdout, "-masa Ch File : MASA format \n" ); fprintf( stdout, " where Ch specifies the number of input/transport channels (1 or 2): \n" ); fprintf( stdout, " and File specifies input file containing parametric MASA metadata \n" ); fprintf( stdout, "-mc InputConf : Multi-channel format\n" ); fprintf( stdout, " where InputConf specifies the channel configuration: 5_1, 7_1, 5_1_2, 5_1_4, 7_1_4\n" ); Loading
lib_com/bits_alloc.c +21 −53 Original line number Diff line number Diff line Loading @@ -536,9 +536,7 @@ ivas_error config_acelp1( const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t idchan, /* i : stereo channel ID */ #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE const int16_t active_cnt, /* i : Active frame counter */ #endif const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ Loading Loading @@ -756,12 +754,10 @@ ivas_error config_acelp1( bits -= acelp_cfg->mid_lsf_bits; } #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) { bits -= TDM_IC_LSF_PRED_BITS; } #endif /* gain Q bit-budget - part 1 */ if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) ) Loading Loading @@ -1318,7 +1314,6 @@ ivas_error config_acelp1( { if ( idchan > 0 && element_mode == IVAS_CPE_TD ) { #ifdef LSF_RE_USE_SECONDARY_CHANNEL if ( !tdm_lp_reuse_flag ) { acelp_cfg->lsf_bits += bits; /* increase LSF Q bits */ Loading Loading @@ -1348,33 +1343,6 @@ ivas_error config_acelp1( bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } } #else int16_t nb_prm = 4; if ( tdm_low_rate_mode == 1 ) { nb_prm = 2; } /* First add remaining bits on gains */ if ( !( *uc_two_stage_flag ) ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, GAINSPRM, acelp_cfg->gains_mode ); } /* Then, Increase pitch bit budget */ if ( tdm_Pitch_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, PITCHPRM, acelp_cfg->pitch_bits ); } /* Increase mid-lsf bit budget */ if ( tdm_lp_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, MID_LSFSPRM, &acelp_cfg->mid_lsf_bits ); bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } #endif #ifdef DEBUGGING if ( idchan > 0 && bits > 0 && ( coder_type > UNVOICED || tdm_low_rate_mode == 0 ) ) { Loading
lib_com/bitstream.c +0 −4 Original line number Diff line number Diff line Loading @@ -1801,11 +1801,7 @@ ivas_error preview_indices( if ( bit_stream[2] == 0 ) { st_ivas->ivas_format = SBA_FORMAT; #ifndef LBR_SBA st_ivas->sba_mode = ivas_sba_mode_select( total_brate ); #else st_ivas->sba_mode = ivas_sba_mode_select(); #endif } else { Loading
lib_com/cnst.h +0 −4 Original line number Diff line number Diff line Loading @@ -294,9 +294,7 @@ enum IND_ISF_1_2, IND_ISF_1_3, IND_ISF_1_4, #ifdef LSF_RE_USE_SECONDARY_CHANNEL IND_IC_LSF_PRED, #endif IND_GSC_ATTACK, IND_GSC_SWB_SPEECH, IND_NOISE_LEVEL, Loading Loading @@ -1391,7 +1389,6 @@ enum #define NPARTCLDFB 10 #define NPART_SHAPING 62 #ifdef ERI_FDCNGVQ_LOW_ROM #define FDCNG_VQ_MAX_LEN FD_CNG_maxN_37bits #define FDCNG_VQ_DCT_NSEGM 4 #define FDCNG_VQ_DCT_MINTRUNC 8 Loading @@ -1408,7 +1405,6 @@ typedef enum _DCTTYPE IDCT_T2_XX_21 = 3 } DCTTYPE; #endif #define MSSUBFRLEN 12 #define MSNUMSUBFR 6 Loading
lib_com/ivas_cnst.h +14 −10 Original line number Diff line number Diff line Loading @@ -791,11 +791,7 @@ enum fea_names #define TDM_LP_REUSE_BITS 1 /* number of bits to code LP reuse flag for secondary channel */ #define TDM_LR_CONTENT_BITS 1 /* number of bits to code flag when the content is LR or not */ #define TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS ( TDM_SECONDARY_SIGNALLING + TDM_RATIO_BITS + TDM_LP_REUSE_BITS + TDM_LR_CONTENT_BITS + STEREO_BITS_TCA ) #ifdef LSF_RE_USE_SECONDARY_CHANNEL #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE #define TDM_IC_LSF_PRED_BITS 1 /* number of bits to code the inter channel LSF prediction mode */ #endif #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -986,9 +982,7 @@ typedef enum /* Common SPAR metadata constants */ #define IVAS_ACTIVEW_DM_F_SCALE 0.5f #define IVAS_ACTIVEW_DM_F_SCALE_DTX 0.25f #ifdef LBR_SBA #define IVAS_ACTIVEW_DM_F_SCALE_VLBR 0.25f #endif #define IVAS_SPAR_FOA_DFLT_FREQ_PER_CHAN 24000 #define MAX_QUANT_STRATS 3 Loading Loading @@ -1021,11 +1015,7 @@ typedef enum DECX_COEFF } ivas_coeffs_type_t; #ifdef LBR_SBA #define IVAS_SPAR_BR_TABLE_LEN 20 #else #define IVAS_SPAR_BR_TABLE_LEN 18 #endif /* TD decorr */ // VE: not all 16CH are currently supported -> t be revisited later enum Loading Loading @@ -1147,6 +1137,9 @@ enum #define MASA_DIRECTION_MAX_BITS 11 #define MASA_NO_INDEX 32767 #define MASA_BITS_ER 3 #ifdef HR_METADATA #define MASA_BITS_ER_HR 4 #endif #define MASA_MIN_BITS_TF 4 #define MASA_LIMIT_2D 2 #define MASA_NO_CV_COH 8 Loading @@ -1165,6 +1158,12 @@ enum #define MASA_COH_LIMIT_2IDX 144 /* limit for sum of values across components for having two joint indexes */ #define QMETADATA_MAX_NO_DIRECTIONS 2 #define MASA_MAX_BITS 1300 /* max. bit-budget for MASA metadata */ #ifdef HR_METADATA #define MASA_MAX_BITS_HR 2000 /* max. bit-budget for MASA metadata in HR mode*/ #define HR_MASA_ER_LEVELS 16 #endif #define LIMIT_ER_ELEVATION_ENC 4 #define LIMIT_ER_SIMPLE_ENC 6 #define LIMIT_USE_COMMON 3 Loading Loading @@ -1193,7 +1192,12 @@ enum #define MASA_STEREO_MIN_BITRATE IVAS_24k4 #define MASA_BIT_REDUCT_PARAM 10 #ifdef HR_METADATA #define MASA_MAXIMUM_TWO_DIR_BANDS 24 #define NBITS_HR_COH 4 #else #define MASA_MAXIMUM_TWO_DIR_BANDS 18 #endif typedef enum { MASA_STEREO_NOT_DEFINED, Loading