Loading lib_com/low_rate_band_att_fx.c +5 −9 Original line number Diff line number Diff line Loading @@ -97,17 +97,13 @@ void ivas_fine_gain_pred_fx( } ELSE { #endif Word16 norm = norm_s( bw ); #ifdef HARM_HQ_CORE Word16 tmp_exp = sub( 15, norm ); tmp1 = ivas_fine_gain_pred_sqrt_bw[bw_idx]; } #else Word16 norm = norm_s( bw ); Word16 tmp1, tmp_exp = sub( 15, norm ); #endif tmp1 = Sqrt16( shl( bw, norm ), &tmp_exp ); tmp1 = shr( tmp1, sub( sub( 15, tmp_exp ), Q11 ) ); #ifdef HARM_HQ_CORE } #endif Mpy_32_16_ss( L_tmp, tmp1, &L_tmp, &lsb ); /*31-exp+11-15=27-exp */ gp = round_fx_sat( L_shl_sat( L_tmp, add( 1, exp ) ) ); /*27-exp+1+exp-16=12 */ Loading lib_com/rom_com.h +3 −3 Original line number Diff line number Diff line Loading @@ -1492,8 +1492,8 @@ extern const Word16 fine_gain_pred_sqrt_bw[]; // Q11 #ifndef HARM_HQ_CORE extern const Word16 ivas_band_len_idx[]; // Q0 extern const Word16 ivas_band_len_ener_shift[]; // Q0 extern const Word16 ivas_fine_gain_pred_sqrt_bw[]; // Q11 #endif extern const Word16 ivas_fine_gain_pred_sqrt_bw[]; // Q11 extern const Word16 Mean_isf_wb[]; // Q2.56 extern const Word16 lsp_shb_prev_tbl_fx[]; // Q15 extern const Word16 lsp_shb_prev_tbl_swb_tbe_enc_fx[]; // Q15 Loading lib_com/rom_com_fx.c +11 −10 Original line number Diff line number Diff line Loading @@ -25782,6 +25782,7 @@ const Word16 band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = { }; // Q0 const Word16 band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; // Q0 /* 96 requires 1 bit more than 48 */ const Word16 fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */ const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5792, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */ #else const Word16 band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = { // Q0 Loading @@ -25796,7 +25797,7 @@ const Word16 ivas_band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = { -1, 0 /*8*/, 1 /*16*/, 2 /*24*/, 3 /*32*/, 4 /*40*/, 5 /*48 */, -1, 6 /*64 */, -1, 7 /*80*/, -1, 8 /*96*/ }; // Q0 const Word16 ivas_band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; // Q0 /* 96 requires 1 bit more than 48 */ const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */ #endif /*% sfms=[8,16,24,32,40,48,64,80,96], round(sqrt(sfms)*2^11) */ lib_enc/peak_vq_enc_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,10 @@ static void quant_peaks_fx( BSTR_ENC_HANDLE hBstr, const Word32 *, Word32 *, const Word32 *, Word16 *, const Word16, const Word32, const Word16 ); static Word16 hvq_code_pos_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks ); static Word16 sparse_code_pos_fx( const Word16 *inp, const Word16 length, Word16 *result ); #ifndef HARM_HQ_CORE #ifdef HARM_HQ_CORE static Word16 hvq_code_pos_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks ); static void quant_peaks_fx( BSTR_ENC_HANDLE hBstr, const Word32 *vect_in, Word32 *vect_out, const Word32 *peak_gain, Word16 *vq_idx, const Word16 overlap, const Word32 core_brate, const Word16 Npeaks ); #else static Word16 hvq_code_pos_ivas_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks ); static void quant_peaks_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle*/ Loading lib_enc/prot_fx_enc.h +1 −1 Original line number Diff line number Diff line Loading @@ -3585,7 +3585,7 @@ Word16 Pit_exc_contribution_len_fx( Word16 pvq_core_enc_fx( #ifdef HARM_HQ_CORE const Word16 element_mode, const Word16 element_mode, /* i : element mode */ #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ Word16 coefs_norm[], /* i/o: normalized coefficients to encode */ Loading Loading
lib_com/low_rate_band_att_fx.c +5 −9 Original line number Diff line number Diff line Loading @@ -97,17 +97,13 @@ void ivas_fine_gain_pred_fx( } ELSE { #endif Word16 norm = norm_s( bw ); #ifdef HARM_HQ_CORE Word16 tmp_exp = sub( 15, norm ); tmp1 = ivas_fine_gain_pred_sqrt_bw[bw_idx]; } #else Word16 norm = norm_s( bw ); Word16 tmp1, tmp_exp = sub( 15, norm ); #endif tmp1 = Sqrt16( shl( bw, norm ), &tmp_exp ); tmp1 = shr( tmp1, sub( sub( 15, tmp_exp ), Q11 ) ); #ifdef HARM_HQ_CORE } #endif Mpy_32_16_ss( L_tmp, tmp1, &L_tmp, &lsb ); /*31-exp+11-15=27-exp */ gp = round_fx_sat( L_shl_sat( L_tmp, add( 1, exp ) ) ); /*27-exp+1+exp-16=12 */ Loading
lib_com/rom_com.h +3 −3 Original line number Diff line number Diff line Loading @@ -1492,8 +1492,8 @@ extern const Word16 fine_gain_pred_sqrt_bw[]; // Q11 #ifndef HARM_HQ_CORE extern const Word16 ivas_band_len_idx[]; // Q0 extern const Word16 ivas_band_len_ener_shift[]; // Q0 extern const Word16 ivas_fine_gain_pred_sqrt_bw[]; // Q11 #endif extern const Word16 ivas_fine_gain_pred_sqrt_bw[]; // Q11 extern const Word16 Mean_isf_wb[]; // Q2.56 extern const Word16 lsp_shb_prev_tbl_fx[]; // Q15 extern const Word16 lsp_shb_prev_tbl_swb_tbe_enc_fx[]; // Q15 Loading
lib_com/rom_com_fx.c +11 −10 Original line number Diff line number Diff line Loading @@ -25782,6 +25782,7 @@ const Word16 band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = { }; // Q0 const Word16 band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; // Q0 /* 96 requires 1 bit more than 48 */ const Word16 fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */ const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5792, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */ #else const Word16 band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = { // Q0 Loading @@ -25796,7 +25797,7 @@ const Word16 ivas_band_len_idx[1 + ( MAX_SFM_LEN_FX / 8 )] = { -1, 0 /*8*/, 1 /*16*/, 2 /*24*/, 3 /*32*/, 4 /*40*/, 5 /*48 */, -1, 6 /*64 */, -1, 7 /*80*/, -1, 8 /*96*/ }; // Q0 const Word16 ivas_band_len_ener_shift[9] = { 1, 2, 2, 2, 3, 3, 3, 4 /*sfm==80*/, 4 /*sfm==96*/ }; // Q0 /* 96 requires 1 bit more than 48 */ const Word16 ivas_fine_gain_pred_sqrt_bw[9] = { 5793, 8192, 10033, 11585, 12953, 14189, 16384, 18318, 20066 }; /* (Q11) */ #endif /*% sfms=[8,16,24,32,40,48,64,80,96], round(sqrt(sfms)*2^11) */
lib_enc/peak_vq_enc_fx.c +4 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,10 @@ static void quant_peaks_fx( BSTR_ENC_HANDLE hBstr, const Word32 *, Word32 *, const Word32 *, Word16 *, const Word16, const Word32, const Word16 ); static Word16 hvq_code_pos_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks ); static Word16 sparse_code_pos_fx( const Word16 *inp, const Word16 length, Word16 *result ); #ifndef HARM_HQ_CORE #ifdef HARM_HQ_CORE static Word16 hvq_code_pos_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks ); static void quant_peaks_fx( BSTR_ENC_HANDLE hBstr, const Word32 *vect_in, Word32 *vect_out, const Word32 *peak_gain, Word16 *vq_idx, const Word16 overlap, const Word32 core_brate, const Word16 Npeaks ); #else static Word16 hvq_code_pos_ivas_fx( BSTR_ENC_HANDLE hBstr, const Word16 *inp, const Word16 length, const Word16 num_peaks ); static void quant_peaks_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle*/ Loading
lib_enc/prot_fx_enc.h +1 −1 Original line number Diff line number Diff line Loading @@ -3585,7 +3585,7 @@ Word16 Pit_exc_contribution_len_fx( Word16 pvq_core_enc_fx( #ifdef HARM_HQ_CORE const Word16 element_mode, const Word16 element_mode, /* i : element mode */ #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ Word16 coefs_norm[], /* i/o: normalized coefficients to encode */ Loading