Commit 403335bb authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[WIP] add placeholder code for most required functions

parent eefad881
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -510,7 +510,15 @@ int main(
            fprintf( stderr, "\nError in loading HRTF binary file %s for CRend \n\n", arg.hrtfCRendFileName );
            goto cleanup;
        }
#endif
#ifdef HRTF_BINARY_FASTCONV
        IVAS_DEC_HRTF_FASTCONV_HANDLE hHrtfFastConv;
        IVAS_DEC_GetHrtfFastConvHandle( hIvasDec, &hHrtfFastConv );

        if ( ( error = load_fastconv_HRTF_from_binary( hHrtfFastConv, hrtfReader) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in loading HRTF binary file %s for FastConv \n\n", arg.hrtfCRendFileName );
        }
#endif
    }

+3 −0
Original line number Diff line number Diff line
@@ -96,6 +96,9 @@ typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE;
#ifdef HRTF_BINARY_FILE
typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE;
#endif
#ifdef HRTF_BINARY_FASTCONV
typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE;
#endif

#ifdef DEBUGGING
typedef enum
+10 −0
Original line number Diff line number Diff line
@@ -4532,6 +4532,16 @@ void ivas_binaural_add_LFE(
    float output_f[][L_FRAME48k]                                /* i/o: synthesized core-coder transport channels/DirAC output  */
);

#ifdef HRTF_BINARY_FASTCONV
ivas_error ivas_HRTF_fastconv_binary_open(
    HRTFS_FASTCONV **hHrtfFastConv                              /* i/o: FASTCONV HRTF structure */
);

void ivas_HRTF_fastconv_binary_close(
    HRTFS_FASTCONV **hHrtfFastConv                              /* i/o: FASTCONV HRTF structure */
);
#endif

void QuatToRotMat(
#ifdef EXT_RENDERER
    const IVAS_QUATERNION quat,                                 /* i  : quaternion describing the rotation                      */
+4 −0
Original line number Diff line number Diff line
@@ -160,6 +160,10 @@
#define FIX_I218_PARAMISM_NOISY_SPEECH                  /* Issue 218: Fix noisy speech buffer in ParamISM */

#define HRTF_BINARY_FILE                                /* HRTF filters' binary file used for binaural rendering. */
#ifdef HRTF_BINARY_FILE
#define HRTF_BINARY_FASTCONV                            /* Enable loading HRTF tables from file for FastConv renderer */
//#define HRTF_BINARY_PARAM                               /* Enable loading HRTF tables from file for Parametric renderer */
#endif

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+19 −1
Original line number Diff line number Diff line
@@ -580,6 +580,13 @@ ivas_error ivas_init_decoder_front(
            return error;
        }
#endif

#ifdef HRTF_BINARY_FASTCONV
        if ( ( error = ivas_HRTF_fastconv_binary_open( &st_ivas->hHrtfFastConv ) ) != IVAS_ERR_OK )
        {
            return error;
        }
#endif
    }

    /*-------------------------------------------------------------------*
@@ -1499,6 +1506,9 @@ void ivas_initialize_handles_dec(
    st_ivas->hHrtf = NULL;
#ifdef HRTF_BINARY_FILE
    st_ivas->hSetOfHRTF = NULL;
#endif
#ifdef HRTF_BINARY_FASTCONV
    st_ivas->hHrtfFastConv = NULL;
#endif
    st_ivas->hoa_dec_mtx = NULL;

@@ -1714,6 +1724,14 @@ void ivas_destroy_dec(
    }
#endif

#ifdef HRTF_BINARY_FASTCONV
    /* Fastconv HRTF filters */
    if ( st_ivas->hHrtfFastConv != NULL )
    {
        ivas_HRTF_fastconv_binary_close( &st_ivas->hHrtfFastConv );
    }
#endif

    /* Config. Renderer */
    ivas_render_config_close( &( st_ivas->hRenderConfig ) );

@@ -1987,7 +2005,7 @@ static ivas_error doSanityChecks_IVAS(
#endif

#ifdef HRTF_BINARY_FILE

// TODO tmu check
#ifdef DEBUGGING
    if ( ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) && ( ( st_ivas->ivas_format != MC_FORMAT && st_ivas->ivas_format != ISM_FORMAT ) || output_config != AUDIO_CONFIG_BINAURAL || ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != MC_MODE_MCT ) ) )
    {
Loading