Commit 262d5d5e authored by vaclav's avatar vaclav
Browse files

remove FIX_2249_HRTF_INIT_HARMONIZATION

parent 09aceded
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_2249_MEMORY_LEAK_IN_SBA                     /* OR : issue 2249 : Memory leak in SBA to BINAURAL_ROOM_REVERB with memory instrumentation */
#define FIX_2249_HRTF_INIT_HARMONIZATION                /* VA: issue 2249: harmonize HRTFs init. between ROM and binary representations */

/* #################### End BE switches ################################## */

+1 −7
Original line number Diff line number Diff line
@@ -504,19 +504,13 @@ static ivas_error ivas_binaural_hrtf_open(
        /* Initialise tables from ROM */
        HRTFS_FASTCONV *HrtfFastConv;

#ifdef FIX_2249_HRTF_INIT_HARMONIZATION
        if ( ( error = ivas_HRTF_fastconv_binary_open( &HrtfFastConv ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#else
        if ( ( HrtfFastConv = (HRTFS_FASTCONV *) malloc( sizeof( HRTFS_FASTCONV ) ) ) == NULL )
        {
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for FastConv HRTF tables" );
        }

        ivas_init_binaural_hrtf( HrtfFastConv );
#endif

        if ( input_config == IVAS_AUDIO_CONFIG_BINAURAL || renderer_type == RENDERER_BINAURAL_FASTCONV )
        {
            HrtfFastConv->FASTCONV_latency_s = FASTCONV_HRIR_latency_s;
+2 −14
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ ivas_error ivas_Crend_hrtf_init(
    return IVAS_ERR_OK;
}

#ifndef FIX_2249_HRTF_INIT_HARMONIZATION

/*-------------------------------------------------------------------------
 * ivas_hrtf_open()
 *
@@ -158,7 +158,7 @@ static void ivas_hrtf_close(

    return;
}
#endif


/*-------------------------------------------------------------------------
 * ivas_rend_initCrend()
@@ -205,17 +205,10 @@ static ivas_error ivas_rend_initCrend(
        else
        {
            /* create new handle when HRTF is loaded from ROM, or external renderer is used */
#ifdef FIX_2249_HRTF_INIT_HARMONIZATION
            if ( ( error = ivas_HRTF_CRend_binary_open( &hHrtf ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#else
            if ( ( error = ivas_hrtf_open( &hHrtf ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif

            hHrtf->init_from_rom = 1;
            if ( hHrtfCrend != NULL )
@@ -1368,12 +1361,7 @@ void ivas_rend_closeCrend(

    if ( ( *pCrend )->hHrtfCrend != NULL && ( *pCrend )->hHrtfCrend->init_from_rom )
    {
#ifdef FIX_2249_HRTF_INIT_HARMONIZATION
        free( ( *pCrend )->hHrtfCrend );
        ( *pCrend )->hHrtfCrend = NULL;
#else
        ivas_hrtf_close( &( *pCrend )->hHrtfCrend );
#endif
    }

    for ( pos_idx = 0; pos_idx < MAX_HEAD_ROT_POSES; pos_idx++ )
+0 −10
Original line number Diff line number Diff line
@@ -396,9 +396,6 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs(
)
{
    int16_t i, j;
#ifdef FIX_2249_HRTF_INIT_HARMONIZATION
    ivas_error error;
#endif

    if ( hHrtfParambin != NULL && *hHrtfParambin != NULL )
    {
@@ -410,17 +407,10 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs(
        /* Initialise tables from ROM */
        HRTFS_PARAMBIN *hrtfParambin;

#ifdef FIX_2249_HRTF_INIT_HARMONIZATION
        if ( ( error = ivas_HRTF_parambin_binary_open( &hrtfParambin )) != IVAS_ERR_OK )
        {
            return error;
        }
#else
        if ( ( hrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) ) ) == NULL )
        {
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate memory for parametric binauralizer HRTF tables" );
        }
#endif

        for ( i = 0; i < BINAURAL_CHANNELS; i++ )
        {
+3 −4
Original line number Diff line number Diff line
@@ -37,7 +37,10 @@
#include "ivas_error.h"
#include "wmc_auto.h"
#include "ivas_prot.h"
#ifndef FIX_2249_MEMORY_LEAK_IN_SBA
#include "ivas_rom_binaural_crend_head.h"
#endif


/*-----------------------------------------------------------------------*
 * ivas_HRTF_td_binary_open()
@@ -368,11 +371,7 @@ ivas_error ivas_HRTF_fastconv_binary_open(
    *hHrtfFastConv = (HRTFS_FASTCONV *) malloc( sizeof( HRTFS_FASTCONV ) );
    if ( *hHrtfFastConv == NULL )
    {
#ifdef FIX_2249_HRTF_INIT_HARMONIZATION
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FastConv HRTF tables!" );
#else
        return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for FASTCONV HRTF tables!" );
#endif
    }

    ivas_init_binaural_hrtf( *hHrtfFastConv );
Loading