Commit 4f73bc08 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '1300-preprocessing-time-domain-issues' into 'main'

possible modification to improve #1300

See merge request !1135
parents 9507dbac 5dc906cb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -170,4 +170,5 @@
#define FIX_1320_LOWRATE_ACELP
#define FIX_1297_OVERFLOW                       /* VA: fixes issue with overflows in pre-processing */
#define FIX_1298                                /* VA: fix possible assert in gaus_enc */
#define FIX_1300_ICA_SHIFT_QUANT_IMPROV         /* VA: Fix to 1300 to improve precision of the lag quantizer */
#endif
+7 −0
Original line number Diff line number Diff line
@@ -1965,6 +1965,8 @@ void stereo_tca_enc_fx(

        Word16 temp_exp, tempF_16fx;
        Word16 scalar_value = BASOP_Util_Divide1616_Scale( currentNCShift, dsFactor, &temp_exp ); /* Q15-temp_exp */

#ifndef FIX_1300_ICA_SHIFT_QUANT_IMPROV
        IF( temp_exp < 0 )
        {
            scalar_value = shl( scalar_value, sub( temp_exp, Q3 ) );                                                                   // Q12
@@ -1976,6 +1978,11 @@ void stereo_tca_enc_fx(
            hStereoTCA->indx_ica_NCShift = usquant_fx( scalar_value, &tempF_16fx, 0, shl( 1, sub( 14, temp_exp ) ), ( 1 << STEREO_BITS_TCA_CORRSTATS ) ); /* Q0 */
            move16();
        }
#else
        scalar_value = shl_sat( scalar_value, sub( temp_exp, 5 ) );                                                                              /*Q10*/
        hStereoTCA->indx_ica_NCShift = usquant_fx( scalar_value, &tempF_16fx, 0, 512 /* 0.5 in Q10 */, ( 1 << STEREO_BITS_TCA_CORRSTATS ) );     /* Q0 */
#endif

        tempF_fx = tempF_16fx;
        move32();
    }