Commit 92c4ff2b authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

LTV test non BE sba enc changes 16062025

parent 77c8f31b
Loading
Loading
Loading
Loading
Loading
+203 −15

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@
#ifndef BASOP_NOGLOB_DEV_USE_GLOBALS
#define BASOP_NOGLOB_DECLARE_LOCAL
#endif
#define FIX_732_MS_PERIODOG_FLOOR                /* Eri: Issue-732: Dynamic range of msPeriodog leads to minimum value 1e-5 being truncated to zero. This uses the smallest non-zero value instead. */

#define FIX_867_CLDFB_NRG_SCALE

@@ -78,6 +79,7 @@
#define OPT_SBA_REND_V1_BE
#define OPT_HEAD_ROT_REND_V1_BE
#define OPT_SBA_DEC_V2_BE
#define OPT_SBA_ENC_V2_NBE
#define OPT_SBA_ENC_V1_BE
#define OPT_BIN_RENDERER_V1
#define OPT_BIN_RENDERER_V2
+1 −1
Original line number Diff line number Diff line
@@ -2886,7 +2886,7 @@ void IMDCT_ivas_fx(
            {
                Word16 q_old_out = q_win;
                move16();
                edct_fx( x_fx, xn_buf_fx_32 + add( shr( overlap, 1 ), nz ), L_frame, &q_xn_buf_fx_32 );
                edct_ivas_fx( x_fx, xn_buf_fx_32 + add( shr( overlap, 1 ), nz ), L_frame, &q_xn_buf_fx_32 );
                Word16 res_m, res_e;
                res_e = 0;
                move16();
+33 −2
Original line number Diff line number Diff line
@@ -1501,14 +1501,19 @@ void perform_noise_estimation_dec_ivas_fx(
    Word16 enr_e, enr_ratio, alpha;
    Word32 *msPeriodog;
    Word32 *msNoiseEst;
#ifdef FIX_732_MS_PERIODOG_FLOOR
    Word32 msPeriodog_floor;
#endif
    Word32 *reIter;
    Word32 rescale_fac = 0;
    Word64 W_tmp;
    Word16 tmp_s, tmp_q, min_q = 31;
    Word16 q_shift;
    Word32 max_l;
    Word16 norm_shift;

#ifdef FIX_732_MS_PERIODOG_FLOOR
    Word16 norm_shift, check = 0;
    move16();
#endif
    /* pointer initialization */
    periodog = hFdCngDec->hFdCngCom->periodog;   /*Q31 - hFdCngDec->hFdCngCom->periodog_exp*/
    fftBuffer = hFdCngDec->hFdCngCom->fftBuffer; /*Q31 - hFdCngDec->hFdCngCom->fftBuffer_exp*/
@@ -1706,12 +1711,38 @@ void perform_noise_estimation_dec_ivas_fx(
                msPeriodog[p] = L_add( msPeriodog[p], L_tmp ); /*Q31 - hFdCngDec->msPeriodog_exp*/
                move32();

#ifdef FIX_732_MS_PERIODOG_FLOOR
                msPeriodog_floor = L_max( 1, L_shr( 21474 /*Q31*/, hFdCngDec->msPeriodog_exp ) ); /*Q31 - hFdCngDec->msPeriodog_exp*/
                IF( LT_32( msPeriodog[p], msPeriodog_floor ) )
#else
                IF( LT_32( msPeriodog[p], L_shr( 21474 /*Q31*/, hFdCngDec->msPeriodog_exp ) ) )
#endif
                {
#ifdef FIX_732_MS_PERIODOG_FLOOR
                    msPeriodog[p] = msPeriodog_floor;
                    move32();
#else
                    msPeriodog[p] = L_shr( 21474 /*Q31*/, hFdCngDec->msPeriodog_exp ); /*Q31 - hFdCngDec->msPeriodog_exp*/
                    move32();
#endif
                }
            }
#ifdef FIX_732_MS_PERIODOG_FLOOR
            FOR( p = 0; p < npart; p++ )
            {
                IF( GT_32( msPeriodog[p], 1 ) )
                {
                    check = 1;
                    move16();
                    BREAK;
                }
            }
            IF( check == 0 )
            {
                hFdCngDec->msPeriodog_exp = 14; /* msPeriodog buffer will have minimum value as 1e-5f */
                move16();
            }
#endif
        }

        /* calculate total energy (short-term and long-term) */
+5 −5
Original line number Diff line number Diff line
@@ -2608,7 +2608,7 @@ void stereo_dft_dec_fx(
                    q_cna_level = hFdCngDec->smoothed_psd_exp;
                    move16();
                    l_tmp = Sqrt32( cna_level, &q_cna_level );
                    scale_fact = Mpy_32_32( l_tmp, scale_fact0 ); /* q_cna_level */
                    scale_fact = Mpy_32_32( l_tmp, scale_fact0 ); /* Q = (31-q_cna_level) + Q15 - 31 */
                    /*
                       scale_fact0 will be in Q15 by the time the above operation is performed
                       so the q of scale_fact represented now by q_cna_level has to be updated
@@ -2628,12 +2628,12 @@ void stereo_dft_dec_fx(
                    l_tmp = L_add( Madd_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */
                    l_tmp = L_shr( l_tmp, sub( q_cna_level, hStereoDft->q_dft ) );      /* q_dft */
#endif                                                                        /* OPT_STEREO_32KBPS_V1 */
                    DFT_L[2 * i] = L_add( DFT_L[2 * i], l_tmp );              /* q_dft */
                    DFT_L[2 * i] = L_add_sat( DFT_L[2 * i], l_tmp );          /* q_dft */
                    move32();
#ifdef OPT_STEREO_32KBPS_V1
                    l_tmp = Msub_32_16( Msub_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */
                    l_tmp = L_shr( l_tmp, shift );                            /* q_dft */
                    DFT_R[2 * i] = L_add( DFT_R[2 * i], l_tmp );              /* q_dft */
                    DFT_R[2 * i] = L_add_sat( DFT_R[2 * i], l_tmp );          /* q_dft */
#else                                                                         /* OPT_STEREO_32KBPS_V1 */
                    l_tmp = L_sub( Msub_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */
                    l_tmp = L_shr( l_tmp, sub( q_cna_level, hStereoDft->q_dft ) );      /* q_dft */
@@ -2646,11 +2646,11 @@ void stereo_dft_dec_fx(
#ifdef OPT_STEREO_32KBPS_V1
                    l_tmp = Madd_32_16( Madd_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */
                    l_tmp = L_shr( l_tmp, shift );                            /* q_dft */
                    DFT_L[2 * i + 1] = L_add( DFT_L[2 * i + 1], l_tmp );      /* q_dft */
                    DFT_L[2 * i + 1] = L_add_sat( DFT_L[2 * i + 1], l_tmp );  /* q_dft */
                    move32();
                    l_tmp = Msub_32_16( Msub_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */
                    l_tmp = L_shr( l_tmp, shift );                            /* q_dft */
                    DFT_R[2 * i + 1] = L_add( DFT_R[2 * i + 1], l_tmp );      /* q_dft */
                    DFT_R[2 * i + 1] = L_add_sat( DFT_R[2 * i + 1], l_tmp );  /* q_dft */
                    move32();
#else  /* OPT_STEREO_32KBPS_V1 */
                    l_tmp = L_add( Madd_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */
Loading