Commit dc3e9c7d authored by vaclav's avatar vaclav
Browse files

clang-format + revert undesirable changes in common_api_types.h

parent 63436a34
Loading
Loading
Loading
Loading
Loading
+95 −81
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#define IVAS_MAX_FRAME_SIZE     ( 48000 / IVAS_NUM_FRAMES_PER_SEC )

#define IVAS_MAX_BITS_PER_FRAME ( 512000 / IVAS_NUM_FRAMES_PER_SEC )

#define IVAS_MAX_NUM_OBJECTS        4
#define IVAS_MAX_INPUT_CHANNELS     16
#define IVAS_MAX_OUTPUT_CHANNELS    16
@@ -55,15 +56,9 @@
#define IVAS_CLDFB_NO_CHANNELS_MAX  60
#define IVAS_MAX_INPUT_LFE_CHANNELS 4


#define IVAS_MAX_PARAM_SPATIAL_SUBFRAMES 4

#define IVAS_ROOM_ABS_COEFF 6
#ifdef SPLIT_REND_WITH_HEAD_ROT
#define IVAS_MAX_SPLIT_REND_BITRATE                   768000
#define IVAS_MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES ( ( ( (int32_t) IVAS_MAX_SPLIT_REND_BITRATE / IVAS_NUM_FRAMES_PER_SEC ) + 7 ) >> 3 )
#define IVAS_SPLIT_REND_ADDITIONAL_BYTES_TO_READ      1
#endif

/*----------------------------------------------------------------------------------*
 * Common API enum for output audio configurations
@@ -101,7 +96,7 @@ typedef enum _IVAS_AUDIO_CONFIG


/*----------------------------------------------------------------------------------*
 * Common API structures
 * Common API structures and enums
 *----------------------------------------------------------------------------------*/

typedef enum _IVAS_ENC_FEC_INDICATOR
@@ -109,6 +104,7 @@ typedef enum _IVAS_ENC_FEC_INDICATOR
    IVAS_ENC_FEC_LO,
    IVAS_ENC_FEC_HI,
    IVAS_ENC_FEC_UNDEFINED = 0xffff

} IVAS_ENC_FEC_INDICATOR;

typedef struct _IVAS_ENC_CHANNEL_AWARE_CONFIG
@@ -116,6 +112,7 @@ typedef struct _IVAS_ENC_CHANNEL_AWARE_CONFIG
    int16_t channelAwareModeEnabled;
    IVAS_ENC_FEC_INDICATOR fec_indicator;
    int16_t fec_offset;

} IVAS_ENC_CHANNEL_AWARE_CONFIG;

typedef struct _IVAS_ISM_METADATA
@@ -128,6 +125,7 @@ typedef struct _IVAS_ISM_METADATA
    float yaw;
    float pitch;
    int16_t non_diegetic_flag;

} IVAS_ISM_METADATA;

typedef struct
@@ -136,7 +134,69 @@ typedef struct

} IVAS_QUATERNION;

typedef struct
{
    float x, y, z;

} IVAS_VECTOR3;

typedef enum
{
    IVAS_HEAD_ORIENT_TRK_NONE,
    IVAS_HEAD_ORIENT_TRK_REF,
    IVAS_HEAD_ORIENT_TRK_AVG,
    IVAS_HEAD_ORIENT_TRK_REF_VEC,
    IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV

} IVAS_HEAD_ORIENT_TRK_T;

typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE;
typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE;

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;
typedef struct cldfb_filter_bank_struct *IVAS_CLDFB_FILTER_BANK_HANDLE;

typedef struct ivas_LS_setup_custom *IVAS_LSSETUP_CUSTOM_HANDLE;
typedef struct ivas_LS_setup_custom IVAS_LSSETUP_CUSTOM_STRUCT;

typedef struct _IVAS_LS_CUSTOM_LAYOUT
{
    int16_t num_spk;
    float azimuth[IVAS_MAX_OUTPUT_CHANNELS];
    float elevation[IVAS_MAX_OUTPUT_CHANNELS];
    int16_t num_lfe;
    int16_t lfe_idx[IVAS_MAX_OUTPUT_CHANNELS];

} IVAS_CUSTOM_LS_DATA;

