Commit c24ed7d9 authored by vaillancour's avatar vaillancour
Browse files

test on using full scale for A in most cases

parent ff09441a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -129,5 +129,5 @@
#define FIX_ISSUE_1801_NOISE_FLOOR_REDUCTION    /* FhG: Fixed getScalefactor usage */

#define FIX_1818_WRONG_PIT_INIT                 /* VA: Fix wrong pitch initialization */

#define REM_Aq_SC
#endif
+4 −0
Original line number Diff line number Diff line
@@ -1105,11 +1105,13 @@ ivas_error acelp_core_enc_ivas_fx(
        move16();
        st->hLPDmem->q_mem_syn = st->Q_syn;
        move16();
#ifndef REM_Aq_SC
        // Scaling Aq to Q12
        FOR( Word16 k = 0; k < NB_SUBFR16k; k++ )
        {
            Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) );
        }
#endif
        /* synthesis at 12.8kHz sampling rate */
        syn_12k8_fx( st->L_frame, Aq, exc3_fx, syn1_fx, hLPDmem->mem_syn3, 1, sub( Q_new, 1 ), st->Q_syn );

@@ -1257,11 +1259,13 @@ ivas_error acelp_core_enc_ivas_fx(
            st->stab_fac_fx = lsf_stab_fx( lsf_new_fx, st->lsf_old_fx, 0, st->L_frame ); // Q15
            move16();
        }
#ifndef REM_Aq_SC
        // Scaling Aq to Q12
        FOR( Word16 k = 0; k < NB_SUBFR16k; k++ )
        {
            Scale_sig( &Aq[( M + 1 ) * k], M + 1, sub( norm_s( Aq[( M + 1 ) * k] ), 2 ) );
        }
#endif
        test();
        IF( EQ_16( st->last_core, HQ_CORE ) && st->element_mode > EVS_MONO )
        {
+4 −0
Original line number Diff line number Diff line
@@ -228,11 +228,13 @@ ivas_error ivas_core_enc_fx(
        Scale_sig( fft_buff_fx[n], ( 2 * L_FFT ), -1 ); // To create 1 headroom for addition of magnitude square spectrum
                                                        // fft_buff_fx_exp = add(fft_buff_fx_exp,1);

#ifndef REM_Aq_SC
        FOR( i = 0; i < st->nb_subfr; i++ )
        {
            Scale_sig( &A_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( A_fx[n][i * ( M + 1 )] ), 2 ) );   // scaling to Q12
            Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12
        }
#endif
        IF( EQ_32( ivas_format, SBA_FORMAT ) )
        {
            IF( NE_32( ( error = pre_proc_ivas_fx( st, last_element_mode, element_brate, last_element_brate, input_frame, old_inp_12k8_fx[n] /* i: -1, o: Q_new - 1 */, old_inp_16k_fx[n] /* i: -1, o: Q_new - 1 */,
@@ -337,10 +339,12 @@ ivas_error ivas_core_enc_fx(
        test();
        IF( ( EQ_16( st->core, TCX_20_CORE ) || EQ_16( st->core, TCX_10_CORE ) ) && NE_16( st->element_mode, IVAS_CPE_MDCT ) )
        {
#ifndef REM_Aq_SC
            FOR( i = 0; i < st->nb_subfr; i++ )
            {
                Scale_sig( &Aw_fx[n][i * ( M + 1 )], M + 1, sub( norm_s( Aw_fx[n][i * ( M + 1 )] ), 2 ) ); // scaling to Q12
            }
#endif
            TCX_ENC_HANDLE hTcxEnc = st->hTcxEnc;
            Word16 Q_spec_old, L_spec;

+2 −1
Original line number Diff line number Diff line
@@ -636,8 +636,9 @@ ivas_error front_vad_spar_fx(
        }

        relE_fx = sub( Etot_fx[0], extract_h( st->lp_speech_32fx ) );
#ifndef REM_Aq_SC
        Scale_sig( A_fx, ( L_FRAME / L_SUBFR ) * ( M + 1 ), -2 ); // Q12

#endif
        st->mem_wsp_fx = (Word16) shl_sat( st->mem_wsp_fx, Q_inp_12k8 - st->mem_wsp_q ); /* Q_inp_12k8 */
        st->mem_wsp_q = Q_inp_12k8;
        move16();