From 37b0b691d6cc3b081c9f288090ea8dfbd14bdab8 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 1 Dec 2025 13:52:08 +0100 Subject: [PATCH 1/7] remove lib_util include from the codec library --- Workspace_msvc/lib_dec.vcxproj | 4 +- apps/encoder.c | 8 +- apps/encoder_fmtsw.c | 8 +- lib_com/common_api_types.h | 475 ++++++++++++++++++++++++++++++++- lib_dec/lib_dec.c | 3 +- lib_dec/lib_dec.h | 4 +- lib_util/ivas_rtp_file.c | 12 +- lib_util/ivas_rtp_file.h | 6 +- lib_util/ivas_rtp_payload.c | 4 +- lib_util/ivas_rtp_pi_data.c | 2 +- lib_util/ivas_rtp_pi_data.h | 435 ------------------------------ 11 files changed, 488 insertions(+), 473 deletions(-) diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj index 5f60decb08..3c7ea3e597 100644 --- a/Workspace_msvc/lib_dec.vcxproj +++ b/Workspace_msvc/lib_dec.vcxproj @@ -68,7 +68,7 @@ Disabled - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) EnableFastChecks @@ -109,7 +109,7 @@ Neither false false - ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories) + ..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories) _CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions) true diff --git a/apps/encoder.c b/apps/encoder.c index dc051562c9..38fbbba443 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -834,10 +834,10 @@ int main( /* scene orientation */ if ( sceneOrientationFileReader ) { - PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; + IVAS_PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *scene = &piDataTs->data.scene; - memset( piDataTs, 0, sizeof( PIDATA_TS ) ); + memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); scene->size = sizeof( IVAS_PIDATA_ORIENTATION ); scene->piDataType = IVAS_PI_SCENE_ORIENTATION; @@ -851,10 +851,10 @@ int main( /* device orientation */ if ( deviceOrientationFileReader ) { - PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; + IVAS_PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *device = &piDataTs->data.deviceUnCompensated; - memset( piDataTs, 0, sizeof( PIDATA_TS ) ); + memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); device->size = sizeof( IVAS_PIDATA_ORIENTATION ); device->piDataType = IVAS_PI_DEVICE_ORIENTATION_COMPENSATED; diff --git a/apps/encoder_fmtsw.c b/apps/encoder_fmtsw.c index 0b7cf0271d..ccb3b7be3d 100644 --- a/apps/encoder_fmtsw.c +++ b/apps/encoder_fmtsw.c @@ -941,10 +941,10 @@ int encoder_main( /* scene orientation */ if ( sceneOrientationFileReader ) { - PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; + IVAS_PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *scene = &piDataTs->data.scene; - memset( piDataTs, 0, sizeof( PIDATA_TS ) ); + memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); scene->size = sizeof( IVAS_PIDATA_ORIENTATION ); scene->piDataType = IVAS_PI_SCENE_ORIENTATION; @@ -958,10 +958,10 @@ int encoder_main( /* device orientation */ if ( deviceOrientationFileReader ) { - PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; + IVAS_PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *device = &piDataTs->data.deviceUnCompensated; - memset( piDataTs, 0, sizeof( PIDATA_TS ) ); + memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); device->size = sizeof( IVAS_PIDATA_ORIENTATION ); device->piDataType = IVAS_PI_DEVICE_ORIENTATION_COMPENSATED; diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index ad74f9136c..7d100ed58d 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -38,6 +38,7 @@ #include "options.h" #include #include +#include #include "ivas_error.h" /*----------------------------------------------------------------------------------* @@ -190,6 +191,7 @@ typedef struct ivas_hrtf_crend_structure *IVAS_DEC_HRTF_CREND_HANDLE; typedef struct ivas_hrtf_fastconv_struct *IVAS_DEC_HRTF_FASTCONV_HANDLE; typedef struct ivas_hrtf_parambin_struct *IVAS_DEC_HRTF_PARAMBIN_HANDLE; typedef struct ivas_hrtf_statistics_struct *IVAS_DEC_HRTF_STATISTICS_HANDLE; + typedef struct ivas_cldfb_filter_bank_struct *IVAS_CLDFB_FILTER_BANK_HANDLE; typedef struct ivas_LS_setup_custom *IVAS_LSSETUP_CUSTOM_HANDLE; @@ -232,6 +234,7 @@ typedef enum _ivas_binaural_renderer_type } IVAS_BIN_RENDERER_TYPE; + /*----------------------------------------------------------------------------------* * Split rendering API constants, structures, and enums *----------------------------------------------------------------------------------*/ @@ -269,7 +272,6 @@ typedef enum } ISAR_SPLIT_REND_CODEC; - typedef struct _ISAR_SPLIT_REND_BITS_DATA { uint8_t *bits_buf; @@ -305,20 +307,11 @@ typedef struct _ISAR_SPLIT_REND_CONFIG } ISAR_SPLIT_REND_CONFIG_DATA, *ISAR_SPLIT_REND_CONFIG_HANDLE; + /*----------------------------------------------------------------------------------* * Renderer API structures and enums *----------------------------------------------------------------------------------*/ -#ifdef DEBUGGING -typedef enum -{ - IVAS_RENDER_TYPE_OVERRIDE_NONE, - IVAS_RENDER_TYPE_OVERRIDE_CREND, - IVAS_RENDER_TYPE_OVERRIDE_FASTCONV - -} IVAS_RENDER_TYPE_OVERRIDE; - -#endif typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG { uint16_t aeID; /* Acoustic environment ID*/ @@ -362,4 +355,464 @@ typedef struct } IVAS_REND_AudioBuffer; + +/*----------------------------------------------------------------------------------* + * RTP API structures and enums + *----------------------------------------------------------------------------------*/ + +/* IVAS PI Data Types */ +typedef enum +{ + /* Forward direction PI types */ + IVAS_PI_SCENE_ORIENTATION, /* orientation of audio scene in unit quaternions */ + IVAS_PI_DEVICE_ORIENTATION_COMPENSATED, /* orientation of device in unit quaternions (compensated) */ + IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED, /* orientation of device in unit quaternions (un-compensated) */ + IVAS_PI_ACOUSTIC_ENVIRONMENT, /* describe the acoustic environment */ + IVAS_PI_AUDIO_DESCRIPTION, /* audio content description (voice/music/ambiance) */ + IVAS_PI_ISM_NUM, /* Number of objects */ + IVAS_PI_ISM_ID, /* id of each object */ + IVAS_PI_ISM_GAIN, /* gain of each object */ + IVAS_PI_ISM_ORIENTATION, /* orientation of each object */ + IVAS_PI_ISM_POSITION, /* position of each object */ + IVAS_PI_ISM_POSITION_COMPACT, /* position of each object in compact representation */ + IVAS_PI_ISM_DISTANCE_ATTENUATION, /* distance attenuation for each object */ + IVAS_PI_ISM_DIRECTIVITY, /* directivity of each object */ + IVAS_PI_DIEGETIC_TYPE, /* digetic audio indication */ + IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_INDICATION, /* audio suppression indication */ + IVAS_PI_AUDIO_FOCUS_INDICATION, /* audio focus indication (direction in Quaternions and/or level) */ + + /* Reverse direction PI types */ + IVAS_PI_PLAYBACK_DEVICE_ORIENTATION, /* orientation of the playback device in quaternions */ + IVAS_PI_HEAD_ORIENTATION, /* head orientation of the listener in Quaternions */ + IVAS_PI_LISTENER_POSITION, /* position of the listener in 3D space */ + IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_REQUEST, /* receiver’s preference with respect to audio suppression */ + IVAS_PI_AUDIO_FOCUS_REQUEST, /* direction of interest for the listener in Quaternions and/or audio focus level */ + IVAS_PI_PI_LATENCY, /* round-trip latency for PI frames */ + IVAS_PI_R_ISM_ID, /* id of an object for editing */ + IVAS_PI_R_ISM_GAIN, /* editing request for gain factor for received object */ + IVAS_PI_R_ISM_ORIENTATION, /* editing request for orientation for received object */ + IVAS_PI_R_ISM_POSITION, /* editing request for position for received object */ + IVAS_PI_R_ISM_POSITION_COMPACT, /* editing request for position for received object in a compact representation*/ + IVAS_PI_R_ISM_DIRECTION, /* editing request for direction for received object */ + IVAS_PI_RESERVED27, /* reserved */ + IVAS_PI_RESERVED28, /* reserved */ + IVAS_PI_RESERVED29, /* reserved */ + IVAS_PI_NO_DATA = 31, /* Indicates an empty PI data frame */ + IVAS_PI_MAX_ID /* Max number of PI data IDs supprted */ + +} IVAS_PI_TYPE; + +/* orientation data corresponding to any of the following pi data types :- + * - IVAS_PI_SCENE_ORIENTATION + * - IVAS_PI_DEVICE_ORIENTATION_COMPENSATED + * - IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED + * - IVAS_PI_PLAYBACK_DEVICE_ORIENTATION + * - IVAS_PI_HEAD_ORIENTATION + * - IVAS_PI_R_ISM_ORIENTATION + * + * piDataType is used to identify the correct pi data type contained here + */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_SCENE_ORIENTATION) */ + uint32_t piDataType; /* one of supported orientation data types */ + IVAS_QUATERNION orientation; /* orientation data expressed as quartenions */ + +} IVAS_PIDATA_ORIENTATION; + +/* Acoustic environment corresponding to IVAS_PI_ACOUSTIC_ENVIRONMENT + * + * acoustic environment ID + * late reverb parameters + * - RT60 – indicating the time that it takes for the reflections to reduce 60 dB in energy level, per frequency band + * - DSR – diffuse to source signal energy ratio, per frequency band + * - Pre-delay – delay at which the computation of DSR values was performed + * early reflections + * - 3D rectangular virtual room dimensions + * - Broadband energy absorption coefficient per wall surface + */ +typedef enum +{ + IVAS_PI_AE_LOW, /* center frequency 25 Hz */ + IVAS_PI_AE_MID, /* center frequency 250 Hz */ + IVAS_PI_AE_HIGH, /* center frequency 2.5 kHz */ + IVAS_PI_AE_NUM_BANDS /* number of ae bands */ + +} IVAS_PI_AE_BANDS; + +typedef enum +{ + IVAS_PI_AE_LOW_FREQ = 25, + IVAS_PI_AE_MID_FREQ = 250, + IVAS_PI_AE_HIGH_FREQ = 2500 + +} IVAS_PI_AE_BANDS_FREQ; + +typedef enum +{ + IVAS_PI_AE_FRONT, + IVAS_PI_AE_BACK, + IVAS_PI_AE_LEFT, + IVAS_PI_AE_RIGHT, + IVAS_PI_AE_CEILING, + IVAS_PI_AE_FLOOR, + IVAS_PI_AE_NUM_SURFACE + +} IVAS_PI_AE_SURFACE; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ACOUSTIC_ENV) */ + uint32_t piDataType; /* IVAS_PI_ACOUSTIC_ENVIRONMENT */ + bool availLateReverb; /* AE contains only late reverb parameters */ + bool availEarlyReflections; /* AE containing late reverb and simplified early reflections */ + uint8_t aeid; /* seven-bit acoustic environment identifier */ + + /* only valid if availLateReverb==true or availEarlyReflections==true */ + float rt60[IVAS_PI_AE_NUM_BANDS]; /* time for the reflections to reduce 60 dB per band in seconds */ + float dsr[IVAS_PI_AE_NUM_BANDS]; /* diffuse to source signal energy ratio per band in dB */ + + /* only valid if availEarlyReflections==true */ + IVAS_VECTOR3 roomDimensions; /* room dimensions in meters length (x), width (y), height (z) */ + float absorbCoeffs[IVAS_PI_AE_NUM_SURFACE]; /* absorption coefficients for all surfaces */ + +} IVAS_PIDATA_ACOUSTIC_ENV; + +/* Audio Description corresponding to IVAS_PI_AUDIO_DESCRIPTION + * Describe the following audio decriptors per object/type :- + * - audio content type is speech/music/ambiance + * - if audio rendering is editable + * - if stereo audio is binaural + * + * number of valid entries decide on basis of audio format:- + * - Stereo/SBA/MASA = 1 entry + * - MultiChannel = 2 entries (1 for center channel + 1 for all other channels) + * - ISM = Number of Object entries ( 1 per object ) + * - OMASA/OSBA = 1 + Num Discrete Coded Objects + * + */ +typedef struct +{ + bool speech; /* audio has voice/speech */ + bool music; /* audio has music */ + bool ambiance; /* audio has background ambiance */ + bool editable; /* rendering audio metadata is editable */ + bool binaural; /* stereo stream is binaural */ + +} IVAS_AUDIO_ID; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_AUDIO_DESC) */ + uint32_t piDataType; /* IVAS_PI_AUDIO_DESCRIPTION */ + uint32_t nValidEntries; /* Number of valid audio IDs */ + IVAS_AUDIO_ID audioId[1 + IVAS_MAX_NUM_OBJECTS]; /* audio id as per format */ + +} IVAS_PIDATA_AUDIO_DESC; + +/* ISM specific PI data related to PI types : - + * + * - IVAS_PI_ISM_NUM + * - IVAS_PI_ISM_ID + * - IVAS_PI_ISM_GAIN + * - IVAS_PI_ISM_ORIENTATION + * - IVAS_PI_ISM_POSITION + * - IVAS_PI_ISM_DISTANCE_ATTENUATION + * - IVAS_PI_ISM_DIRECTIVITY + */ + +/* Number of ISMs */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_NUM) */ + uint32_t piDataType; /* IVAS_PI_ISM_NUM */ + uint32_t numObjects; /* Number of ISM */ + +} IVAS_PIDATA_ISM_NUM; + +/* ISM ID */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_ID) */ + uint32_t piDataType; /* IVAS_PI_ISM_ID */ + uint16_t numObjects; /* number of objects */ + uint8_t id[IVAS_MAX_NUM_OBJECTS]; /* 8-bit ISM id of object */ + +} IVAS_PIDATA_ISM_ID; + +/* ISM gain */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_GAIN) */ + uint32_t piDataType; /* IVAS_PI_ISM_GAIN */ + uint16_t numObjects; /* number of objects */ + int8_t dB[IVAS_MAX_NUM_OBJECTS]; /* ISM gain in dB per object [-96, +3] */ + +} IVAS_PIDATA_ISM_GAIN; + +/* ISM orientation */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_ORIENTATION) */ + uint32_t piDataType; /* IVAS_PI_ISM_ORIENTATION */ + uint16_t numObjects; /* number of objects */ + IVAS_QUATERNION orientation[IVAS_MAX_NUM_OBJECTS]; /* Orientation of audio objects in ISM(s) */ + +} IVAS_PIDATA_ISM_ORIENTATION; + +/* ISM position */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_POSITION) */ + uint32_t piDataType; /* IVAS_PI_ISM_POSITION */ + uint16_t numObjects; /* number of objects */ + IVAS_VECTOR3 position[IVAS_MAX_NUM_OBJECTS]; /* Position of audio objects in ISM(s) */ + +} IVAS_PIDATA_ISM_POSITION; + +/* ISM distance attenuation comprising of following gains per ISM + * - reference distance + * - maximum distance + * - roll-off factor + */ +typedef struct +{ + float ref_dist; /* reference distance in meters */ + float max_dist; /* maximum distance in meters */ + float roll; /* roll-off factor values */ + +} IVAS_DIST_ATTEN; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_ATTENUATION) */ + uint32_t piDataType; /* IVAS_PI_ISM_DISTANCE_ATTENUATION */ + uint16_t numObjects; /* number of objects */ + IVAS_DIST_ATTEN distAtten[IVAS_MAX_NUM_OBJECTS]; /* Distance attenuation of audio objects */ + +} IVAS_PIDATA_ISM_ATTENUATION; + +/* ISM Directivity comprising of following per ISM :- + * - inner cone angle determines the size of the main cone directed to the front of the object + * - outer cone angle determines the size of the outer (back) cone + * - outer attenuation gain determines the attenuation outside the outer cone + */ +typedef struct +{ + uint16_t innerConeAngle; /* inner cone angle in degrees (0 - 360) */ + uint16_t outerConeAngle; /* outer cone angle in degrees (0 - 360) */ + float outerAttenuationdB; /* attenuation outside the outer cone in dB */ + +} IVAS_ISM_DIRECTIVITY; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_DIRECTIVITY) */ + uint32_t piDataType; /* IVAS_PI_ISM_DIRECTIVITY */ + uint16_t numObjects; /* number of objects */ + IVAS_ISM_DIRECTIVITY directivity[IVAS_MAX_NUM_OBJECTS]; /* Directivity of audio objects */ +} IVAS_PIDATA_ISM_DIRECTIVITY; + +/* Diegetic and non-diegetic indication flag as per audio format + * + * number of valid entries decided on basis of audio format:- + * - Stereo/SBA/MASA/MultiChannel = 1 entry + * - ISM = Number of Object entries ( 1 per object ) + * - OMASA/OSBA = 1 (last) + Num Discrete Coded Objects + */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_DIEGETIC) */ + uint32_t piDataType; /* IVAS_PI_DIEGETIC_TYPE */ + bool isDiegetic[1 + IVAS_MAX_NUM_OBJECTS]; /* diegetic indication as per audio format */ + +} IVAS_PIDATA_DIEGETIC; + +/* Audio focus direction indicates a direction of interest. + * The audio focus level indicates the amount of suppression applied to the + * directions other than the audio focus direction. + */ +typedef enum +{ + IVAS_FLVL_NO_AUDIO_FOCUS = 0, /* Apply no audio focus */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_1, /* Audio focus level 1 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_2, /* Audio focus level 2 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_3, /* Audio focus level 3 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_4, /* Audio focus level 4 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_5, /* Audio focus level 5 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_6, /* Audio focus level 6 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_7, /* Audio focus level 7 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_8, /* Audio focus level 8 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_9, /* Audio focus level 9 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_10, /* Audio focus level 10 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_11, /* Audio focus level 11 */ + IVAS_FLVL_FOCUS_LEVEL_LEVEL_12, /* Audio focus level 12 */ + IVAS_FLVL_MAX_AUDIO_FOCUS, /* Apply max audio focus */ + IVAS_FLVL_DEFAULT_AUDIO_FOCUS, /* Default audio focus */ + IVAS_FLVL_NO_PREFERENCE, /* No preference / No indication */ + +} IVAS_FLVL; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_AUDIO_FOCUS) */ + uint32_t piDataType; /* IVAS_PI_AUDIO_FOCUS_INDCATION or IVAS_PI_AUDIO_FOCUS_REQUEST */ + bool availDirection; /* audio focus contains direction */ + bool availLevel; /* audio focus contains level */ + IVAS_QUATERNION direction; /* direction data expressed as quarternions */ + IVAS_FLVL flvl; /* audio focus level */ + +} IVAS_PIDATA_AUDIO_FOCUS; + +/* Position data corresponding to any of the following pi data types :- + * - IVAS_PI_LISTENER_POSITION + * - IVAS_PI_R_ISM_POSITION + * + * piDataType is used to identify the correct pi data type contained here + */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_POSITION) */ + uint32_t piDataType; /* one of supported position data types */ + IVAS_VECTOR3 position; /* Position data */ + +} IVAS_PIDATA_POSITION; + +/* Dynamic Audio Suppression describes receiver’s preference with respect to the + * type of audio content that should be enhanced and the amount of suppression to + * be applied to the background noise + */ +typedef enum +{ + IVAS_SLI_MIN_SUPPRESSION = 0, /* Apply min suppression */ + IVAS_SLI_SUPPRESSION_LEVEL_1, /* Suppression level 1 */ + IVAS_SLI_SUPPRESSION_LEVEL_2, /* Suppression level 2 */ + IVAS_SLI_SUPPRESSION_LEVEL_3, /* Suppression level 3 */ + IVAS_SLI_SUPPRESSION_LEVEL_4, /* Suppression level 4 */ + IVAS_SLI_SUPPRESSION_LEVEL_5, /* Suppression level 5 */ + IVAS_SLI_SUPPRESSION_LEVEL_6, /* Suppression level 6 */ + IVAS_SLI_SUPPRESSION_LEVEL_7, /* Suppression level 7 */ + IVAS_SLI_SUPPRESSION_LEVEL_8, /* Suppression level 8 */ + IVAS_SLI_SUPPRESSION_LEVEL_9, /* Suppression level 9 */ + IVAS_SLI_SUPPRESSION_LEVEL_10, /* Suppression level 10 */ + IVAS_SLI_SUPPRESSION_LEVEL_11, /* Suppression level 11 */ + IVAS_SLI_MAX_SUPPRESSION, /* Apply max suppression */ + IVAS_SLI_NO_SUPPRESSION, /* Apply no suppression */ + IVAS_SLI_DEFAULT_SUPPRESSION, /* Apply default suppression */ + IVAS_SLI_NO_PREFERENCE, /* No preference / No indication */ + +} IVAS_SLI; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_DYNAMIC_SUPPRESSION) */ + uint32_t piDataType; /* IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_REQUEST or IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_INDICATION */ + bool speech; /* receiver's preference is voice/speech */ + bool music; /* receiver's preference is music */ + bool ambiance; /* receiver's preference is background ambiance */ + IVAS_SLI sli; /* suppression level indicator [0, 15] */ + +} IVAS_PIDATA_DYNAMIC_SUPPRESSION; + +/* Reverse PI latency calculated as the elapsed time between the sent reverse PI data + * and received forward PI data. It is based on the receiving device experiencing the + * result of its sent data by receiving the corresponding data in forward direction as + * forward PI data + */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_REVERSE_PI_LATENCY) */ + uint32_t piDataType; /* IVAS_PI_PI_LATENCY */ + IVAS_PI_TYPE type; /* Reverse PI used for computation of Latency */ + int32_t latency; /* Latency as 27-bit int on RTP Clock @ 16KHz */ + +} IVAS_PIDATA_REVERSE_PI_LATENCY; + +/* ISM specific PI data editing requests */ + +/* ISM ID in editing requests */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_ID) */ + uint32_t piDataType; /* IVAS_PI_R_ISM_ID */ + uint8_t id; /* 8-bit ISM id of object to edit */ + +} IVAS_PIDATA_ISM_EDIT_ID; + +/* Editing request for ISM gain */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_GAIN) */ + uint32_t piDataType; /* IVAS_PI_R_ISM_GAIN */ + int8_t dB; /* Preferred ISM gain in dB [-96, +3] */ + +} IVAS_PIDATA_ISM_EDIT_GAIN; + +/* Editing request for ISM orientation */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_ORIENTATION) */ + uint32_t piDataType; /* IVAS_PI_R_ISM_ORIENTATION */ + IVAS_QUATERNION orientation; /* orientation editing request for received ISM */ + +} IVAS_PIDATA_ISM_EDIT_ORIENTATION; + +/* Editing request for ISM direction */ +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_DIRECTION) */ + uint32_t piDataType; /* IVAS_PI_R_ISM_DIRECTION */ + float azimuth; /* azimuth angle in degrees [-180, 180] */ + float elevation; /* elevation angle in degrees [-90°, 90°] */ + +} IVAS_PIDATA_ISM_EDIT_DIRECTION; + +typedef struct +{ + size_t size; /* sizeof(IVAS_PIDATA_NO_DATA) */ + uint32_t piDataType; /* IVAS_PI_NO_DATA */ + +} IVAS_PIDATA_NO_DATA; + +typedef union +{ + IVAS_PIDATA_ORIENTATION scene; + IVAS_PIDATA_ORIENTATION deviceCompensated; + IVAS_PIDATA_ORIENTATION deviceUnCompensated; + IVAS_PIDATA_ACOUSTIC_ENV acousticEnv; + IVAS_PIDATA_AUDIO_DESC audioDesc; + IVAS_PIDATA_ISM_NUM ismNum; + IVAS_PIDATA_ISM_ID ismId; + IVAS_PIDATA_ISM_GAIN ismGain; + IVAS_PIDATA_ISM_ORIENTATION ismOrientation; + IVAS_PIDATA_ISM_POSITION ismPosition; + IVAS_PIDATA_ISM_POSITION ismPositionCompact; + IVAS_PIDATA_ISM_ATTENUATION ismAttenuation; + IVAS_PIDATA_ISM_DIRECTIVITY ismDirectivity; + IVAS_PIDATA_DIEGETIC digeticIndicator; + IVAS_PIDATA_DYNAMIC_SUPPRESSION dynSuppressionIndication; + IVAS_PIDATA_AUDIO_FOCUS focusIndication; + IVAS_PIDATA_ORIENTATION playbackOrientation; + IVAS_PIDATA_ORIENTATION headOrientation; + IVAS_PIDATA_POSITION listnerPosition; + IVAS_PIDATA_DYNAMIC_SUPPRESSION dynSuppressionRequest; + IVAS_PIDATA_AUDIO_FOCUS focusRequest; + IVAS_PIDATA_REVERSE_PI_LATENCY piLatency; + IVAS_PIDATA_ISM_EDIT_ID ismEditId; + IVAS_PIDATA_ISM_EDIT_GAIN ismEditGain; + IVAS_PIDATA_ISM_EDIT_ORIENTATION ismEditOrientation; + IVAS_PIDATA_POSITION ismEditPosition; + IVAS_PIDATA_POSITION ismEditPositionCompact; + IVAS_PIDATA_ISM_EDIT_DIRECTION ismEditDirection; + IVAS_PIDATA_NO_DATA noPiData; + +} IVAS_PIDATA; + +typedef struct pidata_ts_struct +{ + IVAS_PIDATA data; + uint32_t timestamp; + +} IVAS_PIDATA_TS; + #endif /* COMMON_API_TYPES_H */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index b6b8efc3a5..b41d8ea014 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -41,7 +41,6 @@ #include "jbm_jb4sb.h" #include "jbm_pcmdsp_apa.h" #include "jbm_pcmdsp_fifo.h" -#include "ivas_rtp_pi_data.h" #include #include #ifdef DEBUGGING @@ -5720,7 +5719,7 @@ static void setDiegeticInputPI( ivas_error IVAS_DEC_FeedPiDataToDecoder( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - hPiDataTs piData, /* i : PI data received in rtp packet */ + IVAS_PIDATA_TS *piData, /* i : PI data received in rtp packet */ uint32_t numPiData /* i : number of PI data received in rtp packet */ ) { diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index f62087b9af..7f2ff51807 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -63,7 +63,6 @@ typedef enum _IVAS_DEC_COMPLEXITY_LEVEL IVAS_DEC_COMPLEXITY_LEVEL_THREE = 3 } IVAS_DEC_COMPLEXITY_LEVEL; - typedef enum _IVAS_DEC_PCM_TYPE { IVAS_DEC_PCM_INT16, @@ -86,7 +85,6 @@ typedef enum _IVAS_DEC_BS_FORMAT } IVAS_DEC_BS_FORMAT; typedef struct IVAS_DEC *IVAS_DEC_HANDLE; -typedef struct pidata_ts_struct *hPiDataTs; #ifdef SUPPORT_JBM_TRACEFILE /* Callback function for JBM tracefile writing */ @@ -539,7 +537,7 @@ ivas_error IVAS_DEC_GetJbmData( ivas_error IVAS_DEC_FeedPiDataToDecoder( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - hPiDataTs piData, /* i : PI data received in rtp packet */ + IVAS_PIDATA_TS *piData, /* i : PI data received in rtp packet */ uint32_t numPiData /* i : number of PI data received in rtp packet */ ); diff --git a/lib_util/ivas_rtp_file.c b/lib_util/ivas_rtp_file.c index 8c06948635..e2080e135d 100644 --- a/lib_util/ivas_rtp_file.c +++ b/lib_util/ivas_rtp_file.c @@ -152,7 +152,7 @@ static const char *const PiDataNames[IVAS_PI_MAX_ID] = { void IVAS_RTP_LogPiData( FILE *f_piDataOut, /* i/o : Output json file handle to dump PI data for debug/test */ - const PIDATA_TS *piData, /* i : PI Data + Timestamp array containing all PI data in current packet */ + const IVAS_PIDATA_TS *piData, /* i : PI Data + Timestamp array containing all PI data in current packet */ uint32_t nPiDataPresent /* i : Number of valid elements in the piData array */ ) { @@ -174,7 +174,7 @@ void IVAS_RTP_LogPiData( while ( nPiDataPresent-- > 0 ) { - const PIDATA_TS *cur = piData++; + const IVAS_PIDATA_TS *cur = piData++; if ( timestamp != ( ~0u ) && timestamp != cur->timestamp ) { @@ -495,7 +495,7 @@ void IVAS_RTP_LogPiData( void IVAS_RTP_WriteExtPiData( FILE *f_piDataOut, /* i/o : Output csv file handle to dump PI data for external output */ - const PIDATA_TS *piData, /* i : PI Data + Timestamp array containing all PI data in current packet */ + const IVAS_PIDATA_TS *piData, /* i : PI Data + Timestamp array containing all PI data in current packet */ uint32_t nPiDataPresent, /* i : Number of valid elements in the piData array */ uint16_t numObj /* i : Number of objects */ ) @@ -509,7 +509,7 @@ void IVAS_RTP_WriteExtPiData( while ( nPiDataPresent-- > 0 ) { - const PIDATA_TS *cur = piData++; + const IVAS_PIDATA_TS *cur = piData++; /* The writing follows the pattern of: timestamp, PI DATA TYPE, PI DATA */ @@ -943,7 +943,7 @@ ivas_error IVAS_RTP_WriteNextFrame( while ( rtp->nWrittenPiData > 0 ) { - PIDATA_TS *piDataTs = &rtp->piData[nProcPiData++]; + IVAS_PIDATA_TS *piDataTs = &rtp->piData[nProcPiData++]; if ( ( error = IVAS_RTP_PACK_PushPiData( rtp->hPack, (const IVAS_PIDATA_GENERIC *) &piDataTs->data ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while pushing scene orientation\n", ivas_error_to_string( error ) ); @@ -1014,7 +1014,7 @@ ivas_error IVAS_RTP_ReadNextFrame( /* Pre-read all PI data */ while ( rtp->numPiDataInPacket != 0 ) { - PIDATA_TS *piData = &rtp->piData[rtp->nReadPiData]; + IVAS_PIDATA_TS *piData = &rtp->piData[rtp->nReadPiData]; if ( ( error = IVAS_RTP_UNPACK_PullNextPiData( rtp->hUnpack, (IVAS_PIDATA_GENERIC *) &piData->data, sizeof( piData->data ), &piData->timestamp ) ) != IVAS_ERR_OK ) { fprintf( stderr, "failed to pull PI Data, error = %s\n", ivas_error_to_string( error ) ); diff --git a/lib_util/ivas_rtp_file.h b/lib_util/ivas_rtp_file.h index ce2cc183d0..f5c5dc70e3 100644 --- a/lib_util/ivas_rtp_file.h +++ b/lib_util/ivas_rtp_file.h @@ -42,7 +42,7 @@ typedef struct IVAS_RTP_FILE *IVAS_RTP_FILE_HANDLE; typedef struct { uint8_t packet[NOMINAL_BUFFER_SIZE( IVAS_MAX_FRAMES_PER_RTP_PACKET )]; - PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; + IVAS_PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; IVAS_RTP_FILE_HANDLE hRtpFile; FILE *f_piDataOut; @@ -73,8 +73,8 @@ ivas_error IVAS_RTP_READER_Init( IVAS_RTP *rtp, const char *inputBitstreamFilena void IVAS_RTP_Term( IVAS_RTP *rtp ); ivas_error IVAS_RTP_WriteNextFrame( IVAS_RTP *rtp, uint8_t *au, const IVAS_RTP_SR_INFO *srInfo, int16_t auSizeBits, bool isMono, bool forcePacket ); ivas_error IVAS_RTP_ReadNextFrame( IVAS_RTP *rtp, uint8_t *au, int16_t *auSizeBits, uint32_t *rtpTimeStamp, uint16_t *rtpSequenceNumber, uint32_t *nextPacketRcvTime_ms, IVAS_RTP_SR_INFO *srInfo, bool *qBit ); -void IVAS_RTP_LogPiData( FILE *f_piDataOut, const PIDATA_TS *piData, uint32_t nPiDataPresent ); -void IVAS_RTP_WriteExtPiData( FILE *f_piDataOut, const PIDATA_TS *piData, uint32_t nPiDataPresent, uint16_t numObj ); +void IVAS_RTP_LogPiData( FILE *f_piDataOut, const IVAS_PIDATA_TS *piData, uint32_t nPiDataPresent ); +void IVAS_RTP_WriteExtPiData( FILE *f_piDataOut, const IVAS_PIDATA_TS *piData, uint32_t nPiDataPresent, uint16_t numObj ); const char *IVAS_RTP_GetExtPiFilePath( IVAS_RTP *rtp ); uint16_t IVAS_RTP_OwnRandom( uint16_t *seed ); diff --git a/lib_util/ivas_rtp_payload.c b/lib_util/ivas_rtp_payload.c index 3c7c942b17..c73470a734 100644 --- a/lib_util/ivas_rtp_payload.c +++ b/lib_util/ivas_rtp_payload.c @@ -132,7 +132,7 @@ typedef struct typedef struct PIDATA_NODE { struct PIDATA_NODE *next; /* next node is first element */ - PIDATA data; /* unpacked pi data per frame */ + IVAS_PIDATA data; /* unpacked pi data per frame */ uint32_t timestamp; /* rtp timestamp of this frame */ } PIDATA_NODE; @@ -974,7 +974,7 @@ ivas_error IVAS_RTP_PACK_PushPiData( if ( data == NULL || data->piDataType >= IVAS_PI_NO_DATA || /* NO_PI_DATA cannot be provided by user, it is generated in packing */ - data->size > sizeof( PIDATA ) ) + data->size > sizeof( IVAS_PIDATA ) ) { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Wrong PI Data provided" ); } diff --git a/lib_util/ivas_rtp_pi_data.c b/lib_util/ivas_rtp_pi_data.c index 250ea9c72c..addfdbe707 100644 --- a/lib_util/ivas_rtp_pi_data.c +++ b/lib_util/ivas_rtp_pi_data.c @@ -1733,7 +1733,7 @@ ivas_error PI_UnPackData( uint8_t piDataType, uint32_t piSize, const uint8_t *pi return IVAS_ERR_OK; } -/* PIDATA Tables */ +/* IVAS_PIDATA Tables */ const float mapRT60[1u << NBITS_RT60] = { 0.01f, 0.0126f, 0.0159f, 0.02f, 0.0252f, 0.0317f, 0.04f, 0.0504f, 0.0635f, 0.08f, 0.1008f, 0.1270f, 0.16f, 0.2016f, 0.2540f, 0.32f, diff --git a/lib_util/ivas_rtp_pi_data.h b/lib_util/ivas_rtp_pi_data.h index 4b2d8e927a..d1c10a591a 100644 --- a/lib_util/ivas_rtp_pi_data.h +++ b/lib_util/ivas_rtp_pi_data.h @@ -43,439 +43,4 @@ #define REVERSE_ISM_DIRECTION_AZIMUTH_STEP_INV 1.4222222222f #define REVERSE_ISM_DIRECTION_ELEVATION_STEP_INV 0.7055555556f -/* IVAS PI Data Types */ -typedef enum -{ - /* Forward direction PI types */ - IVAS_PI_SCENE_ORIENTATION, /* orientation of audio scene in unit quaternions */ - IVAS_PI_DEVICE_ORIENTATION_COMPENSATED, /* orientation of device in unit quaternions (compensated) */ - IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED, /* orientation of device in unit quaternions (un-compensated) */ - IVAS_PI_ACOUSTIC_ENVIRONMENT, /* describe the acoustic environment */ - IVAS_PI_AUDIO_DESCRIPTION, /* audio content description (voice/music/ambiance) */ - IVAS_PI_ISM_NUM, /* Number of objects */ - IVAS_PI_ISM_ID, /* id of each object */ - IVAS_PI_ISM_GAIN, /* gain of each object */ - IVAS_PI_ISM_ORIENTATION, /* orientation of each object */ - IVAS_PI_ISM_POSITION, /* position of each object */ - IVAS_PI_ISM_POSITION_COMPACT, /* position of each object in compact representation */ - IVAS_PI_ISM_DISTANCE_ATTENUATION, /* distance attenuation for each object */ - IVAS_PI_ISM_DIRECTIVITY, /* directivity of each object */ - IVAS_PI_DIEGETIC_TYPE, /* digetic audio indication */ - IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_INDICATION, /* audio suppression indication */ - IVAS_PI_AUDIO_FOCUS_INDICATION, /* audio focus indication (direction in Quaternions and/or level) */ - - /* Reverse direction PI types */ - IVAS_PI_PLAYBACK_DEVICE_ORIENTATION, /* orientation of the playback device in quaternions */ - IVAS_PI_HEAD_ORIENTATION, /* head orientation of the listener in Quaternions */ - IVAS_PI_LISTENER_POSITION, /* position of the listener in 3D space */ - IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_REQUEST, /* receiver’s preference with respect to audio suppression */ - IVAS_PI_AUDIO_FOCUS_REQUEST, /* direction of interest for the listener in Quaternions and/or audio focus level */ - IVAS_PI_PI_LATENCY, /* round-trip latency for PI frames */ - IVAS_PI_R_ISM_ID, /* id of an object for editing */ - IVAS_PI_R_ISM_GAIN, /* editing request for gain factor for received object */ - IVAS_PI_R_ISM_ORIENTATION, /* editing request for orientation for received object */ - IVAS_PI_R_ISM_POSITION, /* editing request for position for received object */ - IVAS_PI_R_ISM_POSITION_COMPACT, /* editing request for position for received object in a compact representation*/ - IVAS_PI_R_ISM_DIRECTION, /* editing request for direction for received object */ - IVAS_PI_RESERVED27, /* reserved */ - IVAS_PI_RESERVED28, /* reserved */ - IVAS_PI_RESERVED29, /* reserved */ - IVAS_PI_NO_DATA = 31, /* Indicates an empty PI data frame */ - IVAS_PI_MAX_ID /* Max number of PI data IDs supprted */ -} IVAS_PI_TYPE; - -/* cartesian coordinates (X,Y,Z) in 3D space */ -typedef struct -{ - float x, y, z; -} IVAS_COORDINATE; - -/* orientation data corresponding to any of the following pi data types :- - * - IVAS_PI_SCENE_ORIENTATION - * - IVAS_PI_DEVICE_ORIENTATION_COMPENSATED - * - IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED - * - IVAS_PI_PLAYBACK_DEVICE_ORIENTATION - * - IVAS_PI_HEAD_ORIENTATION - * - IVAS_PI_R_ISM_ORIENTATION - * - * piDataType is used to identify the correct pi data type contained here - */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_SCENE_ORIENTATION) */ - uint32_t piDataType; /* one of supported orientation data types */ - IVAS_QUATERNION orientation; /* orientation data expressed as quartenions */ -} IVAS_PIDATA_ORIENTATION; - -/* Acoustic environment corresponding to IVAS_PI_ACOUSTIC_ENVIRONMENT - * - * acoustic environment ID - * late reverb parameters - * - RT60 – indicating the time that it takes for the reflections to reduce 60 dB in energy level, per frequency band - * - DSR – diffuse to source signal energy ratio, per frequency band - * - Pre-delay – delay at which the computation of DSR values was performed - * early reflections - * - 3D rectangular virtual room dimensions - * - Broadband energy absorption coefficient per wall surface - */ -typedef enum -{ - IVAS_PI_AE_LOW, /* center frequency 25 Hz */ - IVAS_PI_AE_MID, /* center frequency 250 Hz */ - IVAS_PI_AE_HIGH, /* center frequency 2.5 kHz */ - IVAS_PI_AE_NUM_BANDS /* number of ae bands */ -} IVAS_PI_AE_BANDS; - -typedef enum -{ - IVAS_PI_AE_LOW_FREQ = 25, - IVAS_PI_AE_MID_FREQ = 250, - IVAS_PI_AE_HIGH_FREQ = 2500 -} IVAS_PI_AE_BANDS_FREQ; - -typedef enum -{ - IVAS_PI_AE_FRONT, - IVAS_PI_AE_BACK, - IVAS_PI_AE_LEFT, - IVAS_PI_AE_RIGHT, - IVAS_PI_AE_CEILING, - IVAS_PI_AE_FLOOR, - IVAS_PI_AE_NUM_SURFACE -} IVAS_PI_AE_SURFACE; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ACOUSTIC_ENV) */ - uint32_t piDataType; /* IVAS_PI_ACOUSTIC_ENVIRONMENT */ - bool availLateReverb; /* AE contains only late reverb parameters */ - bool availEarlyReflections; /* AE containing late reverb and simplified early reflections */ - uint8_t aeid; /* seven-bit acoustic environment identifier */ - - /* only valid if availLateReverb==true or availEarlyReflections==true */ - float rt60[IVAS_PI_AE_NUM_BANDS]; /* time for the reflections to reduce 60 dB per band in seconds */ - float dsr[IVAS_PI_AE_NUM_BANDS]; /* diffuse to source signal energy ratio per band in dB */ - - /* only valid if availEarlyReflections==true */ - IVAS_COORDINATE roomDimensions; /* room dimensions in meters length (x), width (y), height (z) */ - float absorbCoeffs[IVAS_PI_AE_NUM_SURFACE]; /* absorption coefficients for all surfaces */ -} IVAS_PIDATA_ACOUSTIC_ENV; - -/* Audio Description corresponding to IVAS_PI_AUDIO_DESCRIPTION - * Describe the following audio decriptors per object/type :- - * - audio content type is speech/music/ambiance - * - if audio rendering is editable - * - if stereo audio is binaural - * - * number of valid entries decide on basis of audio format:- - * - Stereo/SBA/MASA = 1 entry - * - MultiChannel = 2 entries (1 for center channel + 1 for all other channels) - * - ISM = Number of Object entries ( 1 per object ) - * - OMASA/OSBA = 1 + Num Discrete Coded Objects - * - */ -typedef struct -{ - bool speech; /* audio has voice/speech */ - bool music; /* audio has music */ - bool ambiance; /* audio has background ambiance */ - bool editable; /* rendering audio metadata is editable */ - bool binaural; /* stereo stream is binaural */ -} IVAS_AUDIO_ID; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_AUDIO_DESC) */ - uint32_t piDataType; /* IVAS_PI_AUDIO_DESCRIPTION */ - uint32_t nValidEntries; /* Number of valid audio IDs */ - IVAS_AUDIO_ID audioId[1 + IVAS_MAX_NUM_OBJECTS]; /* audio id as per format */ -} IVAS_PIDATA_AUDIO_DESC; - -/* ISM specific PI data related to PI types : - - * - * - IVAS_PI_ISM_NUM - * - IVAS_PI_ISM_ID - * - IVAS_PI_ISM_GAIN - * - IVAS_PI_ISM_ORIENTATION - * - IVAS_PI_ISM_POSITION - * - IVAS_PI_ISM_DISTANCE_ATTENUATION - * - IVAS_PI_ISM_DIRECTIVITY - */ - -/* Number of ISMs */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_NUM) */ - uint32_t piDataType; /* IVAS_PI_ISM_NUM */ - uint32_t numObjects; /* Number of ISM */ -} IVAS_PIDATA_ISM_NUM; - -/* ISM ID */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_ID) */ - uint32_t piDataType; /* IVAS_PI_ISM_ID */ - uint16_t numObjects; /* number of objects */ - uint8_t id[IVAS_MAX_NUM_OBJECTS]; /* 8-bit ISM id of object */ -} IVAS_PIDATA_ISM_ID; - -/* ISM gain */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_GAIN) */ - uint32_t piDataType; /* IVAS_PI_ISM_GAIN */ - uint16_t numObjects; /* number of objects */ - int8_t dB[IVAS_MAX_NUM_OBJECTS]; /* ISM gain in dB per object [-96, +3] */ -} IVAS_PIDATA_ISM_GAIN; - -/* ISM orientation */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_ORIENTATION) */ - uint32_t piDataType; /* IVAS_PI_ISM_ORIENTATION */ - uint16_t numObjects; /* number of objects */ - IVAS_QUATERNION orientation[IVAS_MAX_NUM_OBJECTS]; /* Orientation of audio objects in ISM(s) */ -} IVAS_PIDATA_ISM_ORIENTATION; - -/* ISM position */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_POSITION) */ - uint32_t piDataType; /* IVAS_PI_ISM_POSITION */ - uint16_t numObjects; /* number of objects */ - IVAS_COORDINATE position[IVAS_MAX_NUM_OBJECTS]; /* Position of audio objects in ISM(s) */ -} IVAS_PIDATA_ISM_POSITION; - -/* ISM distance attenuation comprising of following gains per ISM - * - reference distance - * - maximum distance - * - roll-off factor - */ -typedef struct -{ - float ref_dist; /* reference distance in meters */ - float max_dist; /* maximum distance in meters */ - float roll; /* roll-off factor values */ -} IVAS_DIST_ATTEN; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_ATTENUATION) */ - uint32_t piDataType; /* IVAS_PI_ISM_DISTANCE_ATTENUATION */ - uint16_t numObjects; /* number of objects */ - IVAS_DIST_ATTEN distAtten[IVAS_MAX_NUM_OBJECTS]; /* Distance attenuation of audio objects */ -} IVAS_PIDATA_ISM_ATTENUATION; - -/* ISM Directivity comprising of following per ISM :- - * - inner cone angle determines the size of the main cone directed to the front of the object - * - outer cone angle determines the size of the outer (back) cone - * - outer attenuation gain determines the attenuation outside the outer cone - */ -typedef struct -{ - uint16_t innerConeAngle; /* inner cone angle in degrees (0 - 360) */ - uint16_t outerConeAngle; /* outer cone angle in degrees (0 - 360) */ - float outerAttenuationdB; /* attenuation outside the outer cone in dB */ -} IVAS_ISM_DIRECTIVITY; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_DIRECTIVITY) */ - uint32_t piDataType; /* IVAS_PI_ISM_DIRECTIVITY */ - uint16_t numObjects; /* number of objects */ - IVAS_ISM_DIRECTIVITY directivity[IVAS_MAX_NUM_OBJECTS]; /* Directivity of audio objects */ -} IVAS_PIDATA_ISM_DIRECTIVITY; - -/* Diegetic and non-diegetic indication flag as per audio format - * - * number of valid entries decided on basis of audio format:- - * - Stereo/SBA/MASA/MultiChannel = 1 entry - * - ISM = Number of Object entries ( 1 per object ) - * - OMASA/OSBA = 1 (last) + Num Discrete Coded Objects - */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_DIEGETIC) */ - uint32_t piDataType; /* IVAS_PI_DIEGETIC_TYPE */ - bool isDiegetic[1 + IVAS_MAX_NUM_OBJECTS]; /* diegetic indication as per audio format */ -} IVAS_PIDATA_DIEGETIC; - -/* Audio focus direction indicates a direction of interest. - * The audio focus level indicates the amount of suppression applied to the - * directions other than the audio focus direction. - */ -typedef enum -{ - IVAS_FLVL_NO_AUDIO_FOCUS = 0, /* Apply no audio focus */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_1, /* Audio focus level 1 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_2, /* Audio focus level 2 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_3, /* Audio focus level 3 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_4, /* Audio focus level 4 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_5, /* Audio focus level 5 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_6, /* Audio focus level 6 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_7, /* Audio focus level 7 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_8, /* Audio focus level 8 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_9, /* Audio focus level 9 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_10, /* Audio focus level 10 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_11, /* Audio focus level 11 */ - IVAS_FLVL_FOCUS_LEVEL_LEVEL_12, /* Audio focus level 12 */ - IVAS_FLVL_MAX_AUDIO_FOCUS, /* Apply max audio focus */ - IVAS_FLVL_DEFAULT_AUDIO_FOCUS, /* Default audio focus */ - IVAS_FLVL_NO_PREFERENCE, /* No preference / No indication */ -} IVAS_FLVL; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_AUDIO_FOCUS) */ - uint32_t piDataType; /* IVAS_PI_AUDIO_FOCUS_INDCATION or IVAS_PI_AUDIO_FOCUS_REQUEST */ - bool availDirection; /* audio focus contains direction */ - bool availLevel; /* audio focus contains level */ - IVAS_QUATERNION direction; /* direction data expressed as quarternions */ - IVAS_FLVL flvl; /* audio focus level */ -} IVAS_PIDATA_AUDIO_FOCUS; - -/* Position data corresponding to any of the following pi data types :- - * - IVAS_PI_LISTENER_POSITION - * - IVAS_PI_R_ISM_POSITION - * - * piDataType is used to identify the correct pi data type contained here - */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_POSITION) */ - uint32_t piDataType; /* one of supported position data types */ - IVAS_COORDINATE position; /* Position data */ -} IVAS_PIDATA_POSITION; - -/* Dynamic Audio Suppression describes receiver’s preference with respect to the - * type of audio content that should be enhanced and the amount of suppression to - * be applied to the background noise - */ -typedef enum -{ - IVAS_SLI_MIN_SUPPRESSION = 0, /* Apply min suppression */ - IVAS_SLI_SUPPRESSION_LEVEL_1, /* Suppression level 1 */ - IVAS_SLI_SUPPRESSION_LEVEL_2, /* Suppression level 2 */ - IVAS_SLI_SUPPRESSION_LEVEL_3, /* Suppression level 3 */ - IVAS_SLI_SUPPRESSION_LEVEL_4, /* Suppression level 4 */ - IVAS_SLI_SUPPRESSION_LEVEL_5, /* Suppression level 5 */ - IVAS_SLI_SUPPRESSION_LEVEL_6, /* Suppression level 6 */ - IVAS_SLI_SUPPRESSION_LEVEL_7, /* Suppression level 7 */ - IVAS_SLI_SUPPRESSION_LEVEL_8, /* Suppression level 8 */ - IVAS_SLI_SUPPRESSION_LEVEL_9, /* Suppression level 9 */ - IVAS_SLI_SUPPRESSION_LEVEL_10, /* Suppression level 10 */ - IVAS_SLI_SUPPRESSION_LEVEL_11, /* Suppression level 11 */ - IVAS_SLI_MAX_SUPPRESSION, /* Apply max suppression */ - IVAS_SLI_NO_SUPPRESSION, /* Apply no suppression */ - IVAS_SLI_DEFAULT_SUPPRESSION, /* Apply default suppression */ - IVAS_SLI_NO_PREFERENCE, /* No preference / No indication */ -} IVAS_SLI; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_DYNAMIC_SUPPRESSION) */ - uint32_t piDataType; /* IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_REQUEST or IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_INDICATION */ - bool speech; /* receiver's preference is voice/speech */ - bool music; /* receiver's preference is music */ - bool ambiance; /* receiver's preference is background ambiance */ - IVAS_SLI sli; /* suppression level indicator [0, 15] */ -} IVAS_PIDATA_DYNAMIC_SUPPRESSION; - -/* Reverse PI latency calculated as the elapsed time between the sent reverse PI data - * and received forward PI data. It is based on the receiving device experiencing the - * result of its sent data by receiving the corresponding data in forward direction as - * forward PI data - */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_REVERSE_PI_LATENCY) */ - uint32_t piDataType; /* IVAS_PI_PI_LATENCY */ - IVAS_PI_TYPE type; /* Reverse PI used for computation of Latency */ - int32_t latency; /* Latency as 27-bit int on RTP Clock @ 16KHz */ -} IVAS_PIDATA_REVERSE_PI_LATENCY; - -/* ISM specific PI data editing requests */ - -/* ISM ID in editing requests */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_ID) */ - uint32_t piDataType; /* IVAS_PI_R_ISM_ID */ - uint8_t id; /* 8-bit ISM id of object to edit */ -} IVAS_PIDATA_ISM_EDIT_ID; - -/* Editing request for ISM gain */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_GAIN) */ - uint32_t piDataType; /* IVAS_PI_R_ISM_GAIN */ - int8_t dB; /* Preferred ISM gain in dB [-96, +3] */ -} IVAS_PIDATA_ISM_EDIT_GAIN; - -/* Editing request for ISM orientation */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_ORIENTATION) */ - uint32_t piDataType; /* IVAS_PI_R_ISM_ORIENTATION */ - IVAS_QUATERNION orientation; /* orientation editing request for received ISM */ -} IVAS_PIDATA_ISM_EDIT_ORIENTATION; - - -/* Editing request for ISM direction */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_DIRECTION) */ - uint32_t piDataType; /* IVAS_PI_R_ISM_DIRECTION */ - float azimuth; /* azimuth angle in degrees [-180, 180] */ - float elevation; /* elevation angle in degrees [-90°, 90°] */ -} IVAS_PIDATA_ISM_EDIT_DIRECTION; - -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_NO_DATA) */ - uint32_t piDataType; /* IVAS_PI_NO_DATA */ -} IVAS_PIDATA_NO_DATA; - - -typedef union -{ - IVAS_PIDATA_ORIENTATION scene; - IVAS_PIDATA_ORIENTATION deviceCompensated; - IVAS_PIDATA_ORIENTATION deviceUnCompensated; - IVAS_PIDATA_ACOUSTIC_ENV acousticEnv; - IVAS_PIDATA_AUDIO_DESC audioDesc; - IVAS_PIDATA_ISM_NUM ismNum; - IVAS_PIDATA_ISM_ID ismId; - IVAS_PIDATA_ISM_GAIN ismGain; - IVAS_PIDATA_ISM_ORIENTATION ismOrientation; - IVAS_PIDATA_ISM_POSITION ismPosition; - IVAS_PIDATA_ISM_POSITION ismPositionCompact; - IVAS_PIDATA_ISM_ATTENUATION ismAttenuation; - IVAS_PIDATA_ISM_DIRECTIVITY ismDirectivity; - IVAS_PIDATA_DIEGETIC digeticIndicator; - IVAS_PIDATA_DYNAMIC_SUPPRESSION dynSuppressionIndication; - IVAS_PIDATA_AUDIO_FOCUS focusIndication; - - IVAS_PIDATA_ORIENTATION playbackOrientation; - IVAS_PIDATA_ORIENTATION headOrientation; - IVAS_PIDATA_POSITION listnerPosition; - IVAS_PIDATA_DYNAMIC_SUPPRESSION dynSuppressionRequest; - IVAS_PIDATA_AUDIO_FOCUS focusRequest; - IVAS_PIDATA_REVERSE_PI_LATENCY piLatency; - IVAS_PIDATA_ISM_EDIT_ID ismEditId; - IVAS_PIDATA_ISM_EDIT_GAIN ismEditGain; - IVAS_PIDATA_ISM_EDIT_ORIENTATION ismEditOrientation; - IVAS_PIDATA_POSITION ismEditPosition; - IVAS_PIDATA_POSITION ismEditPositionCompact; - IVAS_PIDATA_ISM_EDIT_DIRECTION ismEditDirection; - IVAS_PIDATA_NO_DATA noPiData; -} PIDATA; - -typedef struct pidata_ts_struct -{ - PIDATA data; - uint32_t timestamp; -} PIDATA_TS; - - #endif /* IVAS_RTP_PI_DATA_H */ -- GitLab From 1353aa9c59efb36311823e012e6a431aa777fec1 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 1 Dec 2025 14:28:59 +0100 Subject: [PATCH 2/7] clang-format --- lib_com/common_api_types.h | 14 +++++++------- lib_util/ivas_rtp_file.c | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 7d100ed58d..1e26b66ffd 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -563,10 +563,10 @@ typedef struct /* ISM position */ typedef struct { - size_t size; /* sizeof(IVAS_PIDATA_ISM_POSITION) */ - uint32_t piDataType; /* IVAS_PI_ISM_POSITION */ - uint16_t numObjects; /* number of objects */ - IVAS_VECTOR3 position[IVAS_MAX_NUM_OBJECTS]; /* Position of audio objects in ISM(s) */ + size_t size; /* sizeof(IVAS_PIDATA_ISM_POSITION) */ + uint32_t piDataType; /* IVAS_PI_ISM_POSITION */ + uint16_t numObjects; /* number of objects */ + IVAS_VECTOR3 position[IVAS_MAX_NUM_OBJECTS]; /* Position of audio objects in ISM(s) */ } IVAS_PIDATA_ISM_POSITION; @@ -672,9 +672,9 @@ typedef struct */ typedef struct { - size_t size; /* sizeof(IVAS_PIDATA_POSITION) */ - uint32_t piDataType; /* one of supported position data types */ - IVAS_VECTOR3 position; /* Position data */ + size_t size; /* sizeof(IVAS_PIDATA_POSITION) */ + uint32_t piDataType; /* one of supported position data types */ + IVAS_VECTOR3 position; /* Position data */ } IVAS_PIDATA_POSITION; diff --git a/lib_util/ivas_rtp_file.c b/lib_util/ivas_rtp_file.c index e2080e135d..6635f6168c 100644 --- a/lib_util/ivas_rtp_file.c +++ b/lib_util/ivas_rtp_file.c @@ -151,9 +151,9 @@ static const char *const PiDataNames[IVAS_PI_MAX_ID] = { }; void IVAS_RTP_LogPiData( - FILE *f_piDataOut, /* i/o : Output json file handle to dump PI data for debug/test */ + FILE *f_piDataOut, /* i/o : Output json file handle to dump PI data for debug/test */ const IVAS_PIDATA_TS *piData, /* i : PI Data + Timestamp array containing all PI data in current packet */ - uint32_t nPiDataPresent /* i : Number of valid elements in the piData array */ + uint32_t nPiDataPresent /* i : Number of valid elements in the piData array */ ) { uint16_t n; @@ -494,10 +494,10 @@ void IVAS_RTP_LogPiData( } void IVAS_RTP_WriteExtPiData( - FILE *f_piDataOut, /* i/o : Output csv file handle to dump PI data for external output */ + FILE *f_piDataOut, /* i/o : Output csv file handle to dump PI data for external output */ const IVAS_PIDATA_TS *piData, /* i : PI Data + Timestamp array containing all PI data in current packet */ - uint32_t nPiDataPresent, /* i : Number of valid elements in the piData array */ - uint16_t numObj /* i : Number of objects */ + uint32_t nPiDataPresent, /* i : Number of valid elements in the piData array */ + uint16_t numObj /* i : Number of objects */ ) { if ( f_piDataOut == NULL || piData == NULL || nPiDataPresent == 0 ) -- GitLab From fd2853cc88ed75ac33a6b480dbf7a71f582768bf Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 2 Dec 2025 08:58:39 +0100 Subject: [PATCH 3/7] replace characters in wrong encoding --- lib_com/common_api_types.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index 1e26b66ffd..ab9ae0ad33 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -385,7 +385,7 @@ typedef enum IVAS_PI_PLAYBACK_DEVICE_ORIENTATION, /* orientation of the playback device in quaternions */ IVAS_PI_HEAD_ORIENTATION, /* head orientation of the listener in Quaternions */ IVAS_PI_LISTENER_POSITION, /* position of the listener in 3D space */ - IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_REQUEST, /* receiver’s preference with respect to audio suppression */ + IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION_REQUEST, /* receiver’s preference with respect to audio suppression */ IVAS_PI_AUDIO_FOCUS_REQUEST, /* direction of interest for the listener in Quaternions and/or audio focus level */ IVAS_PI_PI_LATENCY, /* round-trip latency for PI frames */ IVAS_PI_R_ISM_ID, /* id of an object for editing */ @@ -424,9 +424,9 @@ typedef struct * * acoustic environment ID * late reverb parameters - * - RT60 – indicating the time that it takes for the reflections to reduce 60 dB in energy level, per frequency band - * - DSR – diffuse to source signal energy ratio, per frequency band - * - Pre-delay – delay at which the computation of DSR values was performed + * - RT60 – indicating the time that it takes for the reflections to reduce 60 dB in energy level, per frequency band + * - DSR – diffuse to source signal energy ratio, per frequency band + * - Pre-delay – delay at which the computation of DSR values was performed * early reflections * - 3D rectangular virtual room dimensions * - Broadband energy absorption coefficient per wall surface @@ -678,7 +678,7 @@ typedef struct } IVAS_PIDATA_POSITION; -/* Dynamic Audio Suppression describes receiver’s preference with respect to the +/* Dynamic Audio Suppression describes receiver’s preference with respect to the * type of audio content that should be enhanced and the amount of suppression to * be applied to the background noise */ @@ -763,7 +763,7 @@ typedef struct size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_DIRECTION) */ uint32_t piDataType; /* IVAS_PI_R_ISM_DIRECTION */ float azimuth; /* azimuth angle in degrees [-180, 180] */ - float elevation; /* elevation angle in degrees [-90°, 90°] */ + float elevation; /* elevation angle in degrees [-90°, 90°] */ } IVAS_PIDATA_ISM_EDIT_DIRECTION; -- GitLab From bd4ae759b253417bc7667429e04b750dcc2d6f89 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 2 Dec 2025 08:59:24 +0100 Subject: [PATCH 4/7] remove lib_util dependency in CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7beb46c451..5f1659d6fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,7 +165,7 @@ file(GLOB libDecSrcs "lib_dec/*.c") file(GLOB libDecHeaders "lib_dec/*.h") add_library(lib_dec ${libDecSrcs} ${libDecHeaders}) target_link_libraries(lib_dec lib_com lib_rend lib_debug lib_isar) -target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar lib_util) +target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") @@ -175,7 +175,7 @@ target_include_directories(lib_util PRIVATE lib_lc3plus lib_isar) if(NOT WMOPS) add_executable(ivas_lc3plus_unit_test scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c) - target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug lib_isar) + target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_com lib_debug lib_isar) endif() file(GLOB libISARSrcs "lib_isar/*.c") -- GitLab From 2eaa8140ebcd4e42290032ac905e198be9f3de39 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 2 Dec 2025 08:59:36 +0100 Subject: [PATCH 5/7] remove lib_util dependency in Makefile --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b2b5979898..2eccb012b0 100644 --- a/Makefile +++ b/Makefile @@ -200,16 +200,16 @@ $(LIB_LC3PLUS): $(OBJS_LC3PLUS) $(LIB_LIBUTIL): $(OBJS_LIBUTIL) $(QUIET_AR)$(AR) rcs $@ $^ -$(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) +$(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC) -L. -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC) -$(CLI_APIENC_FMTSW): $(OBJS_CLI_APIENC_FMTSW) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) +$(CLI_APIENC_FMTSW): $(OBJS_CLI_APIENC_FMTSW) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC_FMTSW) -L. -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC_FMTSW) -$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(LIB_LIBISAR) +$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(LIB_LIBISAR) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasdec -livascom -livasutil -livasdebug -llc3plus $(LDLIBS) -o $(CLI_APIDEC) -$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LIBDEC) $(LIB_LC3PLUS) $(LIB_LIBISAR) +$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LIBDEC) $(LIB_LC3PLUS) $(LIB_LIBISAR) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -lisar -livasdec -livasutil -livasdebug -livascom -llc3plus $(LDLIBS) -o $(CLI_APIREND) $(CLI_APIPOSTREND): $(OBJS_CLI_APPPOSTREND) $(LIB_LIBISAR) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) -- GitLab From 702a5b7263b5abf1aa34607193c7aa5b48e8eb0f Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 2 Dec 2025 13:17:15 +0100 Subject: [PATCH 6/7] improve error propagation in build helper script --- ci/build_codec_sanitizers_linux.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/build_codec_sanitizers_linux.sh b/ci/build_codec_sanitizers_linux.sh index 11bfa29004..f76a345f5e 100755 --- a/ci/build_codec_sanitizers_linux.sh +++ b/ci/build_codec_sanitizers_linux.sh @@ -28,9 +28,11 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. +set -euxo pipefail + if [ ! -d "lib_com" ]; then - echo "not in root directory! - please run in IVAS root" - exit 1 + echo "not in root directory! - please run in IVAS root" + exit 1 fi # CI linux container would do this, can stay commented if clang (v13) is in your path -- GitLab From 5706a9463bf61eeae7bc6ec5d4a7d904b4e7356c Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 2 Dec 2025 13:21:40 +0100 Subject: [PATCH 7/7] Revert "remove lib_util dependency in Makefile" This reverts commit 2eaa8140ebcd4e42290032ac905e198be9f3de39. --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2eccb012b0..b2b5979898 100644 --- a/Makefile +++ b/Makefile @@ -200,16 +200,16 @@ $(LIB_LC3PLUS): $(OBJS_LC3PLUS) $(LIB_LIBUTIL): $(OBJS_LIBUTIL) $(QUIET_AR)$(AR) rcs $@ $^ -$(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) +$(CLI_APIENC): $(OBJS_CLI_APIENC) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC) -L. -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC) -$(CLI_APIENC_FMTSW): $(OBJS_CLI_APIENC_FMTSW) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) +$(CLI_APIENC_FMTSW): $(OBJS_CLI_APIENC_FMTSW) $(LIB_LIBENC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIENC_FMTSW) -L. -livasenc -livascom -livasutil -livasdebug $(LDLIBS) -o $(CLI_APIENC_FMTSW) -$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(LIB_LIBISAR) +$(CLI_APIDEC): $(OBJS_CLI_APIDEC) $(LIB_LIBDEC) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) $(LIB_LIBISAR) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APIDEC) -L. -livasdec -livascom -livasutil -livasdebug -llc3plus $(LDLIBS) -o $(CLI_APIDEC) -$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBDEBUG) $(LIB_LIBDEC) $(LIB_LC3PLUS) $(LIB_LIBISAR) +$(CLI_APIREND): $(OBJS_CLI_APPREND) $(LIB_LIBREND) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LIBDEC) $(LIB_LC3PLUS) $(LIB_LIBISAR) $(QUIET_LINK)$(CC) $(LDFLAGS) $(OBJS_CLI_APPREND) -L. -livasrend -lisar -livasdec -livasutil -livasdebug -livascom -llc3plus $(LDLIBS) -o $(CLI_APIREND) $(CLI_APIPOSTREND): $(OBJS_CLI_APPPOSTREND) $(LIB_LIBISAR) $(LIB_LIBCOM) $(LIB_LIBUTIL) $(LIB_LIBDEBUG) $(LIB_LC3PLUS) -- GitLab