Loading lib_com/ivas_prot.h +2 −0 Original line number Diff line number Diff line Loading @@ -1147,9 +1147,11 @@ void ivas_param_ism_dec_render( float *output_f[] /* o : rendered time signal */ ); #ifndef OBJ_EDITING_PARAMISM void ivas_param_ism_params_to_masa_param_mapping( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif /*----------------------------------------------------------------------------------* Loading lib_dec/ivas_ism_param_dec.c +9 −110 Original line number Diff line number Diff line Loading @@ -999,8 +999,7 @@ void ivas_param_ism_dec_digest_tc( *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_dequant_md( Decoder_Struct *st_ivas ) 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 ) ) Loading Loading @@ -1031,7 +1030,6 @@ void ivas_param_ism_dec_prepare_renderer( { int16_t ch, nchan_transport, nchan_out, nchan_out_woLFE, i; int16_t slot_idx, bin_idx; int32_t ivas_total_brate; float ref_power[CLDFB_NO_CHANNELS_MAX]; float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; /* Direct Response/EFAP Gains */ Loading @@ -1046,7 +1044,6 @@ void ivas_param_ism_dec_prepare_renderer( assert( hSpatParamRendCom ); nchan_transport = st_ivas->nchan_transport; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { Loading Loading @@ -1404,113 +1401,18 @@ void ivas_param_ism_dec_render( return; } #ifdef OBJ_EDITING_PARAMISM /*-------------------------------------------------------------------------* * ivas_param_ism_params_to_masa_param_mapping() * * *-------------------------------------------------------------------------*/ void ivas_param_ism_obj2band( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { int16_t nBins; int16_t band_idx, bin_idx, sf_idx; int16_t brange[2]; int16_t azimuth[2]; int16_t elevation[2]; float power_ratio[2]; PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; hParamIsmDec = st_ivas->hParamIsmDec; hSpatParamRendCom = st_ivas->hSpatParamRendCom; nBins = hSpatParamRendCom->num_freq_bands; if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence, 2.0f ); hSpatParamRendCom->numSimultaneousDirections = 1; azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[0] ); elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[0] ); for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) { hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = energy_ratio; hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; } } } else { hSpatParamRendCom->numSimultaneousDirections = 2; for ( band_idx = 0; band_idx < hParamIsmDec->hParamIsm->nbands; band_idx++ ) { brange[0] = hParamIsmDec->hParamIsm->band_grouping[band_idx]; brange[1] = hParamIsmDec->hParamIsm->band_grouping[band_idx + 1]; azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); power_ratio[0] = hParamIsmDec->power_ratios[band_idx][0][0]; azimuth[1] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); elevation[1] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); power_ratio[1] = hParamIsmDec->power_ratios[band_idx][0][1]; for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = brange[0]; bin_idx < brange[1]; bin_idx++ ) { hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = power_ratio[0]; hSpatParamRendCom->azimuth2[sf_idx][bin_idx] = azimuth[1]; hSpatParamRendCom->elevation2[sf_idx][bin_idx] = elevation[1]; hSpatParamRendCom->energy_ratio2[sf_idx][bin_idx] = power_ratio[1]; } } } for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) { hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->spreadCoherence2[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; } } } } #endif /*-------------------------------------------------------------------------* * ivas_param_ism_params_to_masa_param_mapping() * * *-------------------------------------------------------------------------*/ #ifndef OBJ_EDITING_PARAMISM void ivas_param_ism_params_to_masa_param_mapping( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { #ifdef OBJ_EDITING_PARAMISM PARAM_ISM_DEC_HANDLE hParamIsmDec; int32_t ivas_total_brate; hParamIsmDec = st_ivas->hParamIsmDec; #else PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; int16_t nBins; Loading @@ -1524,9 +1426,7 @@ void ivas_param_ism_params_to_masa_param_mapping( hParamIsmDec = st_ivas->hParamIsmDec; hSpatParamRendCom = st_ivas->hSpatParamRendCom; nBins = hSpatParamRendCom->num_freq_bands; #endif 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 ) ) Loading @@ -1541,7 +1441,6 @@ void ivas_param_ism_params_to_masa_param_mapping( } #endif #ifndef OBJ_EDITING_PARAMISM if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; Loading Loading @@ -1605,7 +1504,7 @@ void ivas_param_ism_params_to_masa_param_mapping( } } } #endif return; } #endif lib_dec/ivas_jbm_dec.c +12 −11 Original line number Diff line number Diff line Loading @@ -3143,8 +3143,9 @@ void ivas_jbm_dec_prepare_renderer( 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 ); #ifndef OBJ_EDITING_PARAMISM ivas_param_ism_params_to_masa_param_mapping( st_ivas ); #endif } else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading Loading
lib_com/ivas_prot.h +2 −0 Original line number Diff line number Diff line Loading @@ -1147,9 +1147,11 @@ void ivas_param_ism_dec_render( float *output_f[] /* o : rendered time signal */ ); #ifndef OBJ_EDITING_PARAMISM void ivas_param_ism_params_to_masa_param_mapping( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); #endif /*----------------------------------------------------------------------------------* Loading
lib_dec/ivas_ism_param_dec.c +9 −110 Original line number Diff line number Diff line Loading @@ -999,8 +999,7 @@ void ivas_param_ism_dec_digest_tc( *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_dequant_md( Decoder_Struct *st_ivas ) 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 ) ) Loading Loading @@ -1031,7 +1030,6 @@ void ivas_param_ism_dec_prepare_renderer( { int16_t ch, nchan_transport, nchan_out, nchan_out_woLFE, i; int16_t slot_idx, bin_idx; int32_t ivas_total_brate; float ref_power[CLDFB_NO_CHANNELS_MAX]; float cx_diag[CLDFB_NO_CHANNELS_MAX][PARAM_ISM_MAX_DMX]; /* Direct Response/EFAP Gains */ Loading @@ -1046,7 +1044,6 @@ void ivas_param_ism_dec_prepare_renderer( assert( hSpatParamRendCom ); nchan_transport = st_ivas->nchan_transport; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { Loading Loading @@ -1404,113 +1401,18 @@ void ivas_param_ism_dec_render( return; } #ifdef OBJ_EDITING_PARAMISM /*-------------------------------------------------------------------------* * ivas_param_ism_params_to_masa_param_mapping() * * *-------------------------------------------------------------------------*/ void ivas_param_ism_obj2band( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { int16_t nBins; int16_t band_idx, bin_idx, sf_idx; int16_t brange[2]; int16_t azimuth[2]; int16_t elevation[2]; float power_ratio[2]; PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; hParamIsmDec = st_ivas->hParamIsmDec; hSpatParamRendCom = st_ivas->hSpatParamRendCom; nBins = hSpatParamRendCom->num_freq_bands; if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence, 2.0f ); hSpatParamRendCom->numSimultaneousDirections = 1; azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[0] ); elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[0] ); for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) { hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = energy_ratio; hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; } } } else { hSpatParamRendCom->numSimultaneousDirections = 2; for ( band_idx = 0; band_idx < hParamIsmDec->hParamIsm->nbands; band_idx++ ) { brange[0] = hParamIsmDec->hParamIsm->band_grouping[band_idx]; brange[1] = hParamIsmDec->hParamIsm->band_grouping[band_idx + 1]; azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); elevation[0] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][0]] ); power_ratio[0] = hParamIsmDec->power_ratios[band_idx][0][0]; azimuth[1] = (int16_t) roundf( hParamIsmDec->azimuth_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); elevation[1] = (int16_t) roundf( hParamIsmDec->elevation_values[hParamIsmDec->hParamIsm->obj_indices[band_idx][0][1]] ); power_ratio[1] = hParamIsmDec->power_ratios[band_idx][0][1]; for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = brange[0]; bin_idx < brange[1]; bin_idx++ ) { hSpatParamRendCom->azimuth[sf_idx][bin_idx] = azimuth[0]; hSpatParamRendCom->elevation[sf_idx][bin_idx] = elevation[0]; hSpatParamRendCom->energy_ratio1[sf_idx][bin_idx] = power_ratio[0]; hSpatParamRendCom->azimuth2[sf_idx][bin_idx] = azimuth[1]; hSpatParamRendCom->elevation2[sf_idx][bin_idx] = elevation[1]; hSpatParamRendCom->energy_ratio2[sf_idx][bin_idx] = power_ratio[1]; } } } for ( sf_idx = 0; sf_idx < MAX_PARAM_SPATIAL_SUBFRAMES; sf_idx++ ) { for ( bin_idx = 0; bin_idx < nBins; bin_idx++ ) { hSpatParamRendCom->spreadCoherence[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->spreadCoherence2[sf_idx][bin_idx] = 0.0f; hSpatParamRendCom->surroundingCoherence[sf_idx][bin_idx] = 0.0; } } } } #endif /*-------------------------------------------------------------------------* * ivas_param_ism_params_to_masa_param_mapping() * * *-------------------------------------------------------------------------*/ #ifndef OBJ_EDITING_PARAMISM void ivas_param_ism_params_to_masa_param_mapping( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ) { #ifdef OBJ_EDITING_PARAMISM PARAM_ISM_DEC_HANDLE hParamIsmDec; int32_t ivas_total_brate; hParamIsmDec = st_ivas->hParamIsmDec; #else PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; int16_t nBins; Loading @@ -1524,9 +1426,7 @@ void ivas_param_ism_params_to_masa_param_mapping( hParamIsmDec = st_ivas->hParamIsmDec; hSpatParamRendCom = st_ivas->hSpatParamRendCom; nBins = hSpatParamRendCom->num_freq_bands; #endif 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 ) ) Loading @@ -1541,7 +1441,6 @@ void ivas_param_ism_params_to_masa_param_mapping( } #endif #ifndef OBJ_EDITING_PARAMISM if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; Loading Loading @@ -1605,7 +1504,7 @@ void ivas_param_ism_params_to_masa_param_mapping( } } } #endif return; } #endif
lib_dec/ivas_jbm_dec.c +12 −11 Original line number Diff line number Diff line Loading @@ -3143,8 +3143,9 @@ void ivas_jbm_dec_prepare_renderer( 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 ); #ifndef OBJ_EDITING_PARAMISM ivas_param_ism_params_to_masa_param_mapping( st_ivas ); #endif } else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { Loading