Skip to content

Code duplication in SBA encoder MD generation

Basic info

  • Float reference:
    • Encoder (float):
    • Decoder (float):
  • Fixed point:

Bug description

In floating point code, common function is used in encoder and decoder to compute SPAR MD parameters from DirAC MD. Same function is used to compute SPAR MD from input covariance in SBA encoder. However, in fixed point code, there are two separate functions, one for computing SPAR MD from input covariance (ivas_compute_spar_params_enc_fx()) and another one for computing SPAR MD from DirAC MD (ivas_compute_spar_params_fx()). Sub-functions like ivas_get_pred_coeffs_fx() and ivas_get_Wscaling_factor_fx() also have a second implementation **_enc_fx().

There is lot of duplicate code in these functions which should be avoided. Ideally, a common function should be used like floating point code.

Ways to reproduce

Box folder: ...\Box_EXTERNAL_IVAS_BASOP_VERIFICATION\issues\issue-xxxx