Commit 9580b551 authored by multrus's avatar multrus
Browse files

[cleanup] accept NONBE_1230_DECODE_MASA_ISM_AZIMUTH_PREC_FROM_BASOP

parent 51345670
Loading
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -172,7 +172,6 @@
#define NONBE_1217_OBJ_EDIT_FOA                         /* VA/Nokia: isse 1217: fix crash in object editing to FOA output in ParamISM */
#define NONBE_1215_FIX_JBM_MAX_SCALING                  /* FhG: issue 1215: Fix assert hit in a specific VoIP decoder config. Caused by integer overflow in max scaling calculation. */

#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 ######################### */
+0 −8
Original line number Diff line number Diff line
@@ -2418,23 +2418,15 @@ 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;
                        }