Commit 3133641f authored by multrus's avatar multrus
Browse files

porting of patch

parent 84312b80
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@
#define FIX_WARNING_RENDER_CONFIG                       /* Orange: fix warning on windows build */

#define FIX_1052_EXT_OUTPUT                             /* VA: issue 1052: define EXT decoder output configuration for stereo and MC formats */

#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_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */
#define NONBE_FIX_1091_PMC_LOW_SIGNAL_BURSTS            /* FhG: fix for #1091, fix limit calculation for the regularized inverse of Kx to avoid bursts in very low signals */
+16 −0
Original line number Diff line number Diff line
@@ -922,7 +922,15 @@ static void JB4_adaptActivePlayout(
                }
                rate = (UWord32) W_add( temp3, dropRateMin );
                *scale = idiv1616( sub( 1000, (Word16) rate ), 10 );
#ifdef NONBE_1215_FIX_JBM_MAX_SCALING
                /* Limit max scaling to the duration of one frame. APA will not exceed this limit
                 * anyway due to the 50% limitation of APA_MIN_SCALE and APA_MAX_SCALE. Limiting
                 * the value to a sensible range here avoids integer overflows at later stages when
                 * converting maxScaling from milliseconds to samples. */
                *maxScaling = (UWord32) JB4_MIN( W_sub( currPlayoutDelay, targetMax ), 1000 / IVAS_NUM_FRAMES_PER_SEC );
#else
                *maxScaling = (UWord32) W_sub( currPlayoutDelay, targetMax );
#endif
                move32();
                move32();
            }
@@ -943,7 +951,15 @@ static void JB4_adaptActivePlayout(
        {
            *scale = 120;
            move32();
#ifdef NONBE_1215_FIX_JBM_MAX_SCALING
            /* Limit max scaling to the duration of one frame. APA will not exceed this limit
             * anyway due to the 50% limitation of APA_MIN_SCALE and APA_MAX_SCALE. Limiting
             * the value to a sensible range here avoids integer overflows at later stages when
             * converting maxScaling from milliseconds to samples. */
            *maxScaling = (UWord32) JB4_MIN( W_sub( targetMaxStretch, currPlayoutDelay ), 1000 / IVAS_NUM_FRAMES_PER_SEC );
#else
            *maxScaling = (UWord32) W_sub( targetMaxStretch, currPlayoutDelay );
#endif
            move32();
        }
    }