typedef struct _IVAS_JBM_TRACE_DATA
{
    uint32_t systemTimestamp_ms;
    uint16_t extBufferedSamples;
    uint16_t lastDecodedWasActive;
    int32_t output_Fs;
    int16_t dataUnit_flag;
    uint16_t sequenceNumber;
    uint32_t timeStamp;
    uint32_t rcvTime;

    int16_t partial_frame;
    int16_t partialCopyOffset;

} IVAS_JBM_TRACE_DATA;


#ifdef SPLIT_REND_WITH_HEAD_ROT
/*----------------------------------------------------------------------------------*
 * Split rendering API constants, structures, and enums
 *----------------------------------------------------------------------------------*/

#define IVAS_MAX_SPLIT_REND_BITRATE                   768000
#define IVAS_MAX_SPLIT_REND_BITS_BUFFER_SIZE_IN_BYTES ( ( ( (int32_t) IVAS_MAX_SPLIT_REND_BITRATE / IVAS_NUM_FRAMES_PER_SEC ) + 7 ) >> 3 )

typedef enum
{
    DEFAULT_AXIS,
@@ -146,12 +206,14 @@ typedef enum
    YAW_PITCH,
    YAW_ROLL,
    PITCH_ROLL

} IVAS_SPLIT_REND_ROT_AXIS;

typedef enum
{
    IVAS_SPLIT_REND_POSE_CORRECTION_MODE_NONE,
    IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB,

} IVAS_SPLIT_REND_POSE_CORRECTION_MODE;

typedef enum
@@ -160,6 +222,7 @@ typedef enum
    IVAS_SPLIT_REND_CODEC_LC3PLUS,
    IVAS_SPLIT_REND_CODEC_DEFAULT, /* Will use LCLD for CLDFB rendering paths and LC3plus for TD rendering paths */
    IVAS_SPLIT_REND_CODEC_NONE

} IVAS_SPLIT_REND_CODEC;

typedef enum
@@ -169,6 +232,7 @@ typedef enum
    IVAS_SPLIT_REND_RENDERER_SELECTION_PARAMBIN,
    IVAS_SPLIT_REND_RENDERER_SELECTION_TDREND,
    IVAS_SPLIT_REND_RENDERER_SELECTION_DEFAULT,

} IVAS_SPLIT_REND_RENDERER_SELECTION;

typedef struct _IVAS_SPLIT_REND_BITS_DATA
@@ -180,33 +244,32 @@ typedef struct _IVAS_SPLIT_REND_BITS_DATA
    int16_t codec_frame_size_ms;
    IVAS_SPLIT_REND_CODEC codec;
    IVAS_SPLIT_REND_POSE_CORRECTION_MODE pose_correction;
} IVAS_SPLIT_REND_BITS_DATA, *IVAS_SPLIT_REND_BITS_HANDLE;
#endif

typedef struct
{
    float x, y, z;
} IVAS_VECTOR3;
} IVAS_SPLIT_REND_BITS_DATA, *IVAS_SPLIT_REND_BITS_HANDLE;

typedef enum
typedef struct _IVAS_SPLIT_REND_CONFIG
{
    IVAS_HEAD_ORIENT_TRK_NONE,
    IVAS_HEAD_ORIENT_TRK_REF,
    IVAS_HEAD_ORIENT_TRK_AVG,
    IVAS_HEAD_ORIENT_TRK_REF_VEC,
    IVAS_HEAD_ORIENT_TRK_REF_VEC_LEV

} IVAS_HEAD_ORIENT_TRK_T;

typedef struct ivas_masa_metadata_frame_struct *IVAS_MASA_METADATA_HANDLE;
typedef struct ivas_masa_decoder_ext_out_meta_struct *IVAS_MASA_DECODER_EXT_OUT_META_HANDLE;
    int32_t splitRendBitRate;    /*Bit rate for split rendering mode, if "pcm_out" is set then "splitRendBitRate" is used as a limit for MD bitrate */
    int16_t hq_mode;             /*High quality 3DOF mode with additional side information. Requires more pre-renditions. */
    int16_t dof;                 /*flag to specify if pose correction is needed for 1, 2 or 3 degree of freedoms*/
                                 /*The axis can be set dynamically per frame based on a file input */
                                 /*possible values:
                                 1 - (1dof correction. By default YAW correction)
                                 2 - (2dof correction. By default YAW and PITCH correction)
                                 3 - (3dof correction. By default YAW, PITCH and ROLL correction)
                                 */
    int16_t codec_delay_ms;      /*PLACEHOLDER (currently being ignored) : look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/
    int16_t codec_frame_size_ms; /*Codec frame size in milliseconds, only relevant with LC3plus */
    IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode;
    IVAS_SPLIT_REND_CODEC codec;
    IVAS_SPLIT_REND_RENDERER_SELECTION rendererSelection;

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;
} IVAS_SPLIT_REND_CONFIG_DATA;
#endif

