Commit 56e5aba9 authored by vaclav's avatar vaclav Committed by emerit
Browse files

merge switches into one

parent 79491703
Loading
Loading
Loading
Loading
+20 −16
Original line number Diff line number Diff line
@@ -186,8 +186,8 @@ static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg );
static void usage_dec( void );
static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf );
static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, IVAS_DEC_HANDLE hIvasDec );
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs );
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
static ivas_error load_hrtf_from_file( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const IVAS_AUDIO_CONFIG OutputConfig, const int32_t output_Fs );
#else
static ivas_error IVAS_DEC_LoadHrtfFromFile( IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, IVAS_DEC_HANDLE hIvasDec, const int32_t output_Fs );
#endif
@@ -2380,8 +2380,8 @@ static ivas_error decodeG192(
                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                    if ( ( error = load_hrtf_from_file( hHrtfBinary, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtfBinary, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK )
#endif
@@ -3295,8 +3295,8 @@ static ivas_error decodeVoIP(
                /* Load HRTF binary file data */
                if ( arg.hrtfReaderEnabled )
                {
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                    if ( ( error = load_hrtf_from_file( hHrtf, hIvasDec, arg.outputConfig, arg.output_Fs ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = IVAS_DEC_LoadHrtfFromFile( hHrtf, hIvasDec, arg.output_Fs ) ) != IVAS_ERR_OK )
#endif
@@ -3690,6 +3690,20 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec(
#endif


#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
/*---------------------------------------------------------------------*
 * load_hrtf_from_file()
 *
 * Load HRTF coefficients from external binary file
 *---------------------------------------------------------------------*/

static ivas_error load_hrtf_from_file(
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, /* i/o: HRTF binary wrapper handle   */
    IVAS_DEC_HANDLE hIvasDec,                  /* i/o: IVAS decoder handle          */
    const IVAS_AUDIO_CONFIG OutputConfig,      /* i  : output audio configuration   */
    const int32_t output_Fs                    /* i  : output sampling rate         */
)
#else
/*---------------------------------------------------------------------*
 * IVAS_DEC_LoadHrtfFromFile()
 *
@@ -3699,9 +3713,6 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec(
static ivas_error IVAS_DEC_LoadHrtfFromFile(
    IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary,
    IVAS_DEC_HANDLE hIvasDec,
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
    const IVAS_AUDIO_CONFIG OutputConfig,
#endif
    const int32_t output_Fs )
{
    ivas_error error;
@@ -3806,11 +3817,7 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
            }

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, OutputConfig, hHrtfBinary->fastConv_set_cfg, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->fastConv_set_cfg, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, hHrtfBinary->room_reverb_flag, hHrtfBinary->intern_audio_config, hHrtfBinary->hrtfReader ) ) != IVAS_ERR_OK )
#endif
@@ -3823,9 +3830,6 @@ static ivas_error IVAS_DEC_LoadHrtfFromFile(
                else
                {
                    destroy_fastconv_hrtf( hHrtfFastConv );
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
                    return error;
#endif
                }
            }
        }
+0 −4
Original line number Diff line number Diff line
@@ -946,11 +946,7 @@ int main(
            }

#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, args.outConfig.audioConfig, args.inConfig.ambisonicsBuses->audioConfig, hrtfFileReader ) ) != IVAS_ERR_OK )
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, IVAS_AUDIO_CONFIG_EXTERNAL, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
#else
            if ( ( error = load_fastconv_HRTF_from_binary( *hHrtfFastConv, 0, IVAS_AUDIO_CONFIG_INVALID, hrtfFileReader ) ) != IVAS_ERR_OK )
#endif
+1 −1
Original line number Diff line number Diff line
@@ -1495,7 +1495,7 @@ typedef enum

#define BINAURAL_COHERENCE_DIFFERENCE_BINS      9                           /* Number of bins for direction-dependent diffuse-field binaural coherence */

#ifndef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
#ifndef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
typedef enum 
{
    BINAURAL_INPUT_AUDIO_CONFIG_INVALID,
+1 −1
Original line number Diff line number Diff line
@@ -5136,7 +5136,7 @@ void ivas_init_binaural_hrtf(

ivas_error ivas_allocate_binaural_hrtf(
    HRTFS_FASTCONV *HrtfFastConv,                               /* i/o: FASTCONV HRTF structure                         */
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY
#ifdef FIX_1226_FASTCONV_HRTF_LOADING_OPTIM
    const int16_t n_channels,                                   /* i : number of input channels                         */
#else
    const AUDIO_CONFIG input_config,                            /* i  : input audio configuration                       */
+1 −2
Original line number Diff line number Diff line
@@ -162,8 +162,7 @@
#define TMP_FIX_1119_SPLIT_RENDERING_VOIP               /* FhG: Add error check for unsupported config: split rendering with VoIP mode */
#define FIX_1209_SID_SIGNALING                          /* VA: issue 1209: remove dead code in IVAS SID signaling */
#define FIX_1226_FASTCONV_HRTF_LOADING_OPTIM            /* VA: issue 1226: for FastConv binaural renderer in decoder, load only HTRT coefficient set that is needed */
#define FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_2          /* removal of multiplied code */
#define FIX_1226_FASTCONV_HRTF_LOADING_OPTIM_SIMPLIFY


/* #################### End BE switches ################################## */

Loading