Commit 066472b9 authored by Devansh Kandpal's avatar Devansh Kandpal
Browse files

changes in lib_rend header files

parent abad75ac
Loading
Loading
Loading
Loading
+53 −1
Original line number Diff line number Diff line
@@ -585,6 +585,21 @@ void ivas_HRTF_CRend_binary_close(
    HRTFS_CREND **hSetOfHRTF                                    /* i/o: Set of HRTF handle                      */
);

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
ivas_error ivas_HRTF_statistics_init(
    HRTFS_STATISTICS_HANDLE *hHrtfStatistics,                   /* i/o: HRTF statistics structure               */
    int32_t sampleRate                                          /* i  : Sample rate                             */
);

void ivas_HRTF_statistics_close(
    HRTFS_STATISTICS **hHrtfStatistics                          /* i/o: HRTF statistics structure               */
);

ivas_error ivas_HRTF_statistics_binary_open(
    HRTFS_STATISTICS **hHrtfStatistics                          /* i/o: HRTF statistics structure               */
);

#endif

/*----------------------------------------------------------------------------------*
 * TD object renderer
@@ -857,6 +872,9 @@ ivas_error ivas_rend_openCrend(
    const AUDIO_CONFIG outConfig,
    RENDER_CONFIG_DATA *hRendCfg,
    HRTFS_CREND_HANDLE hSetOfHRTF,
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    HRTFS_STATISTICS_HANDLE hHrtfStatistics,
#endif
#ifdef SPLIT_REND_WITH_HEAD_ROT
    const int32_t output_Fs,
    const int16_t num_poses
@@ -912,16 +930,35 @@ ivas_error ivas_rend_crendProcessSubframe(
 * Reverberator
 *----------------------------------------------------------------------------------*/


