Commit d18cbee3 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '853-floating-point-decode_masa_ism' into 'ivas-float-update'

[NonBE]  Resolve "ivas_decode_masaism_metadata decision logic change due to precision difference"

See merge request !619
parents c6cea169 24842ec9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@
#define FIX_835_PARAMMC_BUFFER_VALUES                   /* FhG: issue 835: wide range of buffer values for cx in ParamMC */
#define NONBE_FIX_943_PORT_1208_DFT_STEREO_PLC_BURST    /* Ericsson: BASOP Issue 943, Float Issue 1208, fix for overflow of sample offset counter for burst error in DFT Stereo PLC. */
#define FIX_903_ZERO_OUT_IMDCT_BUFFERS_FOR_MCT_IGNORE   /* FhG: zero out all relevant imdct buffers in MCT decoding of channels with mct_chan_mode == MCT_CHAN_MODE_IGNORE */

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

#define BASOP_NOGLOB                                    /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */
+16 −8
Original line number Diff line number Diff line
@@ -2347,13 +2347,21 @@ 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 FIX_853_DECODE_MASA_ISM_AZIMUTH_PREC_FP
                    if ( roundf( 100 * ( no_phi_masa[bits_ism[obj] - 1][idx_el] ) * ( azimuth - hMasaIsmData->q_azimuth_old[obj] ) ) / (float) 100.0f > 180.0f )
#else
                    if ( azimuth - hMasaIsmData->q_azimuth_old[obj] > delta_phi )
#endif
                    {
                        azimuth -= delta_phi;
                    }
                    else
                    {
#ifdef FIX_853_DECODE_MASA_ISM_AZIMUTH_PREC_FP
                        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;
                        }