Loading lib_com/prot_fx.h +7 −3 Original line number Diff line number Diff line Loading @@ -7656,7 +7656,11 @@ ivas_error core_switching_pre_dec_fx( ivas_error core_switching_post_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Word16 *synth, /* i/o: output synthesis Qsynth*/ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q11*/ #else Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q4*/ #endif Word16 output_mem_fx[], /* i : OLA memory from last TCX/HQ frame Qx*/ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo Q0*/ const Word16 output_frame, /* i : frame length Q0*/ Loading lib_dec/core_switching_dec_fx.c +20 −4 Original line number Diff line number Diff line Loading @@ -210,7 +210,11 @@ void bw_switching_pre_proc_fx( ivas_error core_switching_post_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Word16 *synth, /* i/o: output synthesis Qsynth*/ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q11*/ #else Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q4*/ #endif Word16 output_mem_fx[], /* i : OLA memory from last TCX/HQ frame Qx*/ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo Q0*/ const Word16 output_frame, /* i : frame length Q0*/ Loading Loading @@ -433,7 +437,11 @@ ivas_error core_switching_post_dec_fx( test(); IF( ( ( NE_32( st_fx->last_core_brate, SID_2k40 ) && NE_32( st_fx->last_core_brate, FRAME_NO_DATA ) ) || ( NE_16( st_fx->element_mode, IVAS_CPE_DFT ) && NE_16( st_fx->element_mode, IVAS_CPE_TD ) ) || EQ_16( nchan_out, 1 ) ) && !( EQ_16( st_fx->element_mode, IVAS_CPE_MDCT ) && EQ_16( st_fx->idchan, 1 ) && ( EQ_16( nchan_out, 1 ) || EQ_16( last_element_mode, IVAS_CPE_DFT ) ) ) ) { #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_fx, output_frame, Q10 - Q11 ); /* Q10 */ #else Scale_sig32( output_fx, L_FRAME48k, Q10 - Q4 ); /* Q10 */ #endif core_switch_lb_upsamp_fx( st_fx, output_fx ); } Loading Loading @@ -491,7 +499,11 @@ ivas_error core_switching_post_dec_fx( FOR( i = 0; i < delta; i++ ) { st_fx->cldfbAna->cldfb_state_fx[offset - delta + i] = #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q11 ), alpha ); /* Q10 */ #else Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q4 ), alpha ); /* Q10 */ #endif move32(); IF( LT_16( alpha, sub( 32767, tmp ) ) ) { Loading Loading @@ -540,7 +552,11 @@ ivas_error core_switching_post_dec_fx( FOR( i = 0; i < delta; i++ ) { st_fx->cldfbAna->cldfb_state_fx[offset - delta + i] = #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q11 ), alpha ); /* Q10 */ #else Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q4 ), alpha ); /* Q10 */ #endif move32(); IF( LT_16( alpha, sub( 32767, tmp ) ) ) { Loading lib_dec/ivas_core_dec_fx.c +20 −9 Original line number Diff line number Diff line Loading @@ -851,12 +851,10 @@ ivas_error ivas_core_dec_fx( set16_fx( output_mem_16_fx, 0, NS2SA_FX2( st->output_Fs, 3125000 ) ); } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], output_frame, Q4 - Q11 ); // Q4 #else #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], L_FRAME48k, Q4 - Q11 ); // Q4 #endif #endif /*size of synth is choosen as delay comp to start with*/ /*-------------------cldfb-start-------------------------*/ Loading Loading @@ -961,7 +959,10 @@ ivas_error ivas_core_dec_fx( } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Scale_sig32( output_32_fx[n], output_frame, ( Q4 - Q11 ) ); // Q4 Scale_sig32( output_32_fx[n], output_frame, ( Q11 - Q4 ) ); // Q11 #endif #else Scale_sig32( output_32_fx[n], L_FRAME48k, ( Q11 - Q4 ) ); // Q11 #endif Loading Loading @@ -1005,8 +1006,18 @@ ivas_error ivas_core_dec_fx( * WB BWE decoding *---------------------------------------------------------------------*/ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Word16 Q_hb_synth_fx, Q_synth_fx; Word16 Q_syn_hb; Q_hb_synth_fx = 0; move16(); Q_synth_fx = Q_synth; move16(); #else Word16 Q_input, Q_hb_synth_fx, Q_synth_fx; Word16 Q_syn_hb, sf; #endif flaf_swb_tbe = 0; move16(); Loading @@ -1024,6 +1035,7 @@ ivas_error ivas_core_dec_fx( move16(); } #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE sf = getScaleFactor32( output_32_fx[n], L_FRAME48k ); Q_input = 0; Loading @@ -1037,7 +1049,6 @@ ivas_error ivas_core_dec_fx( Q_synth_fx = Q_synth; move16(); #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Copy_Scale_sig_32_16( output_32_fx[n], output_16_fx[n], L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif Copy_Scale_sig_32_16( hb_synth_32_fx[n], hb_synth_16_fx[n], L_FRAME48k, -( Q11 ) ); // Q0 Loading Loading
lib_com/prot_fx.h +7 −3 Original line number Diff line number Diff line Loading @@ -7656,7 +7656,11 @@ ivas_error core_switching_pre_dec_fx( ivas_error core_switching_post_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Word16 *synth, /* i/o: output synthesis Qsynth*/ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q11*/ #else Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q4*/ #endif Word16 output_mem_fx[], /* i : OLA memory from last TCX/HQ frame Qx*/ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo Q0*/ const Word16 output_frame, /* i : frame length Q0*/ Loading
lib_dec/core_switching_dec_fx.c +20 −4 Original line number Diff line number Diff line Loading @@ -210,7 +210,11 @@ void bw_switching_pre_proc_fx( ivas_error core_switching_post_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ Word16 *synth, /* i/o: output synthesis Qsynth*/ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q11*/ #else Word32 *output_fx, /* i/o: LB synth/upsampled LB synth Q4*/ #endif Word16 output_mem_fx[], /* i : OLA memory from last TCX/HQ frame Qx*/ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo Q0*/ const Word16 output_frame, /* i : frame length Q0*/ Loading Loading @@ -433,7 +437,11 @@ ivas_error core_switching_post_dec_fx( test(); IF( ( ( NE_32( st_fx->last_core_brate, SID_2k40 ) && NE_32( st_fx->last_core_brate, FRAME_NO_DATA ) ) || ( NE_16( st_fx->element_mode, IVAS_CPE_DFT ) && NE_16( st_fx->element_mode, IVAS_CPE_TD ) ) || EQ_16( nchan_out, 1 ) ) && !( EQ_16( st_fx->element_mode, IVAS_CPE_MDCT ) && EQ_16( st_fx->idchan, 1 ) && ( EQ_16( nchan_out, 1 ) || EQ_16( last_element_mode, IVAS_CPE_DFT ) ) ) ) { #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_fx, output_frame, Q10 - Q11 ); /* Q10 */ #else Scale_sig32( output_fx, L_FRAME48k, Q10 - Q4 ); /* Q10 */ #endif core_switch_lb_upsamp_fx( st_fx, output_fx ); } Loading Loading @@ -491,7 +499,11 @@ ivas_error core_switching_post_dec_fx( FOR( i = 0; i < delta; i++ ) { st_fx->cldfbAna->cldfb_state_fx[offset - delta + i] = #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q11 ), alpha ); /* Q10 */ #else Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q4 ), alpha ); /* Q10 */ #endif move32(); IF( LT_16( alpha, sub( 32767, tmp ) ) ) { Loading Loading @@ -540,7 +552,11 @@ ivas_error core_switching_post_dec_fx( FOR( i = 0; i < delta; i++ ) { st_fx->cldfbAna->cldfb_state_fx[offset - delta + i] = #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q11 ), alpha ); /* Q10 */ #else Mpy_32_16_1( L_shl( output_fx[st_fx->L_frame - delta + i], Q10 - Q4 ), alpha ); /* Q10 */ #endif move32(); IF( LT_16( alpha, sub( 32767, tmp ) ) ) { Loading
lib_dec/ivas_core_dec_fx.c +20 −9 Original line number Diff line number Diff line Loading @@ -851,12 +851,10 @@ ivas_error ivas_core_dec_fx( set16_fx( output_mem_16_fx, 0, NS2SA_FX2( st->output_Fs, 3125000 ) ); } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], output_frame, Q4 - Q11 ); // Q4 #else #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], L_FRAME48k, Q4 - Q11 ); // Q4 #endif #endif /*size of synth is choosen as delay comp to start with*/ /*-------------------cldfb-start-------------------------*/ Loading Loading @@ -961,7 +959,10 @@ ivas_error ivas_core_dec_fx( } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Scale_sig32( output_32_fx[n], output_frame, ( Q4 - Q11 ) ); // Q4 Scale_sig32( output_32_fx[n], output_frame, ( Q11 - Q4 ) ); // Q11 #endif #else Scale_sig32( output_32_fx[n], L_FRAME48k, ( Q11 - Q4 ) ); // Q11 #endif Loading Loading @@ -1005,8 +1006,18 @@ ivas_error ivas_core_dec_fx( * WB BWE decoding *---------------------------------------------------------------------*/ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Word16 Q_hb_synth_fx, Q_synth_fx; Word16 Q_syn_hb; Q_hb_synth_fx = 0; move16(); Q_synth_fx = Q_synth; move16(); #else Word16 Q_input, Q_hb_synth_fx, Q_synth_fx; Word16 Q_syn_hb, sf; #endif flaf_swb_tbe = 0; move16(); Loading @@ -1024,6 +1035,7 @@ ivas_error ivas_core_dec_fx( move16(); } #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE sf = getScaleFactor32( output_32_fx[n], L_FRAME48k ); Q_input = 0; Loading @@ -1037,7 +1049,6 @@ ivas_error ivas_core_dec_fx( Q_synth_fx = Q_synth; move16(); #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Copy_Scale_sig_32_16( output_32_fx[n], output_16_fx[n], L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif Copy_Scale_sig_32_16( hb_synth_32_fx[n], hb_synth_16_fx[n], L_FRAME48k, -( Q11 ) ); // Q0 Loading