Commit 742fc4c3 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'precision_impr_processIGF_McMASA_OMASA' into 'main'

Precision improvements for processIGF, in McMASA and OMASA paths [allow regression]

See merge request !1754
parents 856c5694 f4b38f02
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -608,8 +608,7 @@ void computeDirectionVectors_fixed(
    Word32 *direction_vector_x, /* o: Q30*/
    Word32 *direction_vector_y, /* o: Q30*/
    Word32 *direction_vector_z, /* o: Q30*/
    Word16 i_e                  /*Exponent of all the intensity buffers*/
    ,
    Word16 i_e,                 /*Exponent of all the intensity buffers*/
    Word16 *i_e_band )
{
    Word16 i;
+2 −4
Original line number Diff line number Diff line
@@ -3230,8 +3230,7 @@ void computeDirectionVectors_fixed(
    Word32 *direction_vector_x, /*Q30*/
    Word32 *direction_vector_y, /*Q30*/
    Word32 *direction_vector_z, /*Q30*/
    Word16 i_e                  /*Exponent of all the intensity buffers*/
    ,
    Word16 i_e,                 /*Exponent of all the intensity buffers*/
    Word16 *i_e_band );


@@ -3293,8 +3292,7 @@ void computeReferencePower_enc_fx(
    Word16 ref_power_w,                               /* i  : use 0 if hodirac is enabled     */
    const Word16 nchan_ana,                           /* i  : number of analysis channels     */
    Word16 inp_q,                                     /* i  : q of cld buffers     */
    Word16 *ref_q                                     /* i  : output q     */
);
    Word16 q_reference_power[DIRAC_NO_FB_BANDS_MAX] );

void computeReferencePower_enc_fx_dirac(
    const Word16 *band_grouping,                      /* i  : Band grouping for estimation    */
+2 −2
Original line number Diff line number Diff line
@@ -10502,7 +10502,7 @@ void ProcessStereoIGF_fx(
    Word16 q_pITFMDCTSpectrum_1,
    Word16 q_pITFMDCTSpectrum_2,
    Word32 *pPowerSpectrum_fx[CPE_CHANNELS],                /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    Word16 exp_pPowerSpectrum_fx[CPE_CHANNELS],             /* i/o: exp of pPowerSpectrum_fx                */
    Word16 *exp_pPowerSpectrum_fx[CPE_CHANNELS],            /* i/o: exp of pPowerSpectrum_fx                */
    Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV],   /* i  : inverse power spectrum                  */
    Word16 *q_pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: Q of pPowerSpectrumMsInv_fx           */
    Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV],          /* i  : inverse spectrum                        */
@@ -10519,7 +10519,7 @@ void IGFEncApplyStereo_fx(
    const Word16 igfGridIdx,                                /* i  : IGF grid index                          */
    Encoder_State *sts[CPE_CHANNELS],                       /* i  : Encoder state                           */
    Word32 *pPowerSpectrum_fx[CPE_CHANNELS],                /* i/o: MDCT^2 + MDST^2 spectrum, or estimate   */
    Word16 exp_pPowerSpectrum_fx[CPE_CHANNELS],             /* i/o: exp of pPowerSpectrum_fx                */
    Word16 *exp_pPowerSpectrum_fx[CPE_CHANNELS],            /* i/o: exp of pPowerSpectrum_fx                */
    Word32 *pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV],   /* i/o: inverse power spectrum                  */
    Word16 *q_pPowerSpectrumMsInv_fx[CPE_CHANNELS][NB_DIV], /* i/o: Q of pPowerSpectrumMsInv_fx           */
    Word32 *inv_spectrum_fx[CPE_CHANNELS][NB_DIV],          /* i  : inverse spectrum                        */