#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
ivas_error ivas_binaural_reverb_init(
#else
ivas_error ivas_binaural_reverb_open_fastconv(
#endif
    REVERB_STRUCT_HANDLE *hReverbPr,                            /* i/o: binaural reverb handle                  */
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    const HRTFS_STATISTICS_HANDLE hHrtfStatistics,              /* i  : HRTF statistics handle                  */
#else
#endif
    const int16_t numBins,                                      /* i  : number of CLDFB bins                    */
    const int16_t numCldfbSlotsPerFrame,                        /* i  : number of CLDFB slots per frame         */
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics,       /* i/o: room acoustics parameters               */
#else
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics,             /* i/o: room acoustics parameters               */
    const AUDIO_CONFIG internal_config,                         /* i  : internal audio config for FastConv      */
#endif
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    const float *defaultTimes,                                  /* i  : default reverberation times             */
    const float *defaultEne                                     /* i  : default reverberation energies          */
#else
    const HRTFS_FASTCONV_HANDLE hHrtfFastConv                   /* i  : FastConv HRTF handle                    */
#endif
);

#ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
ivas_error ivas_binaural_reverb_open_parambin(
    REVERB_STRUCT_HANDLE *hReverbPr,                            /* i/o: binaural reverb handle                  */
    const int16_t numBins,                                      /* i  : number of CLDFB bins                    */
@@ -930,6 +967,7 @@ ivas_error ivas_binaural_reverb_open_parambin(
    const int32_t sampling_rate,                                /* i  : sampling rate                           */
    const HRTFS_PARAMBIN_HANDLE hHrtfParambin                   /* i  : Parametric binauralizer HRTF handle     */
);
#endif

void ivas_binaural_reverb_close(
    REVERB_STRUCT_HANDLE *hReverb                               /* i/o: binaural reverb handle                  */
@@ -947,9 +985,13 @@ void ivas_binaural_reverb_processSubframe(

ivas_error ivas_reverb_open( 
    REVERB_HANDLE *hReverb,                                     /* i/o: Reverberator handle                     */
#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
    const HRTFS_STATISTICS_HANDLE hHrtfStatistics,                    /* i  : HRTF statistics handle                  */
#else
    const AUDIO_CONFIG input_audio_config,                      /* i  : reverb. input audio configuration       */
    const HRTFS_HANDLE hHrtf,                                   /* i  : HRTF handle                             */
    const float *lr_energy_and_iac[],                           /* i  : precomuputed lr energies and iac        */
#endif
    RENDER_CONFIG_DATA *pConfig,                                /* i  : Reverb configuration                    */
    const int32_t output_Fs                                     /* i  : output sampling rate                    */
);
@@ -1106,6 +1148,14 @@ void ivas_reverb_calc_color_levels(
    float *pTarget_color_R
);

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
ivas_error ivas_reverb_prepare_cldfb_params(
    const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pInput_params,
    const HRTFS_STATISTICS_HANDLE hHrtfStatistics,
    const int32_t output_Fs,
    float *pOutput_t60,
    float *pOutput_ene );
#else
ivas_error ivas_reverb_prepare_cldfb_params(
    IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pInput_params,
    const HRTFS_FASTCONV_HANDLE hHrtfFastConv,
@@ -1114,6 +1164,7 @@ ivas_error ivas_reverb_prepare_cldfb_params(
    const int32_t output_Fs,
    float *pOutput_t60,
    float *pOutput_ene );
#endif

void ivas_reverb_interpolate_acoustic_data(
    const int16_t input_table_size,
@@ -1126,6 +1177,7 @@ void ivas_reverb_interpolate_acoustic_data(
    float *pOutput_dsr 
);

#ifndef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
void ivas_reverb_get_hrtf_set_properties(
    float **ppHrtf_set_L_re,
    float **ppHrtf_set_L_im,
@@ -1139,7 +1191,7 @@ void ivas_reverb_get_hrtf_set_properties(
    float *pOut_avg_pwr_R,
    float *pOut_i_a_coherence 
);

#endif

/*---------------------------------------------------------------------------------*
 * Shoebox Prototypes
+11 −4
Original line number Diff line number Diff line
@@ -186,26 +186,33 @@ ivas_error IVAS_REND_GetDelay(

/*! r: error code */
ivas_error IVAS_REND_GetHrtfHandle( 
    IVAS_REND_HANDLE hIvasRend,                   /* i/o: IVAS decoder handle                                                     */
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS render handle                                  */
    IVAS_DEC_HRTF_HANDLE **hHrtfTD              /* o  : HRTF handle              */
);

/*! r: error code */
ivas_error IVAS_REND_GetHrtfCRendHandle(
    IVAS_REND_HANDLE hIvasRend,                   /* i/o: IVAS decoder handle                                                     */
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS renderer handle                                */
    IVAS_DEC_HRTF_CREND_HANDLE **hSetOfHRTF      /* o  : Set of HRTF handle                                                      */
);

ivas_error IVAS_REND_GetHrtfFastConvHandle(
    IVAS_REND_HANDLE hIvasRend,                    /* i/o: IVAS decoder handle                                                    */
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS renderer handle                                */
    IVAS_DEC_HRTF_FASTCONV_HANDLE **hHrtfFastConv /* o  : FASTCONV HRTF handle                                                   */
);

ivas_error IVAS_REND_GetHrtfParamBinHandle(
    IVAS_REND_HANDLE hIvasRend,                    /* i/o: IVAS decoder handle                                                    */
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS renderer handle                                */
    IVAS_DEC_HRTF_PARAMBIN_HANDLE **hHrtfParambin /* o  : Parametric binauralizer HRTF handle                                    */
);

#ifdef NONBE_FIX_922_PRECOMPUTED_HRTF_PROPERTIES
ivas_error IVAS_REND_GetHrtfStatisticsHandle(
    IVAS_REND_HANDLE hIvasRend,                     /* i/o: IVAS renderer handle                                */
    IVAS_DEC_HRTF_STATISTICS_HANDLE **hHrtfStatistics     /* o  : HRTF statistics handle                              */
);
#endif

/* Functions to be called during rendering */

ivas_error IVAS_REND_FeedInputAudio(