Commit cba6282b authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_355_REFACTOR_PARAMBIN_TO_5MS

parent 533e0d36
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -908,9 +908,7 @@ typedef enum {
// VE: this should be renamed to e.g. N_SPATIAL_SUBFRAMES
#define MAX_PARAM_SPATIAL_SUBFRAMES             4                           /* Maximum number of subframes for parameteric spatial coding */
#define L_SPATIAL_SUBFR_48k                     (L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES)
#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS
#define CLDFB_SLOTS_PER_SUBFRAME                ( CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES ) /* Number of CLDFB slots per subframe */
#endif


/*----------------------------------------------------------------------------------*
+0 −22
Original line number Diff line number Diff line
@@ -5227,36 +5227,14 @@ void ivas_masa_prerender(
);

#ifdef JBM_TSM_ON_TCS
#ifndef FIX_355_REFACTOR_PARAMBIN_TO_5MS
void ivas_spar_param_to_masa_param_mapping_sf(
    Decoder_Struct *st_ivas, /* i/o: IVAS decoder struct               */
    int16_t azimuth[CLDFB_NO_CHANNELS_MAX],
    int16_t elevation[CLDFB_NO_CHANNELS_MAX],
    float energy_ratio1[CLDFB_NO_CHANNELS_MAX],
    float spreadCoherence[CLDFB_NO_CHANNELS_MAX],
    float surroundingCoherence[CLDFB_NO_CHANNELS_MAX],
    float inRe[][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i  : Input audio in CLDFB domain, real */
    float inIm[][JBM_CLDFB_SLOTS_IN_SUBFRAME][CLDFB_NO_CHANNELS_MAX]  /* i  : Input audio in CLDFB domain, imag */
);
#endif
#endif

#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS
void ivas_spar_param_to_masa_param_mapping(
    Decoder_Struct *st_ivas,                                       /* i/o: IVAS decoder struct                          */
    float inRe[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i  : Input audio in CLDFB domain, real            */
    float inIm[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i  : Input audio in CLDFB domain, imag            */
    const int16_t subframe                                         /* i  : Subframe to map                              */
);
#else
void ivas_spar_param_to_masa_param_mapping(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder struct                             */
    float inRe[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],      /* i  : Input audio in CLDFB domain, real               */
    float inIm[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],      /* i  : Input audio in CLDFB domain, imag               */
    const int16_t firstSubframe,                                /* i  : First subframe to map                           */
    const int16_t nSubframes                                    /* i  : Number of subframes to map                      */
);
#endif


/*---------------------------------------------------------------------------------*
+0 −1
Original line number Diff line number Diff line
@@ -154,7 +154,6 @@

#define HR_METADATA                                     /* Nok: Contribution #45: encode directional MASA metadata with more bits at 384k and 512k */

#define FIX_355_REFACTOR_PARAMBIN_TO_5MS                /* Nokia: Fixes issue 355 by refactoring parametric binauralizer code to 5 ms mode */
#define FIX_411_EVS_BE_TESTS_ON_WINDOWS_FAILING         /* Eri: Fix incorrect use of stack variable used for channel aware config file */
#define COMBINED_FORMAT_SIGNALING                       /* VA: Introduce a signaling bit for combined format coding */
#define FIX_446_STEREO_DMX_CRASH                        /* FhG: fix discrepancy with EVS code that could cause crashes in rare cases */
+0 −21
Original line number Diff line number Diff line
@@ -433,7 +433,6 @@ static ivas_error ivas_binaural_hrtf_open(
 *
 *-------------------------------------------------------------------------*/

#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS
static void ivas_binaural_obtain_DMX(
    const int16_t numTimeSlots,
    BINAURAL_RENDERER_HANDLE hBinRenderer,                               /* i/o: fastconv binaural renderer handle */
@@ -441,15 +440,6 @@ static void ivas_binaural_obtain_DMX(
    float ImagBuffer[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX], /* i  : Contains the LS signals           */
    float realDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX],
    float imagDMX[][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX] )
#else
static void ivas_binaural_obtain_DMX(
    const int16_t numTimeSlots,
    BINAURAL_RENDERER_HANDLE hBinRenderer,                                  /* i/o: fastconv binaural renderer handle */
    float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i  : Contains the LS signals           */
    float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i  : Contains the LS signals           */
    float realDMX[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
    float imagDMX[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] )
#endif
{
    int16_t chIdx, bandIdx, k;

@@ -1183,17 +1173,10 @@ void ivas_binRenderer(
    /* Obtain the binaural dmx and compute the reverb */
    if ( hBinRenderer->hReverb != NULL )
    {
#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS
        float reverbRe[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
        float reverbIm[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
        float inRe[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
        float inIm[BINAURAL_CHANNELS][CLDFB_SLOTS_PER_SUBFRAME][CLDFB_NO_CHANNELS_MAX];
#else
        float reverbRe[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
        float reverbIm[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
        float inRe[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
        float inIm[BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX];
#endif
        ivas_binaural_obtain_DMX( numTimeSlots, hBinRenderer, RealBuffer, ImagBuffer, inRe, inIm );

        for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ )
@@ -1205,15 +1188,11 @@ void ivas_binRenderer(
            }
        }

#ifdef FIX_355_REFACTOR_PARAMBIN_TO_5MS
#ifdef JBM_TSM_ON_TCS
        ivas_binaural_reverb_processSubframe( hBinRenderer->hReverb, BINAURAL_CHANNELS, numTimeSlots, inRe, inIm, reverbRe, reverbIm );
#else
        ivas_binaural_reverb_processSubframe( hBinRenderer->hReverb, BINAURAL_CHANNELS, inRe, inIm, reverbRe, reverbIm );
#endif
#else
        ivas_binaural_reverb_processFrame( hBinRenderer->hReverb, BINAURAL_CHANNELS, inRe, inIm, reverbRe, reverbIm, 0u );
#endif

        /* Add the conv module and reverb module output */
        for ( chIdx = 0; chIdx < BINAURAL_CHANNELS; chIdx++ )
+0 −480

File changed.

Preview size limit exceeded, changes collapsed.

Loading