Commit b259c619 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'FhG/hrtf_binary_fastconv' of forge.3gpp.org:ivas-codec-pc/ivas-codec into hrtf_binary

parents 0c4b3c87 d88dea06
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -509,7 +509,15 @@ int main(
            fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfCRendFileName );
            goto cleanup;
        }
#endif
#ifdef HRTF_BINARY_FASTCONV
        IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv;
        IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv );

        if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfCRendFileName );
        }
#endif
    }

+3 −0
Original line number Diff line number Diff line
@@ -96,6 +96,9 @@ typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE;
#ifdef HRTF_BINARY_FILE
typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE;
#endif
#ifdef HRTF_BINARY_FASTCONV
typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE;
#endif

#ifdef DEBUGGING
typedef enum
+3 −0
Original line number Diff line number Diff line
@@ -1357,6 +1357,9 @@ typedef enum

#define HRTF_SH_ORDER                           3
#define HRTF_SH_CHANNELS                        16
#ifdef HRTF_BINARY_FASTCONV
#define HRTF_LS_CHANNELS                        15
#endif
#define HRTF_NUM_BINS                           60
#define REVERB_PREDELAY_MAX                     20                          /* Max input delay for reverb module */
#define GAIN_LFE                                1.88364911f                 /* Gain applied to LFE during renderering */
+17 −0
Original line number Diff line number Diff line
@@ -3275,6 +3275,10 @@ ivas_error ivas_binaural_reverb_open(
    const AUDIO_CONFIG output_config,                           /* i  : output audio configuration              */
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
    const RENDERER_TYPE renderer_type                           /* i  : renderer type                           */
    #ifdef HRTF_BINARY_FASTCONV
    ,
    const HRTFS_FASTCONV_HANDLE hHrtfFastConv                   /* i  : FastConv HRTF handle                    */
    #endif
);

void ivas_binaural_reverb_close(
@@ -4544,6 +4548,16 @@ void ivas_binaural_add_LFE(
    float output_f[][L_FRAME48k]                                /* i/o: synthesized core-coder transport channels/DirAC output  */
);

#ifdef HRTF_BINARY_FASTCONV
ivas_error ivas_HRTF_fastconv_binary_open(
    HRTFS_FASTCONV **hHrtfFastConv                              /* i/o: FASTCONV HRTF structure */
);

void ivas_HRTF_fastconv_binary_close(
    HRTFS_FASTCONV **hHrtfFastConv                              /* i/o: FASTCONV HRTF structure */
);
#endif

void QuatToRotMat(
#ifdef EXT_RENDERER
    const IVAS_QUATERNION quat,                                 /* i  : quaternion describing the rotation                      */
@@ -5543,6 +5557,9 @@ void ivas_reverb_calc_color_levels(

void ivas_reverb_prepare_cldfb_params(
    ivas_roomAcoustics_t *pInput_params,
#ifdef HRTF_BINARY_FASTCONV
    const HRTFS_FASTCONV_HANDLE hHrtfFastConv,
#endif
    const AUDIO_CONFIG input_audio_config,
    const int16_t use_brir,
    const int32_t output_Fs,
+4 −0
Original line number Diff line number Diff line
@@ -178,6 +178,10 @@


#define HRTF_BINARY_FILE                                /* HRTF filters' binary file used for binaural rendering. */
#ifdef HRTF_BINARY_FILE
#define HRTF_BINARY_FASTCONV                            /* Enable loading HRTF tables from file for FastConv renderer */
#define HRTF_BINARY_PARAM                               /* Enable loading HRTF tables from file for Parametric renderer */
#endif

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
Loading