Commit b7780192 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE

parent ae491916
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1375,11 +1375,7 @@ void pca_enc_s3_fx(

    q_ang_2surv_fx( ph1_fx, n1, ph1_q_fx, ind1 );

#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
    tmp = mac_r( L_mac( L_mult( q_fx[1], q_fx[1] ), q_fx[2], q_fx[2] ), q_fx[3], q_fx[3] ); // Q15 + Q15 - Q15 -> Q15
#else
    tmp = add( add( mult( q_fx[1], q_fx[1] ), mult( q_fx[2], q_fx[2] ) ), mult( q_fx[3], q_fx[3] ) ); // Q15 + Q15 - Q15 -> Q15
#endif
    r_e = 0;
    move16();
    r_fx = Sqrt16( tmp, &r_e );
@@ -1433,11 +1429,7 @@ void pca_enc_s3_fx(
        q_ang_2surv_fx( ph2_fx, n2[i], ph2_q_fx + 2 * i, ind2 + 2 * i );
    }

#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
    r_fx = Sqrt16( mac_r( L_mult( q_fx[2], q_fx[2] ), q_fx[3], q_fx[3] ), &r_e );
#else
    r_fx = Sqrt16( add( mult( q_fx[2], q_fx[2] ), mult( q_fx[3], q_fx[3] ) ), &r_e );
#endif

    v_fx = BASOP_Util_Divide1616_Scale( q_fx[2], r_fx, &v_e );
    v_e = add( v_e, sub( 0, r_e ) );
+0 −1
Original line number Diff line number Diff line
@@ -104,7 +104,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 FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE  /* VA: Precision improvement without increasing complexity, or complexity reduction that might be not BE on the LSB */
#define FIX_2252_LP_CNG_STARTS_SID                      /* VA: issues 2251 and 2252: fix LP CNG uninitialized value in bitstream that starts with an SID */
#define FIX_1381_BWD                                    /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */
#define FIX_2285_CODE_DECODER_INIT_BW                   /* VA: basop issue 2285: fix core-decoder initialization bandwidth */
+0 −4
Original line number Diff line number Diff line
@@ -1041,11 +1041,7 @@ Word16 res_bpf_adapt_ivas_fx(
        bpf_error_ratio = ONE_IN_Q14; // Q13
        move16();
    }
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
    bpf_error_ratio = mac_r( L_mult( STEREO_DFT_BPF_ADAPT_BETA_FX, bpf_error_ratio ), ( MAX_16 - STEREO_DFT_BPF_ADAPT_BETA_FX ), hStereoDft->bpf_error_ratio_mem_fx );
#else
    bpf_error_ratio = add( mult( STEREO_DFT_BPF_ADAPT_BETA_FX, bpf_error_ratio ), mult( ( MAX_16 - STEREO_DFT_BPF_ADAPT_BETA_FX ), hStereoDft->bpf_error_ratio_mem_fx ) );
#endif
    hStereoDft->bpf_error_ratio_mem_fx = bpf_error_ratio;
    move16();

+0 −25
Original line number Diff line number Diff line
@@ -119,9 +119,7 @@ static void stereo_dft_generate_comfort_noise_fx(
    Word32 tmp32_1, tmp32_2;
    Word16 q_div, q_sqrt1, q_sqrt2, q_sqrt, sqrt_res;
    Word16 q_shift, q_shift_1, q_shift_2, min_q;
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
    Word16 tmp16, tmp_p, tmp_s;
#endif
    hFdCngCom = st->hFdCngDec->hFdCngCom;

    push_wmops( "DFT_CNG" );
@@ -164,11 +162,7 @@ static void stereo_dft_generate_comfort_noise_fx(
            }
            ELSE
            {
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
                hStereoDft->g_state_fx[b] = mac_r( L_mult( ONE_MINUS_A_GFILT_FX, extract_h( *pSideGain++ ) ), A_GFILT_FX, hStereoDft->g_state_fx[b] ); /* Q15 */
#else
                hStereoDft->g_state_fx[b] = add( mult( ONE_MINUS_A_GFILT_FX, extract_h( *pSideGain++ ) ), mult( A_GFILT_FX, hStereoDft->g_state_fx[b] ) ); /* Q15 */
#endif
                move16();
            }

@@ -195,21 +189,13 @@ static void stereo_dft_generate_comfort_noise_fx(
                }
                ELSE
                {
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
                    hStereoCng->cm_fx[b] = mac_r( L_mult( ONE_MINUS_A_GFILT_FX, hStereoCng->coh_fx[b] ), A_GFILT_FX, hStereoCng->cm_fx[b] ); /* Q15 */
#else
                    hStereoCng->cm_fx[b] = add( mult( ONE_MINUS_A_GFILT_FX, hStereoCng->coh_fx[b] ), mult( A_GFILT_FX, hStereoCng->cm_fx[b] ) );           /* Q15 */
#endif
                    move16();
                }
            }
            ELSE
            {
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
                hStereoCng->cm_fx[b] = mac_r( L_mult( ONE_MINUS_A_GFILT_FX, hStereoCng->coh_fx[b] ), A_GFILT_FX, hStereoCng->cm_fx[b] ); /* Q15 */
#else
                hStereoCng->cm_fx[b] = add( mult( ONE_MINUS_A_GFILT_FX, hStereoCng->coh_fx[b] ), mult( A_GFILT_FX, hStereoCng->cm_fx[b] ) );               /* Q15 */
#endif
                move16();
            }
        }
