Commit c64034ad authored by emerit's avatar emerit
Browse files

fix missing frame length

parent d11823c9
Loading
Loading
Loading
Loading
+31 −2
Original line number Diff line number Diff line
@@ -41,13 +41,18 @@
#include <assert.h>
#include "ivas_prot_fx.h"


#ifdef FIX_2089_NONBE_LIMITER_CONSTS
#define RELEASE_CNST_20MS       ( 85899345 ) // Q30
#define RELEASE_CNST_2_20MS_5MS ( 21474836 ) // Q30
#define RELEASE_CNST_10MS       ( 42949672 ) // Q30
#define RELEASE_CNST_2_10MS     ( 10737418 ) // Q30
#define RELEASE_CNST_2_5MS      ( 5368709 )  // Q30
#endif
#define ATTACK_CNST_48k ( 2106670080 ) // Q31
#define ATTACK_CNST_32k ( 2086555136 ) // Q31
#define ATTACK_CNST_16k ( 2027355264 ) // Q31
#define ATTACK_CNST_8k  ( 1913946752 ) // Q31


/*-------------------------------------------------------------------*
 * detect_strong_saturations()
 *
@@ -349,6 +354,29 @@ void limiter_process_fx(
     * keep the gain curve smoother if the threshold is exceeded in many frames
     * in a short span of time.
     */
#ifdef FIX_2089_NONBE_LIMITER_CONSTS
    IF( EQ_32( L_msu( hLimiter->sampling_rate, output_frame, 25 ), 0 ) )
    {
        releaseHeuristic_cnst = RELEASE_CNST_20MS;
        move32();
        releaseHeuristic_cnst_2 = RELEASE_CNST_2_20MS_5MS;
        move32();
    }
    ELSE IF( EQ_32( L_msu( hLimiter->sampling_rate, output_frame, 50 ), 0 ) )
    {
        releaseHeuristic_cnst = RELEASE_CNST_10MS;
        move32();
        releaseHeuristic_cnst_2 = RELEASE_CNST_2_10MS;
        move32();
    }
    ELSE
    {
        releaseHeuristic_cnst = RELEASE_CNST_2_20MS_5MS;
        move32();
        releaseHeuristic_cnst_2 = RELEASE_CNST_2_5MS;
        move32();
    }
#else
    SWITCH( output_frame )
    {
        case 960:
@@ -367,6 +395,7 @@ void limiter_process_fx(
            move32();
            BREAK;
    }
#endif
    releaseHeuristic = hLimiter->release_heuristic_fx; /* Q30 */
    move32();

+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@
#define OPT_TCXLTP_FILTER_LOOP                               /* FhG: optimize loop in tcx_ltp_synth_filter */
#define FIX_2049_DIFF_IN_DECORR_TAIL                         /* FhG: correct scale values in ivas_dirac_dec_binaural_process_output_fx() */
#define FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE                  /* Dolby/FhG: fix for issue 2026: Saturation in SWB TBE re-scaling function preventing StereoDownmix complexity job to complete */
#define FIX_2089_NONBE_LIMITER_CONSTS                              /* Orange : fix issuer 2089 : Limiter attack and release constants differ from float version*/

/* #################### Start BASOP porting switches ############################ */