Commit 2b326345 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Fix float issue 1501 by adding a skip if number of two dir bands is zero. This...

Fix float issue 1501 by adding a skip if number of two dir bands is zero. This matches the float code.
parent 8c4042de
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@
#define REMOVE_UNUSED_CODE_IVAS_DEC                     /* VA: remove unused code in ivas_jbm_dec_tc_fx() */
#define FIX_2294_CLANG_18_WARNINGS_ENC                  /* VA: Fix some encoder clang-18 warnings, desc. in 2294 */
#define REMOVE_CAM_FROM_IVAS                            /* VA: basop issue 210: remove obsoelte CAM code from IVAS */
#define FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA              /* Nokia: Fix float issue 1501, uninitialized value in ivas_masa_combine_directions for OMASA */

/* #################### End BE switches ################################## */

+27 −19
Original line number Diff line number Diff line
@@ -1800,6 +1800,10 @@ void ivas_masa_combine_directions_fx(
        }
    }

#ifdef FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA
    IF( GT_16( hMasa->config.numTwoDirBands, 0 ) )
    {
#endif
        /* Estimate the importance of having two directions instead of one */
        /* Reduced precision of importance_fx intentionally to Q13 to maintatin 0.0001f resolution */
        FOR( i = 0; i < numCodingBands; i++ )
@@ -1827,6 +1831,10 @@ void ivas_masa_combine_directions_fx(

        /* Determine bands where to use two directions */
        find_n_largest_fx( importance_fx, exp_importance, indicesOfLargest, numCodingBands, hMasa->config.numTwoDirBands );
#ifdef FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA
    }

#endif

    FOR( i = 0; i < numCodingBands; i++ )
    {