Commit 2164800f authored by vaclav's avatar vaclav
Browse files

Merge branch '251-propagation-of-etot-parameter' into 'main'

Resolve "Propagation of 'Etot' parameter"

See merge request !339
parents 5a654044 cde200bf
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -168,7 +168,9 @@ ivas_error pre_proc_front_ivas(
    const int16_t n,                                            /* i  : channel number                             */
    float old_inp_12k8[],                                       /* o  : buffer of old input signal                 */
    float old_inp_16k[],                                        /* o  : buffer of old input signal @16kHz          */
#ifndef REMOVE_ETOT_PROPAGATION
    float *Etot,                                                /* o  : total energy                               */
#endif
    float *ener,                                                /* o  : residual energy from Levinson-Durbin       */
    float *relE,                                                /* o  : frame relative energy                      */
    float A[NB_SUBFR16k * ( M + 1 )],                           /* o  : A(z) unquantized for the 4 subframes       */
@@ -414,7 +416,9 @@ ivas_error ivas_core_enc(
    const int16_t n_CoreChannels,                                            /* i  : number of core channels to be coded     */
    float old_inp_12k8[CPE_CHANNELS][L_INP_12k8],                            /* i  : buffer of old input signal              */
    float old_inp_16k[CPE_CHANNELS][L_INP],                                  /* i  : buffer of old input signal              */
#ifndef REMOVE_ETOT_PROPAGATION
    const float Etot[CPE_CHANNELS],                                          /* i  : total energy                            */
#endif
    float ener[CPE_CHANNELS],                                                /* i  : residual energy from Levinson-Durbin    */
    float A[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )],                          /* i  : A(z) unquantized for the 4 subframes    */
    float Aw[CPE_CHANNELS][NB_SUBFR16k * ( M + 1 )],                         /* i  : weighted A(z) unquantized for subframes */
@@ -1754,6 +1758,9 @@ void tdm_ol_pitch_comparison(

void tdm_configure_enc(
    CPE_ENC_HANDLE hCPE,                                        /* i  : CPE encoder structure                   */
#ifdef REMOVE_ETOT_PROPAGATION
    const float Etot_last[CPE_CHANNELS],                        /* i/o: Energy of last frame                    */
#endif
    const int16_t tdm_SM_or_LRTD_Pri,                           /* i  : channel combination scheme flag in TD stereo OR LRTD primary channel */
    const int16_t tdm_ratio_idx,                                /* i  : ratio index                             */
    const int16_t tdm_ratio_idx_SM,                             /* i  : ratio index in SM mode                  */
+1 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@
#define LOW_RATE_TRANS                                  /* Eri: Contribution 20: low rate encoding of transients */
#define MC_BITRATE_SWITCHING                            /* Issue 116: support bitrate switching in MC format  */
#define SIMPLIFY_TD_BWE_RESET                           /* Issue 250: Resolve "TB-BWE state memories reset simplification"  */
#define REMOVE_ETOT_PROPAGATION                         /* Issue 251: Do not propagate Etot parameter */



lib_com/prot.h

100755 → 100644
+10 −8
Original line number Diff line number Diff line
@@ -2304,7 +2304,9 @@ void pre_proc(
    float old_inp_16k[],          /* i/o: buffer of old input signal @ 16kHz      */
    float **inp,                  /* o  : ptr. to inp. signal in the current frame*/
    float fr_bands[2 * NB_BANDS], /* i  : energy in frequency bands               */
#ifndef REMOVE_ETOT_PROPAGATION
    float *Etot, /* i  : total energy                            */
#endif
    float *ener, /* o  : residual energy from Levinson-Durbin    */
#ifndef FIX_I4_OL_PITCH
    int16_t pitch_orig[3], /* o  : open-loop pitch values for quantization */
+2 −0
Original line number Diff line number Diff line
@@ -532,7 +532,9 @@ void amr_wb_enc(

    /* update main codec paramaters */
#ifdef MC_BITRATE_SWITCHING
#ifndef REMOVE_ETOT_PROPAGATION
    st->hNoiseEst->Etot_last = Etot;
#endif
    updt_enc_common( st );
#else
    updt_enc_common( st, Etot );
+24 −12
Original line number Diff line number Diff line
@@ -72,7 +72,9 @@ ivas_error evs_enc(
    float old_inp_12k8[L_INP_12k8], *inp; /* buffer of input signal @ 12k8            */
    float old_inp_16k[L_INP];             /* buffer of input signal @ 16kHz           */
    float fr_bands[2 * NB_BANDS];         /* energy in frequency bands                */
#ifndef REMOVE_ETOT_PROPAGATION
    float Etot; /* total energy; correlation shift          */
#endif
    float ener;                          /* residual energy from Levinson-Durbin     */
    float A[NB_SUBFR16k * ( M + 1 )];    /* A(z) unquantized for subframes           */
    float Aw[NB_SUBFR16k * ( M + 1 )];   /* weighted A(z) unquantized for subframes  */
@@ -183,10 +185,18 @@ ivas_error evs_enc(
     *---------------------------------------------------------------------*/

#ifdef FIX_I4_OL_PITCH
#ifdef REMOVE_ETOT_PROPAGATION
    pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, Etot, &ener, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type );
#else
    pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, &Etot, &ener, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type );
#endif
#else
#ifdef REMOVE_ETOT_PROPAGATION
    pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, &ener, pitch_orig, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type );
#else
    pre_proc( st, input_frame, old_inp_12k8, old_inp_16k, &inp, fr_bands, &Etot, &ener, pitch_orig, A, Aw, epsP, lsp_new, lsp_mid, &vad_hover_flag, &attack_flag, new_inp_resamp16k, &Voicing_flag, realBuffer, imagBuffer, &hq_core_type );
#endif
#endif


    if ( st->mdct_sw == MODE2 )
@@ -516,7 +526,9 @@ ivas_error evs_enc(
     *---------------------------------------------------------------------*/

#ifdef MC_BITRATE_SWITCHING
#ifndef REMOVE_ETOT_PROPAGATION
    st->hNoiseEst->Etot_last = Etot;
#endif
    updt_enc_common( st );
#else
    updt_enc_common( st, Etot );
Loading