Commit a96f24f3 authored by vaillancour's avatar vaillancour
Browse files

cleaning

parent 238d725d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -117,12 +117,15 @@

#define EVS_NONBE_REUSAGE_1906
#ifdef EVS_NONBE_REUSAGE_1906
    #define REUSE_EVS_ACELP_SHIFT    // Add shift parameter as expected by EVS acelp subfunctions
    //#define REUSE_EVS_ACELP_SHIFT    // Add shift parameter as expected by EVS acelp subfunctions-> but currently just forced to 0
    #define REUSE_EVS_ACELP_HL_AVQ   // Replace ACELP high layers by EVS
    #define REUSE_EVS_ACELP_INOV
#ifdef REUSE_EVS_ACELP_INOV
    #define REUSE_EVS_ACELP_TC       // Replace TC by EVS TC
    #define REUSE_EVS_ACELP_GEN      // Replace VOICE_GEN by EVS TC
    #define REUSE_EVS_ACELP_GEN      // Replace VOICE_GEN by EVS VOICE_GEN
    #define REUSE_EVS_GSC            // Replace GSC by EVS GSC
    #define USE_NEW_TARGET          /* Ittiam target computation allows for -> this seems not to give improvement on stv */

#endif
#endif

+8 −3
Original line number Diff line number Diff line
@@ -1315,8 +1315,8 @@ ivas_error acelp_core_enc_ivas_fx(

        calc_residu_fx( st, inp, res_fx, Aq );
        calculate_hangover_attenuation_gain_ivas_fx( st, &att_fx, vad_hover_flag );
#if 1//def REUSE_EVS_ACELP_SHIFT 
        /* This could be moved outside of ACELP and compute on wsp or can be estimated on residual, idea is to prevent correlation to saturate, and from here they are all derived from residual*/
#if 0 /* def REUSE_EVS_ACELP_SHIFT */
        /* This should come from outside the scope, can be estimated from residual, but seems to introduce slight quality degradation when done like this*/
        {
            Word16 loc_max;
            loc_max = 0;
@@ -1328,6 +1328,11 @@ ivas_error acelp_core_enc_ivas_fx(

            shift = sub( norm_s( loc_max ), 3 );
            shift = s_min( shift, 0 );
#ifdef DEBUGGING
            if ( shift != 0 )
                //printf( "shift = %d at frame %d\n", shift, frame );
                printf( "shift = %d \n", shift );
#endif
        }
#endif
        IF( NE_16( att_fx, 32767 /* ONE_IN_Q15 */ ) )
@@ -1426,7 +1431,7 @@ ivas_error acelp_core_enc_ivas_fx(

                /* VOICED frames in SC-VBR */
#ifdef REUSE_EVS_ACELP_GEN
                encod_gen_voic_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, 0, Q_new );
                encod_gen_voic_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, shift, Q_new );
#else
                encod_gen_voic_ivas_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, 0, Q_new );
#endif
+1 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ void encod_gen_voic_fx(
    set16_fx( code_preQ_fx, 0, L_SUBFR );

    shift_wsp = add( Q_new, shift );
#ifdef REUSE_EVS_ACELP_GEN
#if defined USE_NEW_TARGET || defined REUSE_EVS_ACELP_GEN
    test();
    if ( st_fx->element_mode > EVS_MONO )
    {
@@ -214,7 +214,6 @@ void encod_gen_voic_fx(
    /*------------------------------------------------------------------*
     * ACELP subframe loop
     *------------------------------------------------------------------*/
#define USE_NEW_TARGET
    FOR( i_subfr_fx = 0; i_subfr_fx < L_frame; i_subfr_fx += L_SUBFR )
    {

+1 −2
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ Word16 encod_tran_fx(
    move16();
    set16_fx( code_preQ, 0, L_SUBFR );
    shift_wsp = add( Q_new, shift );
#if defined REUSE_EVS_ACELP_TC
#if defined USE_NEW_TARGET || defined REUSE_EVS_ACELP_TC
    test();
    if ( st_fx->element_mode > EVS_MONO )
    {
@@ -155,7 +155,6 @@ Word16 encod_tran_fx(
    /*----------------------------------------------------------------*
     * ACELP subframe loop
     *----------------------------------------------------------------*/
#define USE_NEW_TARGET
    FOR( i_subfr = 0; i_subfr < L_frame_fx; i_subfr += L_SUBFR )
    {
        /*----------------------------------------------------------------*