Commit 0ba99db3 authored by multrus's avatar multrus
Browse files

[cleanup] accept REUSE_EVS_BE_ACELP_PITCH, REUSE_EVS_BE_ACELP_PITCH_PIT_Q

parent 12bb57e4
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -78,8 +78,6 @@



#define REUSE_EVS_BE_ACELP_PITCH
#define REUSE_EVS_BE_ACELP_PITCH_PIT_Q


#define FIX_1844_MISSING_FREE                   /* FhG: add missing free in ivas_binRenderer_convModuleClose_fx() */
+2 −7
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ static void encod_gen_voic_core_switch_fx(
    set16_fx( dummyF, -1, NB_SUBFR16k ); /* hack to signal ACELP->HQ switching frame */
    pitch = pit_encode_fx( hBstr,
                           st_fx->acelp_cfg.pitch_bits, core_bitrate, 0, L_frame, GENERIC, &pitch_limit_flag, 0, exc, L_SUBFR, T_op, &T0_min, &T0_max, &T0, &T0_frac, h1, xn, 0 /*hStereoTD->tdm_Pitch_reuse_flag*/, dummyF /*hStereoTD->tdm_Pri_pitch_buf*/
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                           ,
                           st_fx->element_mode, Q_new
#endif
@@ -623,18 +623,13 @@ static void encod_gen_voic_core_switch_ivas_fx(
     * Adaptive exc. construction
     *----------------------------------------------------------------*/
    set16_fx( dummyF, -1, NB_SUBFR16k ); /* hack to signal ACELP->HQ switching frame */
#ifndef REUSE_EVS_BE_ACELP_PITCH
    pitch = pit_encode_ivas_fx( hBstr,
                                st_fx->acelp_cfg.pitch_bits, core_bitrate, 0, L_frame, GENERIC, &pitch_limit_flag, 0, exc, L_SUBFR, T_op, &T0_min, &T0_max, &T0, &T0_frac, h1, xn, 0 /*hStereoTD->tdm_Pitch_reuse_flag*/, dummyF /*hStereoTD->tdm_Pri_pitch_buf*/, Q_new ); /* Q6 */
#else
    pitch = pit_encode_fx( hBstr,
                           st_fx->acelp_cfg.pitch_bits, core_bitrate, 0, L_frame, GENERIC, &pitch_limit_flag, 0, exc, L_SUBFR, T_op, &T0_min, &T0_max, &T0, &T0_frac, h1, xn, 0 /*hStereoTD->tdm_Pitch_reuse_flag*/, dummyF /*hStereoTD->tdm_Pri_pitch_buf*/
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                           ,
                           st_fx->element_mode, Q_new
#endif
    );                                                                                                                                        /* Q6 */
#endif
    /*-----------------------------------------------------------------*
     * Find adaptive exitation
     *-----------------------------------------------------------------*/
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ void encod_amr_wb_fx(

        *pt_pitch = pit_encode_fx( hBstr, st->acelp_cfg.pitch_bits, st->core_brate, 1, L_FRAME, -1, &pitch_limit_flag, i_subfr, exc,
                                   L_SUBFR, T_op, &T0_min, &T0_max, &T0, &T0_frac, h1, xn, 0 /*hStereoTD->tdm_Pitch_reuse_flag*/, NULL /*hStereoTD->tdm_Pri_pitch_buf*/
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                                   ,
                                   0, Q_new
#endif
+2 −7
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ void encod_gen_voic_fx(

        *pt_pitch_fx = pit_encode_fx( hBstr, st_fx->acelp_cfg.pitch_bits, st_fx->core_brate, 0, L_frame, st_fx->coder_type, &pitch_limit_flag, i_subfr_fx, exc_fx,
                                      L_SUBFR, st_fx->pitch, &T0_min_fx, &T0_max_fx, &T0_fx, &T0_frac_fx, h1_fx, xn_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                                      ,
                                      st_fx->element_mode, Q_new
#endif
@@ -622,18 +622,13 @@ void encod_gen_voic_ivas_fx(
         * Close-loop pitch search and quantization
         *----------------------------------------------------------------*/

#ifndef REUSE_EVS_BE_ACELP_PITCH
        *pt_pitch_fx = pit_encode_ivas_fx( hBstr, st_fx->acelp_cfg.pitch_bits, st_fx->core_brate, 0, L_frame, st_fx->coder_type, &pitch_limit_flag, i_subfr_fx, exc_fx,
                                           L_SUBFR, st_fx->pitch, &T0_min_fx, &T0_max_fx, &T0_fx, &T0_frac_fx, h1_fx, xn_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf, Q_new ); /* Q6 */
#else
        *pt_pitch_fx = pit_encode_fx( hBstr, st_fx->acelp_cfg.pitch_bits, st_fx->core_brate, 0, L_frame, st_fx->coder_type, &pitch_limit_flag, i_subfr_fx, exc_fx,
                                      L_SUBFR, st_fx->pitch, &T0_min_fx, &T0_max_fx, &T0_fx, &T0_frac_fx, h1_fx, xn_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                                      ,
                                      st_fx->element_mode, Q_new
#endif
        ); /* Q6 */
#endif
        move16();

        tbe_celp_exc_ivas( st_fx->element_mode, st_fx->idchan, L_frame, L_SUBFR, i_subfr_fx, T0_fx, T0_frac_fx, &error_fx, bwe_exc_fx, st_fx->tdm_LRTD_flag );
+2 −8
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ void enc_pit_exc_fx(
         *----------------------------------------------------------------*/
        *pt_pitch = pit_encode_fx( hBstr, st_fx->acelp_cfg.pitch_bits, Pitch_BR, 0, st_fx->L_frame, Pitch_CT, &pitch_limit_flag, i_subfr, exc,
                                   L_subfr, st_fx->pitch, &T0_min, &T0_max, T0, T0_frac, h1, xn, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                                   ,
                                   st_fx->element_mode, Q_new
#endif
@@ -742,19 +742,13 @@ void enc_pit_exc_ivas_fx(
         * Close-loop pitch search and quantization
         * Adaptive exc. construction
         *----------------------------------------------------------------*/
#ifndef REUSE_EVS_BE_ACELP_PITCH
        *pt_pitch = pit_encode_ivas_fx( hBstr, st_fx->acelp_cfg.pitch_bits, Pitch_BR, 0, st_fx->L_frame, Pitch_CT, &pitch_limit_flag, i_subfr, exc,
                                        L_subfr, st_fx->pitch, &T0_min, &T0_max, T0, T0_frac, h1, xn, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf, Q_new ); /* Q6 */
        move16();
#else
        *pt_pitch = pit_encode_fx( hBstr, st_fx->acelp_cfg.pitch_bits, Pitch_BR, 0, st_fx->L_frame, Pitch_CT, &pitch_limit_flag, i_subfr, exc,
                                   L_subfr, st_fx->pitch, &T0_min, &T0_max, T0, T0_frac, h1, xn, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf
#if defined REUSE_EVS_BE_ACELP_PITCH && !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
#if !defined REUSE_EVS_ACELP_PITCH_NORM_CORR
                                   ,
                                   st_fx->element_mode, Q_new
#endif
        ); /* Q6 */
#endif
        Scale_sig( h1, L_subfr, sub( 14, q_h1 ) ); /* set h1[] in Q14 with scaling for convolution Q14*/

        /*-----------------------------------------------------------------*
Loading