Commit bfc7f521 authored by vaclav's avatar vaclav
Browse files

reimplement FIX_197_CREND_INTERFACE_LIB_REND_H

parent a26e683c
Loading
Loading
Loading
Loading
Loading
+8 −61
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@
#define IVAS_CLDFB_NO_CHANNELS_MAX  ( 60 )
#define IVAS_MAX_INPUT_LFE_CHANNELS 4

#define RENDERER_HEAD_POSITIONS_PER_FRAME 4 // todo  (Marc) -> renanr IVAS_RENDERER_HEAD_POSITIONS_PER_FRAME ?
#define RENDERER_HEAD_POSITIONS_PER_FRAME 4


/*----------------------------------------------------------------------------------*
@@ -89,12 +89,11 @@ typedef struct
typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE;
typedef struct ivas_masa_qmetadata_frame_struct *IVAS_MASA_QMETADATA_HANDLE;

typedef float IVAS_REND_LfePanMtx[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS];
//typedef float IVAS_REND_LfePanMtx[IVAS_MAX_INPUT_LFE_CHANNELS][IVAS_MAX_OUTPUT_CHANNELS];

typedef struct TDREND_HRFILT_FiltSet_struct *IVAS_DEC_HRTF_HANDLE;
typedef struct ivas_hrtfs_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE;
typedef struct ivas_hrtfs_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE;

typedef struct ivas_hrtfs_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE;

#ifdef DEBUGGING
@@ -106,6 +105,12 @@ typedef enum
} IVAS_RENDER_TYPE_OVERRIDE;
#endif

typedef struct
{
    float azimuth;
    float elevation;
} IVAS_REND_AudioObjectPosition;

typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG
{
    int16_t override;
@@ -157,62 +162,4 @@ typedef struct _IVAS_JBM_TRACE_DATA

} IVAS_JBM_TRACE_DATA;


typedef enum
{
    IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED = 0,
    IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS,
    IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED,
    IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL,
    IVAS_REND_AUDIO_CONFIG_TYPE_MASA,
    IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN,
} IVAS_REND_AudioConfigType;

/* TODO(sgi): Harmonize with AUDIO_CONFIG */
/*
    Note: numerical values carry specific information here.

    MSB                                                                            LSB
    --------------------------------------------------------------------------------
    ... unused (assumed all 0) ... | config type (1 byte) | config variant (1 byte) |
    --------------------------------------------------------------------------------

    Where "config type" is the general type from the following list:
        - unknown
        - channel-based
        - ambisonics
        - object-based
        - binaural
        - MASA

    Config variants are concrete configs of each type.
 */
typedef enum
{
    IVAS_REND_AUDIO_CONFIG_MONO = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 0,
    IVAS_REND_AUDIO_CONFIG_STEREO = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 1,
    IVAS_REND_AUDIO_CONFIG_5_1 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 2,
    IVAS_REND_AUDIO_CONFIG_7_1 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 3,
    IVAS_REND_AUDIO_CONFIG_5_1_2 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 4,
    IVAS_REND_AUDIO_CONFIG_5_1_4 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 5,
    IVAS_REND_AUDIO_CONFIG_7_1_4 = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 6,
    IVAS_REND_AUDIO_CONFIG_LS_CUSTOM = IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED << 8 | 255,

    IVAS_REND_AUDIO_CONFIG_FOA = IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS << 8 | 0,
    IVAS_REND_AUDIO_CONFIG_HOA2 = IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS << 8 | 1,
    IVAS_REND_AUDIO_CONFIG_HOA3 = IVAS_REND_AUDIO_CONFIG_TYPE_AMBISONICS << 8 | 2,

    IVAS_REND_AUDIO_CONFIG_OBJECT = IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED << 8 | 0,

    IVAS_REND_AUDIO_CONFIG_BINAURAL = IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL << 8 | 0,
    IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM = IVAS_REND_AUDIO_CONFIG_TYPE_BINAURAL << 8 | 1,

    IVAS_REND_AUDIO_CONFIG_MASA1 = IVAS_REND_AUDIO_CONFIG_TYPE_MASA << 8 | 0,
    IVAS_REND_AUDIO_CONFIG_MASA2 = IVAS_REND_AUDIO_CONFIG_TYPE_MASA << 8 | 1,

    IVAS_REND_AUDIO_CONFIG_UNKNOWN = IVAS_REND_AUDIO_CONFIG_TYPE_UNKNOWN << 8 | 0,
} IVAS_REND_AudioConfig;

