Loading lib_rend/ivas_rom_TdBinauralRenderer.c +5 −6 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ the United Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ /* Generated on 05-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 */ /* Generated on 07-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 */ Loading Loading @@ -84,12 +84,11 @@ const float defaultHRIR_rom_elevKSeq[13] = { -90.000000f, -75.000000f, -60.000000f, -45.000000f, -30.000000f, -15.000000f, 0.000000f, 15.000000f, 30.000000f, 45.000000f, 60.000000f, 75.000000f, 90.000000f, }; const uint32_t defaultHRIR_rom_elevBsShape[36] = { 0x3f800000,0x3ed80000,0x3e000000,0x3c800000,0x00000000,0x80000000,0x3efe0000,0x3f180000,0x3eea0000,0x3e800000,0x3dd80000,0x3d000000,0x3b800000,0x00000000,0x00000000,0x3da2aaab,0x3e855555,0x3eea0000,0x3f155555,0x3f13aaab,0x3ef00000,0x3ea0aaab,0x3e2aaaab,0x3d900000,0x3caaaaab,0x3b2aaaaa,0x00000000,0x80000000,0x3b2aaaaa,0x3caaaaab,0x3d900000,0x3e2aaaab,0x3ea15555,0x3ef55555,0x3f1caaab,0x3f2aaaab, 0x3f800000,0x3ed80000,0x3e000000,0x3c800000,0x00000000,0x00000000,0x3efe0000,0x3f180000,0x3eea0000,0x3e800000,0x3dd80000,0x3d000000,0x3b800000,0x00000000,0x00000000,0x3da2aaab,0x3e855555,0x3eea0000,0x3f155555,0x3f13aaab,0x3ef00000,0x3ea0aaab,0x3e2aaaab,0x3d900000,0x3caaaaab,0x3b2aaaaa,0x00000000,0x00000000,0x3b2aaaaa,0x3caaaaab,0x3d900000,0x3e2aaaab,0x3ea15555,0x3ef55555,0x3f1caaab,0x3f2aaaab, }; const uint32_t defaultHRIR_rom_azimBsShape[21] = { 0x3f2aaaab,0x3f283c13,0x3f21735f,0x3f17152a,0x3f09e60f,0x3ef55555,0x3ed44f30,0x3eb242e7,0x3e90b9af,0x3e627984,0x3e2aaaab,0x3df8d4fe,0x3daec33e,0x3d6a2798,0x3d1374bc,0x3caaaaab,0x3c2ec33e,0x3b9374bc,0x3aaec340,0x392ec340,0x00000000, }; const uint32_t defaultHRIR_rom_AlphaL48[470 * 128] = { 0x3e0946b9,0x3cda8822,0x3e23be7e,0x3e005914,0x3e095696,0x3e097780,0x3e102edf,0x3e12d807,0x3e1514fc,0x3e103703,0x3e0d2242,0x3e09c889,0x3e06fde7,0x3e04b4aa,0x3e035ecf,0x3e0249b7,0x3e0116dd,0x3e008502,0x3dfcee82,0x3dee77e2,0x3e15b7f1,0x3cac1e96,0xbc8dd29b,0xbd855185,0x3d35c945, 0xbc7e4c57,0xbd71b7fd,0xbd7da762,0xbd708def,0xbd3a07f7,0xbd7775d0,0xbd84cf24,0xbd7d084a,0xbc7d5814,0x3d78b324,0xbd72376a,0xbcb689c0,0xbcfdaebc,0x3e0e19d2,0x3e20943f,0x3e1fe583,0x3e2947bb,0x3e3c07e7,0x3e44e230,0x3e463c59,0x3e3a7208,0x3e2f6146,0x3e2475af,0x3e1bd4da,0x3e1633a9, Loading Loading @@ -10170,9 +10169,9 @@ const int16_t defaultHRIR_rom_ITD_azimBsStart[4] = { 0, 11, 32, 63, }; const uint32_t defaultHRIR_rom_ITD_azimBsShape[84] = { 0x3f800000,0x3f3a9fbe,0x3f03126f,0x3eaf9db2,0x3e5d2f1b,0x3e000000,0x3d83126f,0x3cdd2f1a,0x3c03126e,0x3a831270,0x80000000,0x00000000,0x3e8374bc,0x3ede353f,0x3f0ad0e5,0x3f178d50,0x3f180000,0x3f0ed917,0x3efd9168,0x3ed4fdf4,0x3ea95810,0x3e800000,0x3e3a9fbe,0x3e03126f,0x3daf9db2, 0x3d5d2f1b,0x3d000000,0x3c83126e,0x3bdd2f1b,0x3b03126e,0x39831270,0x80000000,0x00000000,0x3c66bdc8,0x3d57b901,0x3de1cac0,0x3e39af72,0x3e855555,0x3eaf1aa0,0x3ed756b3,0x3efb38a9,0x3f0bf7cf,0x3f155555,0x3f18aec3,0x3f16872b,0x3f0fc3ed,0x3f054a69,0x3ef00000,0x3ed19424,0x3eb11bfd, 0x3e90624e,0x3e6263ab,0x3e2aaaab,0x3df8d4fe,0x3daec33e,0x3d6a2798,0x3d1374bc,0x3caaaaab,0x3c2ec33e,0x3b9374bc,0x3aaec340,0x392ec340,0x80000000,0x00000000,0x392ec340,0x3aaec340,0x3b9374bc,0x3c2ec33e,0x3caaaaab,0x3d1374bc,0x3d6a2798,0x3daec33e,0x3df8d4fe,0x3e2aaaab,0x3e627984, 0x3f800000,0x3f3a9fbe,0x3f03126f,0x3eaf9db2,0x3e5d2f1b,0x3e000000,0x3d83126f,0x3cdd2f1a,0x3c03126e,0x3a831270,0x00000000,0x00000000,0x3e8374bc,0x3ede353f,0x3f0ad0e5,0x3f178d50,0x3f180000,0x3f0ed917,0x3efd9168,0x3ed4fdf4,0x3ea95810,0x3e800000,0x3e3a9fbe,0x3e03126f,0x3daf9db2, 0x3d5d2f1b,0x3d000000,0x3c83126e,0x3bdd2f1b,0x3b03126e,0x39831270,0x00000000,0x00000000,0x3c66bdc8,0x3d57b901,0x3de1cac0,0x3e39af72,0x3e855555,0x3eaf1aa0,0x3ed756b3,0x3efb38a9,0x3f0bf7cf,0x3f155555,0x3f18aec3,0x3f16872b,0x3f0fc3ed,0x3f054a69,0x3ef00000,0x3ed19424,0x3eb11bfd, 0x3e90624e,0x3e6263ab,0x3e2aaaab,0x3df8d4fe,0x3daec33e,0x3d6a2798,0x3d1374bc,0x3caaaaab,0x3c2ec33e,0x3b9374bc,0x3aaec340,0x392ec340,0x00000000,0x00000000,0x392ec340,0x3aaec340,0x3b9374bc,0x3c2ec33e,0x3caaaaab,0x3d1374bc,0x3d6a2798,0x3daec33e,0x3df8d4fe,0x3e2aaaab,0x3e627984, 0x3e90b9af,0x3eb242e7,0x3ed44f30,0x3ef55555,0x3f09e60f,0x3f17152a,0x3f21735f,0x3f283c13,0x3f2aaaab, }; const float defaultHRIR_rom_ITD_azimKSeq[19] = { lib_rend/ivas_rom_binauralRenderer.c +2 −2 Original line number Diff line number Diff line Loading @@ -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 05-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 * Generated on 07-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 */ Loading Loading @@ -46955,7 +46955,7 @@ const uint32_t fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = /* * Generated on 05-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 * Generated on 07-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 * Binaural rendering data set based on BRIRs Tables derived from Mozart IIS BRIRs.*/ lib_util/hrtf_file_reader.c +20 −16 Original line number Diff line number Diff line Loading @@ -269,7 +269,9 @@ static void LoadBSplineBinaryITD_fx( ) { int16_t tmp, factor_Q; #ifndef FIX_TDREND_HRTF_FILE_FORMAT_OR int16_t *v_tmp16; #endif #ifdef FIX_TDREND_HRTF_FILE_FORMAT_OR int32_t *v_tmp32; #endif Loading @@ -278,27 +280,27 @@ static void LoadBSplineBinaryITD_fx( #ifdef FIX_TDREND_HRTF_FILE_FORMAT_OR fread( &modelITD->elevDim3, sizeof( int16_t ), 1, f_hrtf ); modelITD->elevKSeq_dyn = (float *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( float ) ); v_tmp16 = (int16_t *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), modelITD->elevDim3 - 2, f_hrtf ); fread( v_tmp32, sizeof( int32_t ), modelITD->elevDim3 - 2, f_hrtf ); for ( j = 0; j < modelITD->elevDim3 - 2; j++ ) { modelITD->elevKSeq_dyn[j] = ( (float) v_tmp16[j] ) * q_scale; modelITD->elevKSeq_dyn[j] = ( (float) v_tmp32[j] ) * q_scale; } free( v_tmp16 ); free( v_tmp32 ); fread( &modelITD->azimDim3, sizeof( int16_t ), 1, f_hrtf ); modelITD->azimKSeq_dyn = (float *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( float ) ); /* basis functions are flipped around 180 deg, number of basis functions above/below is (N+1)/2 */ v_tmp16 = (int16_t *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), ( modelITD->azimDim3 + 1 ) / 2 - 2, f_hrtf ); fread( v_tmp32, sizeof( int32_t ), ( modelITD->azimDim3 + 1 ) / 2 - 2, f_hrtf ); for ( j = 0; j < ( modelITD->azimDim3 + 1 ) / 2 - 2; j++ ) { modelITD->azimKSeq_dyn[j] = ( (float) v_tmp16[j] ) * q_scale; modelITD->azimKSeq_dyn[j] = ( (float) v_tmp32[j] ) * q_scale; } free( v_tmp16 ); free( v_tmp32 ); #else fread( &modelITD->N, sizeof( int16_t ), 1, f_hrtf ); fread( &modelITD->elevDim2, sizeof( int16_t ), 1, f_hrtf ); Loading Loading @@ -504,7 +506,9 @@ static ivas_error LoadBSplineBinary_fx( { ModelParams_t *model; int16_t i, tmp, factor_Q; #ifndef FIX_TDREND_HRTF_FILE_FORMAT_OR int16_t *v_tmp16; #endif #ifdef FIX_TDREND_HRTF_FILE_FORMAT_OR int32_t *v_tmp32; #endif Loading Loading @@ -557,15 +561,15 @@ static ivas_error LoadBSplineBinary_fx( fread( &model->elevDim3, sizeof( int16_t ), 1, f_hrtf ); model->elevKSeq_dyn = (float *) malloc( ( model->elevDim3 - 2 ) * sizeof( float ) ); v_tmp16 = (int16_t *) malloc( ( model->elevDim3 - 2 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( model->elevDim3 - 2 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), model->elevDim3 - 2, f_hrtf ); fread( v_tmp32, sizeof( int32_t ), model->elevDim3 - 2, f_hrtf ); for ( j = 0; j < model->elevDim3 - 2; j++ ) { model->elevKSeq_dyn[j] = ( (float) v_tmp16[j] * q_scale ); model->elevKSeq_dyn[j] = ( (float) v_tmp32[j] * q_scale ); } free( v_tmp16 ); free( v_tmp32 ); #endif model->azimDim3_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); model->azim_start_idx_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); Loading @@ -577,15 +581,15 @@ static ivas_error LoadBSplineBinary_fx( fread( &model->azim_start_idx_dyn[i], sizeof( int16_t ), 1, f_hrtf ); model->azimKSeq[i] = (float *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( float ) ); v_tmp16 = (int16_t *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), ( model->azimDim3_dyn[i] + 1 ), f_hrtf ); fread( v_tmp32, sizeof( int32_t ), ( model->azimDim3_dyn[i] + 1 ), f_hrtf ); for ( j = 0; j < model->azimDim3_dyn[i] + 1; j++ ) { model->azimKSeq[i][j] = ( (float) v_tmp16[j] * q_scale ); model->azimKSeq[i][j] = ( (float) v_tmp32[j] * q_scale ); } free( v_tmp16 ); free( v_tmp32 ); } fread( &model->AlphaN, sizeof( int16_t ), 1, f_hrtf ); Loading scripts/binauralRenderer_interface/Table_Format_Converter/generate_tables_from_rom_to_bin.c +10 −4 Original line number Diff line number Diff line Loading @@ -773,10 +773,13 @@ char *create_hrtf_crend( HRTF_READER_RENDERER_TYPE rend_type, BINAURAL_INPUT_AUD #ifdef FLOAT_FIX_POINT_HRTF_FILE_FORMAT if ( is_fx == 1 ) { rend_type = rend_type + DEFAULT_BIN_FILE_FX_FLAG; *( (int32_t *) ( mixerconv_hrtf_wptr ) ) = rend_type + DEFAULT_BIN_FILE_FX_FLAG; } else { *( (int32_t *) ( mixerconv_hrtf_wptr ) ) = rend_type; } #endif memcpy( mixerconv_hrtf_wptr, &( rend_type ), sizeof( int32_t ) ); mixerconv_hrtf_wptr += sizeof( int32_t ); // Decoder output format Loading Loading @@ -1305,10 +1308,13 @@ char *create_hrtf_fastconv( HRTF_READER_RENDERER_TYPE rend_type, BINAURAL_INPUT_ #ifdef FLOAT_FIX_POINT_HRTF_FILE_FORMAT if ( is_fx == 1 ) { rend_type = rend_type + DEFAULT_BIN_FILE_FX_FLAG; *( (int32_t *) ( fastconv_hrtf_wptr ) ) = rend_type + DEFAULT_BIN_FILE_FX_FLAG; } else { *( (int32_t *) ( fastconv_hrtf_wptr ) ) = rend_type; } #endif memcpy( fastconv_hrtf_wptr, &( rend_type ), sizeof( int32_t ) ); fastconv_hrtf_wptr += sizeof( int32_t ); // Decoder output format Loading scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin LFS (132 B) File changed.No diff preview for this file type. View original file View changed file Loading
lib_rend/ivas_rom_TdBinauralRenderer.c +5 −6 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ the United Nations Convention on Contracts on the International Sales of Goods. *******************************************************************************************************/ /* Generated on 05-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 */ /* Generated on 07-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 */ Loading Loading @@ -84,12 +84,11 @@ const float defaultHRIR_rom_elevKSeq[13] = { -90.000000f, -75.000000f, -60.000000f, -45.000000f, -30.000000f, -15.000000f, 0.000000f, 15.000000f, 30.000000f, 45.000000f, 60.000000f, 75.000000f, 90.000000f, }; const uint32_t defaultHRIR_rom_elevBsShape[36] = { 0x3f800000,0x3ed80000,0x3e000000,0x3c800000,0x00000000,0x80000000,0x3efe0000,0x3f180000,0x3eea0000,0x3e800000,0x3dd80000,0x3d000000,0x3b800000,0x00000000,0x00000000,0x3da2aaab,0x3e855555,0x3eea0000,0x3f155555,0x3f13aaab,0x3ef00000,0x3ea0aaab,0x3e2aaaab,0x3d900000,0x3caaaaab,0x3b2aaaaa,0x00000000,0x80000000,0x3b2aaaaa,0x3caaaaab,0x3d900000,0x3e2aaaab,0x3ea15555,0x3ef55555,0x3f1caaab,0x3f2aaaab, 0x3f800000,0x3ed80000,0x3e000000,0x3c800000,0x00000000,0x00000000,0x3efe0000,0x3f180000,0x3eea0000,0x3e800000,0x3dd80000,0x3d000000,0x3b800000,0x00000000,0x00000000,0x3da2aaab,0x3e855555,0x3eea0000,0x3f155555,0x3f13aaab,0x3ef00000,0x3ea0aaab,0x3e2aaaab,0x3d900000,0x3caaaaab,0x3b2aaaaa,0x00000000,0x00000000,0x3b2aaaaa,0x3caaaaab,0x3d900000,0x3e2aaaab,0x3ea15555,0x3ef55555,0x3f1caaab,0x3f2aaaab, }; const uint32_t defaultHRIR_rom_azimBsShape[21] = { 0x3f2aaaab,0x3f283c13,0x3f21735f,0x3f17152a,0x3f09e60f,0x3ef55555,0x3ed44f30,0x3eb242e7,0x3e90b9af,0x3e627984,0x3e2aaaab,0x3df8d4fe,0x3daec33e,0x3d6a2798,0x3d1374bc,0x3caaaaab,0x3c2ec33e,0x3b9374bc,0x3aaec340,0x392ec340,0x00000000, }; const uint32_t defaultHRIR_rom_AlphaL48[470 * 128] = { 0x3e0946b9,0x3cda8822,0x3e23be7e,0x3e005914,0x3e095696,0x3e097780,0x3e102edf,0x3e12d807,0x3e1514fc,0x3e103703,0x3e0d2242,0x3e09c889,0x3e06fde7,0x3e04b4aa,0x3e035ecf,0x3e0249b7,0x3e0116dd,0x3e008502,0x3dfcee82,0x3dee77e2,0x3e15b7f1,0x3cac1e96,0xbc8dd29b,0xbd855185,0x3d35c945, 0xbc7e4c57,0xbd71b7fd,0xbd7da762,0xbd708def,0xbd3a07f7,0xbd7775d0,0xbd84cf24,0xbd7d084a,0xbc7d5814,0x3d78b324,0xbd72376a,0xbcb689c0,0xbcfdaebc,0x3e0e19d2,0x3e20943f,0x3e1fe583,0x3e2947bb,0x3e3c07e7,0x3e44e230,0x3e463c59,0x3e3a7208,0x3e2f6146,0x3e2475af,0x3e1bd4da,0x3e1633a9, Loading Loading @@ -10170,9 +10169,9 @@ const int16_t defaultHRIR_rom_ITD_azimBsStart[4] = { 0, 11, 32, 63, }; const uint32_t defaultHRIR_rom_ITD_azimBsShape[84] = { 0x3f800000,0x3f3a9fbe,0x3f03126f,0x3eaf9db2,0x3e5d2f1b,0x3e000000,0x3d83126f,0x3cdd2f1a,0x3c03126e,0x3a831270,0x80000000,0x00000000,0x3e8374bc,0x3ede353f,0x3f0ad0e5,0x3f178d50,0x3f180000,0x3f0ed917,0x3efd9168,0x3ed4fdf4,0x3ea95810,0x3e800000,0x3e3a9fbe,0x3e03126f,0x3daf9db2, 0x3d5d2f1b,0x3d000000,0x3c83126e,0x3bdd2f1b,0x3b03126e,0x39831270,0x80000000,0x00000000,0x3c66bdc8,0x3d57b901,0x3de1cac0,0x3e39af72,0x3e855555,0x3eaf1aa0,0x3ed756b3,0x3efb38a9,0x3f0bf7cf,0x3f155555,0x3f18aec3,0x3f16872b,0x3f0fc3ed,0x3f054a69,0x3ef00000,0x3ed19424,0x3eb11bfd, 0x3e90624e,0x3e6263ab,0x3e2aaaab,0x3df8d4fe,0x3daec33e,0x3d6a2798,0x3d1374bc,0x3caaaaab,0x3c2ec33e,0x3b9374bc,0x3aaec340,0x392ec340,0x80000000,0x00000000,0x392ec340,0x3aaec340,0x3b9374bc,0x3c2ec33e,0x3caaaaab,0x3d1374bc,0x3d6a2798,0x3daec33e,0x3df8d4fe,0x3e2aaaab,0x3e627984, 0x3f800000,0x3f3a9fbe,0x3f03126f,0x3eaf9db2,0x3e5d2f1b,0x3e000000,0x3d83126f,0x3cdd2f1a,0x3c03126e,0x3a831270,0x00000000,0x00000000,0x3e8374bc,0x3ede353f,0x3f0ad0e5,0x3f178d50,0x3f180000,0x3f0ed917,0x3efd9168,0x3ed4fdf4,0x3ea95810,0x3e800000,0x3e3a9fbe,0x3e03126f,0x3daf9db2, 0x3d5d2f1b,0x3d000000,0x3c83126e,0x3bdd2f1b,0x3b03126e,0x39831270,0x00000000,0x00000000,0x3c66bdc8,0x3d57b901,0x3de1cac0,0x3e39af72,0x3e855555,0x3eaf1aa0,0x3ed756b3,0x3efb38a9,0x3f0bf7cf,0x3f155555,0x3f18aec3,0x3f16872b,0x3f0fc3ed,0x3f054a69,0x3ef00000,0x3ed19424,0x3eb11bfd, 0x3e90624e,0x3e6263ab,0x3e2aaaab,0x3df8d4fe,0x3daec33e,0x3d6a2798,0x3d1374bc,0x3caaaaab,0x3c2ec33e,0x3b9374bc,0x3aaec340,0x392ec340,0x00000000,0x00000000,0x392ec340,0x3aaec340,0x3b9374bc,0x3c2ec33e,0x3caaaaab,0x3d1374bc,0x3d6a2798,0x3daec33e,0x3df8d4fe,0x3e2aaaab,0x3e627984, 0x3e90b9af,0x3eb242e7,0x3ed44f30,0x3ef55555,0x3f09e60f,0x3f17152a,0x3f21735f,0x3f283c13,0x3f2aaaab, }; const float defaultHRIR_rom_ITD_azimKSeq[19] = {
lib_rend/ivas_rom_binauralRenderer.c +2 −2 Original line number Diff line number Diff line Loading @@ -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 05-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 * Generated on 07-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 */ Loading Loading @@ -46955,7 +46955,7 @@ const uint32_t fastconvReverberationEneCorrections[CLDFB_NO_CHANNELS_MAX] = /* * Generated on 05-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 * Generated on 07-Jun-2024 with Matlab version 24.1.0.2578822 (R2024a) Update 2 by marcemerit on MACA64 * Binaural rendering data set based on BRIRs Tables derived from Mozart IIS BRIRs.*/
lib_util/hrtf_file_reader.c +20 −16 Original line number Diff line number Diff line Loading @@ -269,7 +269,9 @@ static void LoadBSplineBinaryITD_fx( ) { int16_t tmp, factor_Q; #ifndef FIX_TDREND_HRTF_FILE_FORMAT_OR int16_t *v_tmp16; #endif #ifdef FIX_TDREND_HRTF_FILE_FORMAT_OR int32_t *v_tmp32; #endif Loading @@ -278,27 +280,27 @@ static void LoadBSplineBinaryITD_fx( #ifdef FIX_TDREND_HRTF_FILE_FORMAT_OR fread( &modelITD->elevDim3, sizeof( int16_t ), 1, f_hrtf ); modelITD->elevKSeq_dyn = (float *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( float ) ); v_tmp16 = (int16_t *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( modelITD->elevDim3 - 2 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), modelITD->elevDim3 - 2, f_hrtf ); fread( v_tmp32, sizeof( int32_t ), modelITD->elevDim3 - 2, f_hrtf ); for ( j = 0; j < modelITD->elevDim3 - 2; j++ ) { modelITD->elevKSeq_dyn[j] = ( (float) v_tmp16[j] ) * q_scale; modelITD->elevKSeq_dyn[j] = ( (float) v_tmp32[j] ) * q_scale; } free( v_tmp16 ); free( v_tmp32 ); fread( &modelITD->azimDim3, sizeof( int16_t ), 1, f_hrtf ); modelITD->azimKSeq_dyn = (float *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( float ) ); /* basis functions are flipped around 180 deg, number of basis functions above/below is (N+1)/2 */ v_tmp16 = (int16_t *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( ( modelITD->azimDim3 + 1 ) / 2 - 2 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), ( modelITD->azimDim3 + 1 ) / 2 - 2, f_hrtf ); fread( v_tmp32, sizeof( int32_t ), ( modelITD->azimDim3 + 1 ) / 2 - 2, f_hrtf ); for ( j = 0; j < ( modelITD->azimDim3 + 1 ) / 2 - 2; j++ ) { modelITD->azimKSeq_dyn[j] = ( (float) v_tmp16[j] ) * q_scale; modelITD->azimKSeq_dyn[j] = ( (float) v_tmp32[j] ) * q_scale; } free( v_tmp16 ); free( v_tmp32 ); #else fread( &modelITD->N, sizeof( int16_t ), 1, f_hrtf ); fread( &modelITD->elevDim2, sizeof( int16_t ), 1, f_hrtf ); Loading Loading @@ -504,7 +506,9 @@ static ivas_error LoadBSplineBinary_fx( { ModelParams_t *model; int16_t i, tmp, factor_Q; #ifndef FIX_TDREND_HRTF_FILE_FORMAT_OR int16_t *v_tmp16; #endif #ifdef FIX_TDREND_HRTF_FILE_FORMAT_OR int32_t *v_tmp32; #endif Loading Loading @@ -557,15 +561,15 @@ static ivas_error LoadBSplineBinary_fx( fread( &model->elevDim3, sizeof( int16_t ), 1, f_hrtf ); model->elevKSeq_dyn = (float *) malloc( ( model->elevDim3 - 2 ) * sizeof( float ) ); v_tmp16 = (int16_t *) malloc( ( model->elevDim3 - 2 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( model->elevDim3 - 2 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), model->elevDim3 - 2, f_hrtf ); fread( v_tmp32, sizeof( int32_t ), model->elevDim3 - 2, f_hrtf ); for ( j = 0; j < model->elevDim3 - 2; j++ ) { model->elevKSeq_dyn[j] = ( (float) v_tmp16[j] * q_scale ); model->elevKSeq_dyn[j] = ( (float) v_tmp32[j] * q_scale ); } free( v_tmp16 ); free( v_tmp32 ); #endif model->azimDim3_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); model->azim_start_idx_dyn = (int16_t *) malloc( model->elevDim3 * sizeof( int16_t ) ); Loading @@ -577,15 +581,15 @@ static ivas_error LoadBSplineBinary_fx( fread( &model->azim_start_idx_dyn[i], sizeof( int16_t ), 1, f_hrtf ); model->azimKSeq[i] = (float *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( float ) ); v_tmp16 = (int16_t *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( int16_t ) ); v_tmp32 = (int32_t *) malloc( ( model->azimDim3_dyn[i] + 1 ) * sizeof( int32_t ) ); fread( &factor_Q, 1, sizeof( int16_t ), f_hrtf ); q_scale = powf( 2.f, -1.f * (float) factor_Q ); fread( v_tmp16, sizeof( int16_t ), ( model->azimDim3_dyn[i] + 1 ), f_hrtf ); fread( v_tmp32, sizeof( int32_t ), ( model->azimDim3_dyn[i] + 1 ), f_hrtf ); for ( j = 0; j < model->azimDim3_dyn[i] + 1; j++ ) { model->azimKSeq[i][j] = ( (float) v_tmp16[j] * q_scale ); model->azimKSeq[i][j] = ( (float) v_tmp32[j] * q_scale ); } free( v_tmp16 ); free( v_tmp32 ); } fread( &model->AlphaN, sizeof( int16_t ), 1, f_hrtf ); Loading
scripts/binauralRenderer_interface/Table_Format_Converter/generate_tables_from_rom_to_bin.c +10 −4 Original line number Diff line number Diff line Loading @@ -773,10 +773,13 @@ char *create_hrtf_crend( HRTF_READER_RENDERER_TYPE rend_type, BINAURAL_INPUT_AUD #ifdef FLOAT_FIX_POINT_HRTF_FILE_FORMAT if ( is_fx == 1 ) { rend_type = rend_type + DEFAULT_BIN_FILE_FX_FLAG; *( (int32_t *) ( mixerconv_hrtf_wptr ) ) = rend_type + DEFAULT_BIN_FILE_FX_FLAG; } else { *( (int32_t *) ( mixerconv_hrtf_wptr ) ) = rend_type; } #endif memcpy( mixerconv_hrtf_wptr, &( rend_type ), sizeof( int32_t ) ); mixerconv_hrtf_wptr += sizeof( int32_t ); // Decoder output format Loading Loading @@ -1305,10 +1308,13 @@ char *create_hrtf_fastconv( HRTF_READER_RENDERER_TYPE rend_type, BINAURAL_INPUT_ #ifdef FLOAT_FIX_POINT_HRTF_FILE_FORMAT if ( is_fx == 1 ) { rend_type = rend_type + DEFAULT_BIN_FILE_FX_FLAG; *( (int32_t *) ( fastconv_hrtf_wptr ) ) = rend_type + DEFAULT_BIN_FILE_FX_FLAG; } else { *( (int32_t *) ( fastconv_hrtf_wptr ) ) = rend_type; } #endif memcpy( fastconv_hrtf_wptr, &( rend_type ), sizeof( int32_t ) ); fastconv_hrtf_wptr += sizeof( int32_t ); // Decoder output format Loading
scripts/binauralRenderer_interface/binaural_renderers_hrtf_data/ivas_binaural_16kHz.bin LFS (132 B) File changed.No diff preview for this file type. View original file View changed file