Usage of W_mac_32_32() + ONE_IN_Q30
Basic info
- Float reference:
- Encoder (float): n/a
- Decoder (float): n/a
- Fixed point:
Bug description
The usage of W_mac_32_32()
+ ONE_IN_Q30
is apparently causing issues for certain fixed-point compilers.
Affectes places:
1) lib_enc/analy_sp_fx.c, line 645:
/* PS[i] = ( Bin_E[i] + 1e-5f + Bin_E[i + L_FFT / 2] + 1e-5f ) / 2.0f; */
PS[i] = W_extract_h( W_add( W_mac_32_32( W_mult_32_32( Bin_E[i], ONE_IN_Q30 ), Bin_E[i + L_FFT / 2], ONE_IN_Q30 ), W_shr( W_shl( add_const, 32 ), sub( 31, *q_Bin_E ) ) ) ); // *q_Bin_E
2) lib_enc/find_tilt_fx.c, line 326
/*hp_bckr = 0.5f * (bckr[max_band-1] + bckr[max_band]);*/ /* estimated noise E in last 2 critical bands */
hp_bckr = W_extract_h( W_mac_32_32( W_mult_32_32( bckr[max_band - 1], ONE_IN_Q30 ), bckr[max_band], ONE_IN_Q30 ) ); // q_bckr
We will provide equivalent code in a MR.