Skip to content

W_shl()/W_shr() called with exceeding shift values

Basic info

  • Float reference:
    • Encoder (float): n/a
    • Decoder (float): n/a
  • Fixed point:

Bug description

This is a spin-off from from !1865: In the BASOP code, W_shl()/W_shr() are at some places called with exceeding shift values, i.e. the number of bits to shift exceed +/-63. This is a problem on certain platforms. The following spots have been identified using the MR pipelines in !1865 :

  • 1 lib_com/ivas_spar_com_fx.c 805:W_shr() var2=68
  • 2 lib_com/swb_tbe_com_fx.c 6750:W_shl() var2=71
  • 3 lib_com/tns_base.c 650:W_shl() var2=96
  • 4 lib_dec/ivas_lfe_plc_fx.c 649:W_shr() var2=91
  • 5 lib_dec/ivas_svd_dec_fx.c 1199:W_shr() var2=99
  • 6 lib_enc/ivas_mdct_core_enc_fx.c 1967:W_shr() var2=94
  • 7 lib_enc/nois_est_fx.c 2472:W_shl() var2=64
  • 8 lib_rend/ivas_dirac_dec_binaural_functions_fx.c 3808:W_shl() var2=-67

The proposal is to adapt the calling software to use only limited shifts (in the range [-63, +63]), so that no costly limitations have to be added to the shift implementations itself.

Edited by Arthur Tritthart