Commit 28b5a33d authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch 'hrtf_float_tables_fx_file_format' into 'main'

[non-be][split-non-be] Revert to (quantized) float ROM tables for binaural renderers, keep 16bit binary file format

See merge request !1706
parents 81350e24 6fa77524
Loading
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -164,10 +164,13 @@

#define FIX_POINT_HRTF_FILE_FORMAT                     /* All: fix point hrtf binary file format */
#ifdef FIX_POINT_HRTF_FILE_FORMAT
#define FIX_1123_CREND_16BIT_ROM
#define FIX_1123_TDREN_16BIT_ROM
#define FIX_1123_FASTCONV_16BIT_ROM                     /* FhG: issue 1123: update FastConv ROM tables and scripts to generate 16 bit tables instead of float */
#define FIX_1123_PARAMBIN_16BIT_ROM                     /* FhG,Nok: issue 1123: update ParamBin ROM tables and scripts to generate 16 bit tables instead of float */
/*#define FIX_1123_CREND_16BIT_ROM*/                    /* Ora: update CREND ROM tables to 16 bit */
#define FIX_1123_CREND_16BIT_FMT                        /* Ora: update CREND binary file format to 16 bit */
#define FIX_1123_CREND_FLTFX_BE                         /* Ora: make CREND FLT ROM tables BE to FX file */
/*#define FIX_1123_TDREN_16BIT_ROM*/                    /* Eri,Ora: update TD Object Renderer tables to 16 bit */
/*#define FIX_1123_FASTCONV_16BIT_ROM*/                 /* FhG: issue 1123: update FastConv ROM tables to 16 bit (must regenerate ROM file!) */
#define FIX_1123_FASTCONV_16BIT_FMT                     /* FhG: issue 1123: update FastConv binary file format and scripts to 16 bit */
/*#define FIX_1123_PARAMBIN_16BIT_ROM*/                 /* FhG,Nok: issue 1123: update ParamBin ROM tables and scripts to generate 16 bit tables instead of float */
#define FIX_RETURN                                      /* VA: fix location of function returns */
#endif
#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
+9 −8
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(

    if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM )
    {
#ifdef FIX_1123_FASTCONV_16BIT_ROM
#ifdef FIX_1123_FASTCONV_16BIT_FMT
        hBinRenConvModule->numTaps = hHrtf->ntaps_brir;
#else
        hBinRenConvModule->numTaps = BINAURAL_NTAPS_MAX;
@@ -200,7 +200,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
    {
        if ( hBinRenderer->ivas_format == SBA_FORMAT )
        {
#ifdef FIX_1123_FASTCONV_16BIT_ROM
#ifdef FIX_1123_FASTCONV_16BIT_FMT
            if ( input_config == IVAS_AUDIO_CONFIG_HOA3 )
            {
                hBinRenConvModule->numTaps = hHrtf->ntaps_hrir_hoa3;
@@ -223,7 +223,7 @@ static ivas_error ivas_binRenderer_convModuleOpen(
        }
        else
        {
#ifdef FIX_1123_FASTCONV_16BIT_ROM
#ifdef FIX_1123_FASTCONV_16BIT_FMT
            hBinRenConvModule->numTaps = hHrtf->ntaps_hrir;
#else
            hBinRenConvModule->numTaps = BINAURAL_NTAPS;
@@ -493,7 +493,8 @@ void ivas_init_binaural_hrtf(

#ifndef FIX_1123_FASTCONV_16BIT_ROM
    HrtfFastConv->allocate_init_flag = 0x00;
#else
#endif
#ifdef FIX_1123_FASTCONV_16BIT_FMT
    HrtfFastConv->ntaps_hrir = BINAURAL_NTAPS;
    HrtfFastConv->ntaps_hrir_foa = BINAURAL_NTAPS_SBA;
    HrtfFastConv->ntaps_hrir_hoa2 = BINAURAL_NTAPS_SBA;
@@ -719,8 +720,8 @@ ivas_error ivas_allocate_binaural_hrtf(
        }
    }

#ifdef FIX_1123_FASTCONV_16BIT_ROM
    if ( ( renderer_type == RENDERER_BINAURAL_FASTCONV && bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) || ( renderer_type == RENDERER_BINAURAL_FASTCONV && input_config != IVAS_AUDIO_CONFIG_INVALID ) )
#ifdef FIX_1123_FASTCONV_16BIT_FMT
    else if ( ( renderer_type == RENDERER_BINAURAL_FASTCONV && bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) || ( renderer_type == RENDERER_BINAURAL_FASTCONV && input_config != IVAS_AUDIO_CONFIG_INVALID ) )
#else
    if ( renderer_type == RENDERER_BINAURAL_FASTCONV || bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED )
#endif
@@ -765,8 +766,8 @@ ivas_error ivas_allocate_binaural_hrtf(
        }
    }

#ifdef FIX_1123_FASTCONV_16BIT_ROM
    if ( ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) || ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && input_config != IVAS_AUDIO_CONFIG_INVALID ) )
#ifdef FIX_1123_FASTCONV_16BIT_FMT
    else if ( ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED ) || ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && input_config != IVAS_AUDIO_CONFIG_INVALID ) )
#else
    if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED )
#endif
+4855 −4855

File changed.

Preview size limit exceeded, changes collapsed.

+2 −2
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
 * TD Binaural rendering related ROM tables
 *------------------------------------------------------------------------*/
/* TD renderer default HRIR model */
#ifdef FIX_POINT_HRTF_FILE_FORMAT
#ifdef FIX_1123_TDREN_16BIT_ROM
extern const int16_t defaultHRIR_rom_latency_s_Q;
extern const int32_t defaultHRIR_rom_latency_s;
extern const int16_t defaultHRIR_rom_model_configuration[6];
@@ -97,7 +97,7 @@ extern const uint32_t defaultHRIR_rom_ER32[HRTF_MODEL_N_SECTIONS * 470];
extern const uint32_t defaultHRIR_rom_EL16[HRTF_MODEL_N_SECTIONS * 470];
extern const uint32_t defaultHRIR_rom_ER16[HRTF_MODEL_N_SECTIONS * 470];
#endif
#ifdef FIX_POINT_HRTF_FILE_FORMAT
#ifdef FIX_1123_TDREN_16BIT_ROM
extern const int16_t defaultHRIR_rom_elevBsLen[4];
extern const int16_t defaultHRIR_rom_elevBsStart[4];
extern const int16_t defaultHRIR_rom_elevBsShape_Q;
+46026 −46054

File changed.

Preview size limit exceeded, changes collapsed.

Loading