Commit edb26f59 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch '1163-clean-up-leftover-16-bit-hrtf-rom-switches' into 'main'

Resolve "Clean up leftover 16 bit HRTF ROM switches"

See merge request !1739
parents 82406f4d ffa01efb
Loading
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -5140,11 +5140,8 @@ ivas_error ivas_allocate_binaural_hrtf(
    HRTFS_FASTCONV *HrtfFastConv,                               /* i/o: FASTCONV HRTF structure */
    const AUDIO_CONFIG input_config,                            /* i  : input audio configuration                       */
    const BINAURAL_INPUT_AUDIO_CONFIG bin_input_config,         /* i  : binaural input audio config                     */
    const RENDERER_TYPE renderer_type                           /* i  : renderer type                                   */
#ifndef FIX_1123_FASTCONV_16BIT_ROM
    ,
    const RENDERER_TYPE renderer_type,                          /* i  : renderer type                                   */
    const int16_t allocate_init_flag                            /* i  : Memory allocation flag                          */
#endif
);

#ifdef DEBUGGING
+0 −4
Original line number Diff line number Diff line
@@ -164,13 +164,9 @@

#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*/                    /* 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_1135_EXT_RENDERER_HANDLES                   /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */
+31 −211

File changed.

Preview size limit exceeded, changes collapsed.

+0 −402

File changed.

Preview size limit exceeded, changes collapsed.

+0 −29
Original line number Diff line number Diff line
@@ -380,11 +380,7 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs(
    HRTFS_PARAMBIN_HANDLE *hHrtfParambin /* i/o: HRTF structure for rendering */
)
{
#ifdef FIX_1123_PARAMBIN_16BIT_ROM
    int16_t i, j, k;
#else
    int16_t i, j;
#endif

    if ( hHrtfParambin != NULL && *hHrtfParambin != NULL )
    {
@@ -395,14 +391,6 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs(
    {
        /* Initialise tables from ROM */
        HRTFS_PARAMBIN *hrtfParambin;
#ifdef FIX_1123_PARAMBIN_16BIT_ROM
        float shCoef_scale, rt_scale, rene_scale, early_scale;

        shCoef_scale = powf( 2.f, -1.f * hrtfShCoeffs_factorQ );
        rt_scale = powf( 2.f, -1.f * parametricReverberationTimes_factorQ );
        rene_scale = powf( 2.f, -1.f * parametricReverberationEneCorrections_factorQ );
        early_scale = powf( 2.f, -1.f * parametricEarlyPartEneCorrection_factorQ );
#endif

        if ( ( hrtfParambin = (HRTFS_PARAMBIN *) malloc( sizeof( HRTFS_PARAMBIN ) ) ) == NULL )
        {
@@ -413,31 +401,14 @@ ivas_error ivas_dirac_dec_binaural_copy_hrtfs(
        {
            for ( j = 0; j < HRTF_SH_CHANNELS; j++ )
            {
#ifdef FIX_1123_PARAMBIN_16BIT_ROM
                for ( k = 0; k < HRTF_NUM_BINS; k++ )
                {
                    hrtfParambin->hrtfShCoeffsRe[i][j][k] = hrtfShCoeffsRe[i][j][k] * shCoef_scale;
                    hrtfParambin->hrtfShCoeffsIm[i][j][k] = hrtfShCoeffsIm[i][j][k] * shCoef_scale;
                }
#else
                mvr2r( hrtfShCoeffsRe[i][j], hrtfParambin->hrtfShCoeffsRe[i][j], HRTF_NUM_BINS );
                mvr2r( hrtfShCoeffsIm[i][j], hrtfParambin->hrtfShCoeffsIm[i][j], HRTF_NUM_BINS );
#endif
            }
        }

#ifdef FIX_1123_PARAMBIN_16BIT_ROM
        for ( i = 0; i < CLDFB_NO_CHANNELS_MAX; i++ )
        {
            hrtfParambin->parametricReverberationTimes[i] = parametricReverberationTimes[i] * rt_scale;
            hrtfParambin->parametricReverberationEneCorrections[i] = parametricReverberationEneCorrections[i] * rene_scale;
            hrtfParambin->parametricEarlyPartEneCorrection[i] = parametricEarlyPartEneCorrection[i] * early_scale;
        }
#else
        mvr2r( parametricReverberationTimes, hrtfParambin->parametricReverberationTimes, CLDFB_NO_CHANNELS_MAX );
        mvr2r( parametricReverberationEneCorrections, hrtfParambin->parametricReverberationEneCorrections, CLDFB_NO_CHANNELS_MAX );
        mvr2r( parametricEarlyPartEneCorrection, hrtfParambin->parametricEarlyPartEneCorrection, CLDFB_NO_CHANNELS_MAX );
#endif

        *hHrtfParambin = hrtfParambin;

Loading