Commit 555f98cf authored by Devansh Kandpal's avatar Devansh Kandpal
Browse files

all changes in lib_util + imp declarations in lib_rend and lib_dec

parent bb0b3cc4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@

#define NONBE_FIX_973_HODIRAC_BAND_GROUPING                   /* FhG: issue 973: empty parameter band in DirAC */

//#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#define USE_NEW_HRTF_BINARY_FILE_FORMAT                 /* Orange: to activate when decided to change the hrtf binary file format */
#ifdef USE_NEW_HRTF_BINARY_FILE_FORMAT
#define NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES			  /* Philips: Use pre-computed HRTF average L/R energies and IAC in all renderers	*/
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
+3 −0
Original line number Diff line number Diff line
@@ -1155,6 +1155,9 @@ typedef struct Decoder_Struct
    HRTFS_CREND_HANDLE hSetOfHRTF;                             /* Set of HRTFs handle (CRend) */
    HRTFS_FASTCONV_HANDLE hHrtfFastConv;                       /* FASTCONV HRTF tables for binaural rendering */
    HRTFS_PARAMBIN_HANDLE hHrtfParambin;                       /* HRTF tables for parametric binauralizer */
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    HRTFS_STATISTICS_HANDLE hHrtfStatistics;                   /* HRTF statistics handle */
#endif
    LSSETUP_CUSTOM_HANDLE hLsSetupCustom;                      /* Custom LS configuration handle */
    Word32 *hoa_dec_mtx;                                        /* Pointer to decoder matrix for SBA */
    HEAD_TRACK_DATA_HANDLE hHeadTrackData;                     /* Head tracking data structure */
+6 −0
Original line number Diff line number Diff line
@@ -379,6 +379,12 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle(
    IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o  : Parametric binauralizer HRTF handle */
);

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
ivas_error IVAS_DEC_GetHrtfStatisticsHandle(
    IVAS_DEC_HANDLE hIvasDec,                           /* i/o: IVAS decoder handle                                             */
    IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics   /* o  : HRTF statistics handle                                          */
);
#endif

/*! r: error code*/
ivas_error IVAS_DEC_GetRenderConfig(
+23 −0
Original line number Diff line number Diff line
@@ -2599,6 +2599,29 @@ ivas_error IVAS_DEC_GetHrtfParamBinHandle(
    return IVAS_ERR_OK;
}

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
/*---------------------------------------------------------------------*
 * IVAS_DEC_GetHrtfStatisticsHandle( )
 *
 *
 *---------------------------------------------------------------------*/

ivas_error IVAS_DEC_GetHrtfStatisticsHandle(
    IVAS_DEC_HANDLE hIvasDec,                         /* i/o: IVAS decoder handle       */
    IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics /* o  : HRTF statistics handle    */
)
{
    if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL || hIvasDec->st_ivas->hHrtfStatistics == NULL )
    {
        return IVAS_ERR_WRONG_PARAMS;
    }

    *hHrtfStatistics = &hIvasDec->st_ivas->hHrtfStatistics;

    return IVAS_ERR_OK;
}
#endif

/*---------------------------------------------------------------------*
 * copyRendererConfigStruct( )
 *
+14 −1
Original line number Diff line number Diff line
@@ -1200,9 +1200,11 @@ typedef struct TDREND_HRFILT_FiltSet_struct
    ModelParamsITD_t ModelParamsITD;
    TDREND_HRFILT_Method_t FilterMethod;   /* HR filtering method */
    Word32 latency_s_fx;                   /* Q31 */
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
#else
    const Word32 *lr_energy_and_iac_fx[3]; /* left/right energy and interaural coherence for late reverb */
    Word32 *lr_energy_and_iac_dyn_fx[3];

#endif
} TDREND_HRFILT_FiltSet_t;

/* Distance attenuation */
@@ -1474,6 +1476,17 @@ typedef struct ivas_hrtfs_parambin_struct

} HRTFS_PARAMBIN, *HRTFS_PARAMBIN_HANDLE;


#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
typedef struct ivas_hrtfs_statistics_struct
{
    float *average_energy_l;
    float *average_energy_r;
    float *inter_aural_coherence;
    int16_t fromROM; /*  Flag that indicates that the pointers point to tables in ROM (controls init/dealloc).*/
} HRTFS_STATISTICS, *HRTFS_STATISTICS_HANDLE;
#endif

#ifdef SPLIT_REND_WITH_HEAD_ROT

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