Commit 868186bc authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_379_GAININTP

parent 39c39f49
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -147,7 +147,6 @@

/*#define FIX_XXX_JBM_FIFO_BUFFER  */                   /* FhG: prevent wraparound of a length identifier in cause of large frames and many channels*/

#define FIX_379_GAININTP                                /* Eri: Adds a gain interpolation for directional/distance gain to handle abrupt changes in metadata (Non BE) */
#define FIX_387_ISM_MD_FEC                              /* VA: Issue 387: fix MD discontinuity in ISM FEC */

#define FIX_418_SID_BITRATE                             /* Eri: Issue 418: Using the correct bitrate for unified stereo SID */
+0 −10
Original line number Diff line number Diff line
@@ -69,21 +69,11 @@ ivas_error TDREND_REND_RenderSourceHRFilt(
{
    float LeftOutputFrame[L_SPATIAL_SUBFR_48k];
    float RightOutputFrame[L_SPATIAL_SUBFR_48k];
#ifndef FIX_379_GAININTP
    float Gain;

    Gain = ( *Src_p->SrcRend_p->DirGain_p ) * ( *Src_p->SrcRend_p->DistGain_p );
#endif

    TDREND_Apply_ITD( Src_p->InputFrame_p, LeftOutputFrame, RightOutputFrame, &Src_p->previtd, Src_p->itd, Src_p->mem_itd, subframe_length );
#ifdef FIX_379_GAININTP
    TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength, Src_p->Gain, Src_p->prevGain );
    TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength, Src_p->Gain, Src_p->prevGain );
    Src_p->prevGain = Src_p->Gain;
#else
    TDREND_firfilt( LeftOutputFrame, Src_p->hrf_left_prev, hrf_left_delta, intp_count, Src_p->mem_hrf_left, subframe_length, Src_p->filterlength, Gain );
    TDREND_firfilt( RightOutputFrame, Src_p->hrf_right_prev, hrf_right_delta, intp_count, Src_p->mem_hrf_right, subframe_length, Src_p->filterlength, Gain );
#endif

    /* Copy to accumulative output frame */
    v_add( LeftOutputFrame, output_buf[0], output_buf[0], subframe_length );
+0 −10
Original line number Diff line number Diff line
@@ -236,12 +236,8 @@ void TDREND_firfilt(
    float *mem,                    /* i/o: filter memory                  */
    const int16_t subframe_length, /* i  : Length of signal               */
    const int16_t filterlength,    /* i  : Filter length                  */
#ifdef FIX_379_GAININTP
    const float Gain,    /* i  : Gain                           */
    const float prevGain /* i  : Previous gain                  */
#else
    const float Gain /* i  : Gain                           */
#endif
)
{
    float buffer[SFX_SPAT_BIN_MAX_FILTER_LENGTH - 1 + L_SUBFRAME5MS_48k];
@@ -250,13 +246,11 @@ void TDREND_firfilt(
    float *p_filter;
    float tmp;
    int16_t i, j;
#ifdef FIX_379_GAININTP
    float step, gain_tmp, gain_delta;

    gain_delta = ( Gain - prevGain );
    step = gain_delta / ( subframe_length );
    gain_tmp = prevGain;
#endif

    /* Handle memory */
    p_signal = buffer + filterlength - 1;
@@ -274,13 +268,9 @@ void TDREND_firfilt(
        {
            tmp += ( *p_filter++ ) * ( *p_tmp-- );
        }
#ifdef FIX_379_GAININTP
        /* Apply linear gain interpolation in case of abrupt gain changes */
        gain_tmp = gain_tmp + step;
        signal[i] = tmp * gain_tmp;
#else
        signal[i] = tmp * Gain;
#endif

        if ( i < intp_count )
        {
+0 −2
Original line number Diff line number Diff line
@@ -687,9 +687,7 @@ void TDREND_SRC_Init(
    Src_p->hrf_right_prev[0] = 1;
    Src_p->azim_prev = 0.0f;
    Src_p->elev_prev = 0.0f;
#ifdef FIX_379_GAININTP
    Src_p->prevGain = 1.0f;
#endif

    return;
}
+0 −4
Original line number Diff line number Diff line
@@ -498,12 +498,8 @@ void TDREND_firfilt(
    float *mem,                                                 /* i/o: filter memory                           */
    const int16_t subframe_length,                              /* i  : Length of signal                        */
    const int16_t filterlength,                                 /* i  : Filter length                           */
#ifdef FIX_379_GAININTP 
    const float Gain,                                           /* i  : Gain                                    */
    const float prevGain                                        /* i  : Previous gain                           */
#else
    const float Gain                                            /* i  : Gain                                    */
#endif
);


Loading