Loading lib_com/ivas_prot.h +6 −6 Original line number Diff line number Diff line Loading @@ -1652,9 +1652,9 @@ void InternalTCXDecoder( void stereo_mdct_core_enc_fx( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ Word16 new_samples[CPE_CHANNELS][L_INP], /* i : new samples */ Word16 old_wsp[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP */ Word16 pitch_buf_fx[CPE_CHANNELS][NB_SUBFR16k] /* o : floating pitch for each subframe */ Word16 new_samples[CPE_CHANNELS][L_INP], /* i : new samples Q0*/ Word16 old_wsp[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP Qx*/ Word16 pitch_buf_fx[CPE_CHANNELS][NB_SUBFR16k] /* o : floating pitch for each subframe Q6*/ ); void initMdctStereoEncData( Loading Loading @@ -1931,12 +1931,12 @@ void splitAvailableBits( int16_t *bits_ch1 /* o : bits for channel 1 */ ); int16_t write_stereo_to_bitstream Word16 write_stereo_to_bitstream_fx ( STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct, /* i/o: Stereo MDCT encoder structure */ Encoder_State **sts, /* i/o: Encoder state structure */ int16_t ms_mask[NB_DIV][MAX_SFB], /* i : bandwise MS mask */ const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ Word16 ms_mask[NB_DIV][MAX_SFB], /* i : bandwise MS mask Q0*/ const Word16 mct_on, /* i : flag mct block (1) or stereo (0) Q0*/ BSTR_ENC_HANDLE hBstr /* i/o: bitstream handle */ ); Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,6 @@ #define FIX_1127_IMPROVE_SBA_MLD /* Ittiam: Avoid saturation for DiRAC reference power */ #define FIX_1100_REMOVE_LPC_RESCALING /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/ #define FIX_1133_IMPROVE_MC_MLD /* Ittiam: Correcting wrong updation of exponents in ivas_mc_paramupmix_param_est_enc_fx() */ #define FIX_ISSUE_1122 /* Ittiam: Fix issue 1122: corrected incorrect scaling of a buffer leading to incorrect metadata bits */ #define FIX_1132_STACK_CORRUPTION /* Stack corruption issue due of extending index access*/ #endif lib_enc/cod_tcx_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -3799,7 +3799,7 @@ void QuantizeTCXSpectrum_fx( } /* Quantize original spectrum */ sqGain_fx = SQ_gain_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); sqGain_fx = SQ_gain_ivas_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly ); Loading Loading @@ -3887,7 +3887,7 @@ void QuantizeTCXSpectrum_fx( } ELSE { sqGain_fx = SQ_gain_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); sqGain_fx = SQ_gain_ivas_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); } /* Quantize spectrum */ tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly ); Loading lib_enc/ivas_mct_core_enc.c +4 −4 Original line number Diff line number Diff line Loading @@ -496,13 +496,13 @@ void ivas_mct_core_enc_fx( FOR( i = 1; i < L_subframeTCX - 1; i++ ) { mdst_fx = L_sub( L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i + 1], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i - 1], 1 ) ); /* An MDST estimate */ mdst_fx = L_sub( L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i + 1], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i - 1], 1 ) ); /* An MDST estimate, Q = q_spec - 1 */ W_tmp = W_mac_32_32( W_mult_32_32( mdst_fx, mdst_fx ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ) ); W_tmp = W_mac_32_32( W_mult_32_32( mdst_fx, mdst_fx ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ) ); // Q = 2 * (q_spec - 1) + 1 tmp_s = W_norm( W_tmp ); W_tmp = W_shl( W_tmp, tmp_s ); powerSpec_fx[ch][add( i, imult1616( n, L_subframeTCX ) )] = W_extract_h( W_tmp ); tmp_q_powSpec[add( i, imult1616( n, L_subframeTCX ) )] = sub( add( imult1616( q_spec, 2 ), tmp_s ), 31 ); // Q = 2 * q_spec + 1 + tmp_s - 32 powerSpec_fx[ch][i + ( n * L_subframeTCX )] = W_extract_h( W_tmp ); tmp_q_powSpec[i + ( n * L_subframeTCX )] = sub( add( imult1616( q_spec, 2 ), tmp_s ), 33 ); // Q = 2 * (q_spec - 1) + 1 + tmp_s - 32 move32(); move16(); } Loading lib_enc/ivas_mct_enc_mct.c +1 −1 Original line number Diff line number Diff line Loading @@ -959,7 +959,7 @@ void write_mct_bitstream_fx( p_st[1] = sts[hBlock->ch2]; /*then business as usual for each block pair */ write_stereo_to_bitstream( hMCT->hBlockData[pair]->hStereoMdct, p_st, hBlock->mask, 1, hBstr ); write_stereo_to_bitstream_fx( hMCT->hBlockData[pair]->hStereoMdct, p_st, hBlock->mask, 1, hBstr ); } hMCT->nBitsMCT = sub( hBstr->nb_bits_tot, nbits_start ); Loading Loading
lib_com/ivas_prot.h +6 −6 Original line number Diff line number Diff line Loading @@ -1652,9 +1652,9 @@ void InternalTCXDecoder( void stereo_mdct_core_enc_fx( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ Word16 new_samples[CPE_CHANNELS][L_INP], /* i : new samples */ Word16 old_wsp[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP */ Word16 pitch_buf_fx[CPE_CHANNELS][NB_SUBFR16k] /* o : floating pitch for each subframe */ Word16 new_samples[CPE_CHANNELS][L_INP], /* i : new samples Q0*/ Word16 old_wsp[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP Qx*/ Word16 pitch_buf_fx[CPE_CHANNELS][NB_SUBFR16k] /* o : floating pitch for each subframe Q6*/ ); void initMdctStereoEncData( Loading Loading @@ -1931,12 +1931,12 @@ void splitAvailableBits( int16_t *bits_ch1 /* o : bits for channel 1 */ ); int16_t write_stereo_to_bitstream Word16 write_stereo_to_bitstream_fx ( STEREO_MDCT_ENC_DATA_HANDLE hStereoMdct, /* i/o: Stereo MDCT encoder structure */ Encoder_State **sts, /* i/o: Encoder state structure */ int16_t ms_mask[NB_DIV][MAX_SFB], /* i : bandwise MS mask */ const int16_t mct_on, /* i : flag mct block (1) or stereo (0) */ Word16 ms_mask[NB_DIV][MAX_SFB], /* i : bandwise MS mask Q0*/ const Word16 mct_on, /* i : flag mct block (1) or stereo (0) Q0*/ BSTR_ENC_HANDLE hBstr /* i/o: bitstream handle */ ); Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,6 @@ #define FIX_1127_IMPROVE_SBA_MLD /* Ittiam: Avoid saturation for DiRAC reference power */ #define FIX_1100_REMOVE_LPC_RESCALING /* VA: Remove the rescaling of LPC coefficient to Q12 as residu and syn-filt are already taking care of it*/ #define FIX_1133_IMPROVE_MC_MLD /* Ittiam: Correcting wrong updation of exponents in ivas_mc_paramupmix_param_est_enc_fx() */ #define FIX_ISSUE_1122 /* Ittiam: Fix issue 1122: corrected incorrect scaling of a buffer leading to incorrect metadata bits */ #define FIX_1132_STACK_CORRUPTION /* Stack corruption issue due of extending index access*/ #endif
lib_enc/cod_tcx_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -3799,7 +3799,7 @@ void QuantizeTCXSpectrum_fx( } /* Quantize original spectrum */ sqGain_fx = SQ_gain_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); sqGain_fx = SQ_gain_ivas_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly ); Loading Loading @@ -3887,7 +3887,7 @@ void QuantizeTCXSpectrum_fx( } ELSE { sqGain_fx = SQ_gain_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); sqGain_fx = SQ_gain_ivas_fx( spectrum_fx, *spectrum_e, shl( mult( hTcxEnc->tcx_target_bits_fac, sqTargetBits ), 1 ), L_spec, &sqGain_e ); } /* Quantize spectrum */ tcx_scalar_quantization_ivas_fx( spectrum_fx, *spectrum_e, sqQ, L_spec, sqGain_fx, sqGain_e, st->hTcxCfg->sq_rounding, hTcxEnc->memQuantZeros, st->tcxonly ); Loading
lib_enc/ivas_mct_core_enc.c +4 −4 Original line number Diff line number Diff line Loading @@ -496,13 +496,13 @@ void ivas_mct_core_enc_fx( FOR( i = 1; i < L_subframeTCX - 1; i++ ) { mdst_fx = L_sub( L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i + 1], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i - 1], 1 ) ); /* An MDST estimate */ mdst_fx = L_sub( L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i + 1], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i - 1], 1 ) ); /* An MDST estimate, Q = q_spec - 1 */ W_tmp = W_mac_32_32( W_mult_32_32( mdst_fx, mdst_fx ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ) ); W_tmp = W_mac_32_32( W_mult_32_32( mdst_fx, mdst_fx ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ), L_shr( sts[ch]->hTcxEnc->spectrum_fx[n][i], 1 ) ); // Q = 2 * (q_spec - 1) + 1 tmp_s = W_norm( W_tmp ); W_tmp = W_shl( W_tmp, tmp_s ); powerSpec_fx[ch][add( i, imult1616( n, L_subframeTCX ) )] = W_extract_h( W_tmp ); tmp_q_powSpec[add( i, imult1616( n, L_subframeTCX ) )] = sub( add( imult1616( q_spec, 2 ), tmp_s ), 31 ); // Q = 2 * q_spec + 1 + tmp_s - 32 powerSpec_fx[ch][i + ( n * L_subframeTCX )] = W_extract_h( W_tmp ); tmp_q_powSpec[i + ( n * L_subframeTCX )] = sub( add( imult1616( q_spec, 2 ), tmp_s ), 33 ); // Q = 2 * (q_spec - 1) + 1 + tmp_s - 32 move32(); move16(); } Loading
lib_enc/ivas_mct_enc_mct.c +1 −1 Original line number Diff line number Diff line Loading @@ -959,7 +959,7 @@ void write_mct_bitstream_fx( p_st[1] = sts[hBlock->ch2]; /*then business as usual for each block pair */ write_stereo_to_bitstream( hMCT->hBlockData[pair]->hStereoMdct, p_st, hBlock->mask, 1, hBstr ); write_stereo_to_bitstream_fx( hMCT->hBlockData[pair]->hStereoMdct, p_st, hBlock->mask, 1, hBstr ); } hMCT->nBitsMCT = sub( hBstr->nb_bits_tot, nbits_start ); Loading