Commit 6b6802a2 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1939_REVERB_DMX_OUT_Q

parent 17a5c173
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@



#define FIX_1939_REVERB_DMX_OUT_Q                       /*Dlb: output correct q factor for the reverb dmx function*/

#define EVS_BE_REUSAGE
#ifdef EVS_BE_REUSAGE
+0 −24
Original line number Diff line number Diff line
@@ -902,7 +902,6 @@ static ivas_error ivas_binaural_hrtf_open_fx(
 *
 *
 *-------------------------------------------------------------------------*/
#ifdef FIX_1939_REVERB_DMX_OUT_Q
static void ivas_binaural_obtain_DMX_fx(
    const Word16 numTimeSlots,
    BINAURAL_RENDERER_HANDLE hBinRenderer,                                /* i/o: fastconv binaural renderer handle */
@@ -911,15 +910,6 @@ static void ivas_binaural_obtain_DMX_fx(
    Word32 realDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],    /*Q_in_out*/
    Word32 imagDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],    /*Q_in_out*/
    Word16 *Q_in_out )                                                    /*i/o: input and output Q*/
#else
static void ivas_binaural_obtain_DMX_fx(
    const Word16 numTimeSlots,
    BINAURAL_RENDERER_HANDLE hBinRenderer,                                /* i/o: fastconv binaural renderer handle */
    Word32 RealBuffer[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i  : Contains the LS signals         Q_in  */
    Word32 ImagBuffer[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i  : Contains the LS signals         Q_in  */
    Word32 realDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],    /*Q_in-1*/
    Word32 imagDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] )   /*Q_in-1*/
#endif
{
    Word16 chIdx, bandIdx, k;

@@ -1011,9 +1001,7 @@ static void ivas_binaural_obtain_DMX_fx(
                }
            }
        }
#ifdef FIX_1939_REVERB_DMX_OUT_Q
        *Q_in_out = sub( *Q_in_out, 1 );
#endif
    }
    ELSE IF( EQ_32( hBinRenderer->ivas_format, SBA_FORMAT ) || EQ_32( hBinRenderer->ivas_format, MASA_FORMAT ) )
    {
@@ -1081,12 +1069,10 @@ static void ivas_binaural_obtain_DMX_fx(
                }
            }
        }
#ifdef FIX_1939_REVERB_DMX_OUT_Q
        IF( NE_16( hBinRenderer->nInChannels, HOA3_CHANNELS ) )
        {
            *Q_in_out = sub( *Q_in_out, 1 );
        }
#endif
    }

    return;
@@ -1869,16 +1855,10 @@ void ivas_binRenderer_fx(
        Word32 inRe_fx[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
        Word32 inIm_fx[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
        Word16 shift_q;
#ifdef FIX_1939_REVERB_DMX_OUT_Q
        Word16 q_in_out;
        q_in_out = *Q_in;
#endif

#ifdef FIX_1939_REVERB_DMX_OUT_Q
        ivas_binaural_obtain_DMX_fx( numTimeSlots, hBinRenderer, RealBuffer_fx, ImagBuffer_fx, inRe_fx, inIm_fx, &q_in_out );
#else
        ivas_binaural_obtain_DMX_fx( numTimeSlots, hBinRenderer, RealBuffer_fx, ImagBuffer_fx, inRe_fx, inIm_fx );
#endif

        FOR( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ )
        {
@@ -1890,11 +1870,7 @@ void ivas_binRenderer_fx(
        }

        ivas_binaural_reverb_processSubframe_fx( hBinRenderer->hReverb, BINAURAL_CHANNELS, numTimeSlots, inRe_fx, inIm_fx, reverbRe_fx, reverbIm_fx );
#ifdef FIX_1939_REVERB_DMX_OUT_Q
        shift_q = sub( Q6, q_in_out );
#else
        shift_q = sub( Q6, sub( *Q_in, 1 ) );
#endif
        FOR( i = 0; i < BINAURAL_CHANNELS; i++ )
        {
            FOR( j = 0; j < numTimeSlots; j++ )