From c03cd3c53ff007335d07e0211a8f82ce79ccd88d Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 2 Sep 2022 15:33:24 +0200 Subject: [PATCH 1/7] address issue #2 under FIX_I2_BWD --- lib_com/cnst.h | 3 +++ lib_com/options.h | 7 ++++--- lib_enc/bw_detect.c | 38 ++++++++++++++++++++++++++++++++++++++ lib_enc/init_enc.c | 3 +++ lib_enc/ivas_core_enc.c | 3 +++ lib_enc/ivas_cpe_enc.c | 3 +++ lib_enc/ivas_sce_enc.c | 3 +++ lib_enc/stat_enc.h | 3 +++ 8 files changed, 60 insertions(+), 3 deletions(-) diff --git a/lib_com/cnst.h b/lib_com/cnst.h index 40a4710579..ae476a02ec 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -798,6 +798,9 @@ typedef enum #define BWD_COUNT_MAX 100 /* maximum value of BWD counter */ #define BWD_N_BINS_MAX 13 /* maximum number of BWD bins */ #define BWS_TRAN_PERIOD 5 /* BWS - number of frames for transition period */ +#ifdef FIX_I2_BWD +#define BWD_HIGH_BRATE_THR IVAS_256k /* BWD - threshold from which the bitrate sets bws_high_rate_flag = 1 */ +#endif #define PREEMPH_FAC 0.68f /* preemphasis factor at 12.8kHz */ #define PREEMPH_FAC_16k 0.72f diff --git a/lib_com/options.h b/lib_com/options.h index bce8d45d02..9a564035bf 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -147,9 +147,10 @@ /*#define FIX_I1_113*/ /* under review : MCT bit distribution optimization for SBA high bitrates*/ #define FIX_ADAP_STEFI_SHIFT /* Issue 89: fix bug in parameter shift of adaptive stereo filling */ -#define SPAR_SCALING_HARMONIZATION /* issue 80: Changes to harmonize scaling in spar */ +#define SPAR_SCALING_HARMONIZATION /* Issue 80: Changes to harmonize scaling in spar */ +#define FIX_I2_BWD /* Issue 2: BWD fix to more quickly react to WB -> SWB/FB change */ - - /* ################## End DEVELOPMENT switches ######################### */ + +/* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif diff --git a/lib_enc/bw_detect.c b/lib_enc/bw_detect.c index c1357a7f74..f0b6f35355 100644 --- a/lib_enc/bw_detect.c +++ b/lib_enc/bw_detect.c @@ -486,6 +486,44 @@ void bw_detect( } } } +#ifdef FIX_I2_BWDaa + else if ( st->localVAD == 0 && st->bwd_high_brate_flag == 1 && st->input_bwidth == WB ) /* applies in IVAS only */ + { + if( st->count_SWB > 0 ) + { + st->count_SWB++; + } + + if ( st->count_FB > 0 ) + { + st->count_FB++; + } + + if ( st->last_input_bwidth == WB && st->input_Fs > 16000 ) + { + if ( st->count_SWB > BWD_COUNT_WIDER_BW ) + { + st->input_bwidth = SWB; + st->count_SWB = BWD_COUNT_MAX; + + if ( st->count_FB > BWD_COUNT_WIDER_BW ) + { + st->input_bwidth = FB; + st->count_FB = BWD_COUNT_MAX; + } + } + } + + if ( st->last_input_bwidth == SWB && st->input_Fs > 32000 ) + { + if ( st->count_FB > BWD_COUNT_WIDER_BW ) + { + st->input_bwidth = FB; + st->count_FB = BWD_COUNT_MAX; + } + } + } +#endif } /* verify that maximum encoded bandwidth (specified on the command line) is not exceeded */ diff --git a/lib_enc/init_enc.c b/lib_enc/init_enc.c index 1ae2f48c66..2a15da6488 100644 --- a/lib_enc/init_enc.c +++ b/lib_enc/init_enc.c @@ -398,6 +398,9 @@ ivas_error init_encoder( st->last_bwidth = st->bwidth; st->last_bwidth_cng = st->bwidth; st->bwidth_sw_cnt = 0; +#ifdef FIX_I2_BWD + st->bwd_high_brate_flag = 0; +#endif /*-----------------------------------------------------------------* diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index 42a17cb9cb..27b05ef6a1 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -443,6 +443,9 @@ ivas_error ivas_core_enc( dbgwrite( &st->count_WB, sizeof( int16_t ), 1, input_frame, fname( debug_dir, "count_WB", n, id, ENC ) ); dbgwrite( &st->count_SWB, sizeof( int16_t ), 1, input_frame, fname( debug_dir, "count_SWB", n, id, ENC ) ); +#ifdef FIX_I2_BWD + dbgwrite( &st->count_FB, sizeof( int16_t ), 1, input_frame, fname( debug_dir, "count_FB", n, id, ENC ) ); +#endif #ifdef DEBUG_MODE_ACELP dbgwrite( snr_[n], sizeof( float ), 320, 1, fname( debug_dir, "snr", n, id, ENC ) ); diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index b543761491..2c1022920e 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -148,6 +148,9 @@ ivas_error ivas_cpe_enc( sts[n]->bwidth = sts[n]->last_bwidth; /* updated in BWD */ } sts[n]->rate_switching_reset = 0; +#ifdef FIX_I2_BWD + sts[n]->bwd_high_brate_flag = ivas_total_brate >= BWD_HIGH_BRATE_THR ? 1 : 0; +#endif #ifdef DEBUGGING sts[n]->force = hEncoderConfig->force; sts[n]->id_element = cpe_id + st_ivas->nSCE; diff --git a/lib_enc/ivas_sce_enc.c b/lib_enc/ivas_sce_enc.c index 942dd14c99..e648484808 100644 --- a/lib_enc/ivas_sce_enc.c +++ b/lib_enc/ivas_sce_enc.c @@ -118,6 +118,9 @@ ivas_error ivas_sce_enc( st->input_bwidth = st->last_input_bwidth; /* updated in BWD */ st->bwidth = st->last_bwidth; /* updated in BWD */ st->rate_switching_reset = 0; +#ifdef FIX_I2_BWD + st->bwd_high_brate_flag = st_ivas->hEncoderConfig->ivas_total_brate >= BWD_HIGH_BRATE_THR ? 1 : 0; +#endif #ifdef DEBUGGING st->force = st_ivas->hEncoderConfig->force; st->id_element = sce_id; diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index de0451d3bc..e1016c7cf4 100644 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -1389,6 +1389,9 @@ typedef struct enc_core_structure int16_t count_WB; int16_t count_SWB; int16_t count_FB; +#ifdef FIX_I2_BWD + int16_t bwd_high_brate_flag; +#endif /*----------------------------------------------------------------------------------* * Channel-aware mode -- GitLab From f8e393b6efa704f6c7b6ffff26278a1dbfc8dda0 Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 2 Sep 2022 15:35:22 +0200 Subject: [PATCH 2/7] activate FIX_I2_BWD --- lib_enc/bw_detect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/bw_detect.c b/lib_enc/bw_detect.c index f0b6f35355..1f5a906733 100644 --- a/lib_enc/bw_detect.c +++ b/lib_enc/bw_detect.c @@ -486,7 +486,7 @@ void bw_detect( } } } -#ifdef FIX_I2_BWDaa +#ifdef FIX_I2_BWD else if ( st->localVAD == 0 && st->bwd_high_brate_flag == 1 && st->input_bwidth == WB ) /* applies in IVAS only */ { if( st->count_SWB > 0 ) -- GitLab From 560a0b0895c71e2627dc9d2d6e25b757cd5e63f0 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Sep 2022 17:52:51 +0200 Subject: [PATCH 3/7] fix mismatch between push_wmops() and pop_wmops() --- lib_dec/ivas_crend.c | 2 ++ lib_dec/ivas_out_setup_conversion.c | 4 ---- lib_dec/ivas_sba_rendering.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib_dec/ivas_crend.c b/lib_dec/ivas_crend.c index 8eec61d709..8048d8106f 100644 --- a/lib_dec/ivas_crend.c +++ b/lib_dec/ivas_crend.c @@ -1115,5 +1115,7 @@ ivas_error ivas_crend_process( mvr2r( pcm_tmp[i], output[i], output_frame ); } + wmops_sub_end(); + return IVAS_ERR_OK; } diff --git a/lib_dec/ivas_out_setup_conversion.c b/lib_dec/ivas_out_setup_conversion.c index c8008fa129..9ed27e56c3 100644 --- a/lib_dec/ivas_out_setup_conversion.c +++ b/lib_dec/ivas_out_setup_conversion.c @@ -312,8 +312,6 @@ ivas_error ivas_ls_setup_conversion_open( int32_t output_Fs; int16_t nchan_out; - wmops_sub_start( "LS_Renderer" ); - output_Fs = st_ivas->hDecoderConfig->output_Fs; nchan_out = st_ivas->hDecoderConfig->nchan_out; output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); @@ -1072,8 +1070,6 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( } } - wmops_sub_end(); - return; } diff --git a/lib_dec/ivas_sba_rendering.c b/lib_dec/ivas_sba_rendering.c index 5f451a5d55..644b9090a0 100644 --- a/lib_dec/ivas_sba_rendering.c +++ b/lib_dec/ivas_sba_rendering.c @@ -343,8 +343,6 @@ void ivas_sba_mix_matrix_determiner( num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); - wmops_sub_end(); - return; } -- GitLab From 0310f3dcfb535d81fc4419fe2bbafa1e20588b92 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Sep 2022 17:55:24 +0200 Subject: [PATCH 4/7] - avoid doubled initialization of structures to NULL - assign 'hRenderConfig' to NULL in ivas_initialize_handles_dec() -> this fixes a crash in case of premature exit due to unassigned 'hRenderConfig' --- lib_dec/ivas_init_dec.c | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 2bdaec1b7b..a81c9e587c 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -511,29 +511,6 @@ ivas_error ivas_init_decoder_front( error = IVAS_ERR_OK; -#ifdef DEBUGGING - st_ivas->noClipping = 0; -#endif - - /* Custom loudspeaker layout structure */ - st_ivas->hLsSetupCustom = NULL; - - /* TD renderer HRTF data structure */ - st_ivas->hHrtfTD = NULL; - - /* Head track data structure */ - st_ivas->hHeadTrackData = NULL; - - /* Renderer configuration structure */ - st_ivas->hRenderConfig = NULL; - - /* HRTF binauralization latency in ns */ - st_ivas->binaural_latency_ns = 0; - -#ifdef DEBUGGING - st_ivas->hDecoderConfig->force_rend = -1; -#endif - /*-----------------------------------------------------------------* * Resets *-----------------------------------------------------------------*/ @@ -545,10 +522,15 @@ ivas_error ivas_init_decoder_front( st_ivas->ism_mode = ISM_MODE_NONE; st_ivas->mc_mode = MC_MODE_NONE; st_ivas->sba_mode = SBA_MODE_NONE; + + /* HRTF binauralization latency in ns */ + st_ivas->binaural_latency_ns = 0; - st_ivas->hLimiter = NULL; - st_ivas->hoa_dec_mtx = NULL; +#ifdef DEBUGGING + st_ivas->noClipping = 0; + st_ivas->hDecoderConfig->force_rend = -1; +#endif /*-------------------------------------------------------------------* * Allocate and initialize Custom loudspeaker layout handle @@ -1335,9 +1317,8 @@ ivas_error ivas_init_decoder( * Allocate and initialize limiter struct *-----------------------------------------------------------------*/ - { - st_ivas->hLimiter = ivas_limiter_open( hDecoderConfig->nchan_out, output_Fs ); - } + st_ivas->hLimiter = ivas_limiter_open( hDecoderConfig->nchan_out, output_Fs ); + return error; } @@ -1550,11 +1531,13 @@ void ivas_initialize_handles_dec( st_ivas->hMonoDmxRenderer = NULL; st_ivas->hCrend = NULL; st_ivas->hHrtf = NULL; + st_ivas->hoa_dec_mtx = NULL; st_ivas->hHeadTrackData = NULL; st_ivas->hHrtfTD = NULL; st_ivas->hLimiter = NULL; st_ivas->hLsSetupCustom = NULL; + st_ivas->hRenderConfig = NULL; return; } -- GitLab From 209e0454fdda44b97d01c9789dac3c8606fd21e5 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Sep 2022 18:02:05 +0200 Subject: [PATCH 5/7] editorial changes --- lib_com/ivas_prot.h | 5 +++-- lib_dec/ivas_dec.c | 2 +- lib_dec/ivas_mc_param_dec.c | 2 +- lib_dec/ivas_sba_rendering.c | 8 +++----- lib_dec/ivas_stereo_mdct_core_dec.c | 3 +-- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 88e83ded12..0016a77f66 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3721,8 +3721,9 @@ void ivas_sba_upmixer_renderer( ); void ivas_sba_mix_matrix_determiner( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ - float in_out[][L_FRAME48k], /* i/o: transport/output audio channels */ + SPAR_DEC_HANDLE hSpar, /* i/o: SPAR decoder handle */ + float output[][L_FRAME48k], /* i/o: transport/output audio channels */ + const int16_t bfi, /* i : BFI flag */ const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ const int16_t output_frame /* i : output frame length */ ); diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index cf49ae1352..22f841728e 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -309,7 +309,7 @@ ivas_error ivas_dec( if ( st_ivas->sba_mode == SBA_MODE_SPAR && ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { - ivas_sba_mix_matrix_determiner( st_ivas, output, nchan_remapped, output_frame ); + ivas_sba_mix_matrix_determiner( st_ivas->hSpar, output, st_ivas->bfi, nchan_remapped, output_frame ); } } diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index e1df8f2a7d..29e2ce4002 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -263,7 +263,6 @@ ivas_error ivas_param_mc_dec_open( return error; } - /* convert the ls conv dmx matrix into column order matrix format (nchan_out_cldfb x nchan_out) */ if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_LS_CONV_COV || hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { @@ -297,6 +296,7 @@ ivas_error ivas_param_mc_dec_open( matrix_product( hParamMC->ls_conv_dmx_matrix, nchan_out_cov, nchan_out_transport, 0, ivas_param_mc_conf[config_index].dmx_fac, nchan_out_transport, nchan_transport, 0, proto_matrix ); + if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { proto_mtx_norm = 1.f; diff --git a/lib_dec/ivas_sba_rendering.c b/lib_dec/ivas_sba_rendering.c index 644b9090a0..6360c3f508 100644 --- a/lib_dec/ivas_sba_rendering.c +++ b/lib_dec/ivas_sba_rendering.c @@ -291,19 +291,17 @@ void ivas_sba_upmixer_renderer( *-------------------------------------------------------------------*/ void ivas_sba_mix_matrix_determiner( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct */ + SPAR_DEC_HANDLE hSpar, /* i/o: SPAR decoder handle */ float output[][L_FRAME48k], /* i/o: transport/output audio channels */ + const int16_t bfi, /* i : BFI flag */ const int16_t nchan_remapped, /* i : num channels after remapping of TCs */ const int16_t output_frame /* i : output frame length */ ) { int16_t i, ch; float temp; - SPAR_DEC_HANDLE hSpar; int16_t num_bands_out, nchan_transport, nchan_out; - hSpar = st_ivas->hSpar; - /* Convert numeric range */ for ( ch = 0; ch < nchan_remapped; ch++ ) { @@ -341,7 +339,7 @@ void ivas_sba_mix_matrix_determiner( /* Mixing matrix determiner */ num_bands_out = hSpar->hFbMixer->pFb->filterbank_num_bands; - ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, st_ivas->bfi ); + ivas_spar_dec_gen_umx_mat( hSpar->hMdDec, nchan_transport, num_bands_out, bfi ); return; } diff --git a/lib_dec/ivas_stereo_mdct_core_dec.c b/lib_dec/ivas_stereo_mdct_core_dec.c index 3d4c38f272..d626d1ca6a 100644 --- a/lib_dec/ivas_stereo_mdct_core_dec.c +++ b/lib_dec/ivas_stereo_mdct_core_dec.c @@ -381,8 +381,7 @@ void stereo_mdct_core_dec( ivas_mdct_core_tns_ns( hCPE, 0, fUseTns, tnsData, x, Aq, 0 ); - if ( - st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) + if ( st_ivas->renderer_type == RENDERER_MC_PARAMMC && ( st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_MONO || st_ivas->hDecoderConfig->output_config == AUDIO_CONFIG_STEREO ) ) { ivas_ls_setup_conversion_process_mdct_param_mc( st_ivas, x ); } -- GitLab From 5e3e01895dc8f1418746c1d2e5a614da4d8cee12 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Sep 2022 18:04:58 +0200 Subject: [PATCH 6/7] addition of 'const' --- lib_dec/ivas_sba_rendering.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_dec/ivas_sba_rendering.c b/lib_dec/ivas_sba_rendering.c index 6360c3f508..49f3555c6f 100644 --- a/lib_dec/ivas_sba_rendering.c +++ b/lib_dec/ivas_sba_rendering.c @@ -47,7 +47,7 @@ * Local function prototypes *-----------------------------------------------------------------------*/ -static void ivas_sba_mtx_mult( float output_f[][L_FRAME48k], const int16_t output_frame, const int16_t nchan_in, IVAS_OUTPUT_SETUP output_setup, const float *mtx_hoa_decoder ); +static void ivas_sba_mtx_mult( float output_f[][L_FRAME48k], const int16_t output_frame, const int16_t nchan_in, const IVAS_OUTPUT_SETUP output_setup, const float *mtx_hoa_decoder ); /*-------------------------------------------------------------------* @@ -143,11 +143,11 @@ ivas_error ivas_sba_linear_renderer( *-------------------------------------------------------------------*/ static void ivas_sba_mtx_mult( - float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ - const int16_t output_frame, /* i : output frame length per channel */ - const int16_t nchan_in, /* i : Number of ambisonic channels */ - IVAS_OUTPUT_SETUP output_setup, /* i : Output configuration */ - const float *mtx_hoa_decoder /* i : HOA decoding mtx */ + float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output */ + const int16_t output_frame, /* i : output frame length per channel */ + const int16_t nchan_in, /* i : Number of ambisonic channels */ + const IVAS_OUTPUT_SETUP output_setup, /* i : Output configuration */ + const float *mtx_hoa_decoder /* i : HOA decoding mtx */ ) { int16_t i, k, ch_idx; -- GitLab From 6c37577c2d06dbb598d7d15b0bd4fe316d2aa3ba Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 Sep 2022 18:56:15 +0200 Subject: [PATCH 7/7] harmonize more init. calls --- lib_dec/ivas_init_dec.c | 4 ++++ lib_dec/lib_dec.c | 8 ++++---- lib_enc/lib_enc.c | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index a81c9e587c..d8c14257bd 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -522,6 +522,8 @@ ivas_error ivas_init_decoder_front( st_ivas->ism_mode = ISM_MODE_NONE; st_ivas->mc_mode = MC_MODE_NONE; st_ivas->sba_mode = SBA_MODE_NONE; + + st_ivas->sba_dirac_stereo_flag = 0; /* HRTF binauralization latency in ns */ st_ivas->binaural_latency_ns = 0; @@ -677,6 +679,7 @@ ivas_error ivas_init_decoder( } } +#if 0 /*-----------------------------------------------------------------* * Dummy pointers to decoder handles *-----------------------------------------------------------------*/ @@ -728,6 +731,7 @@ ivas_error ivas_init_decoder( st_ivas->hMonoDmxRenderer = NULL; /* Mono downmix renderer */ st_ivas->hHrtf = NULL; /* Crend hrtf data */ st_ivas->hCrend = NULL; /* Crend renderer */ +#endif /*-----------------------------------------------------------------* * Allocate and initalize SCE/CPE and other handles diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index d3fa68ced7..78b9f901aa 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -146,9 +146,12 @@ ivas_error IVAS_DEC_Open( hIvasDec->prev_ft_speech = 1; /* RXDTX handeler previous frametype flag for G.192 format AMRWB SID_FIRST detection */ hIvasDec->CNG = 0; /* RXDTX handler CNG = 1, no CNG = 0*/ + /* initialize pointers to handles */ + ivas_initialize_handles_dec( hIvasDec->st_ivas ); + + /* high-level set parameters */ if ( mode == IVAS_DEC_MODE_EVS ) { - /* EVS - do alloc etc. */ hIvasDec->st_ivas->codec_mode = 0; /* unknown before first frame */ hIvasDec->st_ivas->element_mode_init = EVS_MONO; hIvasDec->st_ivas->ivas_format = MONO_FORMAT; @@ -170,9 +173,6 @@ ivas_error IVAS_DEC_Open( hIvasDec->st_ivas->ini_active_frame = 0; hIvasDec->st_ivas->writeFECoffset = 0; - /*initialize pointers*/ - ivas_initialize_handles_dec( hIvasDec->st_ivas ); - hIvasDec->st_ivas->ism_mode = ISM_MODE_NONE; hIvasDec->st_ivas->sba_mode = SBA_MODE_NONE; hIvasDec->st_ivas->mc_mode = MC_MODE_NONE; diff --git a/lib_enc/lib_enc.c b/lib_enc/lib_enc.c index 803e9518fe..104a8ca388 100644 --- a/lib_enc/lib_enc.c +++ b/lib_enc/lib_enc.c @@ -845,7 +845,7 @@ static ivas_error configureEncoder( } } - if ( hEncoderConfig->ivas_total_brate == 13200 && hEncoderConfig->Opt_RF_ON == 1 ) + if ( hEncoderConfig->ivas_total_brate == IVAS_13k2 && hEncoderConfig->Opt_RF_ON == 1 ) { st_ivas->codec_mode = MODE2; } -- GitLab