+12 −12
Original line number Diff line number Diff line
@@ -20441,42 +20441,42 @@ const Word16 qGains[2][1 << kTcxHmNumGainBits] =
const struct TnsParameters tnsParametersIGF32kHz_LowBR[1] =
{
    {  600, 3, /*1.85f, 0.075f, 4.4f,*/ 237/*1.85f Q7*/,   2458/*0.075f Q15*/,563 /*4.4f Q7*/ }
    {  600, 3, /*1.85f, 0.075f, 4.4f,*/ 237/*1.85f Q7*/,  15518925/*1.85f Q23*/, 2458/*0.075f Q15*/,563 /*4.4f Q7*/ }
};
const struct TnsParameters tnsParameters32kHz[2] =
{
    { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/,    983/*0.0300f Q15*/, 128/*1.0f Q7*/},
    {  600, 1, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,   2048/*0.0625f Q15*/, 563 /*4.4f Q7*/ }
    { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/,11324621/*1.35f Q23*/,    983/*0.0300f Q15*/, 128/*1.0f Q7*/},
    {  600, 1, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,14680064/*1.75f Q23*/,   2048/*0.0625f Q15*/, 563 /*4.4f Q7*/ }
};
const struct TnsParameters tnsParameters32kHz_grouped[2] =
{
    { 8400, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ },
    {  800, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/}
    { 8400, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ },
    {  800, 3, /*1.375f, 0.03125f, 1.0f ,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/}
};
const struct TnsParameters tnsParameters16kHz[1] =
{
    {  600, 3, /*1.5f, 0.05f, 4.4f,*/ 192/*1.5f Q7*/,   1638/*0.05f Q15*/ ,563 /*4.4f Q7*/ }
    {  600, 3, /*1.5f, 0.05f, 4.4f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/,  1638/*0.05f Q15*/ ,563 /*4.4f Q7*/ }
};
const struct TnsParameters tnsParameters16kHz_grouped[2] =
{
    { 4400, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/,   1638/*0.05f Q15*/ , 128/*1.0f Q7*/},
    {  800, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/,   1638/*0.05f Q15*/ , 128/*1.0f Q7*/}
    { 4400, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/,  1638/*0.05f Q15*/ , 128/*1.0f Q7*/},
    {  800, 3, /*1.5f, 0.05f, 1.0f,*/ 192/*1.5f Q7*/, 12582912/*1.5f Q23*/,  1638/*0.05f Q15*/ , 128/*1.0f Q7*/}
};
const struct TnsParameters tnsParameters48kHz_grouped[2] =
{
    { 10400, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/},
    {   800, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ }
    { 10400, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/},
    {   800, 3, /*1.375f, 0.03125f, 1.0f,*/ 176/*1.375f Q7*/,11534336/*1.375f Q23*/,   1024/*0.03125f Q15*/ , 128/*1.0f Q7*/ }
};
const struct TnsParameters tnsParameters32kHz_Stereo[2]=
{
     { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/,    983/*0.0300f Q15*/ , 128/*1.0f Q7*/},
     {  600, 3, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,   2048/*0.0625f Q15*/ ,563 /*4.4f Q7*/  }
     { 4500, 3, /*1.35f, 0.0300f, 1.0f ,*/ 173/*1.35f Q7*/, 11324621/*1.35f Q23*/,    983/*0.0300f Q15*/ , 128/*1.0f Q7*/},
     {  600, 3, /*1.75f, 0.0625f, 4.4f ,*/ 224/*1.75f Q7*/,14680064/*1.75f Q23*/,   2048/*0.0625f Q15*/ ,563 /*4.4f Q7*/  }
};
const Word16 tnsAcfWindow_fx[TNS_MAX_FILTER_ORDER] =
+6 −5
Original line number Diff line number Diff line
@@ -561,6 +561,7 @@ struct TnsParameters
    Word16 startLineFrequency;   /* Starting lower frequency of the TNS filter [20..16000] */
    Word16 nSubdivisions;        /* Number of spectrum subdivisions in which the filter operates [1..8) */
    Word16 minPredictionGain;    /* Minimum prediction gain required to turn on the TNS filter. Exponent = PRED_GAIN_E */
    Word32 minPredictionGain_32; /* Minimum prediction gain required to turn on the TNS filter. Exponent = PRED_GAIN_E */
    Word16 minAvgSqrCoef;        /* Minimum average square of coefficients required to turn on the TNS filter. Exponent = 0 */
    Word16 minEnergyChange;      /* Minimum energy change required to turn on the TNS filter. Exponent = 8 */
};
Loading