From 5cbb65c43e962a3b2963eeb97a00af0a2e0d2595 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 25 Aug 2025 16:29:31 +0200 Subject: [PATCH 1/2] port CR --- lib_dec/ivas_core_dec_fx.c | 7 +--- lib_dec/ivas_cpe_dec_fx.c | 29 +++++++------- lib_enc/ivas_core_enc_fx.c | 2 +- lib_enc/ivas_cpe_enc_fx.c | 79 +++++++++++++++++++++++--------------- 4 files changed, 64 insertions(+), 53 deletions(-) diff --git a/lib_dec/ivas_core_dec_fx.c b/lib_dec/ivas_core_dec_fx.c index 4a9025ddd..2e9a10f1a 100644 --- a/lib_dec/ivas_core_dec_fx.c +++ b/lib_dec/ivas_core_dec_fx.c @@ -363,17 +363,14 @@ ivas_error ivas_core_dec_fx( move16(); } + save_hb_synth_32_fx = NULL; test(); test(); test(); - IF( sba_dirac_stereo_flag && hSCE && LE_32( sts[0]->total_brate, SID_2k40 ) && EQ_16( sts[0]->cng_type, FD_CNG ) ) + if ( sba_dirac_stereo_flag && hSCE && LE_32( sts[0]->total_brate, SID_2k40 ) && EQ_16( sts[0]->cng_type, FD_CNG ) ) { save_hb_synth_32_fx = hSCE->save_hb_synth_fx; } - ELSE - { - save_hb_synth_32_fx = NULL; - } /*------------------------------------------------------------------* * Decode SID for MDCT-Stereo DTX mode diff --git a/lib_dec/ivas_cpe_dec_fx.c b/lib_dec/ivas_cpe_dec_fx.c index f8d229540..d2a8faffa 100644 --- a/lib_dec/ivas_cpe_dec_fx.c +++ b/lib_dec/ivas_cpe_dec_fx.c @@ -74,6 +74,7 @@ ivas_error ivas_cpe_dec_fx( Word16 q_res_buf; Word32 res_buf_fx[STEREO_DFT_N_8k]; /* Q(q_res_buf) */ CPE_DEC_HANDLE hCPE; + STEREO_DFT_CONFIG_DATA_HANDLE hConfigDft; Decoder_State **sts; Word32 ivas_total_brate; ivas_error error; @@ -159,6 +160,12 @@ ivas_error ivas_cpe_dec_fx( } } + hConfigDft = NULL; + if ( hCPE->hStereoDft != NULL ) + { + hConfigDft = hCPE->hStereoDft->hConfig; + } + /*------------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ @@ -222,25 +229,16 @@ ivas_error ivas_cpe_dec_fx( test(); IF( NE_16( hCPE->element_mode, IVAS_CPE_MDCT ) && ( NE_32( hCPE->element_brate, hCPE->last_element_brate ) || NE_16( hCPE->last_element_mode, hCPE->element_mode ) || sts[0]->ini_frame == 0 || ( NE_32( ivas_total_brate, st_ivas->hDecoderConfig->last_ivas_total_brate ) ) ) ) { - STEREO_DFT_CONFIG_DATA_HANDLE hConfig; - IF( hCPE->hStereoDft == NULL ) - { - hConfig = NULL; - } - ELSE - { - hConfig = hCPE->hStereoDft->hConfig; - } test(); IF( st_ivas->hQMetaData != NULL && GT_32( ivas_total_brate, IVAS_SID_5k2 ) ) { IF( EQ_32( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) { - stereo_dft_config_fx( hConfig, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, 35 /* 0.7f * FRAMES_PER_SEC */ ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, 35 /* 0.7f * FRAMES_PER_SEC */ ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } ELSE { - stereo_dft_config_fx( hConfig, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } } ELSE @@ -248,11 +246,11 @@ ivas_error ivas_cpe_dec_fx( /* Note: This only works for stereo operation. If DTX would be applied for multiple CPEs a different bitrate signaling is needed */ IF( LE_32( ivas_total_brate, IVAS_SID_5k2 ) ) { - stereo_dft_config_fx( hConfig, ivas_total_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, ivas_total_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } ELSE { - stereo_dft_config_fx( hConfig, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } } } @@ -598,7 +596,7 @@ ivas_error ivas_cpe_dec_fx( test(); test(); - IF( NE_16( hCPE->element_mode, IVAS_CPE_DFT ) || ( EQ_16( hCPE->nchan_out, 1 ) && EQ_16( hCPE->hStereoDft->hConfig->res_cod_mode, STEREO_DFT_RES_COD_OFF ) ) ) + IF( NE_16( hCPE->element_mode, IVAS_CPE_DFT ) || ( EQ_16( hCPE->nchan_out, 1 ) && EQ_16( hConfigDft->res_cod_mode, STEREO_DFT_RES_COD_OFF ) ) ) { IF( NE_32( ( error = ivas_core_dec_fx( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB_fx, NULL, st_ivas->sba_dirac_stereo_flag ) ), IVAS_ERR_OK ) ) { @@ -616,9 +614,10 @@ ivas_error ivas_cpe_dec_fx( /*----------------------------------------------------------------* * Stereo decoder & upmixing *----------------------------------------------------------------*/ + test(); test(); - IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && !( EQ_16( hCPE->nchan_out, 1 ) && EQ_16( hCPE->hStereoDft->hConfig->res_cod_mode, STEREO_DFT_RES_COD_OFF ) ) ) + IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && !( EQ_16( hCPE->nchan_out, 1 ) && EQ_16( hConfigDft->res_cod_mode, STEREO_DFT_RES_COD_OFF ) ) ) { Word32 DFT_fx[CPE_CHANNELS][STEREO_DFT_BUF_MAX]; // q_dft set32_fx( DFT_fx[0], 0, STEREO_DFT_BUF_MAX ); diff --git a/lib_enc/ivas_core_enc_fx.c b/lib_enc/ivas_core_enc_fx.c index 6d6c55ae0..56be251c8 100644 --- a/lib_enc/ivas_core_enc_fx.c +++ b/lib_enc/ivas_core_enc_fx.c @@ -286,7 +286,7 @@ ivas_error ivas_core_enc_fx( test(); IF( hCPE != NULL && EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) && hCPE->brate_surplus > 0 ) { - ivas_combined_format_brate_sanity_fx( hCPE->element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &diff_nBits ); + ivas_combined_format_brate_sanity_fx( element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &diff_nBits ); } /*---------------------------------------------------------------------* diff --git a/lib_enc/ivas_cpe_enc_fx.c b/lib_enc/ivas_cpe_enc_fx.c index cab884050..f72500da5 100644 --- a/lib_enc/ivas_cpe_enc_fx.c +++ b/lib_enc/ivas_cpe_enc_fx.c @@ -51,13 +51,16 @@ /*--------------------------------------------------------------------------* * Local function prototypes *--------------------------------------------------------------------------*/ + static void stereo_mode_combined_format_enc_fx( const Encoder_Struct *st_ivas, CPE_ENC_HANDLE hCPE ); + /*-------------------------------------------------------------------* * ivas_cpe_enc() * * Channel Pair Element (CPE) encoding routine *-------------------------------------------------------------------*/ + ivas_error ivas_cpe_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const Word16 cpe_id, /* i : CPE # identifier Q0*/ @@ -69,15 +72,15 @@ ivas_error ivas_cpe_enc_fx( Word16 Q_new_out[] ) { CPE_ENC_HANDLE hCPE; + STEREO_DFT_CONFIG_DATA_HANDLE hConfigDft; Encoder_State **sts; Word16 n, n_CoreChannels; Word32 old_inp_12k8_fx[CPE_CHANNELS][L_INP_12k8]; /* buffer of input signal @ 12k8 Q15 */ Word16 old_inp_12k8_16fx[CPE_CHANNELS][L_INP_12k8]; /* buffer of input signal @ 12k8 Q_new-1 */ Word32 old_inp_16k_fx[CPE_CHANNELS][L_INP]; /* buffer of input signal @ 16kHz Q15 */ Word16 old_inp_16k_16fx[CPE_CHANNELS][L_INP]; /* buffer of input signal @ 16kHz Q_new-1 */ - Word16 Q_new[CPE_CHANNELS] = { 0 }; - Word16 fft_buff_fx[CPE_CHANNELS][2 * L_FFT]; /* FFT buffer */ - Word16 fft_buff_fx_q[CPE_CHANNELS]; /* FFT buffer */ + Word16 fft_buff_fx[CPE_CHANNELS][2 * L_FFT]; /* FFT buffer */ + Word16 fft_buff_fx_q[CPE_CHANNELS]; /* FFT buffer */ set16_fx( fft_buff_fx_q, 0, CPE_CHANNELS ); Word16 fft_buff_fx_final_q = MAX_16; move16(); @@ -104,13 +107,12 @@ ivas_error ivas_cpe_enc_fx( Word32 currFlatness_fx[CPE_CHANNELS]; /* flatness parameter Q21 */ Word16 tdm_ratio_idx, tdm_ratio_idx_SM; /* temp. TD stereo parameters */ Word16 tdm_SM_or_LRTD_Pri; /* temp. TD stereo parameters */ - - Word16 nb_bits; /* number of DFT stereo side bits */ - Word32 fr_bands_fx[CPE_CHANNELS][2 * NB_BANDS]; /* energy in frequency bands (Q_buffer + QSCALE) */ - Word16 Etot_LR_fx[CPE_CHANNELS]; /* total energy Q8 */ - Word32 lf_E_fx[CPE_CHANNELS][2 * VOIC_BINS]; /* per bin spectrum energy in lf (Q_buffer + QSCALE - 2) */ - Word16 localVAD_HE_SAD[CPE_CHANNELS]; /* HE-SAD flag without hangover, LR channels */ - Word32 band_energies_LR_fx[2 * NB_BANDS]; /* energy in critical bands without minimum noise floor E_MIN (Q_buffer + QSCALE - band_ener_guardbits) */ + Word16 nb_bits; /* number of DFT stereo side bits */ + Word32 fr_bands_fx[CPE_CHANNELS][2 * NB_BANDS]; /* energy in frequency bands (Q_buffer + QSCALE) */ + Word16 Etot_LR_fx[CPE_CHANNELS]; /* total energy Q8 */ + Word32 lf_E_fx[CPE_CHANNELS][2 * VOIC_BINS]; /* per bin spectrum energy in lf (Q_buffer + QSCALE - 2) */ + Word16 localVAD_HE_SAD[CPE_CHANNELS]; /* HE-SAD flag without hangover, LR channels */ + Word32 band_energies_LR_fx[2 * NB_BANDS]; /* energy in critical bands without minimum noise floor E_MIN (Q_buffer + QSCALE - band_ener_guardbits) */ Word16 Q_buffer[2]; Word16 orig_input_fx[CPE_CHANNELS][L_FRAME48k]; Word32 orig_input_fx32[CPE_CHANNELS][L_FRAME48k]; @@ -127,8 +129,9 @@ ivas_error ivas_cpe_enc_fx( Word16 last_bits_frame_nominal; /* last_bits_frame_nominal for M or PCh channel */ Word16 old_wsp_fx[CPE_CHANNELS][L_WSP]; Word16 e_old_wsp[CPE_CHANNELS], q_old_wsp; - move16(); // Q_new - move16(); // Q_new + Word16 Q_new[CPE_CHANNELS] = { 0 }; + move16(); + move16(); Word16 q_com, shift, q_min, gb; error = IVAS_ERR_OK; @@ -185,6 +188,7 @@ ivas_error ivas_cpe_enc_fx( set16_zero_fx( old_inp_12k8_16fx[i], L_INP_12k8 ); set_zero_fx( old_inp_12k8_fx[i], L_INP_12k8 ); } + /*------------------------------------------------------------------* * CPE initialization - core coder *-----------------------------------------------------------------*/ @@ -263,6 +267,7 @@ ivas_error ivas_cpe_enc_fx( * Stereo technology selection * Front-VAD on input L and R channels *----------------------------------------------------------------*/ + test(); IF( sts[0]->ini_frame > 0 && st_ivas->hMCT == NULL ) { @@ -367,11 +372,17 @@ ivas_error ivas_cpe_enc_fx( /*----------------------------------------------------------------* * dynamically allocate data structures depending on the actual stereo mode *----------------------------------------------------------------*/ + IF( ( error = stereo_memory_enc_fx( hCPE, input_Fs, max_bwidth, ivas_format, st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) { return error; } + hConfigDft = NULL; + IF( hCPE->hStereoDft != NULL ) + { + hConfigDft = hCPE->hStereoDft->hConfig; + } /*----------------------------------------------------------------* * Set TD stereo parameters @@ -386,6 +397,7 @@ ivas_error ivas_cpe_enc_fx( /*----------------------------------------------------------------* * Resets/updates in case of stereo switching *----------------------------------------------------------------*/ + test(); IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) && EQ_16( hCPE->last_element_mode, IVAS_CPE_DFT ) ) { @@ -416,6 +428,7 @@ ivas_error ivas_cpe_enc_fx( /*----------------------------------------------------------------* * Temporal inter-channel alignment, stereo adjustment *----------------------------------------------------------------*/ + shift = s_min( L_norm_arr( sts[0]->input_buff32_fx, L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ) ), L_norm_arr( sts[1]->input_buff32_fx, L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ) ) ); q_min = add( sts[0]->q_inp32, sub( shift, find_guarded_bits_fx( input_frame ) ) ); scale_sig32( sts[1]->input_buff32_fx, L_FRAME48k + L_FRAME48k + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), sub( q_min, sts[1]->q_inp32 ) ); /* q_min */ @@ -438,6 +451,7 @@ ivas_error ivas_cpe_enc_fx( move16(); move16(); move16(); + /*----------------------------------------------------------------* * Input signal buffering - needed in IC-BWE and TD ITD in MDCT stereo *----------------------------------------------------------------*/ @@ -513,32 +527,23 @@ ivas_error ivas_cpe_enc_fx( IF( NE_16( hCPE->element_mode, IVAS_CPE_MDCT ) && ( NE_32( hCPE->element_brate, hCPE->last_element_brate ) || NE_16( hCPE->last_element_mode, hCPE->element_mode ) || sts[0]->ini_frame == 0 || ( NE_32( ivas_total_brate, st_ivas->hEncoderConfig->last_ivas_total_brate ) ) || LE_32( sts[0]->last_core_brate, SID_2k40 ) ) ) /* If the last frame was SID or NO_DATA, we need to run stereo_dft_config here since VAD decision is not known yet */ { - STEREO_DFT_CONFIG_DATA_HANDLE hConfig; - IF( hCPE->hStereoDft == NULL ) - { - hConfig = NULL; - } - ELSE - { - hConfig = hCPE->hStereoDft->hConfig; - } IF( st_ivas->hQMetaData != NULL ) { test(); /* No Basop - st_ivas->ism_mode != ISM_MODE_NONE as comparison with 0 */ IF( EQ_16( ivas_format, MASA_ISM_FORMAT ) && st_ivas->ism_mode != ISM_MODE_NONE ) { - stereo_dft_config_fx( hConfig, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, 35 /* 0.70f * FRAMES_PER_SEC */ ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, 35 /* 0.70f * FRAMES_PER_SEC */ ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } ELSE { - stereo_dft_config_fx( hConfig, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, L_mult0( st_ivas->hQMetaData->bits_frame_nominal, FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } } ELSE { /* note; "bits_frame_nominal" needed in TD stereo as well */ - stereo_dft_config_fx( hConfig, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } } @@ -631,6 +636,7 @@ ivas_error ivas_cpe_enc_fx( * Stereo processing * Stereo down-mix *----------------------------------------------------------------*/ + IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) ) { test(); @@ -677,17 +683,18 @@ ivas_error ivas_cpe_enc_fx( hCPE->q_input_mem[n] = q_com; move16(); } - stereo_dft_hybrid_ITD_flag_fx( hCPE->hStereoDft->hConfig, input_Fs, hCPE->hStereoDft->hItd->hybrid_itd_max ); + + stereo_dft_hybrid_ITD_flag_fx( hConfigDft, input_Fs, hCPE->hStereoDft->hItd->hybrid_itd_max ); /* Time Domain ITD compensation using extrapolation */ - stereo_td_itd_fx( hCPE->hStereoDft->hItd, hCPE->hStereoDft->input_mem_itd_fx, hCPE->hStereoDft->q_input_mem_itd, hCPE->hStereoDft->hConfig->hybrid_itd_flag, hCPE->hStereoDft->dft_ovl, sts, input_frame, hCPE->input_mem_fx, hCPE->q_input_mem ); + stereo_td_itd_fx( hCPE->hStereoDft->hItd, hCPE->hStereoDft->input_mem_itd_fx, hCPE->hStereoDft->q_input_mem_itd, hConfigDft->hybrid_itd_flag, hCPE->hStereoDft->dft_ovl, sts, input_frame, hCPE->input_mem_fx, hCPE->q_input_mem ); stereo_dft_enc_analyze_fx( sts, CPE_CHANNELS, input_frame, hCPE->hStereoDft, NULL, hCPE->hStereoDft->DFT_fx, hCPE->hStereoDft->DFT_fx_e, hCPE->input_mem_fx, hCPE->q_input_mem ); sts[0]->total_brate = L_mult0( add( sts[0]->bits_frame_nominal, 10 ), FRAMES_PER_SEC ); /* add small overhead; st[0]->total_brate used in coder_type_modif() Q0*/ /* Update DFT Stereo memories */ - stereo_dft_enc_update_fx( hCPE->hStereoDft, sts[0]->max_bwidth ); + stereo_dft_enc_update_fx( hCPE->hStereoDft, max_bwidth ); /* DFT stereo processing */ stereo_dft_enc_process_fx( hCPE, vad_flag_dtx, vad_hover_flag, input_frame ); @@ -796,6 +803,7 @@ ivas_error ivas_cpe_enc_fx( /*----------------------------------------------------------------* * DFT stereo: iDFT and resampling on both channels *----------------------------------------------------------------*/ + IF( EQ_16( hCPE->element_mode, IVAS_CPE_DFT ) ) { Word32 internal_Fs; @@ -889,6 +897,7 @@ ivas_error ivas_cpe_enc_fx( /*----------------------------------------------------------------* * Front Pre-processing *----------------------------------------------------------------*/ + FOR( n = 0; n < n_CoreChannels; n++ ) { set16_fx( old_wsp_fx[n], 0, L_WSP ); @@ -949,6 +958,7 @@ ivas_error ivas_cpe_enc_fx( /*----------------------------------------------------------------* * Stereo DTX updates *----------------------------------------------------------------*/ + test(); test(); IF( EQ_16( ivas_format, MASA_FORMAT ) && nb_bits_metadata > 0 && hCPE->hCoreCoder[0]->Opt_DTX_ON ) @@ -988,7 +998,7 @@ ivas_error ivas_cpe_enc_fx( test(); test(); test(); - IF( sts[0]->bwidth != sts[0]->last_bwidth || ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->last_element_mode != hCPE->element_mode ) && sts[0]->bwidth != sts[0]->max_bwidth ) ) + IF( sts[0]->bwidth != sts[0]->last_bwidth || ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->last_element_mode != hCPE->element_mode ) && sts[0]->bwidth != max_bwidth ) ) { initMdctStereoEncData_fx( hCPE->hStereoMdct, ivas_format, hCPE->element_mode, hCPE->element_brate, sts[0]->bwidth, 0, NULL, 0 ); @@ -1023,13 +1033,13 @@ ivas_error ivas_cpe_enc_fx( Word16 bw; /* float uses ternary operator for this: bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : sts[n]->max_bwidth; */ - bw = sts[n]->max_bwidth; + bw = max_bwidth; IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) ) { bw = sts[n]->bwidth; } igf = getIgfPresent_fx( sts[n]->element_mode, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->rf_mode ); /* Q0 */ - IF( ( error = IGF_Reconfig_fx( &sts[n]->hIGFEnc, igf, 0, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) + IF( ( error = IGF_Reconfig_fx( &sts[n]->hIGFEnc, igf, 0, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) { return error; } @@ -1117,11 +1127,11 @@ ivas_error ivas_cpe_enc_fx( /* Reconfigure DFT Stereo for inactive frames */ IF( EQ_32( sts[0]->core_brate, SID_2k40 ) ) { - stereo_dft_config_fx( hCPE->hStereoDft->hConfig, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } ELSE { - stereo_dft_config_fx( hCPE->hStereoDft->hConfig, FRAME_NO_DATA, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); + stereo_dft_config_fx( hConfigDft, FRAME_NO_DATA, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal ); } stereo_dft_cng_side_gain_fx( hCPE->hStereoDft, hCPE->hStereoCng, sts[0]->core_brate, sts[0]->last_core_brate, sts[0]->bwidth ); @@ -1306,11 +1316,13 @@ ivas_error ivas_cpe_enc_fx( return error; } + /*------------------------------------------------------------------------- * create_cpe_enc() * * Create, allocate and initialize IVAS encoder CPE handle *-------------------------------------------------------------------------*/ + ivas_error create_cpe_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const Word16 cpe_id, /* i : CPE # identifier Q0*/ @@ -1612,6 +1624,8 @@ ivas_error create_cpe_enc_fx( return error; } + + /*------------------------------------------------------------------------- * destroy_cpe_enc() * @@ -1767,5 +1781,6 @@ static void stereo_mode_combined_format_enc_fx( } } } + return; } -- GitLab From 34be7ea2ee27610ad43254a607502ff027690869 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 25 Aug 2025 16:33:41 +0200 Subject: [PATCH 2/2] port CR --- lib_dec/ivas_core_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_core_dec_fx.c b/lib_dec/ivas_core_dec_fx.c index 2e9a10f1a..1569cc1f2 100644 --- a/lib_dec/ivas_core_dec_fx.c +++ b/lib_dec/ivas_core_dec_fx.c @@ -1460,7 +1460,7 @@ ivas_error ivas_core_dec_fx( *--------------------------------------------------------*/ Word16 exp_max; - Word32 output_fx_loc[L_FRAME48k]; + Word32 *output_fx_loc = synth_32_fx[0]; exp_max = 0; move16(); -- GitLab