Resolve "Elevation index calculation not rounded in add_vertex_fx"

Reason why this change is needed

  • In add_vertex_fx (lib_rend/ivas_efap_fx.c), the vertex index is idx = idxAziTmp + 181 * idxEleTmp. The azimuth term is rounded with anint_fx, but the elevation term is not:
idxAziTmp = L_shr( anint_fx( tmp, Q22 ), Q22 );   // azimuth: rounded
...
idxEleTmp = tmp;                                   // elevation: NOT rounded
idxEleTmp = L_sub( Q22_90_DEG, idxEleTmp );
... extract_l( L_shr( idxEleTmp, Q22 ) )           // truncated (floor)

The float reference applies anint() to both azimuth and elevation:

idxEleTmp = (float) anint( tmp );
idxEleTmp = 90.0f - idxEleTmp;

So the fixed-point floors 90 - |ele| instead of computing 90 - round(|ele|).

Description of the change

  • Round |elevation| with anint_fx before the 90deg subtraction in add_vertex_fx

Affected operating points

  • non-BE
Edited by Mohammadreza Naghibzadeh

Merge request reports

Loading