Loading lib_rend/ivas_dirac_dec_binaural_functions.c +26 −72 Original line number Diff line number Diff line Loading @@ -178,11 +178,9 @@ static void matrixMul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Ai static void matrixTransp2Mul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Aim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Bre[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Bim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float outRe[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float outIm[BINAURAL_CHANNELS][BINAURAL_CHANNELS] ); #endif #ifdef IVAS_FLOAT_FIXED static void ivas_masa_ext_rend_parambin_internal_fx( MASA_EXT_REND_HANDLE hMasaExtRend, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, Word32 *output_fx[], const Word16 subframe ); #else static void ivas_masa_ext_rend_parambin_internal( MASA_EXT_REND_HANDLE hMasaExtRend, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, float *output_f[], const int16_t subframe ); #endif #ifdef IVAS_FLOAT_FIXED static void formulate2x2MixingMatrix_fx( Word32 Ein1_fx, Word32 Ein2_fx, Word16 q_Ein, Word32 CinRe_fx, Word32 CinIm_fx, Word16 q_Cin, Word32 Eout1_fx, Word32 Eout2_fx, Word16 q_Eout, Word32 CoutRe_fx, Word32 CoutIm_fx, Word16 q_Cout, Word32 Q_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word32 Mre_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word32 Mim_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word16 *q_M, const Word16 regularizationFactor_fx ); Loading Loading @@ -7814,10 +7812,10 @@ static void ivas_masa_ext_rend_parambin_internal( return; } #else static void ivas_masa_ext_rend_parambin_internal_fx( static void ivas_masa_ext_rend_parambin_internal( MASA_EXT_REND_HANDLE hMasaExtRend, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, Word32 *output_fx[], /* Q11*/ float *output_f[], const Word16 subframe ) { Loading @@ -7830,20 +7828,21 @@ static void ivas_masa_ext_rend_parambin_internal_fx( Word16 i, j; Word16 nchan_transport; Word16 q_mat; #if 1 hDiracDecBin = hMasaExtRend->hDiracDecBin; hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom; Word32 *output_fx[MAX_OUTPUT_CHANNELS]; Word32 output_fx_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; FOR( ch = 0; ch < 2; ch++ ) { output_fx[ch] = output_fx_buff[ch]; floatToFixed_arrL32( output_f[ch], output_fx[ch], Q11, L_FRAME48k ); } #endif Word32 Cldfb_RealBuffer_in_fx[6][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_in_fx[6][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; FOR( i = 0; i < 6; i++ ) { FOR( j = 0; j < CLDFB_SLOTS_PER_SUBFRAME; j++ ) { set32_fx( Cldfb_RealBuffer_in_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( Cldfb_ImagBuffer_in_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); } } Word32 Rmat_fx[3][3]; hDiracDecBin = hMasaExtRend->hDiracDecBin; Loading @@ -7864,16 +7863,8 @@ static void ivas_masa_ext_rend_parambin_internal_fx( move16(); config_data.qualityBasedSmFactor_fx = ONE_IN_Q31; move32(); IF( EQ_16( hMasaExtRend->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { config_data.processReverb = 1; move16(); } ELSE { config_data.processReverb = 0; config_data.processReverb = hMasaExtRend->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ? 1 : 0; move16(); } config_data.ism_mode = ISM_MODE_NONE; move32(); Loading Loading @@ -7935,7 +7926,6 @@ static void ivas_masa_ext_rend_parambin_internal_fx( } } Word16 q_inp = Q6; move16(); IF( hCombinedOrientationData ) { FOR( i = 0; i < 3; i++ ) Loading Loading @@ -7992,15 +7982,20 @@ static void ivas_masa_ext_rend_parambin_internal_fx( hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, 0, NULL ); #if 1 Word16 q_out; q_inp = Q6; move16(); FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { output_fx[ch] = output_fx_buff[ch]; } FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state = Q11; move16(); } #endif // Float to fix ends q_mat = hDiracDecBin->q_processMtx; move16(); Loading Loading @@ -8047,18 +8042,20 @@ static void ivas_masa_ext_rend_parambin_internal_fx( move16(); move16(); #if 1 // Fix to float FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { scale_sig32( output_fx[ch], nBins * hSpatParamRendCom->subframe_nbslots[subframe], sub( Q11, q_out ) ); fixedToFloat_arrL32( output_fx[ch], output_f[ch], q_out, nBins * hSpatParamRendCom->subframe_nbslots[subframe] ); scale_sig32( hMasaExtRend->cldfbSynRend[ch]->cldfb_state_fx, hMasaExtRend->cldfbSynRend[ch]->cldfb_size, sub( Q11, hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state ) ); hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state = Q11; } #endif return; } #endif #ifndef IVAS_FLOAT_FIXED void ivas_masa_ext_rend_parambin_render( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ Loading Loading @@ -8098,46 +8095,3 @@ void ivas_masa_ext_rend_parambin_render( return; } #else void ivas_masa_ext_rend_parambin_render_fx( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ Word32 *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output Q11*/ const Word16 num_subframes ) /* i : number of subframes to render */ { Word16 subframe; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; Word32 *p_output[BINAURAL_CHANNELS]; Word16 ch; hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom; FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { p_output[ch] = output_f[ch]; } hSpatParamRendCom->subframes_rendered = hSpatParamRendCom->dirac_read_idx; move16(); FOR( subframe = 0; subframe < num_subframes; subframe++ ) { Word16 n_samples_sf = i_mult( hSpatParamRendCom->slot_size, CLDFB_SLOTS_PER_SUBFRAME ); hSpatParamRendCom->slots_rendered = 0; move16(); ivas_masa_ext_rend_parambin_internal_fx( hMasaExtRend, hCombinedOrientationData, p_output, hSpatParamRendCom->dirac_read_idx ); FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { p_output[ch] += n_samples_sf; } ivas_combined_orientation_update_index( hCombinedOrientationData, n_samples_sf ); hSpatParamRendCom->dirac_read_idx = ( add( hSpatParamRendCom->dirac_read_idx, 1 ) ) % hSpatParamRendCom->dirac_md_buffer_length; move16(); } return; } #endif lib_rend/ivas_prot_rend.h +0 −8 Original line number Diff line number Diff line Loading @@ -357,20 +357,12 @@ void ivas_dirac_dec_binaural_render_fx( Word32 *output_f[] /* o : rendered time signal */ ); #endif #ifndef IVAS_FLOAT_FIXED void ivas_masa_ext_rend_parambin_render( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t num_subframes /* i : number of subframes to render */ ); #else void ivas_masa_ext_rend_parambin_render_fx( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ Word32 *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output Q11*/ const Word16 num_subframes ); /* i : number of subframes to render */ #endif #ifndef IVAS_FLOAT_FIXED ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Loading lib_rend/lib_rend.c +173 −158 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
lib_rend/ivas_dirac_dec_binaural_functions.c +26 −72 Original line number Diff line number Diff line Loading @@ -178,11 +178,9 @@ static void matrixMul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Ai static void matrixTransp2Mul( float Are[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Aim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Bre[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float Bim[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float outRe[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float outIm[BINAURAL_CHANNELS][BINAURAL_CHANNELS] ); #endif #ifdef IVAS_FLOAT_FIXED static void ivas_masa_ext_rend_parambin_internal_fx( MASA_EXT_REND_HANDLE hMasaExtRend, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, Word32 *output_fx[], const Word16 subframe ); #else static void ivas_masa_ext_rend_parambin_internal( MASA_EXT_REND_HANDLE hMasaExtRend, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, float *output_f[], const int16_t subframe ); #endif #ifdef IVAS_FLOAT_FIXED static void formulate2x2MixingMatrix_fx( Word32 Ein1_fx, Word32 Ein2_fx, Word16 q_Ein, Word32 CinRe_fx, Word32 CinIm_fx, Word16 q_Cin, Word32 Eout1_fx, Word32 Eout2_fx, Word16 q_Eout, Word32 CoutRe_fx, Word32 CoutIm_fx, Word16 q_Cout, Word32 Q_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word32 Mre_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word32 Mim_fx[BINAURAL_CHANNELS][BINAURAL_CHANNELS], Word16 *q_M, const Word16 regularizationFactor_fx ); Loading Loading @@ -7814,10 +7812,10 @@ static void ivas_masa_ext_rend_parambin_internal( return; } #else static void ivas_masa_ext_rend_parambin_internal_fx( static void ivas_masa_ext_rend_parambin_internal( MASA_EXT_REND_HANDLE hMasaExtRend, COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, Word32 *output_fx[], /* Q11*/ float *output_f[], const Word16 subframe ) { Loading @@ -7830,20 +7828,21 @@ static void ivas_masa_ext_rend_parambin_internal_fx( Word16 i, j; Word16 nchan_transport; Word16 q_mat; #if 1 hDiracDecBin = hMasaExtRend->hDiracDecBin; hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom; Word32 *output_fx[MAX_OUTPUT_CHANNELS]; Word32 output_fx_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; FOR( ch = 0; ch < 2; ch++ ) { output_fx[ch] = output_fx_buff[ch]; floatToFixed_arrL32( output_f[ch], output_fx[ch], Q11, L_FRAME48k ); } #endif Word32 Cldfb_RealBuffer_in_fx[6][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; Word32 Cldfb_ImagBuffer_in_fx[6][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX]; FOR( i = 0; i < 6; i++ ) { FOR( j = 0; j < CLDFB_SLOTS_PER_SUBFRAME; j++ ) { set32_fx( Cldfb_RealBuffer_in_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); set32_fx( Cldfb_ImagBuffer_in_fx[i][j], 0, CLDFB_NO_CHANNELS_MAX ); } } Word32 Rmat_fx[3][3]; hDiracDecBin = hMasaExtRend->hDiracDecBin; Loading @@ -7864,16 +7863,8 @@ static void ivas_masa_ext_rend_parambin_internal_fx( move16(); config_data.qualityBasedSmFactor_fx = ONE_IN_Q31; move32(); IF( EQ_16( hMasaExtRend->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) ) { config_data.processReverb = 1; move16(); } ELSE { config_data.processReverb = 0; config_data.processReverb = hMasaExtRend->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ? 1 : 0; move16(); } config_data.ism_mode = ISM_MODE_NONE; move32(); Loading Loading @@ -7935,7 +7926,6 @@ static void ivas_masa_ext_rend_parambin_internal_fx( } } Word16 q_inp = Q6; move16(); IF( hCombinedOrientationData ) { FOR( i = 0; i < 3; i++ ) Loading Loading @@ -7992,15 +7982,20 @@ static void ivas_masa_ext_rend_parambin_internal_fx( hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, 0, NULL ); #if 1 Word16 q_out; q_inp = Q6; move16(); FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { output_fx[ch] = output_fx_buff[ch]; } FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state = Q11; move16(); } #endif // Float to fix ends q_mat = hDiracDecBin->q_processMtx; move16(); Loading Loading @@ -8047,18 +8042,20 @@ static void ivas_masa_ext_rend_parambin_internal_fx( move16(); move16(); #if 1 // Fix to float FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { scale_sig32( output_fx[ch], nBins * hSpatParamRendCom->subframe_nbslots[subframe], sub( Q11, q_out ) ); fixedToFloat_arrL32( output_fx[ch], output_f[ch], q_out, nBins * hSpatParamRendCom->subframe_nbslots[subframe] ); scale_sig32( hMasaExtRend->cldfbSynRend[ch]->cldfb_state_fx, hMasaExtRend->cldfbSynRend[ch]->cldfb_size, sub( Q11, hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state ) ); hMasaExtRend->cldfbSynRend[ch]->Q_cldfb_state = Q11; } #endif return; } #endif #ifndef IVAS_FLOAT_FIXED void ivas_masa_ext_rend_parambin_render( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ Loading Loading @@ -8098,46 +8095,3 @@ void ivas_masa_ext_rend_parambin_render( return; } #else void ivas_masa_ext_rend_parambin_render_fx( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ Word32 *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output Q11*/ const Word16 num_subframes ) /* i : number of subframes to render */ { Word16 subframe; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; Word32 *p_output[BINAURAL_CHANNELS]; Word16 ch; hSpatParamRendCom = hMasaExtRend->hSpatParamRendCom; FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { p_output[ch] = output_f[ch]; } hSpatParamRendCom->subframes_rendered = hSpatParamRendCom->dirac_read_idx; move16(); FOR( subframe = 0; subframe < num_subframes; subframe++ ) { Word16 n_samples_sf = i_mult( hSpatParamRendCom->slot_size, CLDFB_SLOTS_PER_SUBFRAME ); hSpatParamRendCom->slots_rendered = 0; move16(); ivas_masa_ext_rend_parambin_internal_fx( hMasaExtRend, hCombinedOrientationData, p_output, hSpatParamRendCom->dirac_read_idx ); FOR( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { p_output[ch] += n_samples_sf; } ivas_combined_orientation_update_index( hCombinedOrientationData, n_samples_sf ); hSpatParamRendCom->dirac_read_idx = ( add( hSpatParamRendCom->dirac_read_idx, 1 ) ) % hSpatParamRendCom->dirac_md_buffer_length; move16(); } return; } #endif
lib_rend/ivas_prot_rend.h +0 −8 Original line number Diff line number Diff line Loading @@ -357,20 +357,12 @@ void ivas_dirac_dec_binaural_render_fx( Word32 *output_f[] /* o : rendered time signal */ ); #endif #ifndef IVAS_FLOAT_FIXED void ivas_masa_ext_rend_parambin_render( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ const int16_t num_subframes /* i : number of subframes to render */ ); #else void ivas_masa_ext_rend_parambin_render_fx( MASA_EXT_REND_HANDLE hMasaExtRend, /* i/o: MASA ext rend structure */ COMBINED_ORIENTATION_HANDLE hCombinedOrientationData, /* i : combined orientation handle */ Word32 *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output Q11*/ const Word16 num_subframes ); /* i : number of subframes to render */ #endif #ifndef IVAS_FLOAT_FIXED ivas_error ivas_dirac_dec_init_binaural_data( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Loading
lib_rend/lib_rend.c +173 −158 File changed.Preview size limit exceeded, changes collapsed. Show changes