Loading lib_dec/ivas_osba_dec_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -344,9 +344,8 @@ void ivas_osba_stereo_add_channels_fx( IF( EQ_16( ism_mode, ISM_SBA_MODE_DISC ) ) { Word32 gain = gain_bed_fx; test(); move32(); // TODO: Enable gain editing feature (NE_32 ( gain, ONE_IN_Q_gain ) ) test(); IF( NE_32( gain, ONE_IN_Q29 ) && GT_32( gain, 0 ) ) { Loading @@ -354,7 +353,8 @@ void ivas_osba_stereo_add_channels_fx( { FOR( i = 0; i < n_samples_to_render; i++ ) { Word32 tmp1 = Mpy_32_32( tc_fx[n + nchan_ism][i], gain ); // Q11 + Q29 - 31 = Q9 Word32 tmp1; tmp1 = Mpy_32_32( tc_fx[n + nchan_ism][i], gain ); // Q11 + Q29 - 31 = Q9 tmp1 = L_shl( tmp1, 2 ); // Q9 --> Q11 output_fx[n][i] = L_add_sat( output_fx[n][i], tmp1 ); // Q11 } Loading lib_dec/ivas_sba_dec_fx.c +22 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ *******************************************************************************************************/ #include "enh32.h" #include <assert.h> #include <stdint.h> #include "options.h" Loading Loading @@ -886,6 +887,27 @@ ivas_error ivas_sba_dec_render_fx( ivas_spar_dec_upmixer_sf_fx( st_ivas, output_fx_local, nchan_internal ); test(); IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) { Word32 gain = st_ivas->hSbaIsmData->gain_bed_fx; // Q29 move32(); test(); IF( NE_32( gain, ONE_IN_Q29 ) && NE_32( gain, 0 ) ) { FOR( ch = 0; ch < nchan_out; ch++ ) { FOR( Word16 i = 0; i < n_samples_sf; i++ ) { Word32 tmp1; tmp1 = Mpy_32_32( output_fx_local[ch][i], gain ); // Q11 + Q29 - 31 = Q9 output_fx_local[ch][i] = L_shl( tmp1, 2 ); // Q9 --> Q11 } } } } FOR( ch = 0; ch < nchan_out; ch++ ) { output_fx_local[ch] = output_fx_local[ch] + n_samples_sf; /*Q11*/ Loading Loading
lib_dec/ivas_osba_dec_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -344,9 +344,8 @@ void ivas_osba_stereo_add_channels_fx( IF( EQ_16( ism_mode, ISM_SBA_MODE_DISC ) ) { Word32 gain = gain_bed_fx; test(); move32(); // TODO: Enable gain editing feature (NE_32 ( gain, ONE_IN_Q_gain ) ) test(); IF( NE_32( gain, ONE_IN_Q29 ) && GT_32( gain, 0 ) ) { Loading @@ -354,7 +353,8 @@ void ivas_osba_stereo_add_channels_fx( { FOR( i = 0; i < n_samples_to_render; i++ ) { Word32 tmp1 = Mpy_32_32( tc_fx[n + nchan_ism][i], gain ); // Q11 + Q29 - 31 = Q9 Word32 tmp1; tmp1 = Mpy_32_32( tc_fx[n + nchan_ism][i], gain ); // Q11 + Q29 - 31 = Q9 tmp1 = L_shl( tmp1, 2 ); // Q9 --> Q11 output_fx[n][i] = L_add_sat( output_fx[n][i], tmp1 ); // Q11 } Loading
lib_dec/ivas_sba_dec_fx.c +22 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ *******************************************************************************************************/ #include "enh32.h" #include <assert.h> #include <stdint.h> #include "options.h" Loading Loading @@ -886,6 +887,27 @@ ivas_error ivas_sba_dec_render_fx( ivas_spar_dec_upmixer_sf_fx( st_ivas, output_fx_local, nchan_internal ); test(); IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) ) { Word32 gain = st_ivas->hSbaIsmData->gain_bed_fx; // Q29 move32(); test(); IF( NE_32( gain, ONE_IN_Q29 ) && NE_32( gain, 0 ) ) { FOR( ch = 0; ch < nchan_out; ch++ ) { FOR( Word16 i = 0; i < n_samples_sf; i++ ) { Word32 tmp1; tmp1 = Mpy_32_32( output_fx_local[ch][i], gain ); // Q11 + Q29 - 31 = Q9 output_fx_local[ch][i] = L_shl( tmp1, 2 ); // Q9 --> Q11 } } } } FOR( ch = 0; ch < nchan_out; ch++ ) { output_fx_local[ch] = output_fx_local[ch] + n_samples_sf; /*Q11*/ Loading