Commit cde83e55 authored by Jonas Svedberg's avatar Jonas Svedberg
Browse files

added updated SNSVQ DCT16 Stage1 tables for tcx10 and tcx20

parent ae16cbd6
Loading
Loading
Loading
Loading
Loading
+449 −451

File changed.

Preview size limit exceeded, changes collapsed.

+13 −12
Original line number Diff line number Diff line
@@ -425,18 +425,6 @@ 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[];

#ifdef ERI_SNSVQ_ROMOPT
extern const float *const snsSt1_tr_midQ_truncQ[];
@@ -454,6 +442,19 @@ extern const Word8 *const snsSt1_segm_neighbour_rev[];
extern const int16_t snsSt1_npost[];
#endif /*   ERI_SNSVQ_ROMOPT */

#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[];
+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@
#define FIX_447_PARAMBIN_MASA_REGU_FAC                  /* Nokia: Issue 447: Fix issue by adjusting regularization factor minimum value. */
#define FIX_441_SBA_PARAMBIN_GAINS                      /* Nokia: Fix issue 441 by changing gains in SBA path of parametric binauralizer */

#define ERI_SNSVQ_ROMOPT                                 /* Eri: BASOP ROM OPT store added SNS VQ stage 1 tables  in DCT16 domain,  as for FDCNGVQ stage 1  */
#define ERI_SNSVQ_ROMOPT                                 /* Eri: 445 Table ROM OPT for SNS-VQ at 48 kbps reusing DCT-N code from FDCNG-MSVQ  */
//#define SNS_MSVQ_DEBUG                                 /* measure SD */ 

/* ################## End DEVELOPMENT switches ######################### */
+13 −15
Original line number Diff line number Diff line
@@ -515,7 +515,9 @@ int16_t quantize_sns(
    const float *means;
#endif 
   
    float sns_buffer[CPE_CHANNELS][NB_DIV][M];
#ifdef SNS_MSVQ_DEBUG
    float sns_inbuf[M];
#endif 
#ifdef ERI_SNSVQ_ROMOPT
    float *invTrfMatrix;
    float tmpRAM[M][M];                                                                 /*16*16*/
@@ -661,6 +663,9 @@ int16_t quantize_sns(
            }
            else
            {
#ifdef SNS_MSVQ_DEBUG
                mvr2r( sns_ptr, sns_inbuf, M ); /* remember input for SD calc */
#endif
#ifdef ERI_SNSVQ_ROMOPT
                msvq_enc( cdbks, NULL, NULL, sns_ptr, levels, 3, nStages, weights, M, M, 20 >> ( nSubframes - 1 ), invTrfMatrix, &indices[idxIndices] );  /*tcx20,tcx10 or fdcngvq  signaled via applyDCTflag*/
                msvq_dec( cdbks, NULL, NULL, nStages, M, M, &indices[idxIndices], 20 >> ( nSubframes - 1 ), invTrfMatrix, snsQ, NULL );
@@ -674,18 +679,11 @@ int16_t quantize_sns(
                    char vq_name[2 * 1024];
                    char v[2 * 1024];
                    int16_t nC; /* nCandidates */
                    int16_t tcx = 10;
                    if ( nSubframes == 1 )
                    {
                        tcx = 20;
                    }

                    int16_t tcx = (nSubframes == 1) ? 20: 10;
#ifdef ERI_SNSVQ_ROMOPT
                    sprintf( v, "ERI_Tcx%d", tcx );
                    nC = 3;
                    sprintf( v, "ERI_Tcx%d", tcx ); nC = 3;
#else
                    sprintf( v, "BSL_Tcx%d", tcx );
                    nC = 3;
                    sprintf( v, "BSL_Tcx%d", tcx ); nC = 3;
#endif
                    if ( sns_stereo_mode[ch] == 0 )
                    {
@@ -695,8 +693,8 @@ int16_t quantize_sns(
                    {
                        sprintf( vq_name, "SD2_%s_LR_Ch%dsub%dSt%dnC%d", v, ch, k, nStages, nC );
                    }
                    assert(0);
                    snr_diff( sns_ptr, snsQ, M, 0, vq_name );
                   
                    snr_diff( sns_inbuf, snsQ, M, 0, vq_name );
                }
#endif
            }