Commit d195b452 authored by vaclav's avatar vaclav
Browse files

Merge branch '1187-huge-static-ram-consumption-when-hrtfs-are-loaded-from-file' into 'main'

Resolve "Huge static RAM consumption when HRTFs are loaded from file"

See merge request !1804
parents 9579701a 275a75e5
Loading
Loading
Loading
Loading
Loading
+320 −2
Original line number Diff line number Diff line
@@ -161,6 +161,27 @@ typedef struct

} DecArguments;

#ifdef FIX_HRTF_LOAD
typedef struct
{
    hrtfFileReader *hrtfReader;
    char *hrtfFileName;

    IVAS_DEC_HRTF_HANDLE *hHrtfTD;
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF;
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics;

    IVAS_BIN_RENDERER_TYPE binaural_renderer;
    IVAS_BIN_RENDERER_TYPE binaural_renderer_old;
    IVAS_BIN_RENDERER_TYPE binaural_renderer_sec;
    IVAS_BIN_RENDERER_TYPE binaural_renderer_sec_old;

    IVAS_AUDIO_CONFIG intern_audio_config;
    int16_t room_reverb_flag;

} IVAS_DEC_HRTF_BINARY_WRAPPER;

#endif

/*------------------------------------------------------------------------------------------*
 * Local functions prototypes
@@ -168,9 +189,14 @@ typedef struct

static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
#ifdef FIX_HRTF_LOAD
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec );
static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs );
#else
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec );

#endif
#ifdef DEBUGGING
static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec );
static int16_t app_own_random( int16_t *seed );
@@ -205,9 +231,13 @@ int main(
    RenderConfigReader *renderConfigReader = NULL;
    int16_t *pcmBuf = NULL;
    IVAS_RENDER_FRAMESIZE asked_frame_size;
#ifdef FIX_HRTF_LOAD
    IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary;
#else
    IVAS_DEC_HRTF_HANDLE *hHrtfTD = NULL;
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF = NULL;
    IVAS_DEC_HRTF_STATISTICS_HANDLE *hHrtfStatistics = NULL;
#endif
#ifdef DEBUGGING
    int32_t noClipping;
    int32_t cnt_frames_limited;
@@ -224,6 +254,12 @@ int main(
    reset_mem( USE_BYTES );
#endif

#ifdef FIX_HRTF_LOAD
    hHrtfBinary.hHrtfTD = NULL;         /* just to avoid compilation warning */
    hHrtfBinary.hSetOfHRTF = NULL;      /* just to avoid compilation warning */
    hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */
#endif

    splitRendBits.bits_buf = splitRendBitsBuf;

    /*------------------------------------------------------------------------------------------*
@@ -704,6 +740,14 @@ int main(

    if ( arg.hrtfReaderEnabled )
    {
#ifdef FIX_HRTF_LOAD
        hHrtfBinary.hrtfReader = hrtfReader;
        hHrtfBinary.hrtfFileName = arg.hrtfFileName;
        hHrtfBinary.binaural_renderer = IVAS_BIN_RENDERER_TYPE_NONE;
        hHrtfBinary.binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE;
        hHrtfBinary.room_reverb_flag = 0;
        hHrtfBinary.intern_audio_config = IVAS_AUDIO_CONFIG_INVALID;
#else
        if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -800,6 +844,7 @@ int main(
                destroy_hrtf_statistics( hHrtfStatistics );
            }
        }
#endif
    }

    /*------------------------------------------------------------------------------------------*
@@ -821,11 +866,19 @@ int main(

    if ( arg.voipMode )
    {
#ifdef FIX_HRTF_LOAD
        error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec );
#else
        error = decodeVoIP( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, hIvasDec );
#endif
    }
    else
    {
#ifdef FIX_HRTF_LOAD
        error = decodeG192( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf );
#else
        error = decodeG192( arg, hBsReader, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, &splitRendBits, hIvasDec, pcmBuf );
#endif
    }

    if ( error == IVAS_ERR_OK || error == IVAS_ERR_END_OF_FILE )
@@ -841,7 +894,11 @@ int main(
    }
    else
    {
#ifdef FIX_HRTF_LOAD
        fprintf( stderr, "\nDecoding finished prematurely: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
#else
        fprintf( stdout, "Decoding finished prematurely\n\n" );
#endif
        goto cleanup;
    }

@@ -877,6 +934,11 @@ cleanup:
#endif
    if ( arg.hrtfReaderEnabled )
    {
#ifdef FIX_HRTF_LOAD
        destroy_td_hrtf( hHrtfBinary.hHrtfTD );
        destroy_SetOfHRTF( hHrtfBinary.hSetOfHRTF );
        destroy_hrtf_statistics( hHrtfBinary.hHrtfStatistics );
#else
        IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfTD );
        destroy_td_hrtf( hHrtfTD );

@@ -885,6 +947,7 @@ cleanup:

        IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfStatistics );
        destroy_hrtf_statistics( hHrtfStatistics );
#endif
    }

    IVAS_DEC_Close( &hIvasDec );
@@ -2077,6 +2140,9 @@ static ivas_error initOnFirstGoodFrame(
static ivas_error decodeG192(
    DecArguments arg,
    BS_READER_HANDLE hBsReader,
#ifdef FIX_HRTF_LOAD
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary,
#endif
    RotFileReader *headRotReader,
    RotFileReader *externalOrientationFileReader,
    RotFileReader *refRotReader,
@@ -2438,16 +2504,48 @@ static ivas_error decodeG192(
#endif
                /* Feed into decoder */
                if ( ( error = IVAS_DEC_FeedFrame_Serial( hIvasDec, bit_stream, num_bits, bfi
#ifndef FIX_HRTF_LOAD
#ifdef OBJ_EDITING_API
                                                          ,
                                                          isSplitRend,
                                                          splitRendBits
#endif
#endif
                                                          ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError: could not feed frame to decoder: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }

#ifdef FIX_HRTF_LOAD
                /* Read main parameters from the bitstream to set-up the decoder */
                hHrtfBinary->binaural_renderer_old = hHrtfBinary->binaural_renderer;
                hHrtfBinary->binaural_renderer_sec_old = hHrtfBinary->binaural_renderer_sec;
                if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtfBinary->binaural_renderer, &hHrtfBinary->binaural_renderer_sec, &hHrtfBinary->room_reverb_flag, &hHrtfBinary->intern_audio_config ) ) != IVAS_ERR_OK )
                {
                    return error;
                }

                /* Placeholder for memory reallocation */
                /* ... */

                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtfBinary, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;
                    }
                }

                /* decode transport channels, do TSM and feed to renderer */
                if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, isSplitRend, splitRendBits ) ) != IVAS_ERR_OK )
                {
                    return error;
                }

#endif
#ifdef OBJ_EDITING_API
#ifdef OBJ_EDITING_EXAMPLE
                if ( arg.objEditEnabled )
@@ -3014,6 +3112,9 @@ static ivas_error writeJbmTraceFileFrameWrapper( const void *data, void *writer
static ivas_error decodeVoIP(
    DecArguments arg,
    BS_READER_HANDLE hBsReader,
#ifdef FIX_HRTF_LOAD
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf,
#endif
    RotFileReader *headRotReader,
    RotFileReader *externalOrientationFileReader,
    RotFileReader *refRotReader,
@@ -3064,6 +3165,10 @@ static ivas_error decodeVoIP(
    int16_t vec_pos_update, vec_pos_len;
    int16_t nOutSamples = 0;

#ifdef FIX_HRTF_LOAD
    bool bitstreamReadDone = false;
#endif

#ifdef OBJ_EDITING_API
    bool parameterAvailableForEditing = false;
    uint16_t nSamplesRendered = 0;
@@ -3357,6 +3462,10 @@ static ivas_error decodeVoIP(

#ifdef SUPPORT_JBM_TRACEFILE
            if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, writeJbmTraceFileFrameWrapper, jbmTraceWriter
#ifdef FIX_HRTF_LOAD
                                                     ,
                                                     &bitstreamReadDone
#endif
#ifdef OBJ_EDITING_API
                                                     ,
                                                     &nSamplesRendered, &parameterAvailableForEditing
@@ -3364,6 +3473,10 @@ static ivas_error decodeVoIP(
                                                     ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, systemTime_ms, &nSamplesRendered, &parameterAvailableForEditing
#ifdef FIX_HRTF_LOAD
                                                 ,
                                                 &bitstreamReadDone
#endif
#ifdef OBJ_EDITING_API
                                                     & nSamplesRendered,
                                                 &parameterAvailableForEditing
@@ -3374,6 +3487,33 @@ static ivas_error decodeVoIP(
                fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                goto cleanup;
            }
#ifdef FIX_HRTF_LOAD

            if ( bitstreamReadDone == true )
            {
                /* Read main parameters from the bitstream to set-up the decoder */
                hHrtf->binaural_renderer_old = hHrtf->binaural_renderer;
                hHrtf->binaural_renderer_sec_old = hHrtf->binaural_renderer_sec;
                if ( ( error = IVAS_DEC_ReadFormat( hIvasDec, &hHrtf->binaural_renderer, &hHrtf->binaural_renderer_sec, &hHrtf->room_reverb_flag, &hHrtf->intern_audio_config ) ) != IVAS_ERR_OK )
                {
                    return error;
                }

                /* Placeholder for memory reallocation */
                /* ... */

                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtf, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nIVAS_DEC_LoadHrtfFromFile failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                        goto cleanup;
                    }
                }
            }

#endif
#ifdef OBJ_EDITING_API
            if ( parameterAvailableForEditing == true )
            {
@@ -3688,4 +3828,182 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec(
}
#endif

#ifdef FIX_HRTF_LOAD

/*---------------------------------------------------------------------*
 * IVAS_DEC_LoadHrtfFromFile()
 *
 *
 *---------------------------------------------------------------------*/

static ivas_error IVAS_DEC_LoadHrtfFromFile(
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary,
    IVAS_DEC_HANDLE hIvasDec,
    const int32_t output_Fs )
{
    ivas_error error;
    IVAS_BIN_RENDERER_TYPE binaural_renderer, binaural_renderer_sec;

    if ( hHrtfBinary == NULL || hIvasDec == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

    binaural_renderer = hHrtfBinary->binaural_renderer;
    binaural_renderer_sec = hHrtfBinary->binaural_renderer_sec;

    if ( ( binaural_renderer != hHrtfBinary->binaural_renderer_old ) ||
         ( binaural_renderer_sec != hHrtfBinary->binaural_renderer_sec_old ) ||
         ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) )
    {
        /*------------------------------------------------------------------------------------------*
         * Release HRTF binary data
         *------------------------------------------------------------------------------------------*/

        if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && binaural_renderer_sec != IVAS_BIN_RENDERER_TYPE_TDREND && hHrtfBinary->hHrtfTD != NULL )
        {
            destroy_td_hrtf( hHrtfBinary->hHrtfTD );
        }

        if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && hHrtfBinary->hSetOfHRTF != NULL )
        {
            destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF );
        }

        if ( ( error = IVAS_DEC_HRTF_binary_close( hIvasDec, hHrtfBinary->binaural_renderer_old ) ) != IVAS_ERR_OK )
        {
            return error;
        }

        /*------------------------------------------------------------------------------------------*
         * Load HRTF binary data
         *------------------------------------------------------------------------------------------*/

        if ( ( error = IVAS_DEC_HRTF_binary_open( hIvasDec, binaural_renderer ) ) != IVAS_ERR_OK )
        {
            return error;
        }

        if ( ( error = IVAS_DEC_HRTF_binary_open( hIvasDec, binaural_renderer_sec ) ) != IVAS_ERR_OK )
        {
            return error;
        }

        if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer_sec == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT )
        {
            if ( ( error = IVAS_DEC_GetHrtfHandle( hIvasDec, &hHrtfBinary->hHrtfTD ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
            }

            if ( ( error = load_HRTF_binary( *hHrtfBinary->hHrtfTD, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", hHrtfBinary->hrtfFileName );
                    return error;
                }
                else
                {
                    destroy_td_hrtf( hHrtfBinary->hHrtfTD );
                }
            }
        }

        if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT )
        {
            if ( ( error = IVAS_DEC_GetHrtfCRendHandle( hIvasDec, &hHrtfBinary->hSetOfHRTF ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_DEC_GetHrtfCRendHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
            }

            if ( ( error = create_SetOfHRTF_from_binary( *hHrtfBinary->hSetOfHRTF, hHrtfBinary->hrtfReader, output_Fs ) ) != IVAS_ERR_OK )
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", hHrtfBinary->hrtfFileName );
                    return error;
                }
                else
                {
                    destroy_SetOfHRTF( hHrtfBinary->hSetOfHRTF );
                }
            }
        }

        if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT )
        {
            IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv = NULL;
            if ( ( error = IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_DEC_GetHrtfFastConvHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
            }

            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->room_reverb_flag, hHrtfBinary->intern_audio_config, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", hHrtfBinary->hrtfFileName );
                    return error;
                }
                else
                {
                    destroy_fastconv_hrtf( hHrtfFastConv );
                }
            }
        }

        if ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_PARAMBIN || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT )
        {
            IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin = NULL;
            if ( ( error = IVAS_DEC_GetHrtfParamBinHandle( hIvasDec, &hHrtfParambin ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "\nIVAS_DEC_GetHrtfParamBinHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
                return error;
            }

            if ( ( error = load_parambin_HRTF_from_binary( *hHrtfParambin, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
                    fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", hHrtfBinary->hrtfFileName );
                    return error;
                }
                else
                {
                    destroy_parambin_hrtf( hHrtfParambin );
                }
            }
        }
    }

    if ( hHrtfBinary->hHrtfStatistics == NULL )
    {
        if ( ( error = IVAS_DEC_GetHrtfStatisticsHandle( hIvasDec, &hHrtfBinary->hHrtfStatistics ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nIVAS_DEC_GetHrtfHandle failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) );
            return error;
        }

        if ( ( error = load_reverb_binary( *hHrtfBinary->hHrtfStatistics, output_Fs, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
        {
            if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
            {
                fprintf( stderr, "\nError in loading HRTF binary file %s \n\n", hHrtfBinary->hrtfFileName );
                return error;
            }
            else
            {
                destroy_hrtf_statistics( hHrtfBinary->hHrtfStatistics );
            }
        }
    }

    return IVAS_ERR_OK;
}
#endif

#undef WMC_TOOL_SKIP
+8 −0
Original line number Diff line number Diff line
@@ -615,7 +615,11 @@ static int16_t get_cldfb_in_flag(
    int16_t cldfb_in_flag;

    cldfb_in_flag = 0;
#ifdef FIX_HRTF_LOAD
    if ( renderConfig->split_rend_config.rendererSelection == IVAS_BIN_RENDERER_TYPE_FASTCONV )
#else
    if ( renderConfig->split_rend_config.rendererSelection == ISAR_SPLIT_REND_RENDERER_SELECTION_FASTCONV )
#endif
    {
#ifdef DEBUGGING
        cldfb_in_flag = 1;
@@ -945,7 +949,11 @@ int main(
                goto cleanup;
            }

#ifdef FIX_HRTF_LOAD
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
            {
                if ( error != IVAS_ERR_BINARY_FILE_WITHOUT_BINAURAL_RENDERER_DATA )
                {
+18 −0
Original line number Diff line number Diff line
@@ -213,6 +213,18 @@ typedef struct _IVAS_JBM_TRACE_DATA

} IVAS_JBM_TRACE_DATA;

#ifdef FIX_HRTF_LOAD
typedef enum _ivas_binaural_renderer_type
{
    IVAS_BIN_RENDERER_TYPE_NONE,
    IVAS_BIN_RENDERER_TYPE_CREND,
    IVAS_BIN_RENDERER_TYPE_FASTCONV,
    IVAS_BIN_RENDERER_TYPE_PARAMBIN,
    IVAS_BIN_RENDERER_TYPE_TDREND,
    IVAS_BIN_RENDERER_TYPE_DEFAULT,

} IVAS_BIN_RENDERER_TYPE;
#endif

/*----------------------------------------------------------------------------------*
 * Split rendering API constants, structures, and enums
@@ -251,6 +263,7 @@ typedef enum

} ISAR_SPLIT_REND_CODEC;

#ifndef FIX_HRTF_LOAD
typedef enum
{
    ISAR_SPLIT_REND_RENDERER_SELECTION_CREND,
@@ -260,6 +273,7 @@ typedef enum
    ISAR_SPLIT_REND_RENDERER_SELECTION_DEFAULT,

} ISAR_SPLIT_REND_RENDERER_SELECTION;
#endif

typedef struct _ISAR_SPLIT_REND_BITS_DATA
{
@@ -291,7 +305,11 @@ typedef struct _ISAR_SPLIT_REND_CONFIG
    int16_t codec_frame_size_ms; /* Codec frame size in milliseconds, only relevant with LC3plus */
    ISAR_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode;
    ISAR_SPLIT_REND_CODEC codec;
#ifdef FIX_HRTF_LOAD
    IVAS_BIN_RENDERER_TYPE rendererSelection;
#else
    ISAR_SPLIT_REND_RENDERER_SELECTION rendererSelection;
#endif
    int16_t lc3plus_highres;

} ISAR_SPLIT_REND_CONFIG_DATA, *ISAR_SPLIT_REND_CONFIG_HANDLE;
+30 −6

File changed.

Preview size limit exceeded, changes collapsed.

+3 −0
Original line number Diff line number Diff line
@@ -171,6 +171,9 @@

#define FIX_587_DEFAULT_REVERB                          /* Philips: issue 587: inconsistent default reverb parameters across renderers */

#define FIX_HRTF_LOAD                                   /* VA: issue 1187: fix memory issue when HRTFs are loaded from a binary file */


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

/* #################### Start NON-BE switches ############################ */
Loading