Commit 8b2ddbda authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept FIX_1001_ARI_HM_OVERFLOW

parent 59a9e42e
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -205,11 +205,7 @@ int16_t CountIndexBits(
 *-------------------------------------------------------------------*/

int16_t tcx_hm_render(
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag, /* i  : pitch lag                             */
#else
    const int16_t lag, /* i  : pitch lag                             */
#endif
    const int16_t fract_res, /* i  : fractional resolution of the lag      */
    Word16 p[]               /* o  : harmonic model (Q13)                  */
)
@@ -269,11 +265,7 @@ int16_t tcx_hm_render(

void tcx_hm_modify_envelope(
    const Word16 gain, /* i  : HM gain (Q11)                         */
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag,
#else
    const int16_t lag,
#endif
    const int16_t fract_res,
    const Word16 p[],     /* i  : harmonic model (Q13)                  */
    Word32 env[],         /* i/o: envelope (Q16)                        */
+0 −1
Original line number Diff line number Diff line
@@ -213,7 +213,6 @@
#define NONBE_FIX_999_JBM_MCT_FLUSH                     /* FhG: issue #999: fix wrong flushing for MCT at a JBM rate switch */
#define NONBE_FIX_1000_G1_G2_SWB_TBE                    /* VA: issue 1000: avoid div by zero due to g1 + g2 being zero in SWB TBE */

#define FIX_1001_ARI_HM_OVERFLOW                        /* FhG: fix for undef behaviour in in the harmonic TCX model arithmetic coder */
#define NONBE_FIX_1005_MC_RS_TCBUFFER_UPDATE            /* FhG: issue #1005: fix TC Buffer update at a MC rate switch */
#define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS             /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */
#define FIX_1008_EXTORIENT_TARGET_INTERPOLATION          /* FhG: issue #1008, external orientation init was wrong for 5ms */
+0 −8
Original line number Diff line number Diff line
@@ -7800,22 +7800,14 @@ int16_t DecodeIndex(
#define GET_ADJ2( T, L, F ) ( ( ( L ) << ( F ) ) - ( T ) )

int16_t tcx_hm_render(
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag, /* i  : pitch lag                             */
#else
    const int16_t lag, /* i  : pitch lag                             */
#endif
    const int16_t fract_res, /* i  : fractional resolution of the lag      */
    Word16 p[]               /* o  : harmonic model (Q13)                  */
);

void tcx_hm_modify_envelope(
    const Word16 gain, /* i  : HM gain (Q11)                         */
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag,
#else
    const int16_t lag,
#endif
    const int16_t fract_res,
    const Word16 p[],     /* i  : harmonic model (Q13)                  */
    Word32 env[],         /* i/o: envelope (Q16)                        */
+0 −8
Original line number Diff line number Diff line
@@ -120,11 +120,7 @@ void tcx_hm_decode(
    int16_t *hm_bits           /* o  : bit consumption               */
)
{
#ifdef FIX_1001_ARI_HM_OVERFLOW
    int32_t lag;
#else
    int16_t lag;
#endif
    int32_t tmpL;
    int16_t NumTargetBits, fract_res;
    Word16 p[2 * kTcxHmParabolaHalfWidth + 1], gain;
@@ -148,11 +144,7 @@ void tcx_hm_decode(

    /* Convert the index to lag */
    UnmapIndex( prm_hm[1], L_frame >= 256, LtpPitchLag, ( NumTargetBits <= kSmallerLagsTargetBitsThreshold ) || ( L_frame < 256 ), &fract_res, &tmpL );
#ifdef FIX_1001_ARI_HM_OVERFLOW
    lag = tmpL;
#else
    lag = (int16_t) tmpL;
#endif

    /* Render the harmonic model */
    if ( tcx_hm_render( lag, fract_res, p ) )
+0 −16
Original line number Diff line number Diff line
@@ -418,11 +418,7 @@ static void PeakFilter(
static float tcx_hm_get_re(
    const float x[],   /* i  : absolute spectrum               */
    const Word16 gain, /* i  : HM gain (Q11)                   */
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag,
#else
    const int16_t lag,
#endif
    const int16_t fract_res,
    const Word16 p[],     /* i  : harmonic model (Q13)            */
    const Word32 env[],   /* i  : envelope (Q16)                  */
@@ -471,11 +467,7 @@ static float tcx_hm_get_re(
static void tcx_hm_quantize_gain(
    const float x[],    /* i  : absolute spectrum                     */
    const Word32 env[], /* i  : envelope (Q16)                        */
#ifdef FIX_1001_ARI_HM_OVERFLOW
    const int32_t lag,
#else
    const int16_t lag,
#endif
    const int16_t fract_res,
    Word16 p[],               /* i  : harmonic model (Q13)                  */
    const int16_t L_frame,    /* i  : number of spectral lines              */
@@ -565,11 +557,7 @@ void tcx_hm_analyse(
    int16_t *hm_bits            /* o  : bit consumption               */
)
{
#ifdef FIX_1001_ARI_HM_OVERFLOW
    int32_t lag;
#else
    int16_t lag;
#endif
    int32_t tmpL;
    int16_t fract_res;
    float fspec[N_MAX_ARI], RelativeScore;
@@ -595,11 +583,7 @@ void tcx_hm_analyse(

    /* Convert the index to lag */
    UnmapIndex( prm_hm[1], L_frame >= 256, LtpPitchLag, ( targetBits - *hm_bits <= kSmallerLagsTargetBitsThreshold ) || ( L_frame < 256 ), &fract_res, &tmpL );
#ifdef FIX_1001_ARI_HM_OVERFLOW
    lag = tmpL;
#else
    lag = (int16_t) tmpL;
#endif

    /* Render harmonic model */
    tcx_hm_render( lag, fract_res, p );