Commit 183cce03 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_445_SNS_BUGFIXES

parent 200194a7
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -866,10 +866,8 @@ enum fea_names
#define SNS_MSVQ_NSTAGES_TCX20                  4
#define SNS_MSVQ_NSTAGES_TCX10                  3
#define SNS_MSVQ_NSTAGES_SIDE                   2
#ifdef FIX_445_SNS_BUGFIXES
#define SNS_CDBKS_BITS_4_FRAC                   12
#define SNS_MEANS_BITS_4_FRAC                   14
#endif

#define MDCT_ST_PLC_FADEOUT_MIN_NOISE_NRG       0.001f
#define MDCT_ST_PLC_FADEOUT_MAX_CONC_FRAME      2 * FRAMES_PER_SEC
+0 −8
Original line number Diff line number Diff line
@@ -2567,18 +2567,14 @@ void sns_avq_cod(
    float *snsmid_q,                                            /* o  : Quantized mid-LFS vectors               */
    int16_t *index,                                             /* o  : Quantization indices                    */
    const int16_t core,                                         /* i  : core                                    */
#ifdef FIX_445_SNS_BUGFIXES
    const int16_t L_frame,
#endif
    const int16_t low_brate_mode                                /* i  : flag low bit operating mode             */
);

void sns_avq_cod_stereo(
    const float *snsl,                                          /* i  : Input sns vector (left channel)         */
    const float *snsr,                                          /* i  : Input sns vector (right channel)        */
#ifdef FIX_445_SNS_BUGFIXES
    const int16_t L_frame,
#endif
    float *snsl_q,                                              /* o  : Quantized sns vector (left channel)     */
    float *snsr_q,                                              /* o  : Quantized sns vector (right channel)    */
    int16_t *indexl,                                            /* o  : Quantization indices (left channel)     */
@@ -2588,18 +2584,14 @@ void sns_avq_cod_stereo(
void sns_avq_dec(
    int16_t *index,                                             /* i  : Quantization indices                    */
    float SNS_Q[NB_DIV][M],                                     /* o  : Quantized SNS vectors                   */
#ifdef FIX_445_SNS_BUGFIXES
    const int16_t L_frame,
#endif
    const int16_t numlpc                                        /* i  : Number of sets of lpc                   */
);

void sns_avq_dec_stereo(
    int16_t *indexl,                                            /* i  : Quantization indices (left channel)     */
    int16_t *indexr,                                            /* i  : Quantization indices (right channe)     */
#ifdef FIX_445_SNS_BUGFIXES
    const int16_t L_frame,
#endif
    float *SNS_Ql,                                              /* o  : Quantized SNS vectors (left channel)    */
    float *SNS_Qr                                               /* o  : Quantized SNS vectors (right channe)    */
);
+0 −605

File changed.

Preview size limit exceeded, changes collapsed.

+0 −26
Original line number Diff line number Diff line
@@ -432,7 +432,6 @@ extern const int16_t ivas_num_active_bands[FB - WB + 1];
/*------------------------------------------------------------------------------------------*
 * SNS MSVQ codebooks and means
 *------------------------------------------------------------------------------------------*/
#ifdef FIX_445_SNS_BUGFIXES
extern const int16_t ivas_sns_cdbks_tcx20_levels[];
extern const int16_t ivas_sns_cdbks_tcx20_bits[];

@@ -449,41 +448,16 @@ extern const int16_t ivas_sns_cdbks_side_tcx10_bits[];

extern const float *const ivas_sns_cdbks_side_tcx20[];
extern const float *const ivas_sns_cdbks_side_tcx10[];
#else
extern const int16_t ivas_sns_cdbks_tcx20_levels[];
extern const int16_t ivas_sns_cdbks_tcx20_bits[];

extern const int16_t ivas_sns_cdbks_tcx10_levels[];
extern const int16_t ivas_sns_cdbks_tcx10_bits[];

extern const float *const ivas_sns_cdbks_tcx20[];
extern const float *const ivas_sns_cdbks_tcx10[];

extern const float ivas_sns_means_tcx20[];
extern const float ivas_sns_means_tcx10[];

extern const int16_t ivas_sns_cdbks_side_tcx20_levels[];
extern const int16_t ivas_sns_cdbks_side_tcx20_bits[];
extern const int16_t ivas_sns_cdbks_side_tcx10_levels[];
extern const int16_t ivas_sns_cdbks_side_tcx10_bits[];

extern const float *const ivas_sns_cdbks_side_tcx20[];
extern const float ivas_sns_means_side_tcx20[];
extern const float *const ivas_sns_cdbks_side_tcx10[];
extern const float ivas_sns_means_side_tcx10[];
#endif

#ifdef MC_PARAMUPMIX_MODE
extern ACPL_QUANT_TABLE alpha_quant_table[];
extern ACPL_QUANT_TABLE beta_quant_table[2][9];
#endif

#ifdef FIX_445_SNS_BUGFIXES
/* means and codebooks for the split VQ in the 2-stage SNS VQ */
extern const int16_t sns_1st_cdbk[2][2][8 * 32];
extern const int16_t sns_1st_means_16k[2][16];
extern const int16_t sns_1st_means_25k6[2][16];
extern const int16_t sns_1st_means_32k[2][16];
#endif
/* IVAS_ROM_COM_H */
#endif
+0 −30
Original line number Diff line number Diff line
@@ -36,9 +36,7 @@
#include "prot.h"
#include "ivas_prot.h"
#include "rom_com.h"
#ifdef FIX_445_SNS_BUGFIXES
#include "ivas_rom_com.h"
#endif
#include <math.h>
#include <assert.h>
#ifdef DEBUGGING
@@ -121,7 +119,6 @@ void sns_compute_scf(
    xs[FDNS_NPTS - 1] = 0.75f * x[FDNS_NPTS - 1] + 0.25f * x[FDNS_NPTS - 2];

    /* Pre-emphasis */
#ifdef FIX_445_SNS_BUGFIXES
    switch ( L_frame )
    {
        case L_FRAME16k:
@@ -137,33 +134,6 @@ void sns_compute_scf(
            tilt = 0.f;
            assert( !"illegal frame length in sns_compute_scf" );
    }
#else
    if ( L_frame == L_FRAME16k )
    {
        tilt = 18.f;
    }
    else if ( L_frame == L_SPEC16k_EXT )
    {
        tilt = 20.f;
    }
    else if ( L_frame == L_FRAME25_6k )
    {
        tilt = 22.f;
    }
    else if ( L_frame == L_FRAME32k )
    {
        tilt = 26.f;
    }
    else if ( L_frame == L_SPEC32k_EXT )
    {
        tilt = 30.f;
    }
    else
    {
        tilt = 0.f;
        assert( 0 && "illegal frame length in sns_compute_scf" );
    }
#endif

    for ( i = 0; i < FDNS_NPTS; i++ )
    {
Loading