typedef uint16_t IVAS_REND_InputId;

#endif /* COMMON_API_TYPES_H */
+0 −21
Original line number Diff line number Diff line
@@ -40,20 +40,10 @@
#include "stat_enc.h"
#include "stat_dec.h"
#include "stat_com.h"
#ifndef FIX_197_CREND_INTERFACE_LIB_REND_H
#ifdef FIX_197_CREND_INTERFACE
#include "ivas_stat_rend.h" // VE!!!!!
#endif
#endif
#include "ivas_stat_enc.h"
#include "ivas_stat_dec.h"
#include "ivas_stat_com.h"
#include "ivas_error_utils.h"
#ifdef FIX_197_CREND_INTERFACE
#ifndef FIX_197_CREND_INTERFACE_LIB_REND_H
#include "lib_rend.h"
#endif
#endif

/* clang-format off */

@@ -4509,17 +4499,6 @@ void ivas_spar_param_to_masa_param_mapping(
);


/*----------------------------------------------------------------------------------*
 * output setup prototypes
 *----------------------------------------------------------------------------------*/


// note: will be removed with !421
IVAS_REND_AudioConfig getRendAudioConfigFromIvasAudioConfig(
    AUDIO_CONFIG config 
);  


/*---------------------------------------------------------------------------------*
 * Binaural FastConv Renderer Prototypes
*-----------------------------------------------------------------------------------*/
+1 −2
Original line number Diff line number Diff line
@@ -160,7 +160,6 @@

#define DFT_STEREO_SPAR_MIXING
#ifdef DFT_STEREO_SPAR_MIXING 
#define FIX_345_MSAN_ERROR                           /* FhG. Fix memory sanitizer error in PLC modes */
/*#define DFT_STEREO_SPAR_MIXING_DEBUG*/             /* more debugging output for DFT_STEREO_SPAR_MIXING_DEBUG */
#define DISABLE_RES_CHANNELS_MCT                     /* decode only W and residual for Y when outputting to stereo */
#endif
+0 −1
Original line number Diff line number Diff line
@@ -434,7 +434,6 @@ ivas_error ivas_dec(
#else
                                                       getRendAudioConfigFromIvasAudioConfig( st_ivas->intern_config ),
                                                       getRendAudioConfigFromIvasAudioConfig( st_ivas->hOutSetup.output_config ),

#endif
                                                       st_ivas->hDecoderConfig,
                                                       st_ivas->hHeadTrackData,
+0 −43
Original line number Diff line number Diff line
@@ -403,46 +403,3 @@ void ivas_renderer_select(

    return;
}


/*-------------------------------------------------------------------*
 * getRendAudioConfigFromIvasAudioConfig()
 *
 *
 *-------------------------------------------------------------------*/

IVAS_REND_AudioConfig getRendAudioConfigFromIvasAudioConfig(
    const AUDIO_CONFIG config )
{
    switch ( config )
    {
        case AUDIO_CONFIG_MONO:
            return IVAS_REND_AUDIO_CONFIG_MONO;
        case AUDIO_CONFIG_STEREO:
            return IVAS_REND_AUDIO_CONFIG_STEREO;
        case AUDIO_CONFIG_BINAURAL:
            return IVAS_REND_AUDIO_CONFIG_BINAURAL;
        case AUDIO_CONFIG_BINAURAL_ROOM:
            return IVAS_REND_AUDIO_CONFIG_BINAURAL_ROOM;
        case AUDIO_CONFIG_5_1:
            return IVAS_REND_AUDIO_CONFIG_5_1;
        case AUDIO_CONFIG_7_1:
            return IVAS_REND_AUDIO_CONFIG_7_1;
        case AUDIO_CONFIG_5_1_2:
            return IVAS_REND_AUDIO_CONFIG_5_1_2;
        case AUDIO_CONFIG_5_1_4:
            return IVAS_REND_AUDIO_CONFIG_5_1_4;
        case AUDIO_CONFIG_7_1_4:
            return IVAS_REND_AUDIO_CONFIG_7_1_4;
        case AUDIO_CONFIG_FOA:
            return IVAS_REND_AUDIO_CONFIG_FOA;
        case AUDIO_CONFIG_HOA2:
            return IVAS_REND_AUDIO_CONFIG_HOA2;
        case AUDIO_CONFIG_HOA3:
            return IVAS_REND_AUDIO_CONFIG_HOA3;
        default:
            break;
    }

    return IVAS_REND_AUDIO_CONFIG_UNKNOWN;
}
Loading