Commit f488fd71 authored by emerit's avatar emerit
Browse files

on going

parent 198a4403
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1647,7 +1647,7 @@ typedef enum
#define REVERB_PREDELAY_MAX                     20                          /* Max input delay for reverb module */
#define GAIN_LFE_WORD32                         2022552831                 /* Gain applied to LFE during renderering */
#ifdef IVAS_FLOAT_FIXED
#define GAIN_LFE                             30862                 /*Q.14 Gain applied to LFE during renderering */
#define GAIN_LFE_FX                             30862                 /*Q.14 Gain applied to LFE during renderering */
#endif // IVAS_FLOAT_FIXED
#define LOW_BIT_RATE_BINAURAL_EQ_BINS           17                          /* Number of bins in an EQ applied at low bit rates in binauralization */
#define LOW_BIT_RATE_BINAURAL_EQ_OFFSET         14                          /* Offset of bins where the low-bit-rate EQ starts*/
+1 −1
Original line number Diff line number Diff line
@@ -7115,7 +7115,7 @@ void ivas_binaural_hrtf_close(
    HRTFS_FASTCONV_HANDLE *hHrtfFastConv                        /* i/o: decoder binaural hrtf handle                    */
);
#ifdef IVAS_FLOAT_FIXED
void ivas_init_binaural_hrtf(
void ivas_init_binaural_hrtf_fx(
    HRTFS_FASTCONV *HrtfFastConv                                  /* i/o: FASTCONV HRTF structure                         */
);
#else
+3267 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ static ivas_error ivas_rend_initCrend(
        IF( EQ_16( inConfigType, IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) )
        {
            hHrtf->max_num_ir = sub( hHrtf->max_num_ir, 1 ); /* subtract LFE */
            hHrtf->gain_lfe = GAIN_LFE;
            hHrtf->gain_lfe = GAIN_LFE_FX;
            move16();

            IF( EQ_32( output_Fs, 48000 ) )
@@ -1130,7 +1130,7 @@ static ivas_error ivas_rend_initCrend(
        {
            hHrtf->max_num_ir = sub( hHrtf->max_num_ir, 1 ); /* subtract LFE */
            move16();
            hHrtf->gain_lfe = GAIN_LFE;
            hHrtf->gain_lfe = GAIN_LFE_FX;
            move16();

            IF( EQ_16( outConfig, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR ) )
+48 −9
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@
 *-----------------------------------------------------------------------*/

#ifdef IVAS_FLOAT_FIXED
ivas_error ivas_HRTF_binary_open(
ivas_error ivas_HRTF_binary_open_fx(
    TDREND_HRFILT_FiltSet_t **hHrtfTD )
{
    /* Allocate HR filter set for headphones configuration */
@@ -85,7 +85,7 @@ ivas_error ivas_HRTF_binary_open(
 *-------------------------------------------------------------------*/

#ifdef IVAS_FLOAT_FIXED
void ivas_HRTF_binary_close(
void ivas_HRTF_binary_close_fx(
    TDREND_HRFILT_FiltSet_t **hHrtfTD )
{
    test();
@@ -122,7 +122,8 @@ void ivas_HRTF_binary_close(
 * Allocate HRTF binary handle
 *-----------------------------------------------------------------------*/

ivas_error ivas_HRTF_CRend_binary_open(
#ifdef IVAS_FLOAT_FIXED
ivas_error ivas_HRTF_CRend_binary_open_fx(
    HRTFS_CREND **hSetOfHRTF )
{
    /* Allocate HR filter set for headphones configuration */
@@ -140,6 +141,26 @@ ivas_error ivas_HRTF_CRend_binary_open(

    return IVAS_ERR_OK;
}
#else
ivas_error ivas_HRTF_CRend_binary_open(
    HRTFS_CREND **hSetOfHRTF )
{
    /* Allocate HR filter set for headphones configuration */
    *hSetOfHRTF = (HRTFS_CREND *) malloc( sizeof( HRTFS_CREND ) );
    if ( *hSetOfHRTF == NULL )
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for set of HRTF binary!" );
    }

    ( *hSetOfHRTF )->hHRTF_hrir_combined = NULL;
    ( *hSetOfHRTF )->hHRTF_hrir_hoa3 = NULL;
    ( *hSetOfHRTF )->hHRTF_hrir_hoa2 = NULL;
    ( *hSetOfHRTF )->hHRTF_hrir_foa = NULL;
    ( *hSetOfHRTF )->hHRTF_brir_combined = NULL;

    return IVAS_ERR_OK;
}
#endif


/*-------------------------------------------------------------------*
@@ -147,7 +168,9 @@ ivas_error ivas_HRTF_CRend_binary_open(
 *
 * Close HRTF CRend binary handle
 *-------------------------------------------------------------------*/
void ivas_HRTF_CRend_binary_close(

#ifdef IVAS_FLOAT_FIXED
void ivas_HRTF_CRend_binary_close_fx(
    HRTFS_CREND **hSetOfHRTF )
{
    test();
@@ -161,6 +184,22 @@ void ivas_HRTF_CRend_binary_close(

    return;
}
#else
void ivas_HRTF_CRend_binary_close(
    HRTFS_CREND **hSetOfHRTF )
{
    if ( hSetOfHRTF == NULL || *hSetOfHRTF == NULL )
    {
        return;
    }

    free( *hSetOfHRTF );
    *hSetOfHRTF = NULL;

    return;
}
#endif


/*-----------------------------------------------------------------------*
 * ivas_HRTF_fastconv_binary_open()
@@ -169,7 +208,7 @@ void ivas_HRTF_CRend_binary_close(
 *-----------------------------------------------------------------------*/

#ifdef IVAS_FLOAT_FIXED
ivas_error ivas_HRTF_fastconv_binary_open(
ivas_error ivas_HRTF_fastconv_binary_open_fx(
    HRTFS_FASTCONV **hHrtfFastConv )
{
    *hHrtfFastConv = (HRTFS_FASTCONV *) malloc( sizeof( HRTFS_FASTCONV ) );
@@ -177,7 +216,7 @@ ivas_error ivas_HRTF_fastconv_binary_open(
    {
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FASTCONV HRTF tables!" );
    }
    ivas_init_binaural_hrtf( *hHrtfFastConv );
    ivas_init_binaural_hrtf_fx( *hHrtfFastConv );
    return IVAS_ERR_OK;
}
#else
@@ -202,7 +241,7 @@ ivas_error ivas_HRTF_fastconv_binary_open(
 *-----------------------------------------------------------------------*/

#ifdef IVAS_FLOAT_FIXED
void ivas_HRTF_fastconv_binary_close(
void ivas_HRTF_fastconv_binary_close_fx(
    HRTFS_FASTCONV **hHrtfFastConv )
{
    test();
@@ -240,7 +279,7 @@ void ivas_HRTF_fastconv_binary_close(
 *-----------------------------------------------------------------------*/

#ifdef IVAS_FLOAT_FIXED
ivas_error ivas_HRTF_parambin_binary_open(
ivas_error ivas_HRTF_parambin_binary_open_fx(
    HRTFS_PARAMBIN **hHrtfParambin )
{
    *hHrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) );
@@ -277,7 +316,7 @@ ivas_error ivas_HRTF_parambin_binary_open(
 *-----------------------------------------------------------------------*/

#ifdef IVAS_FLOAT_FIXED
void ivas_HRTF_parambin_binary_close(
void ivas_HRTF_parambin_binary_close_fx(
    HRTFS_PARAMBIN **hHrtfParambin )
{
    test();
Loading