@@ -241,7 +227,6 @@ static void stereo_dft_generate_comfort_noise_fx(
                }

                LR_ratio = extract_h( tdm_ratio_tabl_fx[hStereoCng->last_tdm_idx] ); /* Q15 */
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
                tmp16 = shr( hStereoDft->g_state_fx[b], 2 );
                tmp_p = add( ONE_IN_Q13, tmp16 );
                tmp_s = sub( ONE_IN_Q13, tmp16 );
@@ -251,16 +236,6 @@ static void stereo_dft_generate_comfort_noise_fx(
                    L_mac( L_mult( tmp_p, tmp_p ), gamma, tmp16 ),
                    L_mac( L_mult( tmp_s, tmp_s ), gamma, tmp16 ),
                    &c_e );
#else
                c = BASOP_Util_Divide3232_Scale(
                    L_add( L_mult( add( ONE_IN_Q13, shr( hStereoDft->g_state_fx[b], 2 ) ),
                                   add( ONE_IN_Q13, shr( hStereoDft->g_state_fx[b], 2 ) ) ),
                           L_shr( L_mult( gamma, gamma ), 4 ) ),
                    L_add( L_mult( sub( ONE_IN_Q13, shr( hStereoDft->g_state_fx[b], 2 ) ),
                                   sub( ONE_IN_Q13, shr( hStereoDft->g_state_fx[b], 2 ) ) ),
                           L_shr( L_mult( gamma, gamma ), 4 ) ),
                    &c_e );
#endif
                q_sqrt = c_e;
                move16();
                sqrt_res = Sqrt16( mult( c, hStereoCng->cm_fx[b] ), &q_sqrt );
+0 −4
Original line number Diff line number Diff line
@@ -3719,11 +3719,7 @@ void stereo_dft_dec_sid_coh_fx(
            pred_fx = add( pred_fx, shl( mult( ( *pptr_fx++ ), cohBandq_fx[i] ), 2 ) ); /*q-13*/
        }
        /* Weighted intra/inter-frame prediction */
#ifdef FIX_2254_IMPROV_PRECISION_OR_COMPLEXITY_NON_BE
        pred_fx = mac_r( L_mult( alpha_fx, pred_fx ), sub( 32767, alpha_fx ), shr( coh_fx[b], 2 ) ); /*q-13*/
#else
        pred_fx = add( mult( alpha_fx, pred_fx ), mult( sub( 32767, alpha_fx ), shr( coh_fx[b], 2 ) ) ); /*q-13*/
#endif
        /* Read residual index from bitstream */
        IF( LT_16( *nb_bits, nr_of_sid_stereo_bits ) ) /* If the bit limit is reached, res_index = 0 is assumed for remaining indices */
        {
Loading