Commit ee3ba935 authored by vaillancour's avatar vaillancour
Browse files

adding possibility of BE, tbc and fixing issue with inov

parent 6869414b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -120,6 +120,8 @@
    #define REUSE_EVS_ACELP_SHIFT    // Add shift parameter as expected by EVS acelp subfunctions
    #define REUSE_EVS_ACELP_HL_AVQ   // Replace ACELP high layers by EVS
    #define REUSE_EVS_ACELP_TC       // Replace TC by EVS TC
    #define REUSE_EVS_ACELP_TC_tmp_inov  // Temporary until inov_encode_ivas_fx is replaced
    //#define REUSE_EVS_ACELP_TC_BE
#endif


+12 −3
Original line number Diff line number Diff line
@@ -196,9 +196,18 @@ Word16 encod_tran_fx(
        /*-----------------------------------------------------------------*
         * ACELP codebook search + pitch sharpening
         *-----------------------------------------------------------------*/

#ifdef REUSE_EVS_ACELP_TC_tmp_inov
        if ( st_fx->element_mode > EVS_MONO )
        {
            inov_encode_ivas_fx( st_fx, st_fx->core_brate, 0, L_frame_fx, st_fx->last_L_frame, st_fx->coder_type, st_fx->bwidth, st_fx->sharpFlag,
                                 i_subfr, tc_subfr, p_Aq, gain_pit, cn, exc_fx, h2_fx, hLPDmem->tilt_code, *pt_pitch, xn2, code, y2, &unbits_PI, L_SUBFR, shift, Q_new );
        }
        ELSE
#endif
        {
            inov_encode_fx( st_fx, st_fx->core_brate, 0, L_frame_fx, st_fx->last_L_frame, st_fx->coder_type, st_fx->bwidth, st_fx->sharpFlag,
                            i_subfr, tc_subfr, p_Aq, gain_pit, cn, exc_fx, h2_fx, hLPDmem->tilt_code, *pt_pitch, xn2, code, y2, &unbits_PI, L_SUBFR, shift );
        }

        test();
        test();
+60 −9
Original line number Diff line number Diff line
@@ -407,7 +407,16 @@ void transition_enc_fx(
                push_indice( hBstr, IND_PITCH, index, nBits );

                /* Find the adaptive codebook vector - ACELP long-term prediction */
#ifdef REUSE_EVS_ACELP_TC_BE
                IF( st_fx->element_mode > EVS_MONO )
                {
                    pred_lt4_ivas_fx( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                ELSE
#endif
                {
                    pred_lt4( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }


                offset = tbe_celp_exc_offset( *T0, *T0_frac, st_fx->L_frame );
@@ -461,8 +470,16 @@ void transition_enc_fx(
                push_indice( hBstr, IND_PITCH, index, nBits );

                /* Find the adaptive codebook vector - ACELP long-term prediction */
#ifdef REUSE_EVS_ACELP_TC_BE
                IF( st_fx->element_mode > EVS_MONO )
                {
                    pred_lt4_ivas_fx( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                ELSE
#endif
                {
                    pred_lt4( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );

                }
                offset = tbe_celp_exc_offset( *T0, *T0_frac, st_fx->L_frame );


@@ -530,8 +547,16 @@ void transition_enc_fx(
                push_indice( hBstr, IND_PITCH, index, nBits );

                /* Find the adaptive codebook vector - ACELP long-term prediction */
#ifdef REUSE_EVS_ACELP_TC_BE
                IF( st_fx->element_mode > EVS_MONO )
                {
                    pred_lt4_ivas_fx( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                ELSE
#endif
                {
                    pred_lt4( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );

                }
                offset = tbe_celp_exc_offset( *T0, *T0_frac, st_fx->L_frame );

                FOR( i = 0; i < L_SUBFR * HIBND_ACB_L_FAC; i++ )
@@ -559,8 +584,16 @@ void transition_enc_fx(
                push_indice( hBstr, IND_PITCH, index, nBits );

                /* Find the adaptive codebook vector - ACELP long-term prediction */
#ifdef REUSE_EVS_ACELP_TC_BE
                IF( st_fx->element_mode > EVS_MONO )
                {
                    pred_lt4_ivas_fx( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                ELSE
#endif
                {
                    pred_lt4( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );

                }
                offset = tbe_celp_exc_offset( *T0, *T0_frac, st_fx->L_frame );


@@ -606,7 +639,16 @@ void transition_enc_fx(
                pit_Q_enc_fx( hBstr, 0, nBits, 8, pit_flag, limit_flag, *T0, *T0_frac, T0_min, T0_max );

                /* Find the adaptive codebook vector - ACELP long-term prediction */
#ifdef REUSE_EVS_ACELP_TC_BE
                IF( st_fx->element_mode > EVS_MONO )
                {
                    pred_lt4_ivas_fx( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                ELSE
#endif
                {
                    pred_lt4( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }

                offset = tbe_celp_exc_offset( *T0, *T0_frac, st_fx->L_frame );

@@ -868,7 +910,16 @@ void transition_enc_fx(
            ELSE
            {
                /* Find the adaptive codebook vector - ACELP long-term prediction */
#ifdef REUSE_EVS_ACELP_TC_BE
                IF( st_fx->element_mode > EVS_MONO )
                {
                    pred_lt4_ivas_fx( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                ELSE
#endif
                {
                    pred_lt4( &exc_fx[i_subfr], &exc_fx[i_subfr], *T0, *T0_frac, L_SUBFR + 1, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP );
                }
                offset = L_deposit_l( 0 );

                tmp = extract_l( L_mult( *T0_frac, 32 ) ); /*Q8, 0.25 in Q7*/