typedef struct cldfb_filter_bank_struct *IVAS_CLDFB_FILTER_BANK_HANDLE;
/*----------------------------------------------------------------------------------*
 * Renderer API structures and enums
 *----------------------------------------------------------------------------------*/

#ifdef DEBUGGING
typedef enum
@@ -214,6 +277,7 @@ typedef enum
    IVAS_RENDER_TYPE_OVERRIDE_NONE,
    IVAS_RENDER_TYPE_OVERRIDE_CREND,
    IVAS_RENDER_TYPE_OVERRIDE_FASTCONV

} IVAS_RENDER_TYPE_OVERRIDE;
#endif

@@ -236,27 +300,6 @@ typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG

} IVAS_ROOM_ACOUSTICS_CONFIG_DATA;

#ifdef SPLIT_REND_WITH_HEAD_ROT

typedef struct _IVAS_SPLIT_REND_CONFIG
{
    int32_t splitRendBitRate;    /*Bit rate for split rendering mode, if "pcm_out" is set then "splitRendBitRate" is used as a limit for MD bitrate */
    int16_t hq_mode;             /*High quality 3DOF mode with additional side information. Requires more pre-renditions. */
    int16_t dof;                 /*flag to specify if pose correction is needed for 1, 2 or 3 degree of freedoms*/
                                 /*The axis can be set dynamically per frame based on a file input */
                                 /*possible values:
                                 1 - (1dof correction. By default YAW correction)
                                 2 - (2dof correction. By default YAW and PITCH correction)
                                 3 - (3dof correction. By default YAW, PITCH and ROLL correction)
                                 */
    int16_t codec_delay_ms;      /*PLACEHOLDER (currently being ignored) : look ahead delay of the codec that is used to code BIN signal output of pre-renderer*/
    int16_t codec_frame_size_ms; /*Codec frame size in milliseconds, only relevant with LC3plus */
    IVAS_SPLIT_REND_POSE_CORRECTION_MODE poseCorrectionMode;
    IVAS_SPLIT_REND_CODEC codec;
    IVAS_SPLIT_REND_RENDERER_SELECTION rendererSelection;
} IVAS_SPLIT_REND_CONFIG_DATA;
#endif

typedef struct _IVAS_RENDER_CONFIG
{
#ifdef DEBUGGING
@@ -267,36 +310,7 @@ typedef struct _IVAS_RENDER_CONFIG
    IVAS_SPLIT_REND_CONFIG_DATA split_rend_config;
#endif
    float directivity[IVAS_MAX_NUM_OBJECTS * 3];
} IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE;

typedef struct _IVAS_LS_CUSTOM_LAYOUT
{
    int16_t num_spk;
    float azimuth[IVAS_MAX_OUTPUT_CHANNELS];
    float elevation[IVAS_MAX_OUTPUT_CHANNELS];
    int16_t num_lfe;
    int16_t lfe_idx[IVAS_MAX_OUTPUT_CHANNELS];

} IVAS_CUSTOM_LS_DATA;

typedef struct ivas_LS_setup_custom *IVAS_LSSETUP_CUSTOM_HANDLE;
typedef struct ivas_LS_setup_custom IVAS_LSSETUP_CUSTOM_STRUCT;


typedef struct _IVAS_JBM_TRACE_DATA
{
    uint32_t systemTimestamp_ms;
    uint16_t extBufferedSamples;
    uint16_t lastDecodedWasActive;
    int32_t output_Fs;
    int16_t dataUnit_flag;
    uint16_t sequenceNumber;
    uint32_t timeStamp;
    uint32_t rcvTime;

    int16_t partial_frame;
    int16_t partialCopyOffset;

} IVAS_JBM_TRACE_DATA;
} IVAS_RENDER_CONFIG_DATA, *IVAS_RENDER_CONFIG_HANDLE;

#endif /* COMMON_API_TYPES_H */
+1 −1

File changed.

Contains only whitespace changes.