Skip to content
Commits on Source (11)
......@@ -3735,8 +3735,13 @@ void ivas_dirac_dec_render_sf(
Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */
float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */
const int16_t nchan_transport, /* i : number of transport channels */
#ifdef FIX_1319_STACK_SBA_DECODER
float *pppQMfFrame_ts_re[HOA3_CHANNELS][CLDFB_NO_COL_MAX],
float *pppQMfFrame_ts_im[HOA3_CHANNELS][CLDFB_NO_COL_MAX]
#else
float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX],
float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX]
#endif
);
void computeDiffuseness_mdft(
......
......@@ -159,11 +159,12 @@
#define FIX_1129_EXT_REND_OUTPUT_HIGH /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */
#define FIX_1113_CLDFB_REND_IN_ISAR /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */
#define NONBE_1328_FIX_NON_LINEARITY /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0 */
#define FIX_CREND_SIMPLIFY_CODE
#ifdef FIX_CREND_SIMPLIFY_CODE
#define FIX_989_TD_REND_ROM /* Eri: Clean-up for TD renderer and completion of ROM generation tool */
#endif
#define NONBE_1328_FIX_NON_LINEARITY /* VA: Fix possible issue when computing bwe_exc_extended and previous frame were almost 0 */
#define FIX_1319_STACK_SBA_DECODER /* VA: issue 1319: Optimize the definition of buffer lengths in the SBA decoder */
/* #################### End BASOP porting switches ############################ */
/* clang-format on */
......
......@@ -5863,7 +5863,6 @@ ivas_error core_switching_post_dec(
float *synth, /* i/o: output synthesis */
float *output, /* i/o: LB synth/upsampled LB synth */
float output_mem[], /* i : OLA memory from last TCX/HQ frame */
const IVAS_FORMAT ivas_format, /* i : IVAS format */
const int16_t use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */
const int16_t output_frame, /* i : frame length */
const int16_t core_switching_flag, /* i : ACELP->HQ switching frame flag */
......
......@@ -557,7 +557,6 @@ ivas_error core_switching_post_dec(
float *synth, /* i/o: output synthesis */
float *output, /* i/o: LB synth/upsampled LB synth */
float output_mem[], /* i : OLA memory from last TCX/HQ frame */
const IVAS_FORMAT ivas_format, /* i : IVAS format */
const int16_t use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */
const int16_t output_frame, /* i : frame length */
const int16_t core_switching_flag, /* i : ACELP->HQ switching flag */
......@@ -679,7 +678,7 @@ ivas_error core_switching_post_dec(
synth[i + delay_comp] = ( synth[i + delay_comp] * i + ( tmpDelta - i ) * st->previoussynth[i + delay_comp] ) / tmpDelta;
}
if ( ( st->element_mode == IVAS_CPE_MDCT || ( ivas_format == ISM_FORMAT && st->core == TCX_20_CORE /* <- means TCX in general, TCX10 is forbidden after ACELP */ ) ) && st->last_core_brate <= SID_2k40 && st->core_brate > SID_2k40 )
if ( ( st->element_mode == IVAS_CPE_MDCT || ( st->is_ism_format && st->core == TCX_20_CORE /* <- means TCX in general, TCX10 is forbidden after ACELP */ ) ) && st->last_core_brate <= SID_2k40 && st->core_brate > SID_2k40 )
{
/* smooth transitions to avoid pops in car noise items */
smoothTransitionDtxToTcx( synth, output_frame, delay_comp );
......
......@@ -274,7 +274,7 @@ ivas_error evs_dec(
* Postprocessing for ACELP/MDCT core switching
*---------------------------------------------------------------------*/
if ( ( error = core_switching_post_dec( st, synth, NULL, NULL, 0, MONO_FORMAT, output_frame, core_switching_flag, 0, -1, EVS_MONO ) ) != IVAS_ERR_OK )
if ( ( error = core_switching_post_dec( st, synth, NULL, NULL, 0, output_frame, core_switching_flag, 0, -1, EVS_MONO ) ) != IVAS_ERR_OK )
{
return error;
}
......
......@@ -70,6 +70,7 @@ ivas_error ivas_core_dec(
Decoder_State **sts, *st;
STEREO_ICBWE_DEC_HANDLE hStereoICBWE;
STEREO_TD_DEC_DATA_HANDLE hStereoTD;
STEREO_CNG_DEC_HANDLE hStereoCng;
int16_t sharpFlag[CPE_CHANNELS];
float synth[CPE_CHANNELS][L_FRAME48k];
float tmp_buffer[L_FRAME48k];
......@@ -116,6 +117,7 @@ ivas_error ivas_core_dec(
last_element_mode = IVAS_SCE;
hStereoTD = NULL;
p_output_mem = NULL;
hStereoCng = NULL;
nchan_out = 1;
if ( st_ivas != NULL && st_ivas->ivas_format == ISM_FORMAT )
{
......@@ -133,6 +135,7 @@ ivas_error ivas_core_dec(
last_element_mode = hCPE->last_element_mode;
hStereoICBWE = hCPE->hStereoICBWE;
hStereoTD = hCPE->hStereoTD;
hStereoCng = hCPE->hStereoCng;
p_output_mem = hCPE->output_mem[1];
nchan_out = hCPE->nchan_out;
......@@ -243,19 +246,16 @@ ivas_error ivas_core_dec(
}
}
if ( hCPE != NULL && hCPE->hStereoCng != NULL )
if ( hStereoCng != NULL )
{
hCPE->hStereoCng->flag_cna_fade = 0;
hStereoCng->flag_cna_fade = 0;
}
save_hb_synth = NULL;
if ( sba_dirac_stereo_flag && hSCE && sts[0]->total_brate <= SID_2k40 && sts[0]->cng_type == FD_CNG )
{
save_hb_synth = hSCE->save_hb_synth;
}
else
{
save_hb_synth = NULL;
}
/*------------------------------------------------------------------*
* Decode SID for MDCT-Stereo DTX mode
......@@ -279,7 +279,7 @@ ivas_error ivas_core_dec(
if ( hCPE != NULL && hCPE->element_mode == IVAS_CPE_DFT && hCPE->brate_surplus > 0 )
{
ivas_combined_format_brate_sanity( hCPE->element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &tmps );
ivas_combined_format_brate_sanity( element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &tmps );
}
/*------------------------------------------------------------------*
......@@ -348,7 +348,7 @@ ivas_error ivas_core_dec(
if ( st->core == ACELP_CORE )
{
/* ACELP core decoder */
if ( ( error = acelp_core_dec( st, output[n], synth[n], save_hb_synth, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], sharpFlag[n], pitch_buf[n], &unbits[n], &sid_bw[n], hStereoTD, tdm_lsfQ_PCh, use_cldfb_for_dft, last_element_mode, last_element_brate, flag_sec_CNA, nchan_out, hCPE == NULL ? NULL : hCPE->hStereoCng, read_sid_info ) ) != IVAS_ERR_OK )
if ( ( error = acelp_core_dec( st, output[n], synth[n], save_hb_synth, bwe_exc_extended[n], voice_factors[n], old_syn_12k8_16k[n], sharpFlag[n], pitch_buf[n], &unbits[n], &sid_bw[n], hStereoTD, tdm_lsfQ_PCh, use_cldfb_for_dft, last_element_mode, last_element_brate, flag_sec_CNA, nchan_out, hStereoCng, read_sid_info ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -357,7 +357,7 @@ ivas_error ivas_core_dec(
if ( ( st->core == TCX_20_CORE || st->core == TCX_10_CORE ) && st->element_mode != IVAS_CPE_MDCT )
{
/* TCX decoder */
stereo_tcx_core_dec( st, frameMode[n], output[n], synth[n], pitch_buf[n], sba_dirac_stereo_flag, hStereoTD, last_element_mode, flag_sec_CNA, hCPE == NULL ? NULL : hCPE->hStereoCng, nchan_out, st_ivas == NULL ? 0 : st_ivas->ivas_format );
stereo_tcx_core_dec( st, frameMode[n], output[n], synth[n], pitch_buf[n], sba_dirac_stereo_flag, hStereoTD, last_element_mode, flag_sec_CNA, hStereoCng, nchan_out, st_ivas == NULL ? 0 : st_ivas->ivas_format );
}
if ( st->core == HQ_CORE )
......@@ -420,9 +420,9 @@ ivas_error ivas_core_dec(
* Stereo CNG updates
*---------------------------------------------------------------------*/
if ( sts[0]->element_mode == IVAS_CPE_TD && hCPE->hStereoCng != NULL )
if ( sts[0]->element_mode == IVAS_CPE_TD && hStereoCng != NULL )
{
stereo_cng_compute_PScorr( output, &hCPE->hStereoCng->c_PS_LT, sts[0]->L_frame, sts[1]->L_frame );
stereo_cng_compute_PScorr( output, &hStereoCng->c_PS_LT, sts[0]->L_frame, sts[1]->L_frame );
}
/*---------------------------------------------------------------------*
......@@ -462,7 +462,7 @@ ivas_error ivas_core_dec(
mvr2r( synth[n], hSCE->save_synth, output_frame );
}
if ( ( error = core_switching_post_dec( st, synth[n], output[n], p_output_mem, ( st_ivas != NULL ) ? st_ivas->ivas_format : UNDEFINED_FORMAT, use_cldfb_for_dft, output_frame, 0 /*core_switching_flag*/, sba_dirac_stereo_flag, nchan_out, ( hCPE != NULL ) ? hCPE->last_element_mode : IVAS_SCE ) ) != IVAS_ERR_OK )
if ( ( error = core_switching_post_dec( st, synth[n], output[n], p_output_mem, use_cldfb_for_dft, output_frame, 0 /*core_switching_flag*/, sba_dirac_stereo_flag, nchan_out, ( hCPE != NULL ) ? hCPE->last_element_mode : IVAS_SCE ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -474,7 +474,7 @@ ivas_error ivas_core_dec(
}
/* if we transition from inactive to active coding in MDCT-Stereo DTX and the output format is mono DMX, we need to sync the upsampled buffer between channels here */
if ( n == 0 && st->element_mode == IVAS_CPE_MDCT && st->last_core == ACELP_CORE && st->core != ACELP_CORE && ( nchan_out == 1 || ( hCPE != NULL && hCPE->last_element_mode == IVAS_CPE_DFT ) ) )
if ( n == 0 && st->element_mode == IVAS_CPE_MDCT && st->last_core == ACELP_CORE && st->core != ACELP_CORE && ( nchan_out == 1 || last_element_mode == IVAS_CPE_DFT ) )
{
mvr2r( sts[0]->previoussynth, sts[1]->previoussynth, st->hTcxDec->L_frameTCX );
}
......@@ -649,7 +649,7 @@ ivas_error ivas_core_dec(
mvr2r( tmp_buffer, st->hb_prev_synth_buffer, tmps );
}
if ( ( st->element_mode != IVAS_CPE_TD && !use_cldfb_for_dft ) || ( hCPE->element_mode == IVAS_CPE_TD && tdm_LRTD_flag ) )
if ( ( st->element_mode != IVAS_CPE_TD && !use_cldfb_for_dft ) || ( st->element_mode == IVAS_CPE_TD && tdm_LRTD_flag ) )
{
/* Delay hb_synth */
delay_signal( hb_synth[n], output_frame, st->hb_prev_synth_buffer, tmps );
......@@ -702,7 +702,7 @@ ivas_error ivas_core_dec(
}
else /* IVAS_CPE_DFT */
{
if ( hCPE->last_element_mode == IVAS_CPE_MDCT )
if ( last_element_mode == IVAS_CPE_MDCT )
{
stereo_mdct2dft_update( hCPE, output[0], synth[0] );
}
......
......@@ -76,6 +76,7 @@ ivas_error ivas_cpe_dec(
float outputHB[CPE_CHANNELS][L_FRAME48k]; /* 'float' buffer for output HB synthesis, both channels */
float res_buf[STEREO_DFT_N_8k];
CPE_DEC_HANDLE hCPE;
STEREO_DFT_CONFIG_DATA_HANDLE hConfigDft;
Decoder_State **sts;
int32_t ivas_total_brate;
ivas_error error;
......@@ -116,6 +117,12 @@ ivas_error ivas_cpe_dec(
return error;
}
hConfigDft = NULL;
if ( hCPE->hStereoDft != NULL )
{
hConfigDft = hCPE->hStereoDft->hConfig;
}
/*------------------------------------------------------------------*
* Initialization
*-----------------------------------------------------------------*/
......@@ -172,11 +179,11 @@ ivas_error ivas_cpe_dec(
{
if ( st_ivas->ivas_format == MASA_ISM_FORMAT )
{
stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, (int32_t) ( 0.7f * st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, (int32_t) ( 0.7f * st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
else
{
stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
}
else
......@@ -184,11 +191,11 @@ ivas_error ivas_cpe_dec(
/* Note: This only works for stereo operation. If DTX would be applied for multiple CPEs a different bitrate signaling is needed */
if ( ivas_total_brate <= IVAS_SID_5k2 )
{
stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, ivas_total_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, ivas_total_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
else
{
stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
}
}
......@@ -419,7 +426,7 @@ ivas_error ivas_cpe_dec(
* Core Decoder
*----------------------------------------------------------------*/
if ( hCPE->element_mode != IVAS_CPE_DFT || ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) )
if ( hCPE->element_mode != IVAS_CPE_DFT || ( hCPE->nchan_out == 1 && hConfigDft->res_cod_mode == STEREO_DFT_RES_COD_OFF ) )
{
if ( ( error = ivas_core_dec( st_ivas, NULL, hCPE, st_ivas->hMCT, n_channels, output, outputHB, NULL, st_ivas->sba_dirac_stereo_flag ) ) != IVAS_ERR_OK )
{
......@@ -438,7 +445,7 @@ ivas_error ivas_cpe_dec(
* Stereo decoder & upmixing
*----------------------------------------------------------------*/
if ( hCPE->element_mode == IVAS_CPE_DFT && !( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) )
if ( hCPE->element_mode == IVAS_CPE_DFT && !( hCPE->nchan_out == 1 && hConfigDft->res_cod_mode == STEREO_DFT_RES_COD_OFF ) )
{
float DFT[CPE_CHANNELS][STEREO_DFT_BUF_MAX];
......
......@@ -1621,6 +1621,82 @@ void ivas_dirac_dec_render(
}
#ifdef FIX_1319_STACK_SBA_DECODER
/*-------------------------------------------------------------------------
* Local functions to perform binaural rendering with optimized stack
*------------------------------------------------------------------------*/
static void binRenderer_split(
BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */
ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE hSplitBinRend, /* i/o: ISAR split binaural rendering handle */
COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle */
const int16_t numTimeSlots, /* i : number of time slots to render */
float Cldfb_RealBuffer_Binaural[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */
float Cldfb_ImagBuffer_Binaural[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */
float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */
float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */
const int16_t slot_idx_start,
const int16_t num_freq_bands,
const int16_t nchan_out )
{
int16_t pos_idx, slot_idx, ch;
float Cldfb_RealBuffer_Binaural_loc[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer_Binaural_loc[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
/* Perform binaural rendering */
ivas_binRenderer( hBinRenderer, &hSplitBinRend->splitrend.multiBinPoseData, hCombinedOrientationData, numTimeSlots,
#ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG
NULL,
#endif
Cldfb_RealBuffer_Binaural_loc, Cldfb_ImagBuffer_Binaural_loc, RealBuffer, ImagBuffer );
for ( slot_idx = 0; slot_idx < numTimeSlots; slot_idx++ )
{
for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ )
{
mvr2r( Cldfb_RealBuffer_Binaural_loc[0][ch][slot_idx], Cldfb_RealBuffer_Binaural[0][ch][slot_idx], num_freq_bands );
mvr2r( Cldfb_ImagBuffer_Binaural_loc[0][ch][slot_idx], Cldfb_ImagBuffer_Binaural[0][ch][slot_idx], num_freq_bands );
}
}
for ( pos_idx = 0; pos_idx < hBinRenderer->numPoses; pos_idx++ )
{
for ( slot_idx = 0; slot_idx < numTimeSlots; slot_idx++ )
{
for ( ch = 0; ch < nchan_out; ch++ )
{
mvr2r( Cldfb_RealBuffer_Binaural_loc[pos_idx][ch][slot_idx], hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_idx_start + slot_idx], num_freq_bands );
mvr2r( Cldfb_ImagBuffer_Binaural_loc[pos_idx][ch][slot_idx], hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_idx_start + slot_idx], num_freq_bands );
}
}
}
return;
}
static void binRenderer(
BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */
COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined head and external orientation handle */
const int16_t numTimeSlots, /* i : number of time slots to render */
float Cldfb_RealBuffer_Binaural[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */
float Cldfb_ImagBuffer_Binaural[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */
float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */
float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX] /* i : LS signals */
)
{
/* Perform binaural rendering */
ivas_binRenderer( hBinRenderer, NULL, hCombinedOrientationData, numTimeSlots,
#ifdef SPLIT_REND_WITH_HEAD_ROT_DEBUG
NULL,
#endif
Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, RealBuffer, ImagBuffer );
return;
}
#endif
/*-------------------------------------------------------------------------
* ivas_dirac_dec_render_sf()
*
......@@ -1631,8 +1707,14 @@ void ivas_dirac_dec_render_sf(
Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */
float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */
const int16_t nchan_transport, /* i : number of transport channels */
#ifdef FIX_1319_STACK_SBA_DECODER
float *pppQMfFrame_ts_re[HOA3_CHANNELS][CLDFB_NO_COL_MAX],
float *pppQMfFrame_ts_im[HOA3_CHANNELS][CLDFB_NO_COL_MAX]
#else
float *pppQMfFrame_ts_re[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX],
float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX] )
float *pppQMfFrame_ts_im[IVAS_MAX_FB_MIXER_IN_CH][CLDFB_NO_COL_MAX]
#endif
)
{
int16_t i, ch, idx_in, idx_lfe;
DIRAC_DEC_HANDLE hDirAC;
......@@ -1647,12 +1729,19 @@ void ivas_dirac_dec_render_sf(
int16_t slot_idx_start, slot_idx_start_cldfb_synth, md_idx;
/*CLDFB: last output channels reserved to LFT for CICPx*/
#ifdef FIX_1319_STACK_SBA_DECODER
float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
float Cldfb_RealBuffer_Binaural[1][BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer_Binaural[1][BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
#else
float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX];
float Cldfb_RealBuffer_Temp[2][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
float Cldfb_ImagBuffer_Temp[2][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
#endif
int16_t index, num_freq_bands;
/* local copies of azi, ele, diffuseness */
......@@ -1829,17 +1918,29 @@ void ivas_dirac_dec_render_sf(
/* CLDFB Analysis*/
for ( ch = 0; ch < nchan_transport; ch++ )
{
#ifdef FIX_1319_STACK_SBA_DECODER
cldfbAnalysis_ts( &( st_ivas->hTcBuffer->tc[hDirACRend->sba_map_tc[ch]][hSpatParamRendCom->num_freq_bands * index_slot] ),
Cldfb_RealBuffer_Binaural[0][ch][slot_idx], /* note: it is a tmp. buffer at this point */
Cldfb_ImagBuffer_Binaural[0][ch][slot_idx], /* note: it is a tmp. buffer at this point */
hSpatParamRendCom->num_freq_bands,
st_ivas->cldfbAnaDec[ch] );
#else
cldfbAnalysis_ts( &( st_ivas->hTcBuffer->tc[hDirACRend->sba_map_tc[ch]][hSpatParamRendCom->num_freq_bands * index_slot] ),
Cldfb_RealBuffer_Temp[ch][slot_idx],
Cldfb_ImagBuffer_Temp[ch][slot_idx],
hSpatParamRendCom->num_freq_bands,
st_ivas->cldfbAnaDec[ch] );
#endif
}
}
if ( st_ivas->ism_mode != ISM_MASA_MODE_DISC && st_ivas->ism_mode != ISM_MASA_MODE_MASA_ONE_OBJ )
{
#ifdef FIX_1319_STACK_SBA_DECODER
ivas_omasa_preProcessStereoTransportsForMovedObjects( st_ivas, Cldfb_RealBuffer_Binaural[0], Cldfb_ImagBuffer_Binaural[0], hSpatParamRendCom->num_freq_bands, subframe_idx );
#else
ivas_omasa_preProcessStereoTransportsForMovedObjects( st_ivas, Cldfb_RealBuffer_Temp, Cldfb_ImagBuffer_Temp, hSpatParamRendCom->num_freq_bands, subframe_idx );
#endif
}
}
......@@ -1866,8 +1967,13 @@ void ivas_dirac_dec_render_sf(
{
for ( ch = 0; ch < nchan_transport; ch++ )
{
#ifdef FIX_1319_STACK_SBA_DECODER
mvr2r( Cldfb_RealBuffer_Binaural[0][ch][slot_idx], Cldfb_RealBuffer[ch][0], hSpatParamRendCom->num_freq_bands );
mvr2r( Cldfb_ImagBuffer_Binaural[0][ch][slot_idx], Cldfb_ImagBuffer[ch][0], hSpatParamRendCom->num_freq_bands );
#else
mvr2r( Cldfb_RealBuffer_Temp[ch][slot_idx], Cldfb_RealBuffer[ch][0], hSpatParamRendCom->num_freq_bands );
mvr2r( Cldfb_ImagBuffer_Temp[ch][slot_idx], Cldfb_ImagBuffer[ch][0], hSpatParamRendCom->num_freq_bands );
#endif
}
}
else
......@@ -2309,6 +2415,20 @@ void ivas_dirac_dec_render_sf(
}
}
#ifdef FIX_1319_STACK_SBA_DECODER
/* Perform binaural rendering */
if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
{
binRenderer_split( st_ivas->hBinRenderer, st_ivas->hSplitBinRend, st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx],
Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer, slot_idx_start, hSpatParamRendCom->num_freq_bands, st_ivas->hDecoderConfig->nchan_out );
}
else
{
binRenderer( st_ivas->hBinRenderer, st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx],
Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer );
}
#else
/* Perform binaural rendering */
ivas_binRenderer( st_ivas->hBinRenderer, ( st_ivas->hSplitBinRend == NULL ) ? NULL : &st_ivas->hSplitBinRend->splitrend.multiBinPoseData,
st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx],
......@@ -2331,13 +2451,19 @@ void ivas_dirac_dec_render_sf(
}
}
}
#endif
/* Inverse CLDFB*/
for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ )
{
/* open CLDFB buffer up to CLDFB_NO_CHANNELS_MAX bands for 48kHz */
#ifdef FIX_1319_STACK_SBA_DECODER
float *RealBuffer[CLDFB_SLOTS_PER_SUBFRAME];
float *ImagBuffer[CLDFB_SLOTS_PER_SUBFRAME];
#else
float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES];
float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES];
#endif
for ( i = 0; i < hSpatParamRendCom->subframe_nbslots[subframe_idx]; i++ )
{
......@@ -2361,8 +2487,13 @@ void ivas_dirac_dec_render_sf(
}
else
{
#ifdef FIX_1319_STACK_SBA_DECODER
float *RealBuffer[CLDFB_SLOTS_PER_SUBFRAME];
float *ImagBuffer[CLDFB_SLOTS_PER_SUBFRAME];
#else
float *RealBuffer[MAX_PARAM_SPATIAL_SUBFRAMES];
float *ImagBuffer[MAX_PARAM_SPATIAL_SUBFRAMES];
#endif
int16_t outchannels;
idx_in = 0;
......
......@@ -260,7 +260,7 @@ ivas_error ivas_mct_dec(
}
/* Postprocessing for ACELP/MDCT core switching and synchronization */
if ( ( error = core_switching_post_dec( sts[n], synth[n], output[cpe_id * CPE_CHANNELS + n], hCPE->output_mem[1], st_ivas->ivas_format, 0, output_frame, 0 /*core_switching_flag*/, ( st_ivas->ivas_format != SBA_ISM_FORMAT || cpe_id >= nCPE - 2 ) ? st_ivas->sba_dirac_stereo_flag : 0, -1, hCPE->last_element_mode ) ) != IVAS_ERR_OK )
if ( ( error = core_switching_post_dec( sts[n], synth[n], output[cpe_id * CPE_CHANNELS + n], hCPE->output_mem[1], 0, output_frame, 0 /*core_switching_flag*/, ( st_ivas->ivas_format != SBA_ISM_FORMAT || cpe_id >= nCPE - 2 ) ? st_ivas->sba_dirac_stereo_flag : 0, -1, hCPE->last_element_mode ) ) != IVAS_ERR_OK )
{
return error;
}
......
......@@ -1376,15 +1376,28 @@ void ivas_spar_dec_upmixer_sf(
)
{
int16_t cldfb_band, num_cldfb_bands, numch_in, numch_out;
#ifdef FIX_1319_STACK_SBA_DECODER
float *cldfb_in_ts_re[HOA3_CHANNELS][CLDFB_NO_COL_MAX];
float *cldfb_in_ts_im[HOA3_CHANNELS][CLDFB_NO_COL_MAX];
#else
float *cldfb_in_ts_re[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][CLDFB_NO_COL_MAX];
float *cldfb_in_ts_im[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][CLDFB_NO_COL_MAX];
#endif
int16_t i, b, ts, out_ch, in_ch;
int16_t num_spar_bands, spar_band, nchan_transport;
int16_t num_in_ingest, split_band;
int16_t slot_size, slot_idx_start;
#ifdef FIX_1319_STACK_SBA_DECODER
float *p_tc[HOA3_CHANNELS];
#else
float *p_tc[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS];
#endif
int16_t md_idx;
#ifdef FIX_1319_STACK_SBA_DECODER
float Pcm_tmp[HOA3_CHANNELS][2 /* Re, Im*/ * L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES];
#else
float Pcm_tmp[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS][L_FRAME48k];
#endif
int16_t numch_out_dirac;
float mixer_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH][IVAS_MAX_NUM_BANDS];
int16_t b_skip_mat[IVAS_SPAR_MAX_CH][IVAS_SPAR_MAX_CH];
......@@ -1499,7 +1512,11 @@ void ivas_spar_dec_upmixer_sf(
if ( hDecoderConfig->output_config != IVAS_AUDIO_CONFIG_FOA )
{
/* at this point, output channels are used as intermediate procesing buffers */
#ifdef FIX_1319_STACK_SBA_DECODER
for ( in_ch = 0; in_ch < HOA3_CHANNELS; in_ch++ )
#else
for ( in_ch = 0; in_ch < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; in_ch++ )
#endif
{
for ( ts = 0; ts < MAX_PARAM_SPATIAL_SUBFRAMES; ts++ )
{
......
......@@ -4214,6 +4214,11 @@ static void ivas_destroy_handle_isar(
{
free( ( *hSplitBinRend )->hCldfbDataOut );
( *hSplitBinRend )->hCldfbDataOut = NULL;
#ifdef FIX_1319_STACK_SBA_DECODER
free( ( *hSplitBinRend ) );
( *hSplitBinRend ) = NULL;
#endif
}
}
......
......@@ -194,7 +194,7 @@ ivas_error ivas_core_enc(
diff_nBits = 0;
if ( hCPE != NULL && hCPE->element_mode == IVAS_CPE_DFT && hCPE->brate_surplus > 0 )
{
ivas_combined_format_brate_sanity( 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( element_brate, sts[0]->core, sts[0]->total_brate, &( sts[0]->core_brate ), &( sts[0]->inactive_coder_type_flag ), &diff_nBits );
}
/*---------------------------------------------------------------------*
......
......@@ -68,6 +68,7 @@ ivas_error ivas_cpe_enc(
)
{
CPE_ENC_HANDLE hCPE;
STEREO_DFT_CONFIG_DATA_HANDLE hConfigDft;
Encoder_State **sts;
int16_t n, n_CoreChannels;
float old_inp_12k8[CPE_CHANNELS][L_INP_12k8]; /* buffer of input signal @ 12k8 */
......@@ -222,6 +223,11 @@ ivas_error ivas_cpe_enc(
return error;
}
hConfigDft = NULL;
if ( hCPE->hStereoDft != NULL )
{
hConfigDft = hCPE->hStereoDft->hConfig;
}
/*----------------------------------------------------------------*
* Set TD stereo parameters
......@@ -295,25 +301,24 @@ ivas_error ivas_cpe_enc(
sts[n]->element_mode = hCPE->element_mode;
}
if ( hCPE->element_mode != IVAS_CPE_MDCT && ( hCPE->element_brate != hCPE->last_element_brate || hCPE->last_element_mode != hCPE->element_mode || sts[0]->ini_frame == 0 ||
( ivas_total_brate != st_ivas->hEncoderConfig->last_ivas_total_brate ) || 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 */
( ivas_total_brate != hEncoderConfig->last_ivas_total_brate ) || 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 */
{
if ( st_ivas->hQMetaData != NULL )
{
if ( ivas_format == MASA_ISM_FORMAT && st_ivas->ism_mode != ISM_MODE_NONE )
{
stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, (int32_t) ( 0.70f * st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, (int32_t) ( 0.70f * st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC ), &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
else
{
stereo_dft_config( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, st_ivas->hQMetaData->bits_frame_nominal * FRAMES_PER_SEC, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, 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( hCPE->hStereoDft == NULL ? NULL : hCPE->hStereoDft->hConfig, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, hCPE->element_brate, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
}
......@@ -399,13 +404,13 @@ ivas_error ivas_cpe_enc(
if ( hCPE->element_mode == IVAS_CPE_DFT )
{
stereo_dft_hybrid_ITD_flag( hCPE->hStereoDft->hConfig, input_Fs, hCPE->hStereoDft->hItd->hybrid_itd_max );
stereo_dft_hybrid_ITD_flag( hConfigDft, input_Fs, hCPE->hStereoDft->hItd->hybrid_itd_max );
/* Time Domain ITD compensation using extrapolation */
#ifdef DEBUG_MODE_DFT
stereo_td_itd( hCPE->hStereoDft->hItd, hCPE->hStereoDft->input_mem_itd, hCPE->hStereoDft->hConfig->hybrid_itd_flag, hCPE->hStereoDft->hConfig->itd_mode, hCPE->hStereoDft->dft_ovl, sts, input_frame, hCPE->input_mem );
stereo_td_itd( hCPE->hStereoDft->hItd, hCPE->hStereoDft->input_mem_itd, hConfigDft->hybrid_itd_flag, hConfigDft->itd_mode, hCPE->hStereoDft->dft_ovl, sts, input_frame, hCPE->input_mem );
#else
stereo_td_itd( hCPE->hStereoDft->hItd, hCPE->hStereoDft->input_mem_itd, hCPE->hStereoDft->hConfig->hybrid_itd_flag, hCPE->hStereoDft->dft_ovl, sts, input_frame, hCPE->input_mem );
stereo_td_itd( hCPE->hStereoDft->hItd, hCPE->hStereoDft->input_mem_itd, hConfigDft->hybrid_itd_flag, hCPE->hStereoDft->dft_ovl, sts, input_frame, hCPE->input_mem );
#endif
/* DFT on right and left input channels */
......@@ -416,7 +421,7 @@ ivas_error ivas_cpe_enc(
hCPE->hStereoDft->res_cod_bits = (int16_t) ( ( hCPE->element_brate ) / FRAMES_PER_SEC - 0.8f * sts[0]->bits_frame_nominal );
#endif
/* Update DFT Stereo memories */
stereo_dft_enc_update( hCPE->hStereoDft, sts[0]->max_bwidth );
stereo_dft_enc_update( hCPE->hStereoDft, max_bwidth );
/* DFT stereo processing */
stereo_dft_enc_process( hCPE, vad_flag_dtx, vad_hover_flag, input_frame );
......@@ -424,9 +429,7 @@ ivas_error ivas_cpe_enc(
else if ( hCPE->element_mode == IVAS_CPE_TD )
{
/* Determine the energy ratio between the 2 channels */
tdm_ratio_idx = stereo_tdm_ener_analysis(
ivas_format,
hCPE, input_frame, &tdm_SM_or_LRTD_Pri, &tdm_ratio_idx_SM );
tdm_ratio_idx = stereo_tdm_ener_analysis( ivas_format, hCPE, input_frame, &tdm_SM_or_LRTD_Pri, &tdm_ratio_idx_SM );
/* Compute the downmix signal based on the ratio index */
stereo_tdm_downmix( hCPE->hStereoTD, sts[0]->input, sts[1]->input, input_frame, tdm_ratio_idx, ( ( hCPE->hStereoTD->tdm_LRTD_flag == 0 ) ? tdm_SM_or_LRTD_Pri : 0 ), tdm_ratio_idx_SM );
......@@ -501,7 +504,7 @@ ivas_error ivas_cpe_enc(
error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n],
&ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], &vad_hover_flag[n], &attack_flag[n],
realBuffer[n], imagBuffer[n], old_wsp[n], pitch_fr[n], voicing_fr[n], &loc_harm[n], &cor_map_sum[n], &vad_flag_dtx[n], enerBuffer[n],
fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0, ivas_format, st_ivas->hMCT != NULL, st_ivas->hEncoderConfig->last_ivas_total_brate, ivas_total_brate
fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0, ivas_format, st_ivas->hMCT != NULL, hEncoderConfig->last_ivas_total_brate, ivas_total_brate
#ifdef DEBUG_MODE_INFO
,
( st_ivas->nSCE + ( cpe_id * CPE_CHANNELS ) + n )
......@@ -557,7 +560,7 @@ ivas_error ivas_cpe_enc(
set_bw_stereo( hCPE );
/* reconfiguration of MDCT stereo */
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( hCPE->hStereoMdct, ivas_format, hCPE->element_mode, hCPE->element_brate, sts[0]->bwidth, 0, NULL, 0 );
hCPE->hStereoMdct->isSBAStereoMode = ( ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) && ( st_ivas->nchan_transport == 2 ) );
......@@ -578,12 +581,11 @@ ivas_error ivas_cpe_enc(
if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) )
{
int16_t igf;
int16_t bw;
bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : sts[n]->max_bwidth;
bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : max_bwidth;
igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->rf_mode );
if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, 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( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
{
return error;
}
......@@ -650,11 +652,11 @@ ivas_error ivas_cpe_enc(
/* Reconfigure DFT Stereo for inactive frames */
if ( sts[0]->core_brate == SID_2k40 )
{
stereo_dft_config( hCPE->hStereoDft->hConfig, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
else
{
stereo_dft_config( hCPE->hStereoDft->hConfig, FRAME_NO_DATA, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
stereo_dft_config( hConfigDft, FRAME_NO_DATA, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
}
stereo_dft_cng_side_gain( hCPE->hStereoDft, hCPE->hStereoCng, sts[0]->core_brate, sts[0]->last_core_brate, sts[0]->bwidth );
......
......@@ -169,7 +169,7 @@ ivas_error ivas_sce_enc(
/* set flag for sampling rate of OL S/M classifier */
flag_16k_smc = 0;
if ( st_ivas->hEncoderConfig->ivas_format == SBA_FORMAT && ( st_ivas->hEncoderConfig->ivas_total_brate == IVAS_24k4 || st_ivas->hEncoderConfig->ivas_total_brate == IVAS_32k ) && hSCE->element_brate == hSCE->last_element_brate )
if ( ivas_format == SBA_FORMAT && ( st_ivas->hEncoderConfig->ivas_total_brate == IVAS_24k4 || st_ivas->hEncoderConfig->ivas_total_brate == IVAS_32k ) && hSCE->element_brate == hSCE->last_element_brate )
{
flag_16k_smc = 1;
}
......
......@@ -507,7 +507,9 @@ typedef struct ivas_hrtfs_parambin_struct
float parametricReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX];
float parametricEarlyPartEneCorrection[CLDFB_NO_CHANNELS_MAX];
#ifndef FIX_CREND_SIMPLIFY_CODE
int16_t allocatedFromFile; /* Not used and should not be here. Remove in cleanup. */
#endif
} HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE;
......