Commit de08a5eb authored by multrus's avatar multrus
Browse files

[cleanup] accept OPT_2308_FIND_TARGET

parent 1f539ba7
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -108,7 +108,6 @@
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_2250_LARGE_DIFFERENCES_BETWEEN_BASOP_AND_FLOAT  /* Dolby: Issue 2250:  random vector generation in GenShapedSHBExcitation() */
#define OPT_2308_FIND_TARGET                            /* VA: Issue 2308, Speeds up computation and improve accuracy of the impulse response */
#define OPT_NBE_2311_HARM_GSC_GAIN                      /* VA: issue 2311: non-BE part of the GSC gain harmonization */
#define FIX_2261_REMOVE_LP_RESCALING                    /* VA: Remove of unnecessary lpc coefficient rescaling */
#define FIX_2320_OOB_SCE_SWITCHING                      /* VA: basop issue 2320: Correct the length of the buffer to be scaled in SCE/CPE switching */
+0 −45
Original line number Diff line number Diff line
@@ -173,12 +173,8 @@ void find_targets_ivas_fx(
{
    Word16 i;
    Word16 temp[M + 6 * L_SUBFR]; /* error of quantization */
#ifndef OPT_2308_FIND_TARGET
    Word16 scale, scaleq, j, d, s, s2, tmp;
#else
    Word16 scale, scaleq, j, d, s, tmp;
    Word32 s2;
#endif
    Word16 Aqs[M + 1];
    Word32 h1_32[6 * L_SUBFR];
    Word16 sf;
@@ -238,57 +234,17 @@ void find_targets_ivas_fx(
    {
        Copy( p_Aq, Aqs, M + 1 ); /* Q12 */
        s = add( scaleq, 1 );
#ifndef OPT_2308_FIND_TARGET
        s2 = shr( 16384, d );
#else
        s2 = L_shr( ( 16384 << 16 ), d );
#endif
    }
    ELSE
    {
        Copy_Scale_sig( p_Aq, Aqs, M + 1, d ); /* Q12 */
        s = add( scale, 1 );
#ifndef OPT_2308_FIND_TARGET
        s2 = 16384;
        move16();
#else
        s2 = ( 16384 << 16 );
        move32();
#endif
    }

    set32_fx( h1_32, 0, L_subfr );
#ifndef OPT_2308_FIND_TARGET
    FOR( i = 0; i < M; i++ )
    {
        Ltmp64 = W_mult_16_16( Ap[i], s2 ); /* Q27 */
        FOR( j = 1; j <= i; j++ )
        {
            Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_sat( h1_32[i - j], s ) ) ); /* Q27 */
        }
        h1_32[i] = W_extract_l( Ltmp64 ); /* Q27 */
        move32();
    }

    Ltmp64 = W_mult_16_16( Ap[i], s2 ); /* Q27 */
    FOR( j = 1; j <= M; j++ )
    {
        Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_sat( h1_32[i - j], s ) ) ); /* Q27 */
    }
    h1_32[M] = W_extract_l( Ltmp64 ); /* Q27 */
    move32();

    FOR( i = M + 1; i < L_subfr; i++ )
    {
        Ltmp64 = W_msu_16_16( 0, Aqs[1], extract_h( L_shl_sat( h1_32[i - 1], s ) ) ); /* Q27 */
        FOR( j = 2; j <= M; j++ )
        {
            Ltmp64 = W_msu_16_16( Ltmp64, Aqs[j], extract_h( L_shl_sat( h1_32[i - j], s ) ) ); /* Q27 */
        }
        h1_32[i] = W_extract_l( Ltmp64 ); /* Q27 */
        move32();
    }
#else
    FOR( i = 0; i < M; i++ )
    {
        Ltmp64 = W_mult_32_16( s2, Ap[i] ); /* Q27 */
@@ -319,7 +275,6 @@ void find_targets_ivas_fx(
        move32();
    }

#endif
    sf = sub( L_norm_arr( h1_32, L_subfr ), 1 );
    Copy_Scale_sig32_16( h1_32, h1, L_subfr, sf ); // Q11 + sf