Commit b9a38078 authored by norvell's avatar norvell
Browse files

Merge with main

parents a65227f3 add9551f
Loading
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@
#include "cnst.h"
#include "prot.h"
#include "wmc_auto.h"
#include "prot_fx.h"

/*-------------------------------------------------------------------*
 * get_next_coeff_mapped_ivas()
@@ -66,7 +67,7 @@ int16_t get_next_coeff_mapped_ivas(
    return hm_cfg->indexBuffer[*idx];
}
#else
Word16 get_next_coeff_mapped_ivas(
Word16 get_next_coeff_mapped_ivas_fx(
    Word16 ii[2],             /* i/o: coefficient indexes			Q0*/
    Word32 *pp,               /* o  : peak(1)/hole(0) indicator		Q0*/
    Word16 *idx,              /* o  : index in unmapped domain		Q0*/
@@ -89,6 +90,7 @@ Word16 get_next_coeff_mapped_ivas(
#endif


#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * get_next_coeff_unmapped_ivas()
 *
@@ -106,7 +108,9 @@ int16_t get_next_coeff_unmapped_ivas(

    return *idx;
}
#endif

#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * update_mixed_context_ivas()
 *
@@ -128,3 +132,4 @@ int32_t update_mixed_context_ivas(

    return ( ctx & 0xf ) * 16 + t + 13;
}
#endif
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@
#include "wmc_auto.h"


#ifndef IVAS_FLOAT_FIXED
/*---------------------------------------------------------------
  Ari 14 bits common routines
  -------------------------------------------------------------*/
@@ -65,3 +66,4 @@ int32_t mul_sbc_14bits_ivas(

    /*function in line*/
}
#endif
+10 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
 *
 *-------------------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
void UnmapIndex_ivas(
    const int16_t PeriodicityIndex,
    const int16_t Bandwidth,
@@ -99,6 +100,7 @@ void UnmapIndex_ivas(

    return;
}
#endif

void UnmapIndex_fx(
    const Word16 PeriodicityIndex, /* Q0 */
@@ -167,6 +169,7 @@ void UnmapIndex_fx(
}


#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * ConfigureContextHm_ivas()
 *
@@ -241,6 +244,7 @@ void ConfigureContextHm_ivas(

    return;
}
#endif


/*-------------------------------------------------------------------*
@@ -249,6 +253,7 @@ void ConfigureContextHm_ivas(
 *
 *-------------------------------------------------------------------*/

#ifndef IVAS_FLOAT_FIXED
int16_t CountIndexBits_ivas(
    const int16_t Bandwidth,
    const int16_t PeriodicityIndex )
@@ -261,6 +266,7 @@ int16_t CountIndexBits_ivas(

    return 8;
}
#endif

Word16 CountIndexBits_fx(
    Word16 Bandwidth,       /* Q0 */
@@ -285,6 +291,7 @@ Word16 CountIndexBits_fx(

#define WMC_TOOL_SKIP

#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * tcx_hm_render_ivas()
 *
@@ -343,6 +350,7 @@ Word16 tcx_hm_render_ivas(

    return 0;
}
#endif

Word32 tcx_hm_render_fx(
    const Word32 lag,       /* i: pitch lag                         Q0  */
@@ -400,6 +408,7 @@ Word32 tcx_hm_render_fx(
    return 0;
}

#ifndef IVAS_FLOAT_FIXED
/*-------------------------------------------------------------------*
 * tcx_hm_modify_envelope_ivas()
 *
@@ -446,6 +455,7 @@ void tcx_hm_modify_envelope_ivas(

    return;
}
#endif

void tcx_hm_modify_envelope_fx(
    const Word16 gain,      /* i:   HM gain                           Q11 */
+8 −9
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
 *-------------------------------------------------------*/

/*! r: Q15 */
Word16 expfp_evs(
Word16 expfp_evs_fx(
    const Word16 x,  /* i  : mantissa  Q15-e */
    const Word16 x_e /* i  : exponent  Q0 */
)
@@ -117,7 +117,6 @@ Word16 expfp_evs(
    return round_fx( L_shl( y, 15 ) );
}


/*-------------------------------------------------------*
 * powfp_odd2_evs()
 *
@@ -130,6 +129,7 @@ Word16 expfp_evs(
 *
 * NOTE: This function must be in sync with ari_decode_14bits_pow_ivas() */

#ifndef IVAS_FLOAT_FIXED
void powfp_odd2_evs(
    const Word16 base, /* Q15 */
    const Word16 exp,  /* Q0  */
@@ -200,7 +200,6 @@ void powfp_odd2_evs(
    return;
}


/*------------------------------------------------------------------------
 * Function: tcx_arith_scale_envelope_flt
 *
@@ -503,7 +502,7 @@ void tcx_arith_scale_envelope_ivas(

    return;
}

#endif

/*------------------------------------------------------------------------
 * Function: tcx_arith_render_envelope_flt
@@ -518,7 +517,7 @@ void tcx_arith_scale_envelope_ivas(
 * and decoder remain synchronized.
 *-------------------------------------------------------------------------*/

void tcx_arith_render_envelope_ivas(
void tcx_arith_render_envelope_ivas_fx(
    const Word16 A_ind[],     /* i  : LPC coefficients of signal envelope        Q12*/
    const Word16 L_frame,     /* i  : number of spectral lines                   Q0*/
    const Word16 L_spec,      /* i  : length of the coded spectrum               Q0*/
@@ -535,12 +534,12 @@ void tcx_arith_render_envelope_ivas(

    /* Compute perceptual LPC envelope, transform it into freq.-domain gains */
    basop_weight_a( A_ind, tmpA, gamma_w );
    basop_lpc2mdct( tmpA, M, NULL, NULL, gainlpc, gainlpc_e );
    basop_lpc2mdct_fx( tmpA, M, NULL, NULL, gainlpc, gainlpc_e );

    /* Add pre-emphasis tilt to LPC envelope, transform LPC into MDCT gains */
    basop_weight_a_inv( A_ind, signal_env, gamma_uw );
    basop_E_LPC_a_add_tilt( signal_env, tmpA, preemph_fac );
    basop_lpc2mdct( tmpA, M + 1, signal_env, signal_env_e, NULL, NULL );
    basop_lpc2mdct_fx( tmpA, M + 1, signal_env, signal_env_e, NULL, NULL );

    /* Compute weighted signal envelope in perceptual domain */
    FOR( k = 0; k < FDNS_NPTS; k++ )
@@ -558,10 +557,10 @@ void tcx_arith_render_envelope_ivas(
        move32();
    }

    basop_PsychAdaptLowFreqDeemph( env, gainlpc, gainlpc_e, NULL );
    basop_PsychAdaptLowFreqDeemph_fx( env, gainlpc, gainlpc_e, NULL );

    /* Scale from FDNS_NPTS to L_frame and multiply LFE gains */
    basop_mdct_noiseShaping_interp( env, L_frame, signal_env, signal_env_e );
    basop_mdct_noiseShaping_interp_fx( env, L_frame, signal_env, signal_env_e );

    FOR( k = L_frame; k < L_spec; ++k )
    {
+3 −3
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ void basop_E_LPC_f_lsp_a_conversion(
);

/* tcx_utils.c */
void basop_lpc2mdct(
void basop_lpc2mdct_fx(
    Word16 *lpcCoeffs,  /* Q12 */
    Word16 lpcOrder,    /* Q0 */
    Word16 *mdct_gains, /* Q12 */
@@ -95,13 +95,13 @@ void basop_lpc2mdct(
    Word16 *mdct_inv_gains, /* Q12 */
    Word16 *mdct_inv_gains_exp );

void basop_PsychAdaptLowFreqDeemph(
void basop_PsychAdaptLowFreqDeemph_fx(
    Word32 x[],              /* Q16 */
    const Word16 lpcGains[], /* exp(lpcGains_e) */
    const Word16 lpcGains_e[],
    Word16 lf_deemph_factors[] /* Qx */
);
void basop_mdct_noiseShaping_interp(
void basop_mdct_noiseShaping_interp_fx(
    Word32 x[],     /* Q16 */
    Word16 lg,      /* Q0 */
    Word16 gains[], /* exp(gain_exp) */
Loading