Commit 8db4631a authored by emerit's avatar emerit
Browse files

fix scripts and readmee.md

parent 760aea62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -587,7 +587,7 @@ int16_t check_bounds_s(
 *---------------------------------------------------------------------*/

void set_zero_l(
    float *vec,         /* o  : input vector            */
    float *vec,         /* i/o: input/output vector     */
    const uint32_t lvec /* i  : length of the vector    */
)
{
+3 −3
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
*******************************************************************************************************/
/*
 * Generated on 14-Nov-2023 with Matlab version 9.5.0.1586782 (R2018b) Update 8 by MUXE6256 on PCWIN64
 * Generated on 27-Nov-2023 with Matlab version 23.2.0.2365128 (R2023b) by MUXE6256 on PCWIN64
 * Binaural rendering data set based on BRIRs
 * Tables derived from Mozart IIS BRIRs.*/
@@ -6330,7 +6330,7 @@ const uint32_t defaultHRIR_rom_AlphaL32[470 * 86] = {
0xbb957b84,0xbbb8d395,0xbba8b42c,0xbb81fd6e,0xbb073c8f,0xba9bc95d,0xb9648787,0x3a822880,0x3a2d0014,0x3a00b1fe,0x39883aec,0xb9c03938,0xba23f049,0xba2c02d6,0x3918ba92,0x3a9f9244,0x3b060cac,0x3aa13e9b,0x3a2e6807,0x384241f8,0x3925068d,0x39b35293,0x39d11225,0x39b97038,0x399e9142,
0xba28bc53,0xb9bbd4d0,0x3a6176f9,0x3b6c7921,0x3bbe5683,0xbb8c6958,0xbb85eeef,0xbb2d28ea,0xbb57094b,0xbb808953,0xbb8754e3,0xbb53828a,0xbae921b5,0x3a9f7f2a,0x3b4e076c,0x3b88ccd6,0x3b98c1df,0x3b9722b5,0x3b81a456,0x3b4ab25f,0x3ad6627d,0xb9a91f14,0xbaca6efb,0xbb10bc61,0xbb26874a,
0xbb2c537d,0xbaee69d1,0xb9f597af,0x3a2e7037,0x3a61fb42,0x39b18868,0xba289649,0xba869504,0xba796980,0xba51326c,0xba4adb95,0xbaaba136,0xbac76abd,0xbb172203,0xbb4d1c11,0xbb811d33,0x3a2700fa,0xb93aea42,0xba45b81d,0xb9c7a0ad,0xb90ac357,0x3a8a88b7,0x3afbf374,0x3b2eec6e,0x3b2532b5,
0x3b1e4d30,0x3b2055cd,0x3ad23aa7,0x3a5d9fb9,0xb71d5540,0xb98dccaa,0xba08acad,0xba42b19c,0xba29f16e,0xba3812a9,0xba6d0344,0xb9848613,0x390044b7,0x39d6f675,0x3aa1e975,0x3b170495,0x3b72ccdf,0x3b622585,0x3b4d2d49,0x3b48459b,0x3b03eb18,0x3a97cc04,0x3900e2cc,0x3a083812,0x3a609321,
0x3b1e4d30,0x3b2055cd,0x3ad23aa7,0x3a5d9fb9,0xb71d553f,0xb98dccaa,0xba08acad,0xba42b19c,0xba29f16e,0xba3812a9,0xba6d0344,0xb9848613,0x390044b7,0x39d6f675,0x3aa1e975,0x3b170495,0x3b72ccdf,0x3b622585,0x3b4d2d49,0x3b48459b,0x3b03eb18,0x3a97cc04,0x3900e2cc,0x3a083812,0x3a609321,
0x3a82b319,0x3a2e11e8,0x3b68b981,0x3b78d75a,0x3b6b68dd,0x3b546810,0x3b3413ca,0x3b1bc552,0x3b023bfd,0x3aede079,0x3a9d7142,0x3a34bf25,0x39639412,0xb997f2b5,0xba3e41e2,0xbaa7ecac,0xba9defbb,0xbaa04489,0xbaa33820,0xbab33ef1,0xbab927ad,0xbacf2c2f,0xbabf99e7,0xba54f979,0xb9b3daa7,
0x386721f9,0x396b201f,0x3a451aed,0x3a7d6f45,0x3aad4fc2,0x3ad79924,0x3b05d173,0x3b23b4bb,0x3b37ed2a,0x3b38c03e,0x3b3589f6,0x3b444014,0x3b50f38a,0x3a05df78,0x3a31ff6b,0x3a002c40,0x39dc9730,0x39d3a6dc,0x399cbed7,0x3942cd56,0x38bfc838,0xb90033eb,0xb9a609c8,0xba109065,0xba3dfeae,
0xba6bddba,0xba95cf9c,0xba8cc7ee,0xba8e3936,0xba8c0186,0xba88850c,0xba85496f,0xba7b0a0d,0xba80b117,0xba70a61d,0xba89e4c6,0xb9b39345,0xb9a43e1f,0xba033d3b,0xb9d5cdfa,0xb9946dca,0xb94ebf73,0xb8738a06,0x3831e3a3,0x3973bb2c,0x39ddc922,0x3a24d7f9,0x39c8d1cb,0x3a078ed1,0xba588e0b,
@@ -10114,7 +10114,7 @@ const uint32_t defaultHRIR_rom_ER16[HRTF_MODEL_N_SECTIONS * 470] = {
0x3933fa02,0x392db0b4,0x39271386,0x39265737,0x39253cfa,0x392dce3c,0x39336a79,0x393c7fe4,0x3944b0c9,0x39929d53,
};
const uint32_t defaultHRIR_rom_ITD_W[658] = {
0xb58b2818,0x3bdea435,0xbef12e52,0xbdeb5ab7,0x3dab4e66,0x3f042e6d,0xbf409841,0xbe91c05f,0xbd4540cb,0x3ee4982c,0xbe4f34d7,0xbf3c944d,0xbf5f4288,0xbe93aac2,0xbe41b919,0xbf30a7bb,0xbf8323e1,0x3ebe1f75,0xbebaee5e,0xbe7b161f,0xbf02cc15,0x3b313b38,0x3f0434ee,0x3e8240b5,0x3ec41384,
0xb58b2816,0x3bdea435,0xbef12e52,0xbdeb5ab7,0x3dab4e66,0x3f042e6d,0xbf409841,0xbe91c05f,0xbd4540cb,0x3ee4982c,0xbe4f34d7,0xbf3c944d,0xbf5f4288,0xbe93aac2,0xbe41b919,0xbf30a7bb,0xbf8323e1,0x3ebe1f75,0xbebaee5e,0xbe7b161f,0xbf02cc15,0x3b313b38,0x3f0434ee,0x3e8240b5,0x3ec41384,
0xbebd76c6,0x3f817fba,0x3f2f49e6,0x3e3d1acf,0x3e95178f,0x3f5ba8c7,0x3f366b13,0x3e4c380a,0xbed1f70f,0x3da000be,0x3e8ed0a6,0x3f3c34bd,0xbf08b389,0xbd9e0cca,0x3e05095b,0x3ef1ac80,0x3da7646f,0xbcd0576f,0x3e83e76e,0x3f870465,0xbf1894ad,0xbf475073,0xbff88503,0xc0368ecb,0xc03cf196,
0xc072281a,0xc0177033,0xbfe11f51,0xbfa3dc3f,0xc01c4557,0xc036030a,0xc0057814,0xbfb60610,0xbef03ace,0x3e105793,0x3fa28542,0x3e9390c2,0xbba00d1b,0xbe99f207,0xbfa3a0da,0xbe329ba0,0x3eef141d,0x3fb9604c,0x40058f0e,0x4036eac0,0x401b7835,0x3fa743f6,0x3fe5dc68,0x401807dc,0x406e3515,
0x40399f8f,0x4037b7c7,0x3ffabd23,0x3f51dc1c,0x3f11a8f6,0xbf868061,0xbea0be67,0x3e09ea72,0x3cb8fdf8,0x3d41b101,0xbfb65ff8,0xc03bf299,0xc073eb6a,0xc09e3e70,0xc0c35434,0xc10268f5,0xc0f009f8,0xc118ddc8,0xc11dbb79,0xc12f3e4a,0xc10f9075,0xc10e9eca,0xc0d71c87,0xc0c2d2c4,0xc09c2687,
+3 −3
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
/* Tables generated by the script at "scripts/binauralRenderer_interface/fastconv/generate_tables_for_fastconv.m */
/* Can be replaced by your own generated HRIR tables */
/*
 * Generated on 14-Nov-2023 with Matlab version 9.5.0.1586782 (R2018b) Update 8 by MUXE6256 on PCWIN64
 * Generated on 27-Nov-2023 with Matlab version 23.2.0.2365128 (R2023b) by MUXE6256 on PCWIN64
*/
@@ -46944,7 +46944,7 @@ const float rightBRIRImag[BINAURAL_CONVBANDS][HRTF_LS_CHANNELS][BINAURAL_NTAPS_M
const float fastconvReverberationTimes[CLDFB_NO_CHANNELS_MAX] = 
{
	0.408741f,    0.205677f,    0.201751f,    0.208383f,    0.215182f,    0.236997f,    0.231209f,    0.229478f,    0.227780f,    0.219031f,    0.224980f,    0.220616f,    0.221697f,    0.223383f,    0.223622f,    0.227146f,    0.227815f,    0.223029f,    0.219917f,    0.218583f,    0.220417f,    0.218250f,    0.213250f,    0.210333f,    0.207417f,    0.198750f,    0.196250f,    0.194917f,    0.190333f,    0.184500f,    0.180333f,    0.176167f,    0.176500f,    0.177583f,    0.183583f,    0.195917f,    0.203250f,    0.208417f,    0.214667f,    0.220000f,    0.222917f,    0.230417f,    0.233928f,    0.233647f,    0.236333f,    0.237428f,    0.241629f,    0.241118f,    0.238847f,    0.242384f,    0.246208f,    0.245948f,    0.246100f,    0.245396f,    0.243951f,    0.244123f,    0.239427f,    0.241823f,    0.234824f,    0.253040f,    
	0.410852f,    0.207215f,    0.203774f,    0.208663f,    0.215503f,    0.235408f,    0.230368f,    0.229903f,    0.227876f,    0.219602f,    0.225582f,    0.221234f,    0.223012f,    0.222813f,    0.223727f,    0.227465f,    0.227247f,    0.223650f,    0.220083f,    0.218750f,    0.220417f,    0.218250f,    0.213250f,    0.210333f,    0.207417f,    0.198750f,    0.196250f,    0.194917f,    0.190333f,    0.184500f,    0.180333f,    0.176167f,    0.176500f,    0.177583f,    0.183583f,    0.195917f,    0.203250f,    0.208417f,    0.214667f,    0.220000f,    0.222917f,    0.230417f,    0.233928f,    0.233647f,    0.236333f,    0.237428f,    0.241629f,    0.241118f,    0.238847f,    0.242384f,    0.246981f,    0.245948f,    0.246549f,    0.245396f,    0.243951f,    0.244123f,    0.238531f,    0.242708f,    0.234824f,    0.253040f,    
};
@@ -46955,7 +46955,7 @@ const float fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] =
/*
 * Generated on 14-Nov-2023 with Matlab version 9.5.0.1586782 (R2018b) Update 8 by MUXE6256 on PCWIN64
 * Generated on 27-Nov-2023 with Matlab version 23.2.0.2365128 (R2023b) by MUXE6256 on PCWIN64
 * Binaural rendering data set based on BRIRs 
 Tables derived from Mozart IIS BRIRs.*/
+15 −29
Original line number Diff line number Diff line
@@ -67,22 +67,6 @@ typedef struct ivas_hrtfs_file_header_t
#define RESAMPLE_FACTOR_16_48 ( 16.0f / 48.0f )
#define RESAMPLE_FACTOR_32_48 ( 32.0f / 48.0f )

#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
typedef enum
{
    HRTF_READER_RENDERER_BINAURAL_INVALID,
    HRTF_READER_RENDERER_BINAURAL_FASTCONV,
    HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM,
    HRTF_READER_RENDERER_BINAURAL_PARAMETRIC,
    HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM,
    HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD,
    HRTF_READER_RENDERER_BINAURAL_MIXER_CONV,
    HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM,
    HRTF_READER_RENDERER_BINAURAL_REVERB_ALL
} HRTF_READER_RENDERER_TYPE;
#endif


/*---------------------------------------------------------------------*
 * Local function declarations
 *---------------------------------------------------------------------*/
@@ -557,6 +541,7 @@ static ivas_error load_reverb_from_binary(
)
{
    int16_t i;
    ivas_error error;
    bool is_reverb;
    ivas_error header_check_result;
    ivas_hrtfs_file_header_t hrtfs_file_header;
@@ -565,9 +550,11 @@ static ivas_error load_reverb_from_binary(
    int32_t hrtf_data_size_max;
    char *hrtf_data;

    error = IVAS_ERR_OK;

    if ( ( header_check_result = read_and_check_hrtf_binary_file_header( &hrtfs_file_header, f_hrtf ) ) != IVAS_ERR_OK )
    {
        return header_check_result;
        return error;
    }

    is_reverb = FALSE;
@@ -861,15 +848,17 @@ static void HRTF_energy_sections_precalc(
 * Deallocated memory allocated by load_HRTF_binary
 *---------------------------------------------------------------------*/

void destroy_td_hrtf(
ivas_error destroy_td_hrtf(
    IVAS_DEC_HRTF_HANDLE *hHrtf /* i/o: HRTF handle */
)
{
    int16_t i;
    ivas_error error;
    error = IVAS_ERR_OK;

    if ( ( hHrtf == NULL ) || ( *hHrtf == NULL ) )
    {
        return;
        return error;
    }

    if ( !( *hHrtf )->ModelParams.modelROM )
@@ -921,7 +910,7 @@ void destroy_td_hrtf(

    ivas_HRTF_binary_close( hHrtf );

    return;
    return error;
}
#else
/*---------------------------------------------------------------------*
@@ -2063,7 +2052,7 @@ static ivas_error destroy_HRTF(
 *---------------------------------------------------------------------*/

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
void destroy_SetOfHRTF(
ivas_error destroy_SetOfHRTF(
    HRTFS_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle */
)
{
@@ -2075,10 +2064,8 @@ void destroy_SetOfHRTF(
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_hrir_foa ) );
        destroy_HRTF( &( ( *hSetOfHRTF )->hHRTF_brir_combined ) );
    }

    ivas_HRTF_CRend_binary_close( hSetOfHRTF );

    return;
    return IVAS_ERR_OK;
}
#else
ivas_error destroy_SetOfHRTF(
@@ -2106,7 +2093,7 @@ ivas_error destroy_SetOfHRTF(
 * Destroy the HRTF data set.
 *---------------------------------------------------------------------*/

void destroy_fastconv_hrtf(
ivas_error destroy_fastconv_hrtf(
    IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv /* i/o: FastConv HRTF handle   */
)
{
@@ -2116,7 +2103,7 @@ void destroy_fastconv_hrtf(
    /* Fastconv HRTF filters */
    ivas_HRTF_fastconv_binary_close( hHrtfFastConv );

    return;
    return IVAS_ERR_OK;
}


@@ -2126,13 +2113,12 @@ void destroy_fastconv_hrtf(
 * Destroy the HRTF data set.
 *---------------------------------------------------------------------*/

void destroy_parambin_hrtf(
ivas_error destroy_parambin_hrtf(
    IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* i/o: Parambin HRTF handle   */
)
{
    ivas_HRTF_parambin_binary_close( hHrtfParambin );

    return;
    return IVAS_ERR_OK;
}

#endif
+20 −4
Original line number Diff line number Diff line
@@ -38,6 +38,22 @@

typedef struct hrtfFileReader hrtfFileReader;

#ifdef FIX_638_ENERGIE_IAC_ROM_TABLES
#include "ivas_cnst.h"
typedef enum
{
    HRTF_READER_RENDERER_BINAURAL_INVALID,
    HRTF_READER_RENDERER_BINAURAL_FASTCONV,
    HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM,
    HRTF_READER_RENDERER_BINAURAL_PARAMETRIC,
    HRTF_READER_RENDERER_BINAURAL_PARAMETRIC_ROOM,
    HRTF_READER_RENDERER_BINAURAL_OBJECTS_TD,
    HRTF_READER_RENDERER_BINAURAL_MIXER_CONV,
    HRTF_READER_RENDERER_BINAURAL_MIXER_CONV_ROOM,
    HRTF_READER_RENDERER_BINAURAL_REVERB_ALL
} HRTF_READER_RENDERER_TYPE;
#endif

typedef struct ivas_hrtfs_header_t
{
    int32_t rend_type;
@@ -111,7 +127,7 @@ ivas_error create_SetOfHRTF_from_binary(
 *---------------------------------------------------------------------*/

#ifdef NONBE_FIX_BINARY_BINAURAL_READING
void destroy_SetOfHRTF(
ivas_error destroy_SetOfHRTF(
    IVAS_DEC_HRTF_CREND_HANDLE *hSetOfHRTF /* i/o: Set of HRTF CRend handle              */
);
#else
@@ -139,7 +155,7 @@ ivas_error load_fastconv_HRTF_from_binary(
 * free memory allocated for FastConv HRTF binary data into the handle
 *---------------------------------------------------------------------*/

void destroy_fastconv_hrtf(
ivas_error destroy_fastconv_hrtf(
    IVAS_DEC_HRTF_FASTCONV_HANDLE *hHrtfFastConv /* i/o: FastConv HRTF handle               */
);
#endif
@@ -163,7 +179,7 @@ ivas_error load_parambin_HRTF_from_binary(
 * free memory allocated for Parambin HRTF binary data into the handle
 *---------------------------------------------------------------------*/

void destroy_parambin_hrtf(
ivas_error destroy_parambin_hrtf(
    IVAS_DEC_HRTF_PARAMBIN_HANDLE *hHrtfParambin /* i/o: Parambin HRTF handle               */
);
#endif
@@ -175,7 +191,7 @@ void destroy_parambin_hrtf(
 * Destroy the HRTF TD handle
 *---------------------------------------------------------------------*/

void destroy_td_hrtf(
ivas_error destroy_td_hrtf(
    IVAS_DEC_HRTF_HANDLE *hHRTF /* i/o: HRTF handle */
);
#else
Loading