Skip to content
Commits on Source (2)
......@@ -1122,6 +1122,10 @@ void ivas_param_ism_dec_digest_tc(
);
#ifdef OBJ_EDITING_API
void ivas_param_ism_dec_dequant_md(
Decoder_Struct *st_ivas
);
void ivas_param_ism_dec_prepare_renderer(
Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */
const uint16_t nCldfbSlots /* i : number of CLFBS slots in the transport channels */
......
......@@ -155,7 +155,7 @@
#define OBJ_EDITING_API /* object editing changes related to the API */
#define OBJ_EDITING_DECODER /* object editing changes realted to the decoder functions */
#define OBJ_EDITING_EXAMPLE /* obj editing example code in decoder.c */
/*#define OBJ_EDITING_PARAMISM*/ /* obj editing for ParamISM */
#define OBJ_EDITING_PARAMISM /* obj editing for ParamISM */
#endif
/* ################### Start BE switches ################################# */
......
......@@ -881,6 +881,7 @@ void ivas_param_ism_dec_digest_tc(
}
set_zero( ref_power, CLDFB_NO_CHANNELS_MAX );
/* Frame-level Processing */
/* De-quantization */
if ( !( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) )
......@@ -991,6 +992,32 @@ void ivas_param_ism_dec_digest_tc(
#ifdef OBJ_EDITING_API
/*-------------------------------------------------------------------------*
* ivas_param_ism_dec_prepare_renderer()
*
*
*-------------------------------------------------------------------------*/
void ivas_param_ism_dec_dequant_md(
Decoder_Struct *st_ivas
)
{
/* De-quantization */
if ( !( st_ivas->hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 || st_ivas->hDecoderConfig->ivas_total_brate == FRAME_NO_DATA ) )
{
ivas_param_ism_dec_dequant_DOA( st_ivas->hParamIsmDec, st_ivas->nchan_ism );
ivas_param_ism_dec_dequant_powrat( st_ivas->hParamIsmDec );
st_ivas->hISMDTX.dtx_flag = 0;
}
else
{
st_ivas->hISMDTX.dtx_flag = 1;
}
return;
}
/*-------------------------------------------------------------------------*
* ivas_param_ism_dec_prepare_renderer()
*
......@@ -1047,19 +1074,6 @@ void ivas_param_ism_dec_prepare_renderer(
}
set_zero( ref_power, CLDFB_NO_CHANNELS_MAX );
/* Frame-level Processing */
/* De-quantization */
if ( !( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) )
{
ivas_param_ism_dec_dequant_DOA( hParamIsmDec, st_ivas->nchan_ism );
ivas_param_ism_dec_dequant_powrat( hParamIsmDec );
st_ivas->hISMDTX.dtx_flag = 0;
}
else
{
st_ivas->hISMDTX.dtx_flag = 1;
}
/* obtain the direct response using EFAP */
if ( !( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) )
{
......@@ -1514,6 +1528,7 @@ void ivas_param_ism_params_to_masa_param_mapping(
ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate;
#ifndef OBJ_EDITING_API
if ( !( ivas_total_brate == IVAS_SID_5k2 || ivas_total_brate == FRAME_NO_DATA ) )
{
ivas_param_ism_dec_dequant_DOA( hParamIsmDec, st_ivas->nchan_ism );
......@@ -1524,6 +1539,7 @@ void ivas_param_ism_params_to_masa_param_mapping(
{
st_ivas->hISMDTX.dtx_flag = 1;
}
#endif
#ifndef OBJ_EDITING_PARAMISM
if ( st_ivas->hISMDTX.dtx_flag )
......
......@@ -165,6 +165,9 @@ ivas_error ivas_jbm_dec_tc(
{
return error;
}
#ifdef OBJ_EDITING_API
ivas_param_ism_dec_dequant_md( st_ivas );
#endif
}
else /* ISM_MODE_DISC */
{
......@@ -3137,9 +3140,6 @@ void ivas_jbm_dec_prepare_renderer(
/* Rendering */
if ( st_ivas->ism_mode == ISM_MODE_PARAM )
{
#ifdef OBJ_EDITING_PARAMISM
#else
if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
{
ivas_dirac_dec_set_md_map( st_ivas, n_render_timeslots );
......@@ -3150,7 +3150,6 @@ void ivas_jbm_dec_prepare_renderer(
{
ivas_param_ism_dec_prepare_renderer( st_ivas, n_render_timeslots );
}
#endif
}
else /* ISM_MODE_DISC */
{
......
......@@ -1024,26 +1024,6 @@ ivas_error IVAS_DEC_FeedFrame_Serial(
}
}
hIvasDec->hasBeenPreparedRendering = false;
if ( hIvasDec->st_ivas->ism_mode == ISM_MODE_PARAM )
{
int16_t n_render_timeslots = hIvasDec->st_ivas->hTcBuffer->n_samples_available / hIvasDec->st_ivas->hTcBuffer->n_samples_granularity;
if ( hIvasDec->st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC ||
hIvasDec->st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ||
hIvasDec->st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC )
{
ivas_dirac_dec_set_md_map( hIvasDec->st_ivas, n_render_timeslots );
ivas_param_ism_params_to_masa_param_mapping( hIvasDec->st_ivas );
}
else if ( hIvasDec->st_ivas->renderer_type == RENDERER_PARAM_ISM || hIvasDec->st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
{
ivas_param_ism_dec_prepare_renderer( hIvasDec->st_ivas, n_render_timeslots );
}
}
#endif
return IVAS_ERR_OK;
......