Loading lib_enc/init_enc.c +37 −1 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ ivas_error init_encoder( { int16_t i; ivas_error error; #ifdef IGF_MEMORY_ALLOC_OPT int32_t igf_brate; #endif error = IVAS_ERR_OK; Loading Loading @@ -747,9 +750,42 @@ ivas_error init_encoder( *-----------------------------------------------------------------*/ #ifdef IGF_MEMORY_ALLOC_OPT igf_brate = st->total_brate; switch ( st->element_mode ) { case IVAS_SCE: if ( st_ivas->hEncoderConfig->ivas_format == ISM_FORMAT ) { igf_brate = st->total_brate - ISM_NB_BITS_METADATA_NOMINAL * FRAMES_PER_SEC; } break; case IVAS_CPE_DFT: /* use nominal bitrates for DFT Stereo, same as in stereo_dft_config() */ if ( element_brate == IVAS_13k2 ) { igf_brate = ACELP_9k60; } else if ( element_brate == IVAS_16k4 ) { igf_brate = ACELP_13k20; } else if ( element_brate == IVAS_24k4 ) { igf_brate = ACELP_16k40; } else if ( element_brate == IVAS_32k ) { igf_brate = ACELP_24k40; } break; case IVAS_CPE_MDCT: igf_brate = element_brate; break; } if ( st->codec_mode == MODE2 || st->element_mode > EVS_MONO ) { st->igf = getIgfPresent( st->element_mode, ( st->element_mode == IVAS_CPE_MDCT ) ? element_brate : st->total_brate, st->max_bwidth, st->rf_mode ); st->igf = getIgfPresent( st->element_mode, igf_brate, st->max_bwidth, st->rf_mode ); } else { Loading lib_enc/ivas_ism_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ ivas_error ivas_ism_enc( *----------------------------------------------------------------*/ #ifdef IGF_MEMORY_ALLOC_OPT /* IGF reconfiguration */ if ( hSCE->last_element_brate != hSCE->element_brate ) if ( hSCE->last_element_brate != hSCE->element_brate || st->last_bwidth != st->bwidth ) { int16_t igf; igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->rf_mode ); Loading lib_enc/ivas_sce_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ ivas_error ivas_sce_enc( #ifdef IGF_MEMORY_ALLOC_OPT /* IGF reconfiguration */ if ( hSCE->last_element_brate != hSCE->element_brate ) if ( hSCE->last_element_brate != hSCE->element_brate || st->last_bwidth != st->bwidth ) { int16_t igf; igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->rf_mode ); Loading Loading
lib_enc/init_enc.c +37 −1 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ ivas_error init_encoder( { int16_t i; ivas_error error; #ifdef IGF_MEMORY_ALLOC_OPT int32_t igf_brate; #endif error = IVAS_ERR_OK; Loading Loading @@ -747,9 +750,42 @@ ivas_error init_encoder( *-----------------------------------------------------------------*/ #ifdef IGF_MEMORY_ALLOC_OPT igf_brate = st->total_brate; switch ( st->element_mode ) { case IVAS_SCE: if ( st_ivas->hEncoderConfig->ivas_format == ISM_FORMAT ) { igf_brate = st->total_brate - ISM_NB_BITS_METADATA_NOMINAL * FRAMES_PER_SEC; } break; case IVAS_CPE_DFT: /* use nominal bitrates for DFT Stereo, same as in stereo_dft_config() */ if ( element_brate == IVAS_13k2 ) { igf_brate = ACELP_9k60; } else if ( element_brate == IVAS_16k4 ) { igf_brate = ACELP_13k20; } else if ( element_brate == IVAS_24k4 ) { igf_brate = ACELP_16k40; } else if ( element_brate == IVAS_32k ) { igf_brate = ACELP_24k40; } break; case IVAS_CPE_MDCT: igf_brate = element_brate; break; } if ( st->codec_mode == MODE2 || st->element_mode > EVS_MONO ) { st->igf = getIgfPresent( st->element_mode, ( st->element_mode == IVAS_CPE_MDCT ) ? element_brate : st->total_brate, st->max_bwidth, st->rf_mode ); st->igf = getIgfPresent( st->element_mode, igf_brate, st->max_bwidth, st->rf_mode ); } else { Loading
lib_enc/ivas_ism_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ ivas_error ivas_ism_enc( *----------------------------------------------------------------*/ #ifdef IGF_MEMORY_ALLOC_OPT /* IGF reconfiguration */ if ( hSCE->last_element_brate != hSCE->element_brate ) if ( hSCE->last_element_brate != hSCE->element_brate || st->last_bwidth != st->bwidth ) { int16_t igf; igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->rf_mode ); Loading
lib_enc/ivas_sce_enc.c +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ ivas_error ivas_sce_enc( #ifdef IGF_MEMORY_ALLOC_OPT /* IGF reconfiguration */ if ( hSCE->last_element_brate != hSCE->element_brate ) if ( hSCE->last_element_brate != hSCE->element_brate || st->last_bwidth != st->bwidth ) { int16_t igf; igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->rf_mode ); Loading