Loading lib_dec/ivas_stereo_dft_dec_fx.c +11 −3 Original line number Diff line number Diff line Loading @@ -3261,11 +3261,19 @@ void stereo_dft_generate_res_pred_fx( dmx_nrg = L_shl( dmx_nrg, norm_dmx_nrg ); q_dmx_nrg = add( sub( shl( hStereoDft->q_dft, 1 ), 31 ), norm_dmx_nrg ); q_diff = sub( hStereoDft->q_hb_nrg[0], q_dmx_nrg ); /* dmx_nrg * 2 / hStereoDft->NFFT */ L_temp = BASOP_Util_Divide3232_Scale_newton( dmx_nrg, shr( hStereoDft->NFFT, 1 ), &temp_e ); L_temp = L_shr( L_temp, sub( 31, temp_e ) ); L_temp = L_shr( L_temp, sub( 31, temp_e ) ); /* q_dmx_nrg */ /* for L_temp we have at least one bit of headroom due to the division above; check also for hStereoDft->hb_nrg_fx[0] and possibly reserve one bit*/ test(); IF( norm_l( hStereoDft->hb_nrg_fx[0] ) == 0 && hStereoDft->hb_nrg_fx[0] != 0 ) { hStereoDft->hb_nrg_fx[0] = L_shr( hStereoDft->hb_nrg_fx[0], 1 ); hStereoDft->q_hb_nrg[0] = sub( hStereoDft->q_hb_nrg[0], 1 ); } q_diff = sub( hStereoDft->q_hb_nrg[0], q_dmx_nrg ); IF( GT_16( q_diff, 0 ) ) { Loading Loading
lib_dec/ivas_stereo_dft_dec_fx.c +11 −3 Original line number Diff line number Diff line Loading @@ -3261,11 +3261,19 @@ void stereo_dft_generate_res_pred_fx( dmx_nrg = L_shl( dmx_nrg, norm_dmx_nrg ); q_dmx_nrg = add( sub( shl( hStereoDft->q_dft, 1 ), 31 ), norm_dmx_nrg ); q_diff = sub( hStereoDft->q_hb_nrg[0], q_dmx_nrg ); /* dmx_nrg * 2 / hStereoDft->NFFT */ L_temp = BASOP_Util_Divide3232_Scale_newton( dmx_nrg, shr( hStereoDft->NFFT, 1 ), &temp_e ); L_temp = L_shr( L_temp, sub( 31, temp_e ) ); L_temp = L_shr( L_temp, sub( 31, temp_e ) ); /* q_dmx_nrg */ /* for L_temp we have at least one bit of headroom due to the division above; check also for hStereoDft->hb_nrg_fx[0] and possibly reserve one bit*/ test(); IF( norm_l( hStereoDft->hb_nrg_fx[0] ) == 0 && hStereoDft->hb_nrg_fx[0] != 0 ) { hStereoDft->hb_nrg_fx[0] = L_shr( hStereoDft->hb_nrg_fx[0], 1 ); hStereoDft->q_hb_nrg[0] = sub( hStereoDft->q_hb_nrg[0], 1 ); } q_diff = sub( hStereoDft->q_hb_nrg[0], q_dmx_nrg ); IF( GT_16( q_diff, 0 ) ) { Loading