Loading lib_com/bits_alloc.c +17 −7 Original line number Diff line number Diff line Loading @@ -777,9 +777,11 @@ ivas_error config_acelp1( bits -= TDM_IC_LSF_PRED_BITS; } /* gain Q bit-budget - part 1 */ /* gain Q bit-budget - part 1: 'Es_pred' of memory-less gain Q */ #ifdef NONBE_FIX_GSC_BSTR if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && !inactive_coder_type_flag ) ) if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) /* mid bitrates in GC and VC, low+mid bitrates in TC */ || ( coder_type == INACTIVE && !inactive_coder_type_flag ) /* AVQ inactive */ ) #else 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 ) ) #endif Loading Loading @@ -1064,7 +1066,9 @@ ivas_error config_acelp1( acelp_cfg->fixed_cdk_index[3] = -1; } #ifdef NONBE_FIX_GSC_BSTR else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) || core == HQ_CORE ) else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || /* @12.8kHz core except of GSC */ ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) /* @16kHz core GC, TC, AVQ inactive */ || core == HQ_CORE /* ACELP -> HQ switching in EVS */ ) #else else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( total_brate > MAX_GSC_INACTIVE_BRATE || coder_type != INACTIVE ) ) || core == HQ_CORE ) #endif Loading Loading @@ -1116,7 +1120,9 @@ ivas_error config_acelp1( /* algebraic codebook bit-budget */ #ifdef NONBE_FIX_GSC_BSTR if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) if ( flag_hardcoded || /* EVS */ ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) /* high-birate ACELP except IC */ || ( !inactive_coder_type_flag && coder_type == INACTIVE ) /* AVQ inactive */ ) #else if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) #endif Loading Loading @@ -1207,7 +1213,8 @@ ivas_error config_acelp1( /* AVQ codebook */ #ifdef NONBE_FIX_GSC_BSTR if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) /* high-birate ACELP except IC */ || ( !inactive_coder_type_flag && coder_type == INACTIVE ) /* AVQ inactive */ ) #else if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) #endif Loading Loading @@ -1246,7 +1253,9 @@ ivas_error config_acelp1( } } #ifdef NONBE_FIX_GSC_BSTR else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && inactive_coder_type_flag ) ) else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) /* LBR secondary channel in TD stereo */ || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) /* GSC @12.8kHz */ || ( coder_type == INACTIVE && inactive_coder_type_flag ) /* AVQ inactive */ ) #else else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) ) #endif Loading Loading @@ -1343,7 +1352,8 @@ ivas_error config_acelp1( if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || nb_subfr == NB_SUBFR16k ) { #ifdef NONBE_FIX_GSC_BSTR if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) /* GSC Inactive @16kHz */ || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* IVAS GSC @16kHz */ #else if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ #endif Loading Loading
lib_com/bits_alloc.c +17 −7 Original line number Diff line number Diff line Loading @@ -777,9 +777,11 @@ ivas_error config_acelp1( bits -= TDM_IC_LSF_PRED_BITS; } /* gain Q bit-budget - part 1 */ /* gain Q bit-budget - part 1: 'Es_pred' of memory-less gain Q */ #ifdef NONBE_FIX_GSC_BSTR if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && !inactive_coder_type_flag ) ) if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) /* mid bitrates in GC and VC, low+mid bitrates in TC */ || ( coder_type == INACTIVE && !inactive_coder_type_flag ) /* AVQ inactive */ ) #else 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 ) ) #endif Loading Loading @@ -1064,7 +1066,9 @@ ivas_error config_acelp1( acelp_cfg->fixed_cdk_index[3] = -1; } #ifdef NONBE_FIX_GSC_BSTR else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) || core == HQ_CORE ) else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || /* @12.8kHz core except of GSC */ ( nb_subfr == NB_SUBFR16k && ( !inactive_coder_type_flag || coder_type != INACTIVE ) ) /* @16kHz core GC, TC, AVQ inactive */ || core == HQ_CORE /* ACELP -> HQ switching in EVS */ ) #else else if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || ( nb_subfr == NB_SUBFR16k && ( total_brate > MAX_GSC_INACTIVE_BRATE || coder_type != INACTIVE ) ) || core == HQ_CORE ) #endif Loading Loading @@ -1116,7 +1120,9 @@ ivas_error config_acelp1( /* algebraic codebook bit-budget */ #ifdef NONBE_FIX_GSC_BSTR if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) if ( flag_hardcoded || /* EVS */ ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) /* high-birate ACELP except IC */ || ( !inactive_coder_type_flag && coder_type == INACTIVE ) /* AVQ inactive */ ) #else if ( flag_hardcoded || ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) #endif Loading Loading @@ -1207,7 +1213,8 @@ ivas_error config_acelp1( /* AVQ codebook */ #ifdef NONBE_FIX_GSC_BSTR if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( !inactive_coder_type_flag && coder_type == INACTIVE ) ) if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) /* high-birate ACELP except IC */ || ( !inactive_coder_type_flag && coder_type == INACTIVE ) /* AVQ inactive */ ) #else if ( ( core_brate_inp >= MIN_BRATE_AVQ_EXC && coder_type != INACTIVE ) || ( total_brate > MAX_GSC_INACTIVE_BRATE && coder_type == INACTIVE ) ) #endif Loading Loading @@ -1246,7 +1253,9 @@ ivas_error config_acelp1( } } #ifdef NONBE_FIX_GSC_BSTR else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && inactive_coder_type_flag ) ) else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) /* LBR secondary channel in TD stereo */ || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) /* GSC @12.8kHz */ || ( coder_type == INACTIVE && inactive_coder_type_flag ) /* AVQ inactive */ ) #else else if ( ( coder_type == UNVOICED && tdm_low_rate_mode == 1 && element_mode == IVAS_CPE_TD ) || ( ( coder_type == INACTIVE || coder_type == AUDIO ) && nb_subfr == NB_SUBFR ) || ( coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) ) #endif Loading Loading @@ -1343,7 +1352,8 @@ ivas_error config_acelp1( if ( ( coder_type != INACTIVE && nb_subfr == NB_SUBFR && coder_type != AUDIO ) || nb_subfr == NB_SUBFR16k ) { #ifdef NONBE_FIX_GSC_BSTR if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && inactive_coder_type_flag ) /* GSC Inactive @16kHz */ || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* IVAS GSC @16kHz */ #else if ( ( L_frame == L_FRAME16k && coder_type == INACTIVE && total_brate <= MAX_GSC_INACTIVE_BRATE ) || ( GSC_IVAS_mode > 0 && L_frame == L_FRAME16k ) ) /* GSC Inactive @16kHz */ #endif Loading