Loading lib_com/prot_fx.h +19 −4 Original line number Diff line number Diff line Loading @@ -8617,7 +8617,7 @@ void ivas_mdct_core_reconstruct_fx( void ari_start_encoding_14bits_ivas_fx( Tastat *s ); #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_ivas_fx( Word32* x, /* i: input coefficients */ Word16 x_e, /* i: exponent */ Loading @@ -8628,6 +8628,21 @@ void tcx_scalar_quantization_ivas_fx( Word16 offset, /* i: rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i: coefficients to be set to 0 */ const Word16 alfe_flag ); #else void tcx_scalar_quantization_fx( Word32* x, /* i: input coefficients */ Word16 x_e, /* i: exponent */ Word16* xq, /* o: quantized coefficients */ Word16 L_frame, /* i: frame length */ Word16 gain, /* i: quantization gain */ Word16 gain_e, /* i: quantization gain exponent */ Word16 offset, /* i: rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i: coefficients to be set to 0 */ const Word16 alfe_flag, const Word16 element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN Word16 RCcontextMapping_encode2_estimate_no_mem_s17_LCS_fx( Word16 *x, /* Spectral coefficients Q0*/ Loading lib_enc/cod_tcx_fx.c +56 −23 Original line number Diff line number Diff line Loading @@ -1436,7 +1436,7 @@ void QuantizeSpectrum_fx( shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(OriginalSpectrum, OriginalSpectrum_e, sqQ, L_spec, Loading @@ -1444,6 +1444,17 @@ void QuantizeSpectrum_fx( hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly ); #else tcx_scalar_quantization_fx(OriginalSpectrum, OriginalSpectrum_e, sqQ, L_spec, sqGain, sqGain_e, hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN /* Estimate original bitrate */ stop = 0; Loading Loading @@ -1530,7 +1541,7 @@ void QuantizeSpectrum_fx( &sqGain_e ); /* Quantize spectrum */ #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, Loading @@ -1538,6 +1549,16 @@ void QuantizeSpectrum_fx( hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly ); #else tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, sqGain, sqGain_e, hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN /* Estimate bitrate */ stop = 0; Loading Loading @@ -1717,7 +1738,7 @@ void QuantizeSpectrum_fx( { sqGain = tmp1; sqGain_e = s; #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, Loading @@ -1725,6 +1746,18 @@ void QuantizeSpectrum_fx( hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly ); #else tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, sqGain, sqGain_e, hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN move16(); stop = 1; Loading lib_enc/prot_fx_enc.h +2 −0 Original line number Diff line number Diff line Loading @@ -1107,6 +1107,7 @@ Word16 SQ_gain_estimate_fx( Word16 *gain_e /* o : SQ gain exponent */ ); #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_fx( Word32 *x, /* i : i coefficients */ Word16 x_e, /* i : exponent */ Loading @@ -1117,6 +1118,7 @@ void tcx_scalar_quantization_fx( Word16 offset, /* i : rounding offset (deadzone) */ Word8 const *memQuantZeros, /* i : coefficients to be set to 0 */ const Word16 alfe_flag ); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN Word16 tcx_scalar_quantization_rateloop_fx( Word32 *x, /* i : i coefficients */ Loading lib_enc/tcx_utils_enc_fx.c +30 −7 Original line number Diff line number Diff line Loading @@ -1259,7 +1259,7 @@ Word16 SQ_gain_estimate_fx( return tmp16; } #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_fx( Word32 *x, /* i : input coefficients */ Word16 x_e, /* i : exponent */ Loading Loading @@ -1333,8 +1333,9 @@ void tcx_scalar_quantization_fx( return; } #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_ivas_fx( Word32* x, /* i : input coefficients exponent = x_e */ Word16 x_e, /* i : exponent */ Loading @@ -1345,6 +1346,19 @@ void tcx_scalar_quantization_ivas_fx( Word16 offset, /* i : rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i : coefficients to be set to 0 */ const Word16 alfe_flag ) #else void tcx_scalar_quantization_fx( Word32* x, /* i : input coefficients exponent = x_e */ Word16 x_e, /* i : exponent */ Word16* xq, /* o : quantized coefficients */ Word16 L_frame, /* i : frame length */ Word16 gain, /* i : quantization gain exponent = gain_e */ Word16 gain_e, /* i : quantization gain exponent */ Word16 offset, /* i : rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i : coefficients to be set to 0 */ const Word16 alfe_flag, const Word16 element_mode) #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN { Word16 i, tmp16, s; Word32 tmp32, offs32; Loading @@ -1354,7 +1368,11 @@ void tcx_scalar_quantization_ivas_fx( /* common exponent for x and gain for comparison */ tmp16 = sub( gain_e, x_e ); tmp32 = L_shl_sat( L_deposit_h( gain ), tmp16 ); // exp:x_e #ifdef FIX_BASOP_2551_HARM_SCALAR_QUAN IF(EQ_16(element_mode, EVS_MONO)) { tmp16 = negate(s_max(tmp16, 0)); } #endif // FIX_BASOP_2551_HARM_SCALAR_QUAN i = sub( L_frame, 1 ); IF( memQuantZeros_fx != NULL ) { Loading Loading @@ -1637,7 +1655,12 @@ Word16 tcx_scalar_quantization_rateloop_fx( } /* Quantize spectrum */ #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(x, x_e, xq, L_frame, sqGain, sqGain_e, offset, memQuantZeros_fx, tcxonly); #else tcx_scalar_quantization_fx(x, x_e, xq, L_frame, sqGain, sqGain_e, offset, memQuantZeros_fx, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN /* Estimate bitrate */ stopFlag = 1; Loading Loading
lib_com/prot_fx.h +19 −4 Original line number Diff line number Diff line Loading @@ -8617,7 +8617,7 @@ void ivas_mdct_core_reconstruct_fx( void ari_start_encoding_14bits_ivas_fx( Tastat *s ); #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_ivas_fx( Word32* x, /* i: input coefficients */ Word16 x_e, /* i: exponent */ Loading @@ -8628,6 +8628,21 @@ void tcx_scalar_quantization_ivas_fx( Word16 offset, /* i: rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i: coefficients to be set to 0 */ const Word16 alfe_flag ); #else void tcx_scalar_quantization_fx( Word32* x, /* i: input coefficients */ Word16 x_e, /* i: exponent */ Word16* xq, /* o: quantized coefficients */ Word16 L_frame, /* i: frame length */ Word16 gain, /* i: quantization gain */ Word16 gain_e, /* i: quantization gain exponent */ Word16 offset, /* i: rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i: coefficients to be set to 0 */ const Word16 alfe_flag, const Word16 element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN Word16 RCcontextMapping_encode2_estimate_no_mem_s17_LCS_fx( Word16 *x, /* Spectral coefficients Q0*/ Loading
lib_enc/cod_tcx_fx.c +56 −23 Original line number Diff line number Diff line Loading @@ -1436,7 +1436,7 @@ void QuantizeSpectrum_fx( shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(OriginalSpectrum, OriginalSpectrum_e, sqQ, L_spec, Loading @@ -1444,6 +1444,17 @@ void QuantizeSpectrum_fx( hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly ); #else tcx_scalar_quantization_fx(OriginalSpectrum, OriginalSpectrum_e, sqQ, L_spec, sqGain, sqGain_e, hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN /* Estimate original bitrate */ stop = 0; Loading Loading @@ -1530,7 +1541,7 @@ void QuantizeSpectrum_fx( &sqGain_e ); /* Quantize spectrum */ #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, Loading @@ -1538,6 +1549,16 @@ void QuantizeSpectrum_fx( hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly ); #else tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, sqGain, sqGain_e, hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN /* Estimate bitrate */ stop = 0; Loading Loading @@ -1717,7 +1738,7 @@ void QuantizeSpectrum_fx( { sqGain = tmp1; sqGain_e = s; #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, Loading @@ -1725,6 +1746,18 @@ void QuantizeSpectrum_fx( hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly ); #else tcx_scalar_quantization_fx(spectrum, *spectrum_e, sqQ, L_spec, sqGain, sqGain_e, hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN move16(); stop = 1; Loading
lib_enc/prot_fx_enc.h +2 −0 Original line number Diff line number Diff line Loading @@ -1107,6 +1107,7 @@ Word16 SQ_gain_estimate_fx( Word16 *gain_e /* o : SQ gain exponent */ ); #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_fx( Word32 *x, /* i : i coefficients */ Word16 x_e, /* i : exponent */ Loading @@ -1117,6 +1118,7 @@ void tcx_scalar_quantization_fx( Word16 offset, /* i : rounding offset (deadzone) */ Word8 const *memQuantZeros, /* i : coefficients to be set to 0 */ const Word16 alfe_flag ); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN Word16 tcx_scalar_quantization_rateloop_fx( Word32 *x, /* i : i coefficients */ Loading
lib_enc/tcx_utils_enc_fx.c +30 −7 Original line number Diff line number Diff line Loading @@ -1259,7 +1259,7 @@ Word16 SQ_gain_estimate_fx( return tmp16; } #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_fx( Word32 *x, /* i : input coefficients */ Word16 x_e, /* i : exponent */ Loading Loading @@ -1333,8 +1333,9 @@ void tcx_scalar_quantization_fx( return; } #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN void tcx_scalar_quantization_ivas_fx( Word32* x, /* i : input coefficients exponent = x_e */ Word16 x_e, /* i : exponent */ Loading @@ -1345,6 +1346,19 @@ void tcx_scalar_quantization_ivas_fx( Word16 offset, /* i : rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i : coefficients to be set to 0 */ const Word16 alfe_flag ) #else void tcx_scalar_quantization_fx( Word32* x, /* i : input coefficients exponent = x_e */ Word16 x_e, /* i : exponent */ Word16* xq, /* o : quantized coefficients */ Word16 L_frame, /* i : frame length */ Word16 gain, /* i : quantization gain exponent = gain_e */ Word16 gain_e, /* i : quantization gain exponent */ Word16 offset, /* i : rounding offset (deadzone) */ Word8 const* memQuantZeros_fx, /* i : coefficients to be set to 0 */ const Word16 alfe_flag, const Word16 element_mode) #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN { Word16 i, tmp16, s; Word32 tmp32, offs32; Loading @@ -1354,7 +1368,11 @@ void tcx_scalar_quantization_ivas_fx( /* common exponent for x and gain for comparison */ tmp16 = sub( gain_e, x_e ); tmp32 = L_shl_sat( L_deposit_h( gain ), tmp16 ); // exp:x_e #ifdef FIX_BASOP_2551_HARM_SCALAR_QUAN IF(EQ_16(element_mode, EVS_MONO)) { tmp16 = negate(s_max(tmp16, 0)); } #endif // FIX_BASOP_2551_HARM_SCALAR_QUAN i = sub( L_frame, 1 ); IF( memQuantZeros_fx != NULL ) { Loading Loading @@ -1637,7 +1655,12 @@ Word16 tcx_scalar_quantization_rateloop_fx( } /* Quantize spectrum */ #ifndef FIX_BASOP_2551_HARM_SCALAR_QUAN tcx_scalar_quantization_fx(x, x_e, xq, L_frame, sqGain, sqGain_e, offset, memQuantZeros_fx, tcxonly); #else tcx_scalar_quantization_fx(x, x_e, xq, L_frame, sqGain, sqGain_e, offset, memQuantZeros_fx, tcxonly, st->element_mode); #endif // !FIX_BASOP_2551_HARM_SCALAR_QUAN /* Estimate bitrate */ stopFlag = 1; Loading