Commit 09f7a8c1 authored by vasilache's avatar vasilache
Browse files

Merge branch '1230-align-with-basop-in-ivas_decode_masaism_metadata' into 'main'

[NONBE][split-non-be] Align with BASOP in ivas_decode_masaism_metadata

See merge request !1876
parents d621039d affdfb63
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -180,6 +180,7 @@
#define NONBE_1217_INIT_OBJ_EDIT                        /* VA: issue 1217: do object editing only when objects metadata is available */
#define NONBE_1217_OBJ_EDIT_FOA                         /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */

#define NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP        /* Nokia: Fixes ivas_decode_masaism_metadata decision logic change due to precision difference; this is the fix in floating point */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+10 −0
Original line number Diff line number Diff line
@@ -2418,13 +2418,23 @@ static int16_t ivas_decode_masaism_metadata(
                if ( azimuth * hMasaIsmData->q_azimuth_old[obj] > 0 )
                {
                    delta_phi = 180.0f / (float) ( no_phi_masa[bits_ism[obj] - 1][idx_el] ); /* 360/2*/
#ifdef NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP
                    /* this is equivalent to testing if 'azimuth - hMasaIsmData->q_azimuth_old[obj] > delta_phi' with limited precision */
                    if ( roundf( 100 * ( no_phi_masa[bits_ism[obj] - 1][idx_el] ) * ( azimuth - hMasaIsmData->q_azimuth_old[obj] ) ) / 100.0f > 180.0f )
#else
                    if ( azimuth - hMasaIsmData->q_azimuth_old[obj] > delta_phi )
#endif
                    {
                        azimuth -= delta_phi;
                    }
                    else
                    {
#ifdef NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP
                        /* this is equivalent to testing if 'hMasaIsmData->q_azimuth_old[obj] - azimuth > delta_phi' with limited precision */
                        if ( roundf( 100 * ( no_phi_masa[bits_ism[obj] - 1][idx_el] ) * ( hMasaIsmData->q_azimuth_old[obj] - azimuth ) ) / 100.0f > 180.0f )
#else
                        if ( hMasaIsmData->q_azimuth_old[obj] - azimuth > delta_phi )
#endif
                        {
                            azimuth += delta_phi;
                        }