Commit f951f598 authored by emerit's avatar emerit
Browse files

Review from Orange

parent 785d98f9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -95,7 +95,11 @@ int32_t get_delay(
        {
            delay = IVAS_DEC_DELAY_NS;

#ifdef REVIEW_ORANGE // same fix as in main branch
            if ( hCldfb != NULL || renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
#else
            if ( hCldfb != NULL )
#endif
            {
                delay += IVAS_FB_DEC_DELAY_NS;
            }
+4 −0
Original line number Diff line number Diff line
@@ -1395,7 +1395,11 @@ typedef enum
#define MAX_ANGULAR_STEP                        (15.0f)
#define MAX_ANGULAR_STEP_INV                    ( 1.0f / MAX_ANGULAR_STEP )
#define MAX_INTERPOLATION_STEPS                 12
#ifdef REVIEW_ORANGE
#define BINAURAL_TD_LATENCY_S                   0.000020833333110f          /* no should be cleaned out, the TD delay is the same as the ORANGE HRIR 53 delay 1 sample à 48000 hz, for binary the file the value depend on HRIR set thus it shall be strore in the file  */
#else
#define BINAURAL_TD_LATENCY_S                   0.0f                        /* ITD fix removes TD renderer delay -- should be cleaned out */
#endif

/* ----- Enums - TD Renderer ----- */

+2 −0
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@
#define FIX_150                                         /* Issue 150: Crash in EVS mono, HQ_HARMONIC mode, related to BASOP_NOGLOB */
#define FIX_VBR_COMPLEXITY                              /* Issue 234: fix extremely high complexity numbers for IVAS EVS mode */


#define REVIEW_ORANGE
/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+8 −0
Original line number Diff line number Diff line
@@ -396,10 +396,18 @@ void ivas_renderer_select(
                *internal_config = transport_config;
                if ( output_config == AUDIO_CONFIG_BINAURAL )
                {
#ifdef REVIEW_ORANGE // TD renderer should also work with head tracking with 5.1.2, 5.1.4 and 7.1.4 input with headtracking ?
#ifdef DEBUGGING
                    if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 || st_ivas->transport_config == AUDIO_CONFIG_5_1_2 || st_ivas->transport_config == AUDIO_CONFIG_5_1_4 || st_ivas->transport_config == AUDIO_CONFIG_7_1_4 ) && st_ivas->hDecoderConfig->Opt_Headrotation ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) )
#else
                    if ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation && ( st_ivas->mc_mode == MC_MODE_MCT ) )
#endif
#else
#ifdef DEBUGGING
                    if ( ( ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation ) || ( st_ivas->hDecoderConfig->force_rend == FORCE_TD_RENDERER ) ) && ( st_ivas->mc_mode == MC_MODE_MCT ) && !( st_ivas->hDecoderConfig->force_rend == FORCE_CLDFB_RENDERER ) )
#else
                    if ( ( st_ivas->transport_config == AUDIO_CONFIG_5_1 || st_ivas->transport_config == AUDIO_CONFIG_7_1 ) && st_ivas->hDecoderConfig->Opt_Headrotation && ( st_ivas->mc_mode == MC_MODE_MCT ) )
#endif
#endif
                    {
                        *renderer_type = RENDERER_BINAURAL_OBJECTS_TD;
+9 −2
Original line number Diff line number Diff line
@@ -55,15 +55,22 @@ classdef data_SOFA < handle
        function obj = get_hrf_itd(obj)
            % load the SOFA file
            netcdf.inqLibVers;
            if isempty(strfind(version,'2017'))
            sofar = py.importlib.import_module('sofar');
            sf = sofar.read_sofa(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf));
            
            sf = py.sofar.read_sofa(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf));
            meas.ListenerPosition = double(sf.ListenerPosition);
            meas.ListenerView = double(sf.ListenerView);
            meas.ListenerUp = double(sf.ListenerUp);
            meas.SourcePosition = double(sf.SourcePosition);
            meas.Data.SamplingRate = double(sf.Data_SamplingRate);
            meas.Data.IR = double(sf.Data_IR);
            else
                if exist('SOFAload')>0
                    meas = SOFAload(fullfile(obj.info.folderNameOnset,'..',obj.info.fileNameHrf));
                else
                    disp('either update matlab version or install https://github.com/sofacoustics/SOFAtoolbox')
                end
            end
            
            obj.info.listenerPosition = meas.ListenerPosition;
            obj.info.listenerView = meas.ListenerView;