Loading lib_com/ivas_prot.h +7 −1 Original line number Diff line number Diff line Loading @@ -932,11 +932,13 @@ void dtx_read_padding_bits( const int16_t num_bits ); #ifndef IVAS_FLOAT_FIXED void ivas_apply_non_diegetic_panning( float *output_f[], /* i/o: core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ ); #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -7011,11 +7013,13 @@ void ivas_mono_downmix_render_passive( const int16_t output_frame /* i : output frame length */ ); #ifndef IVAS_FLOAT_FIXED void ivas_mono_stereo_downmix_mcmasa( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: synthesized core-coder transport channels/mono or stereo output */ int16_t output_frame /* i : output frame length per channel */ ); #endif #ifdef IVAS_FLOAT_FIXED void ivas_lfe_synth_with_filters_fx( MCMASA_LFE_SYNTH_DATA_HANDLE hMasaLfeSynth, /* i/o: LFE synthesis structure for McMASA */ Loading Loading @@ -7390,11 +7394,13 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( float *output_f[] /* o : rendered time signal */ ); #endif #ifndef IVAS_FLOAT_FIXED void ivas_omasa_rearrange_channels( float *output[], /* o : output synthesis signal */ const int16_t nchan_transport_ism, /* i : number of ISM TCs */ const int16_t output_frame /* i : output frame length per channel */ ); #endif #ifndef IVAS_FLOAT_FIXED void ivas_omasa_dirac_rend_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ Loading lib_dec/ivas_mc_param_dec_fx.c +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Word16 param_mc_get_num_cldfb_syntheses_ivas_fx( Word16 num_cldfb_syntheses; num_cldfb_syntheses = 0; move16(); /* sanity check*/ IF( st_ivas->hParamMC == NULL ) Loading @@ -15,9 +16,11 @@ Word16 param_mc_get_num_cldfb_syntheses_ivas_fx( assert( 0 && "ParamMC handle does not exist!\n" ); } test(); IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ) { num_cldfb_syntheses = 2; move16(); } ELSE IF( EQ_16( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) ) { Loading lib_dec/ivas_mdct_core_dec.c +318 −103 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_dec/ivas_mono_dmx_renderer.c +25 −14 Original line number Diff line number Diff line Loading @@ -73,9 +73,13 @@ ivas_error ivas_mono_dmx_renderer_open( } hDownmix->inputEnergy_fx = 0; move16(); hDownmix->protoEnergy_fx = 0; move16(); hDownmix->Q_inputEner = 0; move16(); hDownmix->Q_protoEner = 0; move16(); st_ivas->hMonoDmxRenderer = hDownmix; Loading Loading @@ -112,6 +116,7 @@ void ivas_mono_dmx_renderer_close( MONO_DOWNMIX_RENDERER_HANDLE *hMonoDmxRenderer /* i/ i/o: Mono downmix structure */ ) { test(); IF( hMonoDmxRenderer == NULL || *hMonoDmxRenderer == NULL ) { return; Loading Loading @@ -219,13 +224,15 @@ void ivas_mono_downmix_render_passive_fx( Word16 diff_shift, div, div_sqrt; Word32 protoEner_pre, inputEner_pre; numInputChannels = st_ivas->nSCE; IF( EQ_16( (Word16) st_ivas->ivas_format, (Word16) SBA_ISM_FORMAT ) ) if ( EQ_16( (Word16) st_ivas->ivas_format, (Word16) SBA_ISM_FORMAT ) ) { numInputChannels = st_ivas->nchan_ism; move16(); } IF( EQ_16( (Word16) st_ivas->ivas_format, (Word16) MASA_ISM_FORMAT ) ) { test(); IF( EQ_16( (Word16) st_ivas->ism_mode, (Word16) ISM_MASA_MODE_MASA_ONE_OBJ ) || EQ_16( (Word16) st_ivas->ism_mode, (Word16) ISM_MASA_MODE_PARAM_ONE_OBJ ) ) { numInputChannels = add( st_ivas->nchan_transport, 1 ); Loading @@ -240,10 +247,11 @@ void ivas_mono_downmix_render_passive_fx( set32_fx( proto_signal_fx, 0, output_frame ); Word16 Output_norm = 32; FOR( int lp = 0; lp < numInputChannels; lp++ ) move16(); FOR( Word16 lp = 0; lp < numInputChannels; lp++ ) { Word16 norm = L_norm_arr( output_f_fx[lp], output_frame ); Output_norm = min( Output_norm, norm ); Output_norm = s_min( Output_norm, norm ); } Q_shift = sub( Output_norm, find_guarded_bits_fx( numInputChannels ) ); Loading Loading @@ -296,8 +304,8 @@ void ivas_mono_downmix_render_passive_fx( norm_inputEner = add( norm_l( hDownmix->inputEnergy_fx ), hDownmix->Q_inputEner ); } norm_protoEner = min( norm_protoEner, sub( shl( add( add( 11, Q_shift ), proto_shift ), 1 ), 31 ) ) - 1; norm_inputEner = min( norm_inputEner, sub( shl( add( 11, input_shift ), 1 ), 31 ) ) - 1; norm_protoEner = sub( s_min( norm_protoEner, sub( shl( add( add( 11, Q_shift ), proto_shift ), 1 ), 31 ) ), 1 ); norm_inputEner = sub( s_min( norm_inputEner, sub( shl( add( 11, input_shift ), 1 ), 31 ) ), 1 ); hDownmix->protoEnergy_fx = L_shl( hDownmix->protoEnergy_fx, sub( norm_protoEner, hDownmix->Q_protoEner ) ); hDownmix->inputEnergy_fx = L_shl( hDownmix->inputEnergy_fx, sub( norm_inputEner, hDownmix->Q_inputEner ) ); Loading @@ -312,7 +320,7 @@ void ivas_mono_downmix_render_passive_fx( hDownmix->inputEnergy_fx = L_add( hDownmix->inputEnergy_fx, inputEner_pre ); diff_shift = sub( hDownmix->Q_inputEner, hDownmix->Q_protoEner ); IF( GT_16( diff_shift, 0 ) ) IF( diff_shift > 0 ) { hDownmix->inputEnergy_fx = L_shr( hDownmix->inputEnergy_fx, diff_shift ); hDownmix->Q_inputEner = sub( hDownmix->Q_inputEner, diff_shift ); Loading Loading @@ -349,6 +357,7 @@ void ivas_mono_downmix_render_passive_fx( * Downmix process in McMASA *------------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void ivas_mono_stereo_downmix_mcmasa( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: synthesized core-coder transport channels/mono or stereo output */ Loading Loading @@ -388,7 +397,7 @@ void ivas_mono_stereo_downmix_mcmasa( return; } #ifdef IVAS_FLOAT_FIXED #else void ivas_mono_stereo_downmix_mcmasa_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Word32 *output_f_fx[], /* i/o: synthesized core-coder transport channels/mono or stereo output */ Loading @@ -402,21 +411,22 @@ void ivas_mono_stereo_downmix_mcmasa_fx( set32_fx( dmx_tmp_fx, 0, output_frame ); /* Dowmix center channel to L and R */ if ( st_ivas->hDecoderConfig->nchan_out == 2 && st_ivas->hOutSetup.separateChannelEnabled ) test(); IF ( EQ_16(st_ivas->hDecoderConfig->nchan_out, 2) && st_ivas->hOutSetup.separateChannelEnabled ) { v_multc_acc_32_16( output_f_fx[st_ivas->hOutSetup.separateChannelIndex], INV_SQRT2_FX_Q15, output_f_fx[0], output_frame ); v_multc_acc_32_16( output_f_fx[st_ivas->hOutSetup.separateChannelIndex], INV_SQRT2_FX_Q15, output_f_fx[1], output_frame ); } /* Mono downmix */ else if ( st_ivas->hDecoderConfig->nchan_out == 1 ) ELSE IF (EQ_16(st_ivas->hDecoderConfig->nchan_out, 1) ) { /* Downmix L and R to dmx_tmp */ for ( i = 0; i < st_ivas->nchan_transport; i++ ) FOR ( i = 0; i < st_ivas->nchan_transport; i++ ) { v_multc_acc_32_16( output_f_fx[i], INV_SQRT2_FX_Q15, dmx_tmp_fx, output_frame ); } /* Add center channel */ if ( st_ivas->hOutSetup.separateChannelEnabled ) IF( st_ivas->hOutSetup.separateChannelEnabled ) { v_add_32( output_f_fx[st_ivas->hOutSetup.separateChannelIndex], dmx_tmp_fx, dmx_tmp_fx, output_frame ); } Loading @@ -437,6 +447,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( * Apply non-diegetic panning *------------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void ivas_apply_non_diegetic_panning( float *output_f[], /* i/o: core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ Loading @@ -454,7 +465,7 @@ void ivas_apply_non_diegetic_panning( return; } #ifdef IVAS_FLOAT_FIXED #else void ivas_apply_non_diegetic_panning_fx( Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain */ Loading @@ -463,8 +474,8 @@ void ivas_apply_non_diegetic_panning_fx( { Word16 pan_left_fx, pan_right_fx; pan_left_fx = mult( non_diegetic_pan_gain_fx, 16348 ) + 16348; pan_right_fx = 32767 - pan_left_fx; pan_left_fx = add( mult( non_diegetic_pan_gain_fx, 16348 ), 16348 ); pan_right_fx = sub( 32767, pan_left_fx ); v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); Loading lib_dec/ivas_objectRenderer_internal.c +8 −5 Original line number Diff line number Diff line Loading @@ -43,8 +43,6 @@ #include "prot_fx1.h" #include "prot_fx2.h" #include "debug.h" #define float_to_fixed( n, factor ) ( round( n * ( 1 << factor ) ) ) #define fixed_to_float( n, factor ) ( (float) n / ( 1 << factor ) ) #endif Loading @@ -61,7 +59,8 @@ ivas_error ivas_td_binaural_open_fx( { *num_src = st_ivas->nchan_transport; move16(); IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) || EQ_16( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) test(); if( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) || EQ_16( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) { *num_src = st_ivas->nchan_ism; move16(); Loading Loading @@ -114,12 +113,13 @@ ivas_error ivas_td_binaural_renderer_fx( { ism_md_subframe_update = 2; } move16(); IF( EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) if( EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) { ism_md_subframe_update = 2; move16(); } return ivas_td_binaural_renderer_unwrap_fx( st_ivas->hReverb, st_ivas->transport_config, st_ivas->hBinRendererTd, nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, st_ivas->hCombinedOrientationData, ism_md_subframe_update, output, output_frame, MAX_PARAM_SPATIAL_SUBFRAMES ); } #else Loading Loading @@ -248,6 +248,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx( /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ tmp = 0; move16(); IF( n_samples_granularity != 0 ) { tmp = idiv1616( n_samples_granularity, slot_size ); Loading Loading @@ -275,6 +276,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx( FOR( nS = 0; nS < nchan_ism; nS++ ) { test(); IF( !( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && EQ_16( nS, LFE_CHANNEL ) ) ) /* Skip LFE for MC */ { st_ivas->hBinRendererTd->Sources[c_indx]->InputFrame_p_fx = tc_local_fx[nS]; /* Q11 */ Loading Loading @@ -306,6 +308,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx( tmp_vector_fx->y_fx = L_shr( tmp_vector_fx->y_fx, sub( tmp_vector_fx->q_fact, pos_q ) ); tmp_vector_fx->z_fx = L_shr( tmp_vector_fx->z_fx, sub( tmp_vector_fx->q_fact, pos_q ) ); tmp_vector_fx->q_fact = pos_q; move16(); } ELSE { Loading Loading
lib_com/ivas_prot.h +7 −1 Original line number Diff line number Diff line Loading @@ -932,11 +932,13 @@ void dtx_read_padding_bits( const int16_t num_bits ); #ifndef IVAS_FLOAT_FIXED void ivas_apply_non_diegetic_panning( float *output_f[], /* i/o: core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ const int16_t output_frame /* i : output frame length per channel */ ); #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -7011,11 +7013,13 @@ void ivas_mono_downmix_render_passive( const int16_t output_frame /* i : output frame length */ ); #ifndef IVAS_FLOAT_FIXED void ivas_mono_stereo_downmix_mcmasa( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: synthesized core-coder transport channels/mono or stereo output */ int16_t output_frame /* i : output frame length per channel */ ); #endif #ifdef IVAS_FLOAT_FIXED void ivas_lfe_synth_with_filters_fx( MCMASA_LFE_SYNTH_DATA_HANDLE hMasaLfeSynth, /* i/o: LFE synthesis structure for McMASA */ Loading Loading @@ -7390,11 +7394,13 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( float *output_f[] /* o : rendered time signal */ ); #endif #ifndef IVAS_FLOAT_FIXED void ivas_omasa_rearrange_channels( float *output[], /* o : output synthesis signal */ const int16_t nchan_transport_ism, /* i : number of ISM TCs */ const int16_t output_frame /* i : output frame length per channel */ ); #endif #ifndef IVAS_FLOAT_FIXED void ivas_omasa_dirac_rend_jbm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ Loading
lib_dec/ivas_mc_param_dec_fx.c +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ Word16 param_mc_get_num_cldfb_syntheses_ivas_fx( Word16 num_cldfb_syntheses; num_cldfb_syntheses = 0; move16(); /* sanity check*/ IF( st_ivas->hParamMC == NULL ) Loading @@ -15,9 +16,11 @@ Word16 param_mc_get_num_cldfb_syntheses_ivas_fx( assert( 0 && "ParamMC handle does not exist!\n" ); } test(); IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) ) { num_cldfb_syntheses = 2; move16(); } ELSE IF( EQ_16( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) ) { Loading
lib_dec/ivas_mdct_core_dec.c +318 −103 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_dec/ivas_mono_dmx_renderer.c +25 −14 Original line number Diff line number Diff line Loading @@ -73,9 +73,13 @@ ivas_error ivas_mono_dmx_renderer_open( } hDownmix->inputEnergy_fx = 0; move16(); hDownmix->protoEnergy_fx = 0; move16(); hDownmix->Q_inputEner = 0; move16(); hDownmix->Q_protoEner = 0; move16(); st_ivas->hMonoDmxRenderer = hDownmix; Loading Loading @@ -112,6 +116,7 @@ void ivas_mono_dmx_renderer_close( MONO_DOWNMIX_RENDERER_HANDLE *hMonoDmxRenderer /* i/ i/o: Mono downmix structure */ ) { test(); IF( hMonoDmxRenderer == NULL || *hMonoDmxRenderer == NULL ) { return; Loading Loading @@ -219,13 +224,15 @@ void ivas_mono_downmix_render_passive_fx( Word16 diff_shift, div, div_sqrt; Word32 protoEner_pre, inputEner_pre; numInputChannels = st_ivas->nSCE; IF( EQ_16( (Word16) st_ivas->ivas_format, (Word16) SBA_ISM_FORMAT ) ) if ( EQ_16( (Word16) st_ivas->ivas_format, (Word16) SBA_ISM_FORMAT ) ) { numInputChannels = st_ivas->nchan_ism; move16(); } IF( EQ_16( (Word16) st_ivas->ivas_format, (Word16) MASA_ISM_FORMAT ) ) { test(); IF( EQ_16( (Word16) st_ivas->ism_mode, (Word16) ISM_MASA_MODE_MASA_ONE_OBJ ) || EQ_16( (Word16) st_ivas->ism_mode, (Word16) ISM_MASA_MODE_PARAM_ONE_OBJ ) ) { numInputChannels = add( st_ivas->nchan_transport, 1 ); Loading @@ -240,10 +247,11 @@ void ivas_mono_downmix_render_passive_fx( set32_fx( proto_signal_fx, 0, output_frame ); Word16 Output_norm = 32; FOR( int lp = 0; lp < numInputChannels; lp++ ) move16(); FOR( Word16 lp = 0; lp < numInputChannels; lp++ ) { Word16 norm = L_norm_arr( output_f_fx[lp], output_frame ); Output_norm = min( Output_norm, norm ); Output_norm = s_min( Output_norm, norm ); } Q_shift = sub( Output_norm, find_guarded_bits_fx( numInputChannels ) ); Loading Loading @@ -296,8 +304,8 @@ void ivas_mono_downmix_render_passive_fx( norm_inputEner = add( norm_l( hDownmix->inputEnergy_fx ), hDownmix->Q_inputEner ); } norm_protoEner = min( norm_protoEner, sub( shl( add( add( 11, Q_shift ), proto_shift ), 1 ), 31 ) ) - 1; norm_inputEner = min( norm_inputEner, sub( shl( add( 11, input_shift ), 1 ), 31 ) ) - 1; norm_protoEner = sub( s_min( norm_protoEner, sub( shl( add( add( 11, Q_shift ), proto_shift ), 1 ), 31 ) ), 1 ); norm_inputEner = sub( s_min( norm_inputEner, sub( shl( add( 11, input_shift ), 1 ), 31 ) ), 1 ); hDownmix->protoEnergy_fx = L_shl( hDownmix->protoEnergy_fx, sub( norm_protoEner, hDownmix->Q_protoEner ) ); hDownmix->inputEnergy_fx = L_shl( hDownmix->inputEnergy_fx, sub( norm_inputEner, hDownmix->Q_inputEner ) ); Loading @@ -312,7 +320,7 @@ void ivas_mono_downmix_render_passive_fx( hDownmix->inputEnergy_fx = L_add( hDownmix->inputEnergy_fx, inputEner_pre ); diff_shift = sub( hDownmix->Q_inputEner, hDownmix->Q_protoEner ); IF( GT_16( diff_shift, 0 ) ) IF( diff_shift > 0 ) { hDownmix->inputEnergy_fx = L_shr( hDownmix->inputEnergy_fx, diff_shift ); hDownmix->Q_inputEner = sub( hDownmix->Q_inputEner, diff_shift ); Loading Loading @@ -349,6 +357,7 @@ void ivas_mono_downmix_render_passive_fx( * Downmix process in McMASA *------------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void ivas_mono_stereo_downmix_mcmasa( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[], /* i/o: synthesized core-coder transport channels/mono or stereo output */ Loading Loading @@ -388,7 +397,7 @@ void ivas_mono_stereo_downmix_mcmasa( return; } #ifdef IVAS_FLOAT_FIXED #else void ivas_mono_stereo_downmix_mcmasa_fx( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ Word32 *output_f_fx[], /* i/o: synthesized core-coder transport channels/mono or stereo output */ Loading @@ -402,21 +411,22 @@ void ivas_mono_stereo_downmix_mcmasa_fx( set32_fx( dmx_tmp_fx, 0, output_frame ); /* Dowmix center channel to L and R */ if ( st_ivas->hDecoderConfig->nchan_out == 2 && st_ivas->hOutSetup.separateChannelEnabled ) test(); IF ( EQ_16(st_ivas->hDecoderConfig->nchan_out, 2) && st_ivas->hOutSetup.separateChannelEnabled ) { v_multc_acc_32_16( output_f_fx[st_ivas->hOutSetup.separateChannelIndex], INV_SQRT2_FX_Q15, output_f_fx[0], output_frame ); v_multc_acc_32_16( output_f_fx[st_ivas->hOutSetup.separateChannelIndex], INV_SQRT2_FX_Q15, output_f_fx[1], output_frame ); } /* Mono downmix */ else if ( st_ivas->hDecoderConfig->nchan_out == 1 ) ELSE IF (EQ_16(st_ivas->hDecoderConfig->nchan_out, 1) ) { /* Downmix L and R to dmx_tmp */ for ( i = 0; i < st_ivas->nchan_transport; i++ ) FOR ( i = 0; i < st_ivas->nchan_transport; i++ ) { v_multc_acc_32_16( output_f_fx[i], INV_SQRT2_FX_Q15, dmx_tmp_fx, output_frame ); } /* Add center channel */ if ( st_ivas->hOutSetup.separateChannelEnabled ) IF( st_ivas->hOutSetup.separateChannelEnabled ) { v_add_32( output_f_fx[st_ivas->hOutSetup.separateChannelIndex], dmx_tmp_fx, dmx_tmp_fx, output_frame ); } Loading @@ -437,6 +447,7 @@ void ivas_mono_stereo_downmix_mcmasa_fx( * Apply non-diegetic panning *------------------------------------------------------------------------*/ #ifndef IVAS_FLOAT_FIXED void ivas_apply_non_diegetic_panning( float *output_f[], /* i/o: core-coder transport mono channel/stereo output */ const float non_diegetic_pan_gain, /* i : non-diegetic panning gain */ Loading @@ -454,7 +465,7 @@ void ivas_apply_non_diegetic_panning( return; } #ifdef IVAS_FLOAT_FIXED #else void ivas_apply_non_diegetic_panning_fx( Word32 *output_f_fx[], /* i/o: core-coder transport mono channel/stereo output */ const Word16 non_diegetic_pan_gain_fx, /* i : non-diegetic panning gain */ Loading @@ -463,8 +474,8 @@ void ivas_apply_non_diegetic_panning_fx( { Word16 pan_left_fx, pan_right_fx; pan_left_fx = mult( non_diegetic_pan_gain_fx, 16348 ) + 16348; pan_right_fx = 32767 - pan_left_fx; pan_left_fx = add( mult( non_diegetic_pan_gain_fx, 16348 ), 16348 ); pan_right_fx = sub( 32767, pan_left_fx ); v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame ); v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame ); Loading
lib_dec/ivas_objectRenderer_internal.c +8 −5 Original line number Diff line number Diff line Loading @@ -43,8 +43,6 @@ #include "prot_fx1.h" #include "prot_fx2.h" #include "debug.h" #define float_to_fixed( n, factor ) ( round( n * ( 1 << factor ) ) ) #define fixed_to_float( n, factor ) ( (float) n / ( 1 << factor ) ) #endif Loading @@ -61,7 +59,8 @@ ivas_error ivas_td_binaural_open_fx( { *num_src = st_ivas->nchan_transport; move16(); IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) || EQ_16( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) test(); if( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) || EQ_16( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) { *num_src = st_ivas->nchan_ism; move16(); Loading Loading @@ -114,12 +113,13 @@ ivas_error ivas_td_binaural_renderer_fx( { ism_md_subframe_update = 2; } move16(); IF( EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) if( EQ_16( st_ivas->ivas_format, MASA_ISM_FORMAT ) ) { ism_md_subframe_update = 2; move16(); } return ivas_td_binaural_renderer_unwrap_fx( st_ivas->hReverb, st_ivas->transport_config, st_ivas->hBinRendererTd, nchan_transport, LFE_CHANNEL, st_ivas->ivas_format, st_ivas->hIsmMetaData, st_ivas->hCombinedOrientationData, ism_md_subframe_update, output, output_frame, MAX_PARAM_SPATIAL_SUBFRAMES ); } #else Loading Loading @@ -248,6 +248,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx( /* loop for synthesis, assume we always have to render in multiples of 5ms subframes with spills */ tmp = 0; move16(); IF( n_samples_granularity != 0 ) { tmp = idiv1616( n_samples_granularity, slot_size ); Loading Loading @@ -275,6 +276,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx( FOR( nS = 0; nS < nchan_ism; nS++ ) { test(); IF( !( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && EQ_16( nS, LFE_CHANNEL ) ) ) /* Skip LFE for MC */ { st_ivas->hBinRendererTd->Sources[c_indx]->InputFrame_p_fx = tc_local_fx[nS]; /* Q11 */ Loading Loading @@ -306,6 +308,7 @@ ivas_error ivas_td_binaural_renderer_sf_fx( tmp_vector_fx->y_fx = L_shr( tmp_vector_fx->y_fx, sub( tmp_vector_fx->q_fact, pos_q ) ); tmp_vector_fx->z_fx = L_shr( tmp_vector_fx->z_fx, sub( tmp_vector_fx->q_fact, pos_q ) ); tmp_vector_fx->q_fact = pos_q; move16(); } ELSE { Loading