Loading lib_util/hrtf_file_reader.c +75 −16 Original line number Diff line number Diff line Loading @@ -1821,24 +1821,17 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( ( *hHRTF )->allocate_init_flag = 0; #ifndef FIX_1123_FASTCONV_16BIT_ROM if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } } else if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -1847,6 +1840,7 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "renderer type not compliant" ); } #endif hrtf_data_rptr = hrtf_data; Loading Loading @@ -1883,6 +1877,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2020,6 +2021,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2157,6 +2165,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2295,6 +2310,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2433,6 +2455,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* BRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2693,24 +2722,17 @@ static ivas_error create_fastconv_HRTF_from_rawdata( ( *hHRTF )->allocate_init_flag = 0; #ifndef FIX_1123_FASTCONV_16BIT_ROM if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } } else if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -2719,6 +2741,7 @@ static ivas_error create_fastconv_HRTF_from_rawdata( { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "renderer type not compliant" ); } #endif hrtf_data_rptr = hrtf_data; Loading Loading @@ -2750,6 +2773,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) Loading Loading @@ -2830,6 +2860,14 @@ static ivas_error create_fastconv_HRTF_from_rawdata( } #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HOA3_CHANNELS; j++ ) Loading Loading @@ -2911,6 +2949,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HOA2_CHANNELS; j++ ) Loading Loading @@ -2992,6 +3037,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < FOA_CHANNELS; j++ ) Loading Loading @@ -3073,6 +3125,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) Loading Loading
lib_util/hrtf_file_reader.c +75 −16 Original line number Diff line number Diff line Loading @@ -1821,24 +1821,17 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( ( *hHRTF )->allocate_init_flag = 0; #ifndef FIX_1123_FASTCONV_16BIT_ROM if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } } else if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -1847,6 +1840,7 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "renderer type not compliant" ); } #endif hrtf_data_rptr = hrtf_data; Loading Loading @@ -1883,6 +1877,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2020,6 +2021,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2157,6 +2165,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2295,6 +2310,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* HRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2433,6 +2455,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata_fx( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif /* BRIR Q factor*/ factorQ = *( (Word16 *) ( hrtf_data_rptr ) ); hrtf_data_rptr += sizeof( Word16 ); Loading Loading @@ -2693,24 +2722,17 @@ static ivas_error create_fastconv_HRTF_from_rawdata( ( *hHRTF )->allocate_init_flag = 0; #ifndef FIX_1123_FASTCONV_16BIT_ROM if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } } else if ( rend_type == HRTF_READER_RENDERER_BINAURAL_FASTCONV_ROOM ) { #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #else if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, 0, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) #endif { return error; } Loading @@ -2719,6 +2741,7 @@ static ivas_error create_fastconv_HRTF_from_rawdata( { return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "renderer type not compliant" ); } #endif hrtf_data_rptr = hrtf_data; Loading Loading @@ -2750,6 +2773,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) Loading Loading @@ -2830,6 +2860,14 @@ static ivas_error create_fastconv_HRTF_from_rawdata( } #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HOA3_CHANNELS; j++ ) Loading Loading @@ -2911,6 +2949,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HOA2_CHANNELS; j++ ) Loading Loading @@ -2992,6 +3037,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < FOA_CHANNELS; j++ ) Loading Loading @@ -3073,6 +3125,13 @@ static ivas_error create_fastconv_HRTF_from_rawdata( #endif hrtf_data_rptr += sizeof( uint16_t ); #ifdef FIX_1123_FASTCONV_16BIT_ROM if ( ( error = ivas_allocate_binaural_hrtf( *hHRTF, IVAS_AUDIO_CONFIG_INVALID, input_cfg, RENDERER_BINAURAL_FASTCONV_ROOM, ( *hHRTF )->allocate_init_flag ) ) != IVAS_ERR_OK ) { return error; } #endif for ( i = 0; i < BINAURAL_CONVBANDS; i++ ) { for ( j = 0; j < HRTF_LS_CHANNELS; j++ ) Loading