From 4f9d67784eb268726e0c6d24ddaff7b447640cf9 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 27 Nov 2025 02:43:06 -0600 Subject: [PATCH 1/2] Accept switches as agreed on 2025-11-26 + clang format --- apps/decoder.c | 430 +------------- apps/encoder.c | 53 -- apps/encoder_fmtsw.c | 69 --- apps/isar_post_rend.c | 105 ---- apps/renderer.c | 30 - lib_com/bitstream.c | 17 - lib_com/common_api_types.h | 10 +- lib_com/edct.c | 20 - lib_com/fd_cng_com.c | 4 - lib_com/ivas_cnst.h | 18 - lib_com/ivas_omasa_com.c | 33 -- lib_com/ivas_prot.h | 12 - lib_com/ivas_rom_com.c | 4 - lib_com/ivas_rom_com.h | 4 - lib_com/options.h | 41 -- lib_com/stat_com.h | 6 +- lib_debug/debug.c | 5 - lib_dec/amr_wb_dec.c | 2 - lib_dec/fd_cng_dec.c | 76 --- lib_dec/ivas_binRenderer_internal.c | 4 - lib_dec/ivas_decision_matrix_dec.c | 4 - lib_dec/ivas_dirac_dec.c | 15 - lib_dec/ivas_init_dec.c | 109 +--- lib_dec/ivas_ism_metadata_dec.c | 12 - lib_dec/ivas_ism_param_dec.c | 24 - lib_dec/ivas_ism_renderer.c | 15 - lib_dec/ivas_jbm_dec.c | 39 -- lib_dec/ivas_mc_param_dec.c | 9 - lib_dec/ivas_mc_paramupmix_dec.c | 9 - lib_dec/ivas_mct_dec.c | 4 - lib_dec/ivas_mdct_core_dec.c | 2 - lib_dec/ivas_omasa_dec.c | 19 - lib_dec/ivas_osba_dec.c | 21 - lib_dec/ivas_output_config.c | 50 +- lib_dec/ivas_sba_dirac_stereo_dec.c | 15 - lib_dec/ivas_stat_dec.h | 44 +- lib_dec/ivas_stereo_dft_dec.c | 10 - lib_dec/ivas_stereo_dft_plc.c | 7 - lib_dec/ivas_stereo_mdct_stereo_dec.c | 4 - lib_dec/lib_dec.c | 426 +------------- lib_dec/lib_dec.h | 13 - lib_enc/fd_cng_enc.c | 60 -- lib_enc/ivas_cpe_enc.c | 14 +- lib_enc/ivas_spar_encoder.c | 4 - lib_enc/ivas_stat_enc.h | 2 - lib_enc/ivas_stereo_dft_enc.c | 12 - lib_enc/ivas_stereo_dft_enc_itd.c | 7 - lib_enc/ivas_stereo_dmx_evs.c | 107 ---- lib_enc/stat_enc.h | 4 - lib_enc/swb_pre_proc.c | 4 - lib_isar/isar_prot.h | 15 - lib_isar/isar_splitRend_lcld_enc.c | 13 +- lib_isar/isar_splitRendererPre.c | 75 +-- lib_isar/isar_stat.h | 2 - lib_isar/lib_isar_pre_rend.c | 31 +- lib_isar/lib_isar_pre_rend.h | 5 - lib_rend/ivas_cldfb_ring_buffer.c | 2 - lib_rend/ivas_dirac_dec_binaural_functions.c | 51 -- lib_rend/ivas_prot_rend.h | 34 -- lib_rend/ivas_render_config.c | 21 - lib_rend/ivas_rom_rend.c | 20 - lib_rend/ivas_rom_rend.h | 6 - lib_rend/ivas_rotation.c | 39 -- lib_rend/ivas_stat_rend.h | 2 - lib_rend/ivas_td_ring_buffer.c | 93 --- lib_rend/lib_rend.c | 73 +-- lib_rend/lib_rend.h | 10 - lib_util/g192.c | 4 - lib_util/g192.h | 8 +- lib_util/ivas_rtp_api.h | 67 +-- lib_util/ivas_rtp_file.c | 115 +--- lib_util/ivas_rtp_file.h | 17 - lib_util/ivas_rtp_internal.h | 20 +- lib_util/ivas_rtp_payload.c | 117 +--- lib_util/ivas_rtp_pi_data.c | 569 ++----------------- lib_util/ivas_rtp_pi_data.h | 133 ++--- lib_util/obj_edit_file_reader.c | 12 - lib_util/obj_edit_file_reader.h | 9 - lib_util/render_config_reader.c | 8 - lib_util/render_config_reader.h | 2 - lib_util/rtpdump.c | 12 - 81 files changed, 207 insertions(+), 3386 deletions(-) diff --git a/apps/decoder.c b/apps/decoder.c index 9b20043786..b078c2441e 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -38,9 +38,7 @@ #include "bitstream_reader.h" #include "evs_rtp_payload.h" #include "ism_file_writer.h" -#ifdef IVAS_RTPDUMP #include "ivas_rtp_file.h" -#endif #include "jbm_file_writer.h" #include "hrtf_file_reader.h" #include "ls_custom_file_reader.h" @@ -80,13 +78,7 @@ static #define NUM_BITS_SID_IVAS_5K2 104 #endif -#ifdef NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS #define RANDOM_INITSEED_DEC ( 0xFADE ) -#else -#ifdef FIXED_RTP_SEQUENCE_NUM -#define RANDOM_INITSEED_DEC ( 0xFEEDFADE ) -#endif -#endif /*------------------------------------------------------------------------------------------* * Local structure for storing cmdln arguments @@ -139,11 +131,9 @@ typedef struct IVAS_DEC_COMPLEXITY_LEVEL complexityLevel; bool tsmEnabled; IVAS_RENDER_FRAMESIZE renderFramesize; -#ifdef IVAS_RTPDUMP bool applyPiData; char *piOutputFilename; bool rtpOutSR; -#endif #ifdef DEBUGGING #ifdef DEBUG_FOA_AGC FILE *agcBitstream; /* temporary */ @@ -159,12 +149,8 @@ typedef struct uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; char *objEditFileName; -#ifdef FIX_1419_MONO_STEREO_UMX bool evsMode; -#endif -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE IVAS_ROOM_SIZE_T roomSize; -#endif } DecArguments; @@ -214,17 +200,9 @@ static ivas_error decodeVoIP( RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ISAR_SPLIT_REND_BITS_DATA *splitRendBits, -#endif -#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART IVAS_RENDER_CONFIG_DATA *renderConfig, -#endif -#ifdef DECODER_FORMAT_SWITCHING IVAS_DEC_HANDLE *phIvasDec, -#else - IVAS_DEC_HANDLE hIvasDec, -#endif int16_t *pcmBuf ); 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 ); #ifdef DEBUGGING @@ -232,9 +210,7 @@ static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBs static int16_t app_own_random( int16_t *seed ); #endif static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); -#ifdef DECODER_FORMAT_SWITCHING static ivas_error restartDecoder( IVAS_DEC_HANDLE *phIvasDec, const IVAS_DEC_MODE decMode, DecArguments *arg, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_CUSTOM_LS_DATA *hLsCustomData ); -#endif /*------------------------------------------------------------------------------------------* @@ -267,13 +243,9 @@ int main( IVAS_RENDER_FRAMESIZE asked_frame_size; IVAS_DEC_HRTF_BINARY_WRAPPER hHrtfBinary; ObjectEditFileReader *objectEditFileReader = NULL; -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT IVAS_ROOM_ACOUSTICS_CONFIG_DATA **pAE = NULL; uint32_t aeCount = 0; -#endif -#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART IVAS_RENDER_CONFIG_DATA renderConfig = { 0 }; -#endif #ifdef DEBUGGING int32_t noClipping; int32_t cnt_frames_limited; @@ -498,24 +470,12 @@ int main( *------------------------------------------------------------------------------------------*/ asked_frame_size = arg.renderFramesize; -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : IVAS_DEFAULT_AEID; -#else - uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535; -#endif -#ifdef IVAS_RTPDUMP arg.enableHeadRotation = arg.enableHeadRotation || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM; -#endif -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.roomSize, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, - arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, - arg.non_diegetic_pan_gain, arg.dpidEnabled, aeID, arg.objEditEnabled, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -550,9 +510,6 @@ int main( fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#ifndef IVAS_RTPDUMP - arg.enableHeadRotation = true; -#endif } /*------------------------------------------------------------------------------------------* @@ -661,9 +618,6 @@ int main( if ( arg.renderConfigEnabled ) { -#ifndef FIX_SPLIT_RENDERING_ON_DECODER_RESTART - IVAS_RENDER_CONFIG_DATA renderConfig; -#endif /* sanity check */ if ( arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB && @@ -691,7 +645,6 @@ int main( goto cleanup; } -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT aeCount = RenderConfigReader_getAcousticEnvironmentCount( renderConfigReader ); if ( aeCount > 0 ) { @@ -731,7 +684,6 @@ int main( } } } -#endif if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, arg.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK ) { @@ -770,11 +722,7 @@ int main( if ( arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT if ( ( error = IVAS_DEC_GetAcousticEnvironment( hIvasDec, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) -#else - if ( ( error = RenderConfigReader_getAcousticEnvironment( renderConfigReader, aeID, &renderConfig.roomAcoustics ) ) == IVAS_ERR_OK ) -#endif { if ( RenderConfigReader_checkValues( &renderConfig ) != IVAS_ERR_OK ) { @@ -860,17 +808,9 @@ int main( if ( arg.voipMode ) { error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP &splitRendBits, -#endif -#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART &renderConfig, -#endif -#ifdef DECODER_FORMAT_SWITCHING &hIvasDec, -#else - hIvasDec, -#endif pcmBuf ); } else @@ -916,7 +856,6 @@ cleanup: free( pcmBuf ); -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT if ( pAE != NULL ) { uint16_t n; @@ -928,7 +867,6 @@ cleanup: free( pAE ); } -#endif if ( arg.aeSequence.count > 0 ) { @@ -1097,9 +1035,7 @@ static bool parseCmdlIVAS_dec( arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; -#ifdef FIX_1419_MONO_STEREO_UMX arg->evsMode = false; -#endif arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; @@ -1114,11 +1050,9 @@ static bool parseCmdlIVAS_dec( arg->referenceVectorTrajFileName = NULL; arg->enableExternalOrientation = false; arg->externalOrientationTrajFileName = NULL; -#ifdef IVAS_RTPDUMP arg->applyPiData = false; arg->piOutputFilename = NULL; arg->rtpOutSR = false; -#endif #ifdef SUPPORT_JBM_TRACEFILE arg->jbmTraceFilename = NULL; @@ -1165,9 +1099,7 @@ static bool parseCmdlIVAS_dec( arg->objEditEnabled = false; arg->objEditFileName = NULL; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE arg->roomSize = IVAS_ROOM_SIZE_AUTO; -#endif /*-----------------------------------------------------------------* * Initialization @@ -1209,7 +1141,6 @@ static bool parseCmdlIVAS_dec( arg->inputFormat = IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF; i++; } -#ifdef IVAS_RTPDUMP else if ( strcmp( argv_to_upper, "-PIDATAFILE" ) == 0 ) { i++; @@ -1232,7 +1163,6 @@ static bool parseCmdlIVAS_dec( arg->rtpOutSR = true; i++; } -#endif #ifdef SUPPORT_JBM_TRACEFILE else if ( strcmp( argv_to_upper, "-TRACEFILE" ) == 0 ) { @@ -1657,15 +1587,12 @@ static bool parseCmdlIVAS_dec( } i++; } -#ifdef FIX_1419_MONO_STEREO_UMX else if ( strcmp( argv_to_upper, "-EVS" ) == 0 ) { arg->evsMode = true; arg->decMode = IVAS_DEC_MODE_EVS; i++; } -#endif -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE else if ( strcmp( argv_to_upper, "-ROOM_SIZE" ) == 0 ) { i++; @@ -1703,7 +1630,6 @@ static bool parseCmdlIVAS_dec( } i++; } -#endif /*-----------------------------------------------------------------* * Option not recognized @@ -1754,14 +1680,12 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } -#ifdef FIX_1419_MONO_STEREO_UMX else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->evsMode ) { fprintf( stderr, "Error: Both non-diegetic panning and stereo output specified!\n\n" ); usage_dec(); return false; } -#endif if ( arg->outputMdFilename != NULL && arg->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { @@ -1854,9 +1778,7 @@ static bool parseCmdlIVAS_dec( static void usage_dec( void ) { fprintf( stdout, "Usage for EVS: IVAS_dec.exe [Options] Fs bitstream_file output_file\n" ); -#ifdef FIX_1419_MONO_STEREO_UMX fprintf( stdout, " OR usage for IVAS (below) with -evs option and OutputConf\n" ); -#endif fprintf( stdout, "Usage for IVAS: IVAS_dec.exe [Options] OutputConf Fs bitstream_file output_file\n\n" ); fprintf( stdout, "Mandatory parameters:\n" ); @@ -1873,12 +1795,9 @@ static void usage_dec( void ) fprintf( stdout, "Options:\n" ); fprintf( stdout, "--------\n" ); -#ifdef FIX_1419_MONO_STEREO_UMX fprintf( stdout, "-evs : Specify that the supplied bitstream is an EVS bitstream\n" ); -#endif fprintf( stdout, "-VOIP : VoIP mode: RTP in G192\n" ); fprintf( stdout, "-VOIP_hf_only=0 : VoIP mode: EVS RTP Payload Format hf_only=0 in rtpdump\n" ); -#ifdef IVAS_RTPDUMP fprintf( stdout, "-VOIP_hf_only=1 : VoIP mode: EVS or IVAS RTP Payload Format hf_only=1 in rtpdump\n" ); fprintf( stdout, " The decoder may read rtpdump files containing TS26.445 Annex A.2.2\n" ); fprintf( stdout, " EVS RTP Payload Format or rtpdump files containing TS26.253 Annex A\n" ); @@ -1887,12 +1806,6 @@ static void usage_dec( void ) fprintf( stdout, "-PiDataFile PF Log the timestampped PI data.\n" ); fprintf( stdout, "-ApplyPiData Apply the PI data found in the rtp packet.\n" ); fprintf( stdout, "-rtpOutSR : Split Rendering bitstream RTPDump output \n" ); -#else - fprintf( stdout, "-VOIP_hf_only=1 : VoIP mode: EVS RTP Payload Format hf_only=1 in rtpdump\n" ); - fprintf( stdout, " The decoder may read rtpdump files containing TS26.445 Annex A.2.2\n" ); - fprintf( stdout, " EVS RTP Payload Format. The SDP parameter hf_only is required.\n" ); - fprintf( stdout, " Reading RFC4867 AMR/AMR-WB RTP payload format is not supported.\n" ); -#endif #ifdef SUPPORT_JBM_TRACEFILE fprintf( stdout, "-Tracefile TF : VoIP mode: Generate trace file named TF. Requires -no_delay_cmp to\n" ); fprintf( stdout, " be enabled so that trace contents remain in sync with audio output.\n" ); @@ -1923,10 +1836,8 @@ static void usage_dec( void ) fprintf( stdout, "-rvf File : Reference vector specified by external trajectory File\n" ); fprintf( stdout, " works only in combination with '-otr ref_vec' and 'ref_vec_lev' modes\n" ); fprintf( stdout, "-render_config File : Renderer configuration File\n" ); -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE fprintf( stdout, "-room_size (S|M|L) : Selects default reverb based on a room size (S - small | M - medium | L - large)\n" ); fprintf( stdout, " for BINAURAL_ROOM_REVERB output configuration,\n" ); -#endif fprintf( stdout, "-om File : Metadata output File for BINAURAL_SPLIT_PCM OutputConf (only for Fs = 48 kHz)\n" ); fprintf( stdout, "-non_diegetic_pan P : panning mono non-diegetic sound to stereo with panning P, -90<= P <=90,\n" ); fprintf( stdout, " left or l or 90->left, right or r or -90->right, center or c or 0->middle\n" ); @@ -1999,9 +1910,7 @@ static ivas_error initOnFirstGoodFrame( IsmFileWriter *ismWriters[IVAS_MAX_NUM_OBJECTS], /* o : */ int16_t *pNumOutChannels, /* o : */ uint16_t *pNumObj, /* o : */ -#ifdef IVAS_RTPDUMP - IVAS_RTP *srRtp, /* o : */ -#endif + IVAS_RTP *srRtp, /* o : */ SplitFileReadWrite **splitRendWriter ) { int16_t isSplitRend, isSplitCoded; @@ -2054,23 +1963,12 @@ static ivas_error initOnFirstGoodFrame( int16_t splitRendIsarFrameSizeMs; int16_t lc3plusHighRes; -#ifdef NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ uint16_t rtpDecSeed = RANDOM_INITSEED_DEC; uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpDecSeed ) << 16 ); uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpDecSeed ); -#else -#ifdef FIXED_RTP_SEQUENCE_NUM - /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we - use fixed seed for random num generator for regression based tests. Any realtime - application should implement this initialization seperately */ - srand( RANDOM_INITSEED_DEC ); - uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 ); - uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF ); -#endif -#endif if ( ( error = IVAS_DEC_GetDelay( hIvasDec, delayNumSamples_temp, &delayTimeScale_temp ) ) != IVAS_ERR_OK ) { @@ -2084,7 +1982,6 @@ static ivas_error initOnFirstGoodFrame( return error; } -#ifdef IVAS_RTPDUMP /* Split Rendering RTPDump Output file */ if ( arg.rtpOutSR && srRtp != NULL ) { @@ -2097,36 +1994,20 @@ static ivas_error initOnFirstGoodFrame( fParamsSR = fopen( srParamsFile, "w" ); if ( NULL != fParamsSR ) { -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE fprintf( fParamsSR, "DOF = %d;\nLC3PLUS_HIGHRES = %d;\n", poseCorrection, lc3plusHighRes ); -#else - fprintf( fParamsSR, "CODEC = %s;\nDOF = %d;\nFRAMESIZE = %d;\nRENDERSIZE = %d;\nLC3PLUS_HIGHRES = %d;\n", - splitRendCodec == ISAR_SPLIT_REND_CODEC_LC3PLUS ? "LC3PLUS" : "LCLD", - poseCorrection, - splitRendCodecFrameSizeMs, - splitRendIsarFrameSizeMs, - lc3plusHighRes ); -#endif fclose( fParamsSR ); fParamsSR = NULL; } /* Split Rendering RTPDump Output file */ -#ifdef FIXED_RTP_SEQUENCE_NUM if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ), ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_RTP_WRITER_Init( srRtp, arg.outputWavFilename, 1000 / ( IVAS_NUM_FRAMES_PER_SEC * splitRendCodecFrameSizeMs ) ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nError: Can't open SR output bitstream file for RTP output %s \n\n", arg.outputWavFilename ); return error; } } else if ( isSplitCoded ) -#else - if ( isSplitCoded ) -#endif { if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputWavFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs, splitRendIsarFrameSizeMs, arg.output_Fs, lc3plusHighRes ) ) != IVAS_ERR_OK ) { @@ -2160,7 +2041,6 @@ static ivas_error initOnFirstGoodFrame( } } -#ifdef IVAS_RTPDUMP if ( !arg.rtpOutSR ) { int16_t pcmFrameSize; @@ -2180,11 +2060,7 @@ static ivas_error initOnFirstGoodFrame( for ( int16_t i = 0; i < numInitialBadFrames; ++i ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( isSplitRend ) -#else - if ( *splitRendWriter != NULL ) -#endif { ISAR_SPLIT_REND_BITS_DATA splitRendBitsZero; splitRendBitsZero.bits_buf = NULL; @@ -2203,11 +2079,7 @@ static ivas_error initOnFirstGoodFrame( } } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( !isSplitCoded ) -#else - else -#endif { if ( *pRemainingDelayNumSamples < *numOutSamples ) { @@ -2227,72 +2099,6 @@ static ivas_error initOnFirstGoodFrame( free( zeroBuf ); } -#else - int16_t pcmFrameSize; - if ( ( error = IVAS_DEC_GetOutputBufferSize( hIvasDec, &pcmFrameSize ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nError in IVAS_DEC_GetOutputBufferSize, error code: %d\n", error ); - return error; - } - - /* Write zeros to the output audio buffer */ - int16_t *zeroBuf = calloc( pcmFrameSize, sizeof( int16_t ) ); - if ( zeroBuf == NULL ) - { - fprintf( stdout, "Error: Unable to allocate memory for output buffer.\n" ); - return IVAS_ERR_FAILED_ALLOC; - } - - for ( int16_t i = 0; i < numInitialBadFrames; ++i ) - { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP - if ( isSplitRend ) -#else - if ( *splitRendWriter != NULL ) -#endif - { - ISAR_SPLIT_REND_BITS_DATA splitRendBitsZero; - splitRendBitsZero.bits_buf = NULL; - splitRendBitsZero.bits_read = 0; - splitRendBitsZero.bits_written = 0; - splitRendBitsZero.buf_len = 0; - splitRendBitsZero.codec = ISAR_SPLIT_REND_CODEC_DEFAULT; - splitRendBitsZero.pose_correction = ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE; - splitRendBitsZero.codec_frame_size_ms = 0; - splitRendBitsZero.isar_frame_size_ms = 20; - - if ( split_rend_write_bitstream_to_file( *splitRendWriter, splitRendBitsZero.bits_buf, &splitRendBitsZero.bits_read, &splitRendBitsZero.bits_written ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nUnable to write to bitstream file!\n" ); - return error; - } - } - -#ifdef FIX_1119_SPLIT_RENDERING_VOIP - if ( !isSplitCoded ) -#else - else -#endif - { - if ( *pRemainingDelayNumSamples < *numOutSamples ) - { - if ( ( error = AudioFileWriter_write( *ppAfWriter, zeroBuf, *numOutSamples * *pNumOutChannels - ( *pRemainingDelayNumSamples * *pNumOutChannels ) ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nOutput audio file writer error\n" ); - return error; - } - *pRemainingDelayNumSamples = 0; - } - else - { - *pRemainingDelayNumSamples -= *numOutSamples; - } - } - } - - free( zeroBuf ); - -#endif /* Open other output files if EXT output config - now details about ISM or MASA are known */ if ( arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) @@ -2386,11 +2192,7 @@ static ivas_error initOnFirstGoodFrame( } } -#ifdef IVAS_RTPDUMP if ( arg.rtpOutSR || *splitRendWriter != NULL ) -#else - if ( *splitRendWriter != NULL ) -#endif { if ( numOutSamples == NULL || vec_pos_len == NULL ) { @@ -2485,13 +2287,11 @@ static ivas_error decodeG192( return error; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( !isSplitRend ) { /* Ensure split rendering output struct is not used when not outputting to a split rendering output configuration */ splitRendBits = NULL; } -#endif if ( ( error = IVAS_DEC_is_split_rendering_coded_out( hIvasDec, &isSplitCoded ) ) != IVAS_ERR_OK ) { @@ -2828,11 +2628,7 @@ static ivas_error decodeG192( } /* decode transport channels, do TSM and feed to renderer */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, splitRendBits ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, isSplitRend, splitRendBits ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -2934,11 +2730,7 @@ static ivas_error decodeG192( /* Once good frame decoded, catch up */ if ( decodedGoodFrame ) { -#ifdef IVAS_RTPDUMP if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, &vec_pos_len, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, NULL, &splitRendWriter ) ) != IVAS_ERR_OK ) -#else - if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, &vec_pos_len, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK ) -#endif { goto cleanup; } @@ -3277,61 +3069,24 @@ static ivas_error printBitstreamInfoVoip( { bool previewFailed = true; ivas_error error = IVAS_ERR_OK; -#ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp; uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3]; int16_t auSizeBits; uint8_t *auPtr = NULL; -#else - FILE *f_rtpstream = NULL; - EVS_RTPDUMP_DEPACKER rtpdumpDepacker; - EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR; - bool isAMRWB_IOmode; - uint16_t frameTypeIndex; - uint8_t au[( IVAS_MAX_BITS_PER_FRAME + 7 ) >> 3]; - int16_t auSizeBits; - uint8_t *auPtr = NULL; -#endif bool qBit; uint32_t nextPacketRcvTime_ms = 0; uint16_t rtpSequenceNumber; uint32_t rtpTimeStamp; -#ifndef IVAS_RTPDUMP - rtpdumpDepacker.rtpdump = NULL; -#endif switch ( arg.inputFormat ) { case IVAS_DEC_INPUT_FORMAT_RTPDUMP: case IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF: -#ifdef IVAS_RTPDUMP -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 - if ( ( error = IVAS_RTP_READER_Init( &ivasRtp, 0, arg.inputBitstreamFilename, arg.piOutputFilename, arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL, arg.outputWavFilename ) ) != IVAS_ERR_OK ) -#endif -#else if ( ( error = IVAS_RTP_READER_Init( &ivasRtp, arg.inputBitstreamFilename, arg.piOutputFilename, arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL, arg.outputWavFilename ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "error in IVAS_RTP_READER_Init(): %d\n", error ); goto cleanup; } -#else - f_rtpstream = fopen( arg.inputBitstreamFilename, "r" ); - - if ( f_rtpstream == NULL ) - { - fprintf( stderr, "could not open: %s\n", arg.inputBitstreamFilename ); - goto cleanup; - } - - rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_open( &rtpdumpDepacker, f_rtpstream, arg.inputFormat == IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF ); - if ( rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) - { - fprintf( stderr, "error in EVS_RTPDUMP_DEPACKER_open(): %d\n", rtpdumpDepackerError ); - goto cleanup; - } -#endif break; case IVAS_DEC_INPUT_FORMAT_G192: auPtr = au; @@ -3352,24 +3107,12 @@ static ivas_error printBitstreamInfoVoip( else { auPtr = au; /* might have been set to RTP packet in prev call */ -#ifdef IVAS_RTPDUMP -#ifdef RTP_S4_251135_CR26253_0016_REV1 error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSizeBits, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); -#else - error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSizeBits, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit ); -#endif -#else - rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSizeBits ); -#endif /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } -#ifdef IVAS_RTPDUMP if ( error != IVAS_ERR_OK ) -#else - if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) -#endif { fprintf( stderr, "failed to read first RTP packet\n" ); goto cleanup; @@ -3388,11 +3131,7 @@ static ivas_error printBitstreamInfoVoip( cleanup: -#ifdef IVAS_RTPDUMP IVAS_RTP_Term( &ivasRtp ); -#else - EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker ); -#endif if ( previewFailed && error == IVAS_ERR_OK ) { @@ -3426,17 +3165,9 @@ static ivas_error decodeVoIP( RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ISAR_SPLIT_REND_BITS_DATA *splitRendBits, -#endif -#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART IVAS_RENDER_CONFIG_DATA *renderConfig, -#endif -#ifdef DECODER_FORMAT_SWITCHING IVAS_DEC_HANDLE *phIvasDec, -#else - IVAS_DEC_HANDLE hIvasDec, -#endif int16_t *pcmBuf ) { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ @@ -3468,29 +3199,13 @@ static ivas_error decodeVoIP( int16_t delayNumSamples = -1; int32_t delayTimeScale = -1; int16_t i; -#ifdef DECODER_FORMAT_SWITCHING IVAS_DEC_HANDLE hIvasDec = *phIvasDec; bool restartNeeded; -#endif -#ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp = { 0 }; IVAS_RTP srRtp = { 0 }; -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE IVAS_RTP_SR_INFO srInfo = { true, false, 0, 20, IVAS_SR_TRANSPORT_LCLD }; -#else - IVAS_RTP_SR_INFO srInfo = { true, false, 0, IVAS_SR_TRANSPORT_LCLD }; -#endif int32_t initialTsOffsetSystemAndRTP = 0; -#else - FILE *f_rtpstream = NULL; - EVS_RTPDUMP_DEPACKER rtpdumpDepacker; - EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR; -#endif uint8_t *auPtr = NULL; -#ifndef IVAS_RTPDUMP - bool isAMRWB_IOmode; - uint16_t frameTypeIndex; -#endif bool qBit; IVAS_DEC_BS_FORMAT bsFormat = IVAS_DEC_BS_UNKOWN; @@ -3504,7 +3219,6 @@ static ivas_error decodeVoIP( bool parametersAvailableForEditing = false; uint16_t nSamplesRendered = 0; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP SplitFileReadWrite *splitRendWriter = NULL; int16_t isSplitRend, isSplitCoded; @@ -3525,7 +3239,6 @@ static ivas_error decodeVoIP( fprintf( stderr, "\nError in IVAS_DEC_is_split_rendering_coded_out, code: %d\n", error ); return error; } -#endif vec_pos_update = 0; if ( ( error = IVAS_DEC_GetRenderFramesizeMs( hIvasDec, &systemTimeInc_ms ) ) != IVAS_ERR_OK ) @@ -3551,41 +3264,15 @@ static ivas_error decodeVoIP( delayNumSamples_orig[0] = -1; -#ifndef IVAS_RTPDUMP - rtpdumpDepacker.rtpdump = NULL; -#endif switch ( arg.inputFormat ) { case IVAS_DEC_INPUT_FORMAT_RTPDUMP: case IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF: -#ifdef IVAS_RTPDUMP -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 - if ( ( error = IVAS_RTP_READER_Init( &ivasRtp, 0, arg.inputBitstreamFilename, arg.piOutputFilename, arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL, arg.outputWavFilename ) ) != IVAS_ERR_OK ) -#endif -#else if ( ( error = IVAS_RTP_READER_Init( &ivasRtp, arg.inputBitstreamFilename, arg.piOutputFilename, arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL, arg.outputWavFilename ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "error in IVAS_RTP_READER_Init(): %d\n", error ); goto cleanup; } -#else - f_rtpstream = fopen( arg.inputBitstreamFilename, "r" ); - - if ( f_rtpstream == NULL ) - { - fprintf( stderr, "could not open: %s\n", arg.inputBitstreamFilename ); - goto cleanup; - } - - rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_open( &rtpdumpDepacker, f_rtpstream, arg.inputFormat == IVAS_DEC_INPUT_FORMAT_RTPDUMP_HF ); - if ( rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) - { - fprintf( stderr, "error in EVS_RTPDUMP_DEPACKER_open(): %d\n", rtpdumpDepackerError ); - goto cleanup; - } -#endif break; case IVAS_DEC_INPUT_FORMAT_G192: auPtr = au; @@ -3627,25 +3314,13 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ -#ifdef IVAS_RTPDUMP -#ifdef RTP_S4_251135_CR26253_0016_REV1 error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); -#else - error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit ); -#endif initialTsOffsetSystemAndRTP = rtpTimeStamp - systemTime_ms * 16; /* For time mapping */ -#else - rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, &nextPacketRcvTime_ms, &isAMRWB_IOmode, &frameTypeIndex, &qBit, &auPtr, (uint16_t *) &auSize ); -#endif /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; } -#ifdef IVAS_RTPDUMP if ( error != IVAS_ERR_OK ) -#else - if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) -#endif { fprintf( stderr, "failed to read first RTP packet\n" ); goto cleanup; @@ -3674,7 +3349,6 @@ static ivas_error decodeVoIP( { nSamplesRendered = 0; -#ifdef DECODER_FORMAT_SWITCHING /* restart decoder in case of format switching */ if ( ivasRtp.restartNeeded ) { @@ -3683,11 +3357,7 @@ static ivas_error decodeVoIP( &hIvasDec, newDecModeInPacket, &arg, -#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART renderConfig, -#else - NULL, /* ToDo : Provide rendererConfig */ -#endif NULL /* ToDo : Provide LS Custom Data */ ) ) != IVAS_ERR_OK ) { @@ -3698,7 +3368,6 @@ static ivas_error decodeVoIP( *phIvasDec = hIvasDec; /* Update for main()' s free */ ivasRtp.restartNeeded = false; } -#endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) @@ -3841,38 +3510,17 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ -#ifdef IVAS_RTPDUMP -#ifdef RTP_S4_251135_CR26253_0016_REV1 error = IVAS_RTP_ReadNextFrame( &ivasRtp, au, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); -#else - error = IVAS_RTP_ReadNextFrame( &ivasRtp, au, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit ); -#endif /* IVAS RTP payload format has timescale 16000, JBM uses 1000 internally */ rtpTimeStamp = rtpTimeStamp / 16; -#else - rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_readNextFrame( &rtpdumpDepacker, &rtpSequenceNumber, &rtpTimeStamp, - &nextPacketRcvTime_ms, - &isAMRWB_IOmode, &frameTypeIndex, &qBit, - &auPtr, (uint16_t *) &auSize ); - /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ - rtpTimeStamp = rtpTimeStamp / 16; -#endif } -#ifdef IVAS_RTPDUMP if ( error == IVAS_ERR_END_OF_FILE ) -#else - if ( error == IVAS_ERR_END_OF_FILE || rtpdumpDepackerError == EVS_RTPDUMP_DEPACKER_EOF ) -#endif { /* finished reading */ nextPacketRcvTime_ms = (uint32_t) -1; } -#ifdef IVAS_RTPDUMP else if ( error != IVAS_ERR_OK ) -#else - else if ( error != IVAS_ERR_OK || rtpdumpDepackerError != EVS_RTPDUMP_DEPACKER_NO_ERROR ) -#endif { fprintf( stderr, "\nError in BS_Reader_ReadVoipFrame_compact, error code: %d\n", error ); goto cleanup; @@ -3896,7 +3544,6 @@ static ivas_error decodeVoIP( /* decode and get samples */ while ( nSamplesRendered < nOutSamples ) { -#ifdef IVAS_RTPDUMP if ( arg.applyPiData ) { /* Rudimentry Time Mapping to map system time to rtp timestamp */ @@ -3917,8 +3564,6 @@ static ivas_error decodeVoIP( ivasRtp.nProcPiData += numPiData; } -#endif -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( isSplitRend ) { #ifdef SUPPORT_JBM_TRACEFILE @@ -3933,19 +3578,16 @@ static ivas_error decodeVoIP( } else { -#endif #ifdef SUPPORT_JBM_TRACEFILE if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, writeJbmTraceFileFrameWrapper, jbmTraceWriter, &bitstreamReadDone, &nSamplesRendered, ¶metersAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #else - if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_DEC_VoIP_GetSamples( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &bitstreamReadDone, &nSamplesRendered, ¶meterAvailableForEditing, systemTime_ms ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP } -#endif if ( bitstreamReadDone == true ) { @@ -3957,7 +3599,6 @@ static ivas_error decodeVoIP( return error; } -#ifdef DECODER_FORMAT_SWITCHING /* restart decoder in case of format switching */ if ( ( error = IVAS_DEC_isRestartNeeded( hIvasDec, &restartNeeded ) ) != IVAS_ERR_OK ) { @@ -3987,7 +3628,6 @@ static ivas_error decodeVoIP( } *phIvasDec = hIvasDec; /* Update for main()' s free */ } -#endif /* Placeholder for memory reallocation */ /* ... */ @@ -4057,20 +3697,8 @@ static ivas_error decodeVoIP( /* Once good frame decoded, catch up */ if ( decodedGoodFrame ) { -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - SplitFileReadWrite *splitRendWriter = NULL; - -#endif -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, &vec_pos_len, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, -#else - if ( ( error = initOnFirstGoodFrame( hIvasDec, arg, numInitialBadFrames, &nOutSamples, NULL, delayNumSamples_orig, &delayNumSamples, &delayTimeScale, -#endif -#ifdef IVAS_RTPDUMP &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &srRtp, &splitRendWriter ) ) != IVAS_ERR_OK ) -#else - &bsFormat, &afWriter, &masaWriter, ismWriters, &nOutChannels, &numObj, &splitRendWriter ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "Error in initOnFirstGoodFrame(): %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -4083,13 +3711,8 @@ static ivas_error decodeVoIP( } /* Write current frame */ -#ifdef IVAS_RTPDUMP if ( !srRtp.hPack && decodedGoodFrame ) -#else - if ( decodedGoodFrame ) -#endif { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( isSplitRend ) { if ( split_rend_write_bitstream_to_file( splitRendWriter, splitRendBits->bits_buf, &splitRendBits->bits_read, &splitRendBits->bits_written ) != IVAS_ERR_OK ) @@ -4101,7 +3724,6 @@ static ivas_error decodeVoIP( if ( !isSplitCoded ) { -#endif if ( delayNumSamples < nOutSamples ) { if ( ( error = AudioFileWriter_write( afWriter, &pcmBuf[delayNumSamples * nOutChannels], nOutSamples * nOutChannels - ( delayNumSamples * nOutChannels ) ) ) != IVAS_ERR_OK ) @@ -4115,9 +3737,7 @@ static ivas_error decodeVoIP( { delayNumSamples -= nOutSamples; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP } -#endif /* Write ISM metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) @@ -4176,7 +3796,6 @@ static ivas_error decodeVoIP( IVAS_RTP_WriteExtPiData( ivasRtp.f_piExtOut, ivasRtp.piData, ivasRtp.nReadPiData, numObj ); } } -#ifdef IVAS_RTPDUMP else if ( decodedGoodFrame ) { srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms; @@ -4190,7 +3809,6 @@ static ivas_error decodeVoIP( splitRendBits->bits_written = 0; splitRendBits->bits_read = 0; } -#endif vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( vec_pos_update == 0 ) @@ -4223,11 +3841,7 @@ static ivas_error decodeVoIP( goto cleanup; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( nSamplesFlushed && !isSplitCoded ) -#else - if ( nSamplesFlushed ) -#endif { /* Write current frame */ if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) @@ -4300,18 +3914,14 @@ static ivas_error decodeVoIP( memset( pcmBuf, 0, delayNumSamples_orig[0] * nOutChannels * sizeof( int16_t ) ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( afWriter != NULL ) { -#endif if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, delayNumSamples_orig[0] * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing output file: %s\n", ivas_error_to_string( error ) ); goto cleanup; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP } -#endif /*------------------------------------------------------------------------------------------* * Printouts after decoding has finished @@ -4356,16 +3966,10 @@ static ivas_error decodeVoIP( cleanup: -#ifdef IVAS_RTPDUMP IVAS_RTP_Term( &srRtp ); IVAS_RTP_Term( &ivasRtp ); -#else - EVS_RTPDUMP_DEPACKER_close( &rtpdumpDepacker ); -#endif AudioFileWriter_close( &afWriter ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP split_rend_reader_writer_close( &splitRendWriter ); -#endif JbmOffsetFileWriter_close( &jbmOffsetWriter ); #ifdef SUPPORT_JBM_TRACEFILE JbmTraceFileWriter_close( &jbmTraceWriter ); @@ -4448,7 +4052,6 @@ static void do_object_editing( editableParameters->ism_metadata[obj_idx].elevation = readInfo->obj_ele[obj_idx]; } } -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA /* object direction editing only for diegetic objects */ if ( readInfo->obj_yaw_edited[obj_idx] ) { @@ -4487,7 +4090,6 @@ static void do_object_editing( editableParameters->ism_metadata[obj_idx].radius = readInfo->obj_radius[obj_idx]; } } -#endif } /* gain editing for all objects */ @@ -4709,7 +4311,6 @@ static ivas_error load_hrtf_from_file( return IVAS_ERR_OK; } -#ifdef DECODER_FORMAT_SWITCHING /*---------------------------------------------------------------------* * restartDecoder() @@ -4750,15 +4351,9 @@ static ivas_error restartDecoder( uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : 65535; IVAS_AUDIO_CONFIG outputConfig = ( decMode == IVAS_DEC_MODE_IVAS ) ? arg->outputConfig : IVAS_AUDIO_CONFIG_MONO; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->renderFramesize, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, arg->enableHeadRotation, arg->enableExternalOrientation, arg->orientation_tracking, arg->renderConfigEnabled, arg->roomSize, arg->non_diegetic_pan_enabled, arg->non_diegetic_pan_gain, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_DEC_Configure( hIvasDec, arg->output_Fs, outputConfig, arg->renderFramesize, arg->customLsOutputEnabled, arg->hrtfReaderEnabled, - arg->enableHeadRotation, arg->enableExternalOrientation, arg->orientation_tracking, arg->renderConfigEnabled, arg->non_diegetic_pan_enabled, - arg->non_diegetic_pan_gain, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; @@ -4770,24 +4365,6 @@ static ivas_error restartDecoder( goto cleanup; } -#ifndef FIX_SPLIT_RENDERING_ON_DECODER_RESTART - if ( arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg->outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) - { - if ( ( error = IVAS_DEC_EnableSplitRendering( hIvasDec ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nSplit rendering configure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - if ( ( error = IVAS_DEC_GetRenderFramesize( hIvasDec, &arg->renderFramesize ) ) != IVAS_ERR_OK ) - { - fprintf( stderr, "\nConfigure failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); - goto cleanup; - } - - arg->enableHeadRotation = true; - } -#endif if ( arg->voipMode ) { @@ -4804,14 +4381,12 @@ static ivas_error restartDecoder( goto cleanup; } -#ifdef FIX_SPLIT_RENDERING_ON_DECODER_RESTART /* ISAR frame size is set from command line, not renderer config file. * This will be ignored if output format is not split rendering. */ if ( renderConfig != NULL ) { renderConfig->split_rend_config.isar_frame_size_ms = (int16_t) arg->renderFramesize /* given in number of 5ms subframes */ * 5; } -#endif if ( arg->renderConfigEnabled && renderConfig != NULL ) { @@ -4837,6 +4412,5 @@ cleanup: IVAS_DEC_Close( phIvasDec ); return error; } -#endif #undef WMC_TOOL_SKIP diff --git a/apps/encoder.c b/apps/encoder.c index 2c9c42b462..dc051562c9 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -38,10 +38,8 @@ #include "ism_file_reader.h" #include "jbm_file_reader.h" #include "masa_file_reader.h" -#ifdef IVAS_RTPDUMP #include "rotation_file_reader.h" #include "ivas_rtp_file.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -61,13 +59,7 @@ static #endif int32_t frame = 0; /* Counter of frames */ -#ifdef NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS #define RANDOM_INITSEED_ENC ( 0xDEAF ) -#else -#ifdef FIXED_RTP_SEQUENCE_NUM -#define RANDOM_INITSEED_ENC ( 0xFEEDDEAF ) -#endif -#endif #define DEFAULT_FIXED_SID_RATE 8 /* DTX SID rate */ @@ -160,12 +152,10 @@ typedef struct #endif bool pca; bool ism_extended_metadata; -#ifdef IVAS_RTPDUMP bool rtpdumpOutput; uint32_t numFramesPerPacket; char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; -#endif } EncArguments; @@ -209,10 +199,8 @@ int main( MasaFileReader *masaReader = NULL; IsmFileReader *ismReaders[IVAS_MAX_NUM_OBJECTS] = { NULL, NULL, NULL, NULL }; int16_t *pcmBuf = NULL; -#ifdef IVAS_RTPDUMP RotFileReader *sceneOrientationFileReader = NULL; RotFileReader *deviceOrientationFileReader = NULL; -#endif #ifdef DEBUGGING FILE *f_forcedModeProfile = NULL; #ifdef DEBUG_SBA @@ -233,28 +221,15 @@ int main( enable_float_exception_trap( FLE_MASK_DENORM | FLE_MASK_UNDERFLOW ); #endif -#ifdef IVAS_RTPDUMP uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; IVAS_RTP ivasRtp = { 0 }; -#endif -#ifdef NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ uint16_t rtpEncSeed = RANDOM_INITSEED_ENC; uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) << 16 ); uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpEncSeed ); -#else -#ifdef FIXED_RTP_SEQUENCE_NUM - /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we - use fixed seed for random num generator for regression based tests. Any realtime - application should implement this initialization seperately */ - srand( RANDOM_INITSEED_ENC ); - uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 ); - uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF ); -#endif -#endif /*------------------------------------------------------------------------------------------* * Parse command-line arguments @@ -284,11 +259,7 @@ int main( const BS_WRITER_FORMAT bsWriterFormat = arg.mimeOutput ? BS_WRITER_FORMAT_MIME : BS_WRITER_FORMAT_G192; -#ifdef IVAS_RTPDUMP if ( !arg.rtpdumpOutput && BS_Writer_Open_filename( &hBsWriter, arg.outputBitstreamFilename, bsWriterFormat ) != IVAS_ERR_OK ) -#else - if ( BS_Writer_Open_filename( &hBsWriter, arg.outputBitstreamFilename, bsWriterFormat ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nCan't open %s\n\n", arg.outputBitstreamFilename ); goto cleanup; @@ -646,18 +617,13 @@ int main( } } -#ifdef IVAS_RTPDUMP /*------------------------------------------------------------------------------------------* * RTPDump *------------------------------------------------------------------------------------------*/ if ( arg.rtpdumpOutput ) { -#ifdef FIXED_RTP_SEQUENCE_NUM if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_RTP_WRITER_Init( &ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename ); goto cleanup; @@ -689,7 +655,6 @@ int main( goto cleanup; } } -#endif /*------------------------------------------------------------------------------------------* * Run the encoder @@ -859,7 +824,6 @@ int main( } /* *** Encode one frame *** */ -#ifdef IVAS_RTPDUMP if ( ivasRtp.hPack ) { bool isMono = ( arg.inputFormat == IVAS_ENC_INPUT_MONO ); @@ -907,11 +871,7 @@ int main( goto cleanup; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = IVAS_RTP_WriteNextFrame( &ivasRtp, au, NULL, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_RTP_WriteNextFrame( &ivasRtp, au, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nError %s while pushing audio frame to RTP pack\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; @@ -919,7 +879,6 @@ int main( } else { -#endif if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); @@ -932,9 +891,7 @@ int main( fprintf( stderr, "\nBS_Writer_WriteFrame_short failed, error code %d\n\n", error ); goto cleanup; } -#ifdef IVAS_RTPDUMP } -#endif frame++; if ( !arg.quietModeEnabled ) @@ -1012,7 +969,6 @@ cleanup: fclose( f_bitrateProfile ); } -#ifdef IVAS_RTPDUMP if ( sceneOrientationFileReader ) { RotationFileReader_close( &sceneOrientationFileReader ); @@ -1024,7 +980,6 @@ cleanup: } IVAS_RTP_Term( &ivasRtp ); -#endif IVAS_ENC_Close( &hIvasEnc ); @@ -1096,11 +1051,9 @@ static bool parseCmdlIVAS_enc( arg->mimeOutput = false; arg->ism_extended_metadata = false; arg->complexityLevel = IVAS_ENC_COMPLEXITY_LEVEL_THREE; -#ifdef IVAS_RTPDUMP arg->rtpdumpOutput = false; arg->sceneOrientationTrajFileName = NULL; arg->deviceOrientationTrajFileName = NULL; -#endif #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; arg->forcedModeFile = NULL; @@ -1894,7 +1847,6 @@ static bool parseCmdlIVAS_enc( i++; } -#ifdef IVAS_RTPDUMP /*-----------------------------------------------------------------* * RTPDump output *-----------------------------------------------------------------*/ @@ -1960,7 +1912,6 @@ static bool parseCmdlIVAS_enc( i++; } -#endif /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ @@ -1972,7 +1923,6 @@ static bool parseCmdlIVAS_enc( } } /* end of while */ -#ifdef IVAS_RTPDUMP if ( arg->sceneOrientationTrajFileName != NULL && arg->rtpdumpOutput == false ) { fprintf( stderr, "Error: Scene orientations are only enabled with rtpdump output!\n\n" ); @@ -1987,7 +1937,6 @@ static bool parseCmdlIVAS_enc( return false; } -#endif /*-----------------------------------------------------------------* * Mandatory input arguments *-----------------------------------------------------------------*/ @@ -2194,14 +2143,12 @@ static void usage_enc( void ) #endif fprintf( stdout, "-q : Quiet mode, no frame counters\n" ); fprintf( stdout, " default is deactivated\n" ); -#ifdef IVAS_RTPDUMP fprintf( stdout, "-rtpdump : RTPDump output, hf_only=1 by default. The encoder will packetize the \n" ); fprintf( stdout, " bitstream frames into TS26.253 Annex A IVAS RTP Payload Format packets and \n" ); fprintf( stdout, " writes those to the output file. In EVS mono operating mode, TS26.445 Annex A.2.2 \n" ); fprintf( stdout, " EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" ); fprintf( stdout, "-scene_orientation : Scene orientation trajectory file. Only used with rtpdump output.\n" ); fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" ); -#endif fprintf( stdout, "\n" ); return; diff --git a/apps/encoder_fmtsw.c b/apps/encoder_fmtsw.c index 1730018f8e..0b7cf0271d 100644 --- a/apps/encoder_fmtsw.c +++ b/apps/encoder_fmtsw.c @@ -38,10 +38,8 @@ #include "ism_file_reader.h" #include "jbm_file_reader.h" #include "masa_file_reader.h" -#ifdef IVAS_RTPDUMP #include "rotation_file_reader.h" #include "ivas_rtp_file.h" -#endif #ifdef DEBUGGING #include "debug.h" #endif @@ -64,13 +62,7 @@ static #endif int32_t frame = 0; /* Counter of frames */ -#ifdef NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS #define RANDOM_INITSEED_ENC ( 0xDEAF ) -#else -#ifdef FIXED_RTP_SEQUENCE_NUM -#define RANDOM_INITSEED_ENC ( 0xFEEDDEAF ) -#endif -#endif #define DEFAULT_FIXED_SID_RATE 8 /* DTX SID rate */ @@ -163,12 +155,10 @@ typedef struct #endif bool pca; bool ism_extended_metadata; -#ifdef IVAS_RTPDUMP bool rtpdumpOutput; uint32_t numFramesPerPacket; char *sceneOrientationTrajFileName; char *deviceOrientationTrajFileName; -#endif } EncArguments; @@ -186,11 +176,7 @@ static ivas_error readForcedMode( FILE *file, IVAS_ENC_FORCED_MODE *forcedMode, static IVAS_ENC_FORCED_MODE parseForcedMode( char *forcedModeChar ); #endif static void str2arg( char *str, int *argc_local, char *argv_local[] ); -#ifdef IVAS_RTPDUMP static int encoder_main( int argc, char *argv[], IVAS_RTP *ivasRtp, int init_RtpWriter ); -#else -static int encoder_main( int argc, char *argv[] ); -#endif /*------------------------------------------------------------------------------------------* @@ -209,11 +195,9 @@ int main( char line[2048]; int argc_local = 0; char *argv_local[MAX_ARGV] = { 0 }; -#ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp = { 0 }; char prev_outputBitstreamFilename[2048] = { 0 }; int rtp_term = 0; -#endif IVAS_ENC_PrintDisclaimer(); @@ -237,7 +221,6 @@ int main( line[strcspn( line, "\r\n" )] = 0; printf( "Processing format switching commandline: %s\n", line ); str2arg( line, &argc_local, argv_local ); -#ifdef IVAS_RTPDUMP if ( strcmp( argv_local[argc_local - 1], (char *) prev_outputBitstreamFilename ) == 0 ) { /* append to last Rtp file */ @@ -262,9 +245,6 @@ int main( rtp_term = 1; } strcpy( (char *) prev_outputBitstreamFilename, argv_local[argc_local - 1] ); -#else - encoder_main( argc_local, argv_local ); -#endif } /*------------------------------------------------------------------------------------------* @@ -275,9 +255,7 @@ int main( cleanup: -#ifdef IVAS_RTPDUMP IVAS_RTP_Term( &ivasRtp ); -#endif if ( FmtSWFile ) { fclose( FmtSWFile ); @@ -311,13 +289,9 @@ void str2arg( int encoder_main( int argc, -#ifdef IVAS_RTPDUMP char *argv[], IVAS_RTP *ivasRtp, int init_RtpWriter ) -#else - char *argv[] ) -#endif { bool mainFailed = true; /* Assume main failed until cleanup is reached without errors */ EncArguments arg; @@ -334,10 +308,8 @@ int encoder_main( MasaFileReader *masaReader = NULL; IsmFileReader *ismReaders[IVAS_MAX_NUM_OBJECTS] = { NULL, NULL, NULL, NULL }; int16_t *pcmBuf = NULL; -#ifdef IVAS_RTPDUMP RotFileReader *sceneOrientationFileReader = NULL; RotFileReader *deviceOrientationFileReader = NULL; -#endif #ifdef DEBUGGING FILE *f_forcedModeProfile = NULL; #ifdef DEBUG_SBA @@ -358,28 +330,15 @@ int encoder_main( enable_float_exception_trap( FLE_MASK_DENORM | FLE_MASK_UNDERFLOW ); #endif -#ifdef IVAS_RTPDUMP uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; /* IVAS_RTP ivasRtp = { 0 }; */ -#endif -#ifdef NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we use fixed seed for random num generator for regression based tests. Any realtime application should implement this initialization seperately */ uint16_t rtpEncSeed = RANDOM_INITSEED_ENC; uint32_t ssrc = ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) & 0x0000FFFF ) | ( (uint32_t) IVAS_RTP_OwnRandom( &rtpEncSeed ) << 16 ); uint16_t seqNumInitVal = IVAS_RTP_OwnRandom( &rtpEncSeed ); -#else -#ifdef FIXED_RTP_SEQUENCE_NUM - /* Ideally ssrc is negotiated via SDP and sequence number is radomized but we - use fixed seed for random num generator for regression based tests. Any realtime - application should implement this initialization seperately */ - srand( RANDOM_INITSEED_ENC ); - uint32_t ssrc = ( (uint32_t) rand() & 0x0000FFFF ) | ( (uint32_t) rand() << 16 ); - uint16_t seqNumInitVal = (uint16_t) ( rand() & 0xFFFF ); -#endif -#endif /*------------------------------------------------------------------------------------------* * Parse command-line arguments @@ -407,11 +366,7 @@ int encoder_main( *------------------------------------------------------------------------------------------*/ const BS_WRITER_FORMAT bsWriterFormat = arg.mimeOutput ? BS_WRITER_FORMAT_MIME : BS_WRITER_FORMAT_G192; -#ifdef IVAS_RTPDUMP if ( !arg.rtpdumpOutput && BS_Writer_Open_filename( &hBsWriter, arg.outputBitstreamFilename, bsWriterFormat ) != IVAS_ERR_OK ) -#else - if ( BS_Writer_Open_filename( &hBsWriter, arg.outputBitstreamFilename, bsWriterFormat ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nCan't open %s\n\n", arg.outputBitstreamFilename ); goto cleanup; @@ -769,18 +724,13 @@ int encoder_main( } } -#ifdef IVAS_RTPDUMP /*------------------------------------------------------------------------------------------* * RTPDump *------------------------------------------------------------------------------------------*/ if ( arg.rtpdumpOutput && init_RtpWriter ) { -#ifdef FIXED_RTP_SEQUENCE_NUM if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket, ssrc, seqNumInitVal ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_RTP_WRITER_Init( ivasRtp, arg.outputBitstreamFilename, arg.numFramesPerPacket ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nError: Can't open output bitstream file for RTP output %s \n\n", arg.outputBitstreamFilename ); goto cleanup; @@ -812,7 +762,6 @@ int encoder_main( goto cleanup; } } -#endif /*------------------------------------------------------------------------------------------* * Run the encoder @@ -982,7 +931,6 @@ int encoder_main( } /* *** Encode one frame *** */ -#ifdef IVAS_RTPDUMP if ( ivasRtp->hPack ) { bool isMono = ( arg.inputFormat == IVAS_ENC_INPUT_MONO ); @@ -1030,11 +978,7 @@ int encoder_main( goto cleanup; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( error = IVAS_RTP_WriteNextFrame( ivasRtp, au, NULL, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_RTP_WriteNextFrame( ivasRtp, au, numBits, isMono, forcePacket ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nError %s while pushing audio frame to RTP pack\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; @@ -1042,7 +986,6 @@ int encoder_main( } else { -#endif if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); @@ -1055,9 +998,7 @@ int encoder_main( fprintf( stderr, "\nBS_Writer_WriteFrame_short failed, error code %d\n\n", error ); goto cleanup; } -#ifdef IVAS_RTPDUMP } -#endif frame++; if ( !arg.quietModeEnabled ) @@ -1135,7 +1076,6 @@ cleanup: fclose( f_bitrateProfile ); } -#ifdef IVAS_RTPDUMP if ( sceneOrientationFileReader ) { RotationFileReader_close( &sceneOrientationFileReader ); @@ -1147,7 +1087,6 @@ cleanup: } /* IVAS_RTP_Term( &ivasRtp ); */ -#endif IVAS_ENC_Close( &hIvasEnc ); @@ -1214,11 +1153,9 @@ static bool parseCmdlIVAS_enc( arg->mimeOutput = false; arg->ism_extended_metadata = false; arg->complexityLevel = IVAS_ENC_COMPLEXITY_LEVEL_THREE; -#ifdef IVAS_RTPDUMP arg->rtpdumpOutput = false; arg->sceneOrientationTrajFileName = NULL; arg->deviceOrientationTrajFileName = NULL; -#endif #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; @@ -2013,7 +1950,6 @@ static bool parseCmdlIVAS_enc( i++; } -#ifdef IVAS_RTPDUMP /*-----------------------------------------------------------------* * RTPDump output *-----------------------------------------------------------------*/ @@ -2077,7 +2013,6 @@ static bool parseCmdlIVAS_enc( i++; } -#endif /*-----------------------------------------------------------------* * Option not recognized *-----------------------------------------------------------------*/ @@ -2089,7 +2024,6 @@ static bool parseCmdlIVAS_enc( } } /* end of while */ -#ifdef IVAS_RTPDUMP if ( arg->sceneOrientationTrajFileName != NULL && arg->rtpdumpOutput == false ) { fprintf( stderr, "Error: Scene orientations are only enabled with rtpdump output!\n\n" ); @@ -2103,7 +2037,6 @@ static bool parseCmdlIVAS_enc( return false; } -#endif /*-----------------------------------------------------------------* * Mandatory input arguments *-----------------------------------------------------------------*/ @@ -2310,14 +2243,12 @@ static void usage_enc( void ) #endif fprintf( stdout, "-q : Quiet mode, no frame counters\n" ); fprintf( stdout, " default is deactivated\n" ); -#ifdef IVAS_RTPDUMP fprintf( stdout, "-rtpdump : RTPDump output, hf_only=1 by default. The encoder will packetize the \n" ); fprintf( stdout, " bitstream frames into TS26.253 Annex A IVAS RTP Payload Format packets and \n" ); fprintf( stdout, " writes those to the output file. In EVS mono operating mode, TS26.445 Annex A.2.2 \n" ); fprintf( stdout, " EVS RTP Payload Format is used. Optional N represents number of frames per RTP packet\n" ); fprintf( stdout, "-scene_orientation : Scene orientation trajectory file. Only used with rtpdump output.\n" ); fprintf( stdout, "-device_orientation : Device orientation trajectory file. Only used with rtpdump output.\n" ); -#endif fprintf( stdout, "\n" ); return; diff --git a/apps/isar_post_rend.c b/apps/isar_post_rend.c index 96dc9b827f..cdcdad4901 100644 --- a/apps/isar_post_rend.c +++ b/apps/isar_post_rend.c @@ -48,9 +48,7 @@ #include "debug.h" #endif #include "wmc_auto.h" -#ifdef RTP_S4_251135_CR26253_0016_REV1 #include "ivas_rtp_file.h" -#endif #define WMC_TOOL_SKIP @@ -81,9 +79,7 @@ static typedef struct { -#ifdef RTP_S4_251135_CR26253_0016_REV1 bool srRtp; -#endif IVAS_AUDIO_CONFIG audioConfig; int32_t inputChannelIndex; float gain_dB; @@ -105,9 +101,7 @@ typedef struct char executableName[POST_REND_MAX_CLI_ARG_LENGTH]; char inputFilePath[POST_REND_MAX_CLI_ARG_LENGTH]; char outputFilePath[POST_REND_MAX_CLI_ARG_LENGTH]; -#ifdef RTP_S4_251135_CR26253_0016_REV1 char srParamsFilePath[POST_REND_MAX_CLI_ARG_LENGTH]; -#endif int32_t sampleRate; InputConfig inConfig; OutputConfig outConfig; @@ -137,9 +131,7 @@ typedef enum CmdLnOptionId_listFormats, CmdLnOptionId_SplitRendBFIFile, CmdLnOptionId_framing, -#ifdef RTP_S4_251135_CR26253_0016_REV1 CmdLnOptionId_srParamsFile, -#endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -215,14 +207,12 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "fr", .description = "Set Render audio framing.", }, -#ifdef RTP_S4_251135_CR26253_0016_REV1 { .id = CmdLnOptionId_srParamsFile, .match = "sr_params", .matchShort = "s", .description = "Path to the split rendering init params file", }, -#endif }; @@ -234,11 +224,7 @@ static const int32_t numCliOptions = sizeof( cliOptions ) / sizeof( CmdLnParser_ static void printSupportedAudioConfigs( void ); -#ifdef RTP_S4_251135_CR26253_0016_REV1 static IVAS_AUDIO_CONFIG parseAudioConfig( const char *configString, bool *srRtp ); -#else -static IVAS_AUDIO_CONFIG parseAudioConfig( const char *configString ); -#endif static void convertOutputBuffer( const float *floatBuffer, const int16_t numSamplesPerChannel, const int16_t numChannels, int16_t *intBuffer ); @@ -326,20 +312,14 @@ static bool parseInConfig( } /* Check for single-format inputs. The given string should map to a member of AUDIO_CONFIG enum. */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 bool srRtp = false; IVAS_AUDIO_CONFIG audioConfig = parseAudioConfig( inFormatStr, &srRtp ); -#else - IVAS_AUDIO_CONFIG audioConfig = parseAudioConfig( inFormatStr ); -#endif switch ( audioConfig ) { case IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED: case IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM: inConfig->numBinBuses = 1; -#ifdef RTP_S4_251135_CR26253_0016_REV1 inConfig->binBuses[0].srRtp = srRtp; -#endif inConfig->binBuses[0].audioConfig = audioConfig; inConfig->binBuses[0].inputChannelIndex = 0; inConfig->binBuses[0].gain_dB = 0.0f; @@ -390,19 +370,13 @@ static bool parseRenderFramesize( static IVAS_AUDIO_CONFIG parseAudioConfig( -#ifdef RTP_S4_251135_CR26253_0016_REV1 const char *configString, bool *srRtp ) -#else - const char *configString ) -#endif { char charBuf[25]; charBuf[24] = '\0'; -#ifdef RTP_S4_251135_CR26253_0016_REV1 *srRtp = false; -#endif strncpy( charBuf, configString, sizeof( charBuf ) - 1 ); charBuf[sizeof( charBuf ) - 1] = '\0'; to_upper( charBuf ); @@ -419,13 +393,11 @@ static IVAS_AUDIO_CONFIG parseAudioConfig( { return IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( strcmp( charBuf, "RTPDUMP" ) == 0 ) { *srRtp = true; return IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED; } -#endif return IVAS_AUDIO_CONFIG_INVALID; } @@ -482,9 +454,7 @@ static CmdlnArgs defaultArgs( strncpy( args.executableName, executableName, POST_REND_MAX_CLI_ARG_LENGTH ); clearString( args.inputFilePath ); clearString( args.outputFilePath ); -#ifdef RTP_S4_251135_CR26253_0016_REV1 clearString( args.srParamsFilePath ); -#endif args.sampleRate = 0; args.outConfig.audioConfig = IVAS_AUDIO_CONFIG_INVALID; @@ -592,12 +562,10 @@ static void parseOption( } break; -#ifdef RTP_S4_251135_CR26253_0016_REV1 case CmdLnOptionId_srParamsFile: assert( numOptionValues == 1 ); strncpy( args->srParamsFilePath, optionValues[0], POST_REND_MAX_CLI_ARG_LENGTH - 1 ); break; -#endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; @@ -634,9 +602,7 @@ static void printSupportedAudioConfigs( void ) "BINAURAL (output only)", "BINAURAL_SPLIT_PCM", "BINAURAL_SPLIT_CODED", -#ifdef RTP_S4_251135_CR26253_0016_REV1 "RTPDUMP", -#endif }; fprintf( stdout, "Supported audio formats:\n" ); @@ -729,7 +695,6 @@ static void convertOutputBuffer( return; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 static void trim( char *str ) { char c; @@ -749,9 +714,7 @@ static void trim( char *str ) static ivas_error parseSRParamsFile( const char *srParamsFilePath, -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE const char *rtpFilePath, -#endif ISAR_SPLIT_REND_CODEC *codec, ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, int16_t *codec_frame_size_ms, @@ -778,7 +741,6 @@ static ivas_error parseSRParamsFile( trim( key ); trim( value ); -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE if ( 0 == strncmp( key, "DOF", 3 ) ) { int val = atoi( value ); @@ -795,51 +757,11 @@ static ivas_error parseSRParamsFile( *lc3plusHighRes = (int16_t) val; } } -#else - if ( 0 == strncmp( key, "CODEC", 5 ) ) - { - *codec = ( 0 == strncmp( value, "LCLD", 4 ) ) ? ISAR_SPLIT_REND_CODEC_LCLD : *codec; - *codec = ( 0 == strncmp( value, "LC3PLUS", 7 ) ) ? ISAR_SPLIT_REND_CODEC_LC3PLUS : *codec; - } - else if ( 0 == strncmp( key, "DOF", 3 ) ) - { - int val = atoi( value ); - if ( val == 0 || val == 1 ) - { - *poseCorrection = ( val == 0 ) ? ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE : ISAR_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB; - } - } - else if ( 0 == strncmp( key, "FRAMESIZE", 9 ) ) - { - int val = atoi( value ); - if ( val == 5 || val == 10 || val == 20 ) - { - *codec_frame_size_ms = (int16_t) val; - } - } - else if ( 0 == strncmp( key, "RENDERSIZE", 9 ) ) - { - int val = atoi( value ); - if ( val == 5 || val == 10 || val == 20 ) - { - *isar_frame_size_ms = (int16_t) val; - } - } - else if ( 0 == strncmp( key, "LC3PLUS_HIGHRES", 15 ) ) - { - int val = atoi( value ); - if ( val == 0 || val == 1 ) - { - *lc3plusHighRes = (int16_t) val; - } - } -#endif } } fclose( fParamSR ); -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE { /* Peek the RTP stream to ascertain the codec and codec_frame_size */ ivas_error error = IVAS_ERR_OK; @@ -877,11 +799,9 @@ static ivas_error parseSRParamsFile( } IVAS_RTP_Term( &srRtp ); } -#endif return IVAS_ERR_OK; } -#endif /*------------------------------------------------------------------------------------------* * main() @@ -922,9 +842,7 @@ int main( int16_t i, numChannels; ivas_error error = IVAS_ERR_OK; bool splitBinNeedsNewFrame = true; -#ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP srRTP = { 0 }; -#endif #ifdef WMOPS reset_wmops(); @@ -951,9 +869,7 @@ int main( convert_backslash( args.inputFilePath ); convert_backslash( args.outputFilePath ); convert_backslash( args.headRotationFilePath ); -#ifdef RTP_S4_251135_CR26253_0016_REV1 convert_backslash( args.srParamsFilePath ); -#endif /*------------------------------------------------------------------------------------------* * Open head-rotation file @@ -1008,13 +924,10 @@ int main( } } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( ( args.inConfig.numBinBuses > 0 ) && ( args.inConfig.binBuses[0].srRtp ) ) { error = parseSRParamsFile( args.srParamsFilePath, -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE args.inputFilePath, -#endif &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, @@ -1026,27 +939,17 @@ int main( goto cleanup; } -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE - if ( ( error = IVAS_RTP_READER_Init( &srRTP, (uint32_t) bitsBuffer.config.codec_frame_size_ms, args.inputFilePath, NULL, false, NULL ) ) != IVAS_ERR_OK ) -#else if ( ( error = IVAS_RTP_READER_Init( &srRTP, args.inputFilePath, NULL, false, NULL ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "error in IVAS_RTP_READER_Init(): %d\n", error ); goto cleanup; } audioReader = NULL; -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE /* Force owerwrite of command line provided rendersize to align with codec frame size */ args.render_framesize = bitsBuffer.config.isar_frame_size_ms / 5; -#endif } /*if split renderer is running in post renderer mode*/ else if ( ( args.inConfig.numBinBuses > 0 ) && ( args.inConfig.binBuses[0].audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) -#else - /*if split renderer is running in post renderer mode*/ - if ( ( args.inConfig.numBinBuses > 0 ) && ( args.inConfig.binBuses[0].audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) ) -#endif { error = split_rend_reader_open( &hSplitRendFileReadWrite, args.inputFilePath, @@ -1246,7 +1149,6 @@ int main( num_in_channels = inBuffer.config.numChannels; numSamplesRead = 0; -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( srRTP.hRtpFile && splitBinNeedsNewFrame ) { IVAS_RTP_SR_INFO srInfo = { 0 }; @@ -1269,9 +1171,7 @@ int main( if ( error == IVAS_ERR_END_OF_FILE ) { numSamplesRead = 0; -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE break; -#endif } else { @@ -1293,9 +1193,6 @@ int main( } } else if ( ( hSplitRendFileReadWrite != NULL ) && splitBinNeedsNewFrame ) -#else - if ( ( hSplitRendFileReadWrite != NULL ) && splitBinNeedsNewFrame ) -#endif { ivas_error error_tmp; @@ -1409,7 +1306,6 @@ int main( goto cleanup; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /* Set BFI if frame is empty */ int16_t frameEmpty = (int16_t) ( bitsBuffer.config.bitsWritten == 0 ); if ( frameEmpty ) @@ -1420,7 +1316,6 @@ int main( goto cleanup; } } -#endif } } diff --git a/apps/renderer.c b/apps/renderer.c index 753a116c15..63db453f3c 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -33,9 +33,7 @@ #include "lib_rend.h" #include #include -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER #include -#endif #include #include "audio_file_reader.h" #include "audio_file_writer.h" @@ -192,17 +190,11 @@ typedef struct float lfeConfigElevation; bool lfeCustomRoutingEnabled; char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH]; -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER int16_t syncMdDelay; -#else - float syncMdDelay; -#endif IVAS_RENDER_FRAMESIZE render_framesize; uint16_t directivityPatternId[RENDERER_MAX_ISM_INPUTS]; AcousticEnvironmentSequence aeSequence; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE IVAS_ROOM_SIZE_T reverbRoomSize; -#endif } CmdlnArgs; typedef enum @@ -233,12 +225,8 @@ typedef enum CmdLnOptionId_framing, CmdLnOptionId_syncMdDelay, CmdLnOptionId_directivityPatternId, -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE CmdLnOptionId_acousticEnvironmentId, CmdLnOptionId_roomSize, -#else - CmdLnOptionId_acousticEnvironmentId -#endif } CmdLnOptionId; static const CmdLnParser_Option cliOptions[] = { @@ -404,14 +392,12 @@ static const CmdLnParser_Option cliOptions[] = { .matchShort = "aeid", .description = "Acoustic environment ID (number > 0) alternatively, it can be\na text file where each line contains \"ID duration\" for\nBINAURAL_ROOM_REVERB output.", }, -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE { .id = CmdLnOptionId_roomSize, .match = "room_size", .matchShort = "rsz", .description = "Selects default reverb based on a room size (S - small | M - medium | L - large)", } -#endif }; @@ -1176,7 +1162,6 @@ int main( fprintf( stderr, "\nError in IVAS_REND_SetOrientationTrackingMode(): %s\n", ivas_error_to_string( error ) ); goto cleanup; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /* Set reverb room size if specified */ if ( args.reverbRoomSize != IVAS_ROOM_SIZE_AUTO ) @@ -1187,7 +1172,6 @@ int main( goto cleanup; } } -#endif /* Set up output custom layout configuration */ if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_LS_CUSTOM ) @@ -1449,16 +1433,12 @@ int main( audioWriter = NULL; } -#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, &bitsBuffer.config.isar_frame_size_ms, &bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, &bitsBuffer.config.isar_frame_size_ms ) ) != IVAS_ERR_OK ) -#endif { fprintf( stderr, "\nError in IVAS_REND_GetSplitRendBitstreamHeader()!\n" ); goto cleanup; @@ -2588,7 +2568,6 @@ static bool parseAcousticEnvironmentIds( return true; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE static bool parseReverbRoomSize( @@ -2620,7 +2599,6 @@ static bool parseReverbRoomSize( return true; } -#endif static bool checkRequiredArgs( @@ -2742,10 +2720,8 @@ static CmdlnArgs defaultArgs( args.aeSequence.pValidity = NULL; args.aeSequence.selected = 0; args.aeSequence.frameCounter = 0; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE args.reverbRoomSize = IVAS_ROOM_SIZE_AUTO; -#endif return args; } @@ -2925,13 +2901,8 @@ static void parseOption( case CmdLnOptionId_syncMdDelay: assert( numOptionValues == 1 ); /* Metadata Delay to sync with audio delay in ms */ -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER args->syncMdDelay = (int16_t) strtol( optionValues[0], NULL, 10 ); -#else - args->syncMdDelay = strtof( optionValues[0], NULL ); -#endif break; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE case CmdLnOptionId_roomSize: assert( numOptionValues == 1 ); if ( !parseReverbRoomSize( optionValues[0], &args->reverbRoomSize ) ) @@ -2940,7 +2911,6 @@ static void parseOption( exit( -1 ); } break; -#endif default: assert( 0 && "This should be unreachable - all command line options should be explicitly handled." ); break; diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index bd8bf608de..6be53a0802 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -5409,20 +5409,3 @@ void evs_dec_previewFrame( return; } -#ifndef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG - -void dtx_read_padding_bits( - DEC_CORE_HANDLE st, - const int16_t num_bits ) -{ - /* TODO: temporary hack, need to decide what to do with core-coder bitrate */ - int32_t tmp; - - tmp = st->total_brate; - st->total_brate = st->total_brate + num_bits * FRAMES_PER_SEC; - get_next_indice( st, num_bits ); - st->total_brate = tmp; - - return; -} -#endif diff --git a/lib_com/common_api_types.h b/lib_com/common_api_types.h index f4a75208b6..4956a1aa69 100644 --- a/lib_com/common_api_types.h +++ b/lib_com/common_api_types.h @@ -59,9 +59,7 @@ #define IVAS_ROOM_ABS_COEFF 6 #define IVAS_REVERB_PREDELAY_MAX 20 /* Max input delay for reverb module */ #define IVAS_ER_LIST_HEIGHT 1.6f -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT -#define IVAS_DEFAULT_AEID 65535 -#endif +#define IVAS_DEFAULT_AEID 65535 /* JBM constants for adaptive-playout */ #define IVAS_TIME_SCALE_MIN 50 /* min. time-scaling [%] */ @@ -176,7 +174,6 @@ typedef enum } IVAS_RENDER_FRAMESIZE; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE typedef enum { IVAS_ROOM_SIZE_AUTO = -1, @@ -184,7 +181,6 @@ typedef enum IVAS_ROOM_SIZE_MEDIUM, IVAS_ROOM_SIZE_LARGE } IVAS_ROOM_SIZE_T; -#endif 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; @@ -325,9 +321,7 @@ typedef enum #endif typedef struct _IVAS_ROOM_ACOUSTICS_CONFIG { -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT - uint16_t aeID; /* Acoustic environment ID*/ -#endif + uint16_t aeID; /* Acoustic environment ID*/ int16_t nBands; /* Number of frequency bands for which reverb properties are provided, integer, range [2..256] */ float pFc_input[IVAS_CLDFB_NO_CHANNELS_MAX]; /* Center frequencies for which following values are provided: */ float pAcoustic_rt60[IVAS_CLDFB_NO_CHANNELS_MAX]; /* - The room's T60 per center frequency */ diff --git a/lib_com/edct.c b/lib_com/edct.c index 09e6a99765..84ca54f151 100644 --- a/lib_com/edct.c +++ b/lib_com/edct.c @@ -275,14 +275,9 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ); const float wIm = sinf( angle_tmp ); -#else - const float wRe = cosf( scale * k ); - const float wIm = sinf( scale * k ); -#endif y[k] /*pt 1*/ = wRe * re[k] + wIm * im[k]; y[length - k] = wIm * re[k] - wRe * im[k]; @@ -293,14 +288,9 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ); const float wIm = sinf( angle_tmp ); -#else - const float wRe = cosf( scale * k ); - const float wIm = sinf( scale * k ); -#endif y[Nm1 - k] = wRe * re[k] + wIm * im[k]; y[k - 1] = wIm * re[k] - wRe * im[k]; @@ -316,14 +306,9 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ) * 0.5f; const float wIm = sinf( angle_tmp ) * 0.5f; -#else - const float wRe = cosf( scale * k ) * 0.5f; - const float wIm = sinf( scale * k ) * 0.5f; -#endif re[k] = wRe * x[k] + wIm * x[length - k]; im[k] = wRe * x[length - k] - wIm * x[k]; @@ -334,14 +319,9 @@ void edxt( { for ( k = Nm1 >> 1; k > 0; k-- ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float angle_tmp = scale * k; const float wRe = cosf( angle_tmp ) * 0.5f; const float wIm = sinf( angle_tmp ) * 0.5f; -#else - const float wRe = cosf( scale * k ) * 0.5f; - const float wIm = sinf( scale * k ) * 0.5f; -#endif re[k] = wRe * x[Nm1 - k] + wIm * x[k - 1]; im[k] = wRe * x[k - 1] - wIm * x[Nm1 - k]; diff --git a/lib_com/fd_cng_com.c b/lib_com/fd_cng_com.c index 608e2ed50e..1fb31f694a 100644 --- a/lib_com/fd_cng_com.c +++ b/lib_com/fd_cng_com.c @@ -141,11 +141,7 @@ void initFdCngCom( hFdCngCom->msMinBufferPtr = 0; set_f( hFdCngCom->msAlphaCor, 0.3f, 2 ); -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG set_f( hFdCngCom->coherence, 0.5f, MDCT_ST_DTX_NUM_COHERENCE_BANDS ); -#else - hFdCngCom->coherence = 0.5f; -#endif return; } diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 2d3c7e969a..3e038de0a4 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -177,10 +177,8 @@ typedef enum #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH #define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ -#ifdef FIX_GAIN_EDIT_LIMITS #define EDIT_GAIN_MIN 0.0630957f /* Minimum allowed gain edit with parametric modes: -24 dB */ #define EDIT_GAIN_MAX 3.9810719f /* Maximum allowed gain edit: +12 dB */ -#endif typedef enum @@ -856,10 +854,8 @@ enum fea_names #define MDCT_ST_PLC_FADEOUT_TO_ZERO_LEN 20 #define MDCT_ST_PLC_FADEOUT_DELAY_4_LSP_FADE 3 -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG #define MDCT_ST_DTX_NUM_COHERENCE_BANDS 5 #define MDCT_ST_DTX_FIRST_BAND_OFFSET 2 -#endif typedef enum { NOISE_GEN_MODE_UNDEF = -1, @@ -1232,9 +1228,7 @@ enum #define OMASA_GAIN_EDIT_THR 0.06f /* OMASA gain change threshold */ #define OMASA_AZI_EDIT_THR 1.0f /* OMASA-DISC azimuth change threshold */ #define OMASA_ELE_EDIT_THR 2.0f /* OMASA-DISC elevation change threshold */ -#ifdef NONBE_1380_OMASA_BUILD_DIFF #define OMASA_PAN_TBL_LEN 601 -#endif #define MASA_JBM_RINGBUFFER_FRAMES 3 @@ -1257,11 +1251,7 @@ typedef enum *----------------------------------------------------------------------------------*/ #define MC_LS_SETUP_BITS 3 /* number of bits for writing the MC LS configuration */ -#ifdef FIX_1419_MONO_STEREO_UMX #define LS_SETUP_CONVERSION_NUM_MAPPINGS 41 /* number of mappings for LS setup conversion */ -#else -#define LS_SETUP_CONVERSION_NUM_MAPPINGS 35 /* number of mappings for LS setup conversion */ -#endif typedef enum { @@ -1493,10 +1483,8 @@ typedef enum #define VBAP_NUM_SEARCH_SECTORS 4 -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL #define LS_ANGLE_RAD_30_DEG 0.52359879f /* 30.0f * PI_OVER_180 */ #define INV_TAN_LS_ANGLE_RAD_30_DEG 1.7320507f /* 1.0f/tanf(30.0f * PI_OVER_180) */ -#endif /*----------------------------------------------------------------------------------* * Binaural Rendering Constants @@ -1601,18 +1589,13 @@ typedef enum #define RV_FILTER_MAX_HISTORY ( 512 - 160 ) /* for longest history */ #define RV_LENGTH_NR_FC ( RV_FILTER_MAX_FFT_SIZE / 2 ) + 1 #define RV_LENGTH_NR_FC_16KHZ ( RV_FILTER_MAX_FFT_SIZE / 4 ) + 1 -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE #define IVAS_REVERB_DEFAULT_L_N_BANDS 31 #define IVAS_REVERB_DEFAULT_M_N_BANDS 31 #define IVAS_REVERB_DEFAULT_S_N_BANDS 60 -#else -#define IVAS_REVERB_DEFAULT_N_BANDS 31 -#endif #define LR_IAC_LENGTH_NR_FC ( RV_LENGTH_NR_FC ) #define LR_IAC_LENGTH_NR_FC_16KHZ ( RV_LENGTH_NR_FC_16KHZ ) -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE typedef enum { DEFAULT_REVERB_UNSET = -1, @@ -1620,7 +1603,6 @@ typedef enum DEFAULT_REVERB_MEDIUM, DEFAULT_REVERB_LARGE, } IVAS_DefaultReverbSize; -#endif /*----------------------------------------------------------------------------------* * FB mixer constants diff --git a/lib_com/ivas_omasa_com.c b/lib_com/ivas_omasa_com.c index a66e0e5c6b..36ad0d009c 100644 --- a/lib_com/ivas_omasa_com.c +++ b/lib_com/ivas_omasa_com.c @@ -61,11 +61,9 @@ #define GAMMA_ISM_MEDIUM_IMP4 1.0f #define GAMMA_ISM_HIGH_IMP4 1.2f -#ifdef NONBE_1380_OMASA_BUILD_DIFF #define PAN_MAX_DEG 30.0f #define ONE_OVER_PAN_STEP_DEG 10.0f #define SIN_LS_ANGLE 0.5f /* sinf( 30.0f * PI_OVER_180 ) */ -#endif /*--------------------------------------------------------------- * ivas_omasa_ism_mode_select() * @@ -500,7 +498,6 @@ void ivas_get_stereo_panning_gains( const float eleDeg, float panningGains[2] ) { -#ifdef NONBE_1380_OMASA_BUILD_DIFF float aziPlusEle, aziMinusEle, y; /* use identity sin(A+B) + sin(A−B) = 2 sinA cosB */ @@ -557,36 +554,6 @@ void ivas_get_stereo_panning_gains( panningGains[0] = ivas_tan_panning_gain_tbl[idx]; panningGains[1] = ivas_tan_panning_gain_tbl[OMASA_PAN_TBL_LEN - 1 - idx]; } -#else - float aziRad, eleRad; - float y, mappedX, aziRadMapped, A, A2, A3; - const float LsAngleRad = 30.0f * PI_OVER_180; - /* Convert azi and ele to an azi value of the cone of confusion */ - aziRad = aziDeg * PI_OVER_180; - eleRad = eleDeg * PI_OVER_180; - y = ( sinf( aziRad ) * cosf( eleRad ) ); - mappedX = sqrtf( max( 0.0f, 1.0f - ( y * y ) ) ); - aziRadMapped = atan2f( y, mappedX ); - - if ( aziRadMapped >= LsAngleRad ) - { /* Left side */ - panningGains[0] = 1.0f; - panningGains[1] = 0.0f; - } - else if ( aziRadMapped <= -LsAngleRad ) - { /* Right side */ - panningGains[0] = 0.0f; - panningGains[1] = 1.0f; - } - else /* Tangent panning law */ - { - A = tanf( aziRadMapped ) / tanf( LsAngleRad ); - A2 = ( A - 1.0f ) / max( 0.001f, A + 1.0f ); - A3 = 1.0f / ( A2 * A2 + 1.0f ); - panningGains[0] = sqrtf( A3 ); - panningGains[1] = sqrtf( 1.0f - A3 ); - } -#endif return; } diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 3699782aa7..3e8f951eff 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -793,14 +793,6 @@ Word16 matrix_product_q30_fx( Word32 *Z_fx /* o : resulting matrix after the matrix multiplication Q30*/ ); -#ifndef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG - -void dtx_read_padding_bits( - DEC_CORE_HANDLE st, - const int16_t num_bits -); - -#endif void ivas_apply_non_diegetic_panning( float *input_f, /* i : non-diegetic object */ float *output_f[], /* o : core-coder transport mono channel/stereo output */ @@ -808,7 +800,6 @@ void ivas_apply_non_diegetic_panning( const int16_t output_frame /* i : output frame length per channel */ ); -#ifdef IVAS_RTPDUMP void QuaternionProduct( const IVAS_QUATERNION q1, const IVAS_QUATERNION q2, @@ -820,7 +811,6 @@ void QuaternionInverse( IVAS_QUATERNION *const r ); -#endif /*----------------------------------------------------------------------------------* * JBM prototypes *----------------------------------------------------------------------------------*/ @@ -5196,7 +5186,6 @@ void ivas_binaural_add_LFE( float *output_f[] /* o : synthesized core-coder transport channels/DirAC output */ ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------------------* * Multi-pose ring buffer Prototypes @@ -5232,7 +5221,6 @@ void ivas_CLDFB_RINGBUF_GetByIdx( const int16_t idx ); -#endif /*----------------------------------------------------------------------------------* * renderer prototypes diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index 039dee13c5..431613466e 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -793,11 +793,9 @@ const float nf_tw_smoothing_coeffs[N_LTP_GAIN_MEMS] = 0.4f,0.2f,0.2f,0.2f }; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG const int16_t mdct_stereo_dtx_coherence_bandlengths[MDCT_ST_DTX_NUM_COHERENCE_BANDS] = { 6, /* 8 - MDCT_ST_DTX_FIRST_BAND_OFFSET */ 8, 16, 16, 80 }; -#endif /*----------------------------------------------------------------------------------* @@ -2869,7 +2867,6 @@ const float dct12[12*12]= 0.2887f, -0.4048f, 0.3943f, -0.3772f, 0.3536f, -0.3239f, 0.2887f, -0.2485f, 0.2041f, -0.1562f, 0.1057f, -0.0533f }; -#ifdef NONBE_1380_OMASA_BUILD_DIFF const float ivas_tan_panning_gain_tbl[OMASA_PAN_TBL_LEN] = { 0.0000000f, 0.0020142f, 0.0040283f, 0.0060425f, 0.0080872f, @@ -2994,7 +2991,6 @@ const float ivas_tan_panning_gain_tbl[OMASA_PAN_TBL_LEN] = 0.9999390f, 0.9999390f, 0.9999695f, 0.9999695f, 0.9999695f, 0.9999695f }; -#endif /*----------------------------------------------------------------------------------* * ISM ROM tables diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index 9ef4737c59..db32eecc06 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -138,9 +138,7 @@ extern const SpectrumWarping sw32000Hz[]; /* PsychLPC */ extern const MDCTStereoBands_config mdctStereoBands_32000_640[]; extern const float nf_tw_smoothing_coeffs[N_LTP_GAIN_MEMS]; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG extern const int16_t mdct_stereo_dtx_coherence_bandlengths[MDCT_ST_DTX_NUM_COHERENCE_BANDS]; -#endif /*----------------------------------------------------------------------------------* * Stereo DTX ROM tables @@ -336,9 +334,7 @@ extern const float dct4[]; extern const float dct5[]; extern const float dct8[]; extern const float dct12[]; -#ifdef NONBE_1380_OMASA_BUILD_DIFF extern const float ivas_tan_panning_gain_tbl[]; -#endif /*----------------------------------------------------------------------------------* * ISM ROM tables diff --git a/lib_com/options.h b/lib_com/options.h index 9e2052b43b..6e70bb1bec 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,31 +159,11 @@ /* ################## Start DEVELOPMENT switches ######################### */ -#define RTP_S4_251135_CR26253_0016_REV1 /* RTP Pack/Unpack API corresponding to CR 26253 */ -#define IVAS_RTPDUMP /* RTPDUMP writing and reading for IVAS payloads */ -#define IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT /* RTPDUMP acoustic environment */ -#define FIXED_RTP_SEQUENCE_NUM /* Remove random sequence number initialization */ -#define PI_LATENCY /* Pi latency PI frame */ -#define ISM_PI_DATA /* Add reading and packing/unpacking of ISM PI data */ -#define REVERSE_ISM_PI_DATA /* Add reading and packing/unpacking of reverse ISM PI data */ -#define DECODER_FORMAT_SWITCHING /* Re-initialize the decoder when the format/subformat of the incoming stream is changed */ -#define RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE /* CR for split rendering codec framesize signalling in Toc Byte*/ -#define FIX_SPLIT_RENDERING_ON_DECODER_RESTART /* Re-configure split rendering on decoder restart */ -#define RTP_UPDATES_SA4_134 /* Updates to RTP during SA4 134 */ -#define COMPACT_ORIENTATION_PI_DATA - /* ################### Start BE switches ################################# */ /* only BE switches wrt selection floating point code */ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ -#define FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add split rendering support to decoder in VoIP mode */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ -#define FIX_1413_IGF_INIT_PRINTOUT /* FhG: use correct variable for IGF initiliazation */ -#define RENDERER_MD_SYNC_DELAY_TO_INTEGER /* FhG: change data type of metadata sync delay in ext renderer to int16_t for better BASOP portability (and nicer code) */ -#define FIX_1427_OBJ_EDITING_EXT_METADATA /* Eri: Add support for extended metadata in object editing */ -#define FIX_1419_MONO_STEREO_UMX /* FhG: fix for issue 1419 : support upmix to all output formats for mono and stereo */ -#define FIX_1437_LC3PLUS_EXTREND_HIRES /* FhG: fix external renderer split bitstream header writing causing a crash for LC3plus High-res mode */ - #define FIX_1318_ROOM_SIZE_CMD_LINE /* Philips/Nokia: Default room sizes support */ /* #################### End BE switches ################################## */ @@ -193,28 +173,7 @@ /* any switch which is non-be wrt selection floating point code */ /* all switches in this category should start with "NONBE_" */ -#define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ -#define NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES /* Nokia: Fix for issues 1399: obj edit broken with MC/SBA output in VOIP, and 1400: negative energy estimate used for gaining. */ -#define FIX_1411_IGF_CRASH_BW_SWITCHING /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/ - -#define NONBE_1412_AVOID_ROUNDING_AZ_ELEV /* FhG: Avoid rounding when passing azimuth and elevation to efap_determine_gains() */ -#define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ -#define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* FhG: fix non-BE in DFT stereo encoder between optimization levels */ -#define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 /* FhG: fix even more non-BEnesses */ -#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */ -#define FIX_1330_JBM_MEMORY_FIX /* VA: basop issue: 2179 fix non-BE difference in FIX_1330_JBM_MEMORY */ -#define NONBE_1380_OMASA_BUILD_DIFF /* Nokia: Fix for issue #1380: Large differences in OMASA output between Debug and Release builds */ -#define NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL /* Nokia: Adjustments in remaining stereo panning functions to make them BE between Debug and Release */ -#define FIX_GAIN_EDIT_LIMITS /* Harmonize gain edit limits for all opertation points. For all modes, limit to max +12dB. For parametric modes, limit to min -24dB. */ -#define BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL /* Dolby: Fix coverage of SBA SPAR Dynamic active W not getting hit by the tests */ -#define NONBE_FIX_1442_MASA_EXT_REND_ORIENT_IDX /* Nokia: Fix issue 1442 of wrong index to combinedOrientationData */ - -#define FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING /* Orange: Fix for basop issue 2184 - to prevent one channel from becoming inaudible in the mono downmix output */ -#define FIX_1440_AMR_WB_RESET /* VA: issue 1440: Fix missing AMR-WB IO memory reset (applicable to float only) */ -#define FIX_BASOP_ISSUE_1585_CUT_BS_CRASH /* FhG: Fix for BASOP issue 1585 crash of a cut bitstream, also valid for float code*/ - -#define NONBE_FIX_BASOP_2233_RTPDUMP_DIFFERING_BITSTREAMS /* Nokia: fix basop issue 2233: Fix differing rtpdump streams */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_com/stat_com.h b/lib_com/stat_com.h index 2eb9b5ee95..86597ca08f 100644 --- a/lib_com/stat_com.h +++ b/lib_com/stat_com.h @@ -405,12 +405,8 @@ typedef struct int16_t flag_noisy_speech; float likelihood_noisy_speech; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG float coherence[MDCT_ST_DTX_NUM_COHERENCE_BANDS]; /* inter-channel coherence of noise */ -#else - float coherence; /* inter-channel coherence of noise */ -#endif - int16_t no_side_flag; /* indicates whether the side noise shape should be zeroed-out or not */ + int16_t no_side_flag; /* indicates whether the side noise shape should be zeroed-out or not */ } FD_CNG_COM, *HANDLE_FD_CNG_COM; diff --git a/lib_debug/debug.c b/lib_debug/debug.c index 6ea62a4a46..e75b280ce9 100644 --- a/lib_debug/debug.c +++ b/lib_debug/debug.c @@ -774,13 +774,8 @@ char *fname( { char idd[6]; -#ifdef BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL assert( id >= 0 && id < 100 ); snprintf( idd, sizeof( idd ), ".id%d", id ); -#else - assert( id < 100 ); - sprintf( idd, ".id%d", id ); -#endif strcpy( tmp_fname, dir ); strcat( tmp_fname, file ); diff --git a/lib_dec/amr_wb_dec.c b/lib_dec/amr_wb_dec.c index bbb0c7b10d..d9b3ae121f 100644 --- a/lib_dec/amr_wb_dec.c +++ b/lib_dec/amr_wb_dec.c @@ -295,7 +295,6 @@ ivas_error amr_wb_dec( st->bfi_pitch_frame = L_FRAME; } -#ifdef FIX_1440_AMR_WB_RESET if ( st->last_core != AMR_WB_CORE ) { /* reset the unvoiced/audio signal improvement memories */ @@ -305,7 +304,6 @@ ivas_error amr_wb_dec( mvr2r( st->hAmrwb_IO->old_Aq, st->hAmrwb_IO->old_Aq + 3 * ( M + 1 ), M + 1 ); } -#endif if ( st->last_bwidth == NB && st->ini_frame != 0 ) { st->rate_switching_reset = 1; diff --git a/lib_dec/fd_cng_dec.c b/lib_dec/fd_cng_dec.c index adca10685d..1a90e00606 100644 --- a/lib_dec/fd_cng_dec.c +++ b/lib_dec/fd_cng_dec.c @@ -1102,13 +1102,8 @@ void generate_comfort_noise_dec( scale = 1.f; scaleCldfb = CLDFB_SCALING / hFdCngCom->scalingFactor; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG c1 = (float) sqrt( hFdCngCom->coherence[0] ); c2 = (float) sqrt( 1 - hFdCngCom->coherence[0] ); -#else - c1 = (float) sqrt( hFdCngCom->coherence ); - c2 = (float) sqrt( 1 - hFdCngCom->coherence ); -#endif seed2 = &( hFdCngCom->seed2 ); if ( st->element_mode == IVAS_CPE_MDCT && st->idchan == 1 ) @@ -1121,11 +1116,7 @@ void generate_comfort_noise_dec( if ( hFdCngCom->startBand == 0 ) { -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG if ( ( st->element_mode == IVAS_CPE_MDCT && nchan_out != 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#else - if ( st->element_mode == IVAS_CPE_MDCT || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#endif { rand_gauss( &tmp1, seed ); rand_gauss( &tmp2, seed2 ); @@ -1147,7 +1138,6 @@ void generate_comfort_noise_dec( } ptr_i = ptr_r + 1; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG if ( st->element_mode == IVAS_CPE_MDCT && nchan_out != 1 ) { int16_t band_len_accu; @@ -1234,46 +1224,6 @@ void generate_comfort_noise_dec( ptr_i += 2; } } -#else - for ( ; ptr_level < cngNoiseLevel + hFdCngCom->stopFFTbin - hFdCngCom->startBand; ptr_level++ ) - { - /* Real part in FFT bins */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG - if ( ( st->element_mode == IVAS_CPE_MDCT && nchan_out != 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#else - if ( st->element_mode == IVAS_CPE_MDCT || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#endif - { - rand_gauss( &tmp1, seed ); - rand_gauss( &tmp2, seed2 ); - *ptr_r = tmp1 * c1 + tmp2 * c2; - } - else - { - rand_gauss( ptr_r, seed ); - } - ( *ptr_r ) *= (float) sqrt( ( scale * *ptr_level ) * 0.5f ); - ptr_r += 2; - - /* Imaginary part in FFT bins */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG - if ( ( st->element_mode == IVAS_CPE_MDCT && nchan_out != 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#else - if ( st->element_mode == IVAS_CPE_MDCT || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#endif - { - rand_gauss( &tmp1, seed ); - rand_gauss( &tmp2, seed2 ); - *ptr_i = tmp1 * c1 + tmp2 * c2; - } - else - { - rand_gauss( ptr_i, seed ); - } - ( *ptr_i ) *= (float) sqrt( ( scale * *ptr_level ) * 0.5f ); - ptr_i += 2; - } -#endif /* Remaining FFT bins are set to zero */ set_f( fftBuffer + 2 * hFdCngCom->stopFFTbin, 0.0f, hFdCngCom->fftlen - 2 * hFdCngCom->stopFFTbin ); @@ -1332,12 +1282,10 @@ void generate_comfort_noise_dec( /* Generate Gaussian random noise in real and imaginary parts of the CLDFB bands Amplitudes are adjusted to the estimated noise level cngNoiseLevel in each band */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* * Note: for the stereo DTX noise mixing, c1 and c2 at this point are set to the value calculated for the last band * as all the coherence bands are in the FFT region, we do not need the special handling here */ -#endif if ( bufferReal != NULL && hFdCngCom->numCoreBands < hFdCngCom->regularStopBand ) { @@ -1346,11 +1294,7 @@ void generate_comfort_noise_dec( for ( i = 0; i < hFdCngCom->numSlots; i++ ) { /* Real part in CLDFB band */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG if ( ( st->element_mode == IVAS_CPE_MDCT && nchan_out != 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#else - if ( st->element_mode == IVAS_CPE_MDCT || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#endif { rand_gauss( &tmp1, seed ); rand_gauss( &tmp2, seed2 ); @@ -1363,11 +1307,7 @@ void generate_comfort_noise_dec( bufferReal[i][j] *= (float) sqrt( ( scaleCldfb * *ptr_level ) * 0.5f ); /* Imaginary part in CLDFB band */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG if ( ( st->element_mode == IVAS_CPE_MDCT && nchan_out != 1 ) || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#else - if ( st->element_mode == IVAS_CPE_MDCT || ( st->element_mode == IVAS_SCE && st->cng_ism_flag ) ) -#endif { rand_gauss( &tmp1, seed ); rand_gauss( &tmp2, seed2 ); @@ -1484,14 +1424,9 @@ void generate_comfort_noise_dec_hf( { seed2 = &( hFdCngCom->seed2 ); -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* alwas use the value for the last band - frequency-wise we are here always above */ c1 = (float) sqrt( hFdCngCom->coherence[MDCT_ST_DTX_NUM_COHERENCE_BANDS - 1] ); c2 = (float) sqrt( 1 - hFdCngCom->coherence[MDCT_ST_DTX_NUM_COHERENCE_BANDS - 1] ); -#else - c1 = (float) sqrt( hFdCngCom->coherence ); - c2 = (float) sqrt( 1 - hFdCngCom->coherence ); -#endif } ptr_level = hFdCngCom->cngNoiseLevel + hFdCngCom->stopFFTbin - hFdCngCom->startBand; @@ -2235,9 +2170,7 @@ void FdCngDecodeMDCTStereoSID( int16_t is_out_ms; float *invTrfMatrix; float tmpRAM[FDCNG_VQ_MAX_LEN][FDCNG_VQ_DCT_MAXTRUNC]; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG int32_t tmp; -#endif invTrfMatrix = (float *) tmpRAM; create_IDCT_N_Matrix( invTrfMatrix, FDCNG_VQ_MAX_LEN, FDCNG_VQ_DCT_MAXTRUNC, sizeof( tmpRAM ) / ( sizeof( float ) ) ); @@ -2287,7 +2220,6 @@ void FdCngDecodeMDCTStereoSID( msvq_dec( cdk_37bits_ivas, NULL, NULL, stages, N, FD_CNG_maxN_37bits, indices, 1, invTrfMatrix, ms_ptr[ch], NULL ); } -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG tmp = sts[1]->total_brate; sts[1]->total_brate = sts[1]->total_brate + 16 * FRAMES_PER_SEC; /* read the four additional coherence values */ @@ -2300,9 +2232,6 @@ void FdCngDecodeMDCTStereoSID( sts[1]->hFdCngDec->hFdCngCom->coherence[b] = sts[0]->hFdCngDec->hFdCngCom->coherence[b]; } sts[1]->total_brate = tmp; -#else - dtx_read_padding_bits( sts[1], ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC ); -#endif if ( sts[0]->hFdCngDec->hFdCngCom->no_side_flag ) { @@ -2413,16 +2342,11 @@ void FdCngDecodeDiracMDCTStereoSID( lpc_from_spectrum( hFdCngCom, hFdCngCom->startBand, hFdCngCom->stopFFTbin, sts[ch]->preemph_fac ); } -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG for ( i = 0; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { sts[0]->hFdCngDec->hFdCngCom->coherence[i] = 0.0f; sts[1]->hFdCngDec->hFdCngCom->coherence[i] = 0.0f; } -#else - sts[0]->hFdCngDec->hFdCngCom->coherence = 0.0f; - sts[1]->hFdCngDec->hFdCngCom->coherence = 0.0f; -#endif if ( hCPE->nchan_out == 1 ) { diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index 60808714ca..3a0bbfba0f 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1026,11 +1026,7 @@ ivas_error ivas_binRenderer_open( ivas_dirac_dec_get_response( (int16_t) ls_azimuth_CICP19[k], (int16_t) ls_elevation_CICP19[k], hBinRenderer->hReverb->foa_enc[k], 1 ); } } -#ifdef IVAS_RTPDUMP else if ( st_ivas->ivas_format == MC_FORMAT && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) ) -#else - else if ( st_ivas->ivas_format == MC_FORMAT && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) -#endif { if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK ) { diff --git a/lib_dec/ivas_decision_matrix_dec.c b/lib_dec/ivas_decision_matrix_dec.c index da624d5a66..0de93e1370 100644 --- a/lib_dec/ivas_decision_matrix_dec.c +++ b/lib_dec/ivas_decision_matrix_dec.c @@ -104,11 +104,7 @@ void ivas_decision_matrix_dec( else if ( st->total_brate == SID_2k40 && st->idchan == 1 && st->element_mode == IVAS_CPE_MDCT && st->cng_sba_flag == 0 ) { /* read channel coherence */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG st->hFdCngDec->hFdCngCom->coherence[0] = (float) get_next_indice( st, 4 ) / 15.f; -#else - st->hFdCngDec->hFdCngCom->coherence = (float) get_next_indice( st, 4 ) / 15.f; -#endif /* read flag for no side noise shape */ st->hFdCngDec->hFdCngCom->no_side_flag = get_next_indice( st, 1 ); diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 31f47c4dfd..857fdf6078 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1637,9 +1637,6 @@ static void binRenderer_split( float Cldfb_ImagBuffer_Binaural[][BINAURAL_CHANNELS][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* o : Rotated Binaural signals */ float RealBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ float ImagBuffer[][MAX_PARAM_SPATIAL_SUBFRAMES][CLDFB_NO_CHANNELS_MAX], /* i : LS signals */ -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - const int16_t slot_idx_start, -#endif const int16_t num_freq_bands, const int16_t nchan_out ) { @@ -1669,16 +1666,11 @@ static void binRenderer_split( { for ( ch = 0; ch < nchan_out; ch++ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_Push( hSplitBinRend->hMultiBinCldfbData[pos_idx * BINAURAL_CHANNELS + ch], Cldfb_RealBuffer_Binaural_loc[pos_idx][ch][slot_idx], Cldfb_ImagBuffer_Binaural_loc[pos_idx][ch][slot_idx], num_freq_bands ); -#else - mvr2r( Cldfb_RealBuffer_Binaural_loc[pos_idx][ch][slot_idx], hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_idx_start + slot_idx], num_freq_bands ); - mvr2r( Cldfb_ImagBuffer_Binaural_loc[pos_idx][ch][slot_idx], hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_idx_start + slot_idx], num_freq_bands ); -#endif } } } @@ -2082,11 +2074,7 @@ void ivas_dirac_dec_render_sf( { mvs2s( &hSpatParamRendCom->azimuth[md_idx][hDirAC->hConfig->enc_param_start_band], &azimuth[hDirAC->hConfig->enc_param_start_band], hSpatParamRendCom->num_freq_bands - hDirAC->hConfig->enc_param_start_band ); mvs2s( &hSpatParamRendCom->elevation[md_idx][hDirAC->hConfig->enc_param_start_band], &elevation[hDirAC->hConfig->enc_param_start_band], hSpatParamRendCom->num_freq_bands - hDirAC->hConfig->enc_param_start_band ); -#ifdef IVAS_RTPDUMP if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) -#else - if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && st_ivas->hCombinedOrientationData->shd_rot_max_order == 0 ) -#endif { num_freq_bands = hDirAC->band_grouping[hDirAC->hConfig->enc_param_start_band]; rotateAziEle_DirAC( azimuth, elevation, num_freq_bands, hSpatParamRendCom->num_freq_bands, p_Rmat ); @@ -2404,9 +2392,6 @@ void ivas_dirac_dec_render_sf( { binRenderer_split( st_ivas->hBinRenderer, st_ivas->hSplitBinRend, st_ivas->hCombinedOrientationData, hSpatParamRendCom->subframe_nbslots[subframe_idx], Cldfb_RealBuffer_Binaural, Cldfb_ImagBuffer_Binaural, Cldfb_RealBuffer, Cldfb_ImagBuffer, -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - slot_idx_start, -#endif hSpatParamRendCom->num_freq_bands, st_ivas->hDecoderConfig->nchan_out ); } else diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index aa544ce6b8..ac639b7dba 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -106,9 +106,7 @@ ivas_error ivas_dec_get_format( int16_t nchan_ism, element_mode_flag; int16_t sba_order, sba_planar, sba_analysis_order; int32_t ivas_total_brate; -#ifdef DECODER_FORMAT_SWITCHING int16_t Opt_tsm; -#endif uint16_t *bit_stream_orig; AUDIO_CONFIG signaled_config; ivas_error error; @@ -117,9 +115,7 @@ ivas_error ivas_dec_get_format( element_mode_flag = 0; ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; -#ifdef DECODER_FORMAT_SWITCHING Opt_tsm = st_ivas->hDecoderConfig->Opt_tsm; -#endif bit_stream_orig = st_ivas->bit_stream; /*-------------------------------------------------------------------* @@ -135,7 +131,6 @@ ivas_error ivas_dec_get_format( !( st_ivas->ivas_format == MASA_FORMAT && st_ivas->last_ivas_format == MASA_ISM_FORMAT ) && !( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->last_ivas_format == MASA_FORMAT ) ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -144,14 +139,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the number of ISMs is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong number of objects signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } /*-------------------------------------------------------------------* @@ -185,7 +177,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && nchan_ism != st_ivas->nchan_ism ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -194,14 +185,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the number of ISMs is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong number of objects signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->nchan_ism = nchan_ism; @@ -221,7 +209,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && sba_planar != st_ivas->sba_planar ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -229,14 +216,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the SBA planar/3D layout is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong SBA planar flag signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } /* read Ambisonic (SBA) order */ @@ -245,7 +229,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && sba_order != st_ivas->sba_order ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -254,14 +237,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the SBA order is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong SBA order signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } sba_analysis_order = ivas_sba_get_analysis_order( ivas_total_brate, sba_order ); @@ -269,30 +249,24 @@ ivas_error ivas_dec_get_format( } else if ( st_ivas->ivas_format == MASA_FORMAT ) { -#ifdef DECODER_FORMAT_SWITCHING uint8_t masaRestartCandidate = 0; -#endif /* read number of MASA transport channels */ if ( st_ivas->bit_stream[( ivas_total_brate / FRAMES_PER_SEC ) - 1] ) { -#ifdef DECODER_FORMAT_SWITCHING if ( st_ivas->nchan_transport == 1 && Opt_tsm ) { masaRestartCandidate = 1; } -#endif st_ivas->nchan_transport = 2; element_mode_flag = 1; } else { -#ifdef DECODER_FORMAT_SWITCHING if ( st_ivas->nchan_transport == 2 && Opt_tsm ) { masaRestartCandidate = 1; } -#endif st_ivas->nchan_transport = 1; } @@ -320,18 +294,15 @@ ivas_error ivas_dec_get_format( st_ivas->nchan_transport = 2; element_mode_flag = 1; } -#ifdef DECODER_FORMAT_SWITCHING else if ( masaRestartCandidate > 0 ) { st_ivas->restartNeeded = 1; return IVAS_ERR_OK; } -#endif if ( st_ivas->ini_frame > 0 && nchan_ism != st_ivas->nchan_ism ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -340,14 +311,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the number of ISMs is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong number of objects signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->nchan_ism = nchan_ism; @@ -362,7 +330,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && nchan_ism != st_ivas->nchan_ism ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -371,14 +338,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the number of ISMs is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong number of objects signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->nchan_ism = nchan_ism; @@ -390,7 +354,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && nchan_ism != st_ivas->nchan_ism ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -399,14 +362,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the number of ISMs is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong number of objects signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->nchan_ism = nchan_ism; @@ -430,7 +390,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && sba_order != st_ivas->sba_order ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -439,14 +398,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the SBA order is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong SBA order signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->ism_mode = ivas_osba_ism_mode_select( ivas_total_brate, st_ivas->nchan_ism ); @@ -471,7 +427,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && st_ivas->transport_config != signaled_config ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -480,14 +435,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Switching of MC configurations is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "wrong MC configuration signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->mc_mode = ivas_mc_mode_select( ivas_mc_map_output_config_to_mc_ls_setup( signaled_config ), st_ivas->hDecoderConfig->ivas_total_brate ); @@ -569,7 +521,6 @@ ivas_error ivas_dec_get_format( if ( st_ivas->ini_frame > 0 && nchan_ism != st_ivas->nchan_ism ) { -#ifdef DECODER_FORMAT_SWITCHING if ( Opt_tsm ) { st_ivas->restartNeeded = 1; @@ -578,14 +529,11 @@ ivas_error ivas_dec_get_format( } else { -#endif #ifdef DEBUGGING fprintf( stderr, "\nError: Changing the number of ISMs is not supported!\n" ); #endif return IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong number of objects signalled!" ); -#ifdef DECODER_FORMAT_SWITCHING } -#endif } st_ivas->nchan_ism = nchan_ism; @@ -1438,15 +1386,11 @@ ivas_error ivas_init_decoder( if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { -#ifdef FIX_1419_MONO_STEREO_UMX if ( st_ivas->ivas_format == MONO_FORMAT ) { hDecoderConfig->nchan_out = 1; } else if ( st_ivas->ivas_format == STEREO_FORMAT ) -#else - if ( st_ivas->ivas_format == STEREO_FORMAT ) -#endif { hDecoderConfig->nchan_out = CPE_CHANNELS; } @@ -1499,13 +1443,11 @@ ivas_error ivas_init_decoder( st_ivas->hOutSetup.output_config = st_ivas->intern_config; st_ivas->hOutSetup.nchan_out_woLFE = audioCfg2channels( st_ivas->intern_config ); } -#ifdef FIX_1419_MONO_STEREO_UMX if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->transport_config = ( st_ivas->ivas_format == MONO_FORMAT ) ? IVAS_AUDIO_CONFIG_MONO : IVAS_AUDIO_CONFIG_STEREO; } -#endif /* Only initialize transport setup if it is used */ if ( st_ivas->transport_config != IVAS_AUDIO_CONFIG_INVALID ) @@ -1555,15 +1497,9 @@ ivas_error ivas_init_decoder( } } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /*--------------------------------------------------------------------------* * Allocate and initialize HRTF Statistics handle, get default reverb values *--------------------------------------------------------------------------*/ -#else - /*--------------------------------------------------------------------* - * Allocate and initialize HRTF Statistics handle - *--------------------------------------------------------------------*/ -#endif if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) { @@ -1572,7 +1508,6 @@ ivas_error ivas_init_decoder( { return error; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /* Get default reverb values based on format, if custom values were not given */ if ( st_ivas->hDecoderConfig->Opt_RendConfigCustom == 0 ) { @@ -1620,7 +1555,6 @@ ivas_error ivas_init_decoder( return error; } } -#endif } /*-----------------------------------------------------------------* @@ -1644,9 +1578,6 @@ ivas_error ivas_init_decoder( else if ( st_ivas->ivas_format == STEREO_FORMAT ) { st_ivas->nchan_transport = CPE_CHANNELS; -#ifndef FIX_1419_MONO_STEREO_UMX /* already set now by renderer_select() */ - st_ivas->intern_config = IVAS_AUDIO_CONFIG_STEREO; -#endif st_ivas->nSCE = 0; st_ivas->nCPE = 1; /* in stereo, there is always only one CPE */ @@ -2380,11 +2311,7 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { -#ifdef IVAS_RTPDUMP if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) ) -#else - if ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->ivas_format == MC_FORMAT && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) -#endif { if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK ) { @@ -2864,10 +2791,8 @@ void ivas_initialize_handles_dec( st_ivas->hRenderConfig = NULL; st_ivas->hExtOrientationData = NULL; st_ivas->hCombinedOrientationData = NULL; -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT st_ivas->acousticEnvironmentsCount = 0; st_ivas->pAcousticEnvironments = NULL; -#endif st_ivas->hSplitBinRend = NULL; for ( i = 0; i < MAX_HEAD_ROT_POSES - 1; ++i ) @@ -3089,14 +3014,12 @@ void ivas_destroy_dec( /* Config. Renderer */ ivas_render_config_close( &( st_ivas->hRenderConfig ) ); -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT /* Acoustic environments */ if ( st_ivas->pAcousticEnvironments != NULL ) { free( st_ivas->pAcousticEnvironments ); st_ivas->pAcousticEnvironments = NULL; } -#endif /* Limiter struct */ ivas_limiter_close( &( st_ivas->hLimiter ) ); @@ -3386,20 +3309,6 @@ static ivas_error doSanityChecks_IVAS( return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Error: Non-diegetic panning not supported in this IVAS format" ); } -#ifndef FIX_1419_MONO_STEREO_UMX /* we now support basically everything for stereo */ - /* Verify stereo output configuration */ - if ( st_ivas->ivas_format == STEREO_FORMAT ) - { - if ( output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_5_1 && output_config != IVAS_AUDIO_CONFIG_7_1 && output_config != IVAS_AUDIO_CONFIG_5_1_2 && output_config != IVAS_AUDIO_CONFIG_5_1_4 && output_config != IVAS_AUDIO_CONFIG_7_1_4 && output_config != IVAS_AUDIO_CONFIG_LS_CUSTOM && output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Wrong output configuration specified for Stereo!" ); - } - } - /* Verify output configuration for other formats */ - else - { - if ( output_config == IVAS_AUDIO_CONFIG_INVALID ) -#else /* exclude invalid configs instead of matching valid ones */ if ( output_config == IVAS_AUDIO_CONFIG_INVALID || output_config == IVAS_AUDIO_CONFIG_ISM1 || output_config == IVAS_AUDIO_CONFIG_ISM2 || @@ -3407,18 +3316,14 @@ static ivas_error doSanityChecks_IVAS( output_config == IVAS_AUDIO_CONFIG_ISM4 || output_config == IVAS_AUDIO_CONFIG_MASA1 || output_config == IVAS_AUDIO_CONFIG_MASA2 ) -#endif - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" ); - } - if ( ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) && - ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) - { - return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" ); - } -#ifndef FIX_1419_MONO_STEREO_UMX + { + return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" ); + } + if ( ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) && + ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) + { + return IVAS_ERROR( IVAS_ERR_INVALID_OUTPUT_FORMAT, "Incorrect output configuration specified!" ); } -#endif if ( ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) && output_Fs != 48000 ) { diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index 5f65826b5b..410449b7b1 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -1057,40 +1057,28 @@ void ivas_ism_metadata_sid_dec( { if ( ch == *sce_id_dtx ) { -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG for ( i = 0; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[i] = 1.0f; } -#else - hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence = 1.0f; -#endif continue; } idx = get_next_indice( st0, nBits_coh ); -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[0] = (float) ( idx ) / (float) ( ( 1 << nBits_coh ) - 1 ); for ( i = 1; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[i] = hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[0]; } -#else - hSCE[ch]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence = (float) ( idx ) / (float) ( ( 1 << nBits_coh ) - 1 ); -#endif } } if ( ism_mode == ISM_MODE_PARAM ) { -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG for ( i = 0; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { hSCE[*sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[i] = hSCE[!*sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[i]; } -#else - hSCE[*sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence = hSCE[!*sce_id_dtx]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence; -#endif } /*----------------------------------------------------------------* diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 0e27f96377..f364e5e1a0 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -709,9 +709,6 @@ void ivas_ism_dec_digest_tc( ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM && st_ivas->hDecoderConfig->Opt_Headrotation == 0 ) ) { int16_t i; -#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV - int16_t azimuth, elevation; -#endif /* we have a full frame interpolator, adapt it */ /* for BE testing */ if ( ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC ) == st_ivas->hTcBuffer->n_samples_available ) @@ -754,36 +751,21 @@ void ivas_ism_dec_digest_tc( } else { -#ifndef NONBE_1412_AVOID_ROUNDING_AZ_ELEV - // TODO tmu review when #215 is resolved - azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_azimuth + 0.5f ); - elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_elevation + 0.5f ); -#endif if ( ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_OSBA_LS || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM || ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM && st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ) && st_ivas->hCombinedOrientationData == NULL ) { -#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV float elevation = st_ivas->hIsmMetaData[i]->edited_elevation; -#endif if ( st_ivas->hIntSetup.is_planar_setup ) { /* If no elevation support in output format, then rendering should be done with zero elevation */ -#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV elevation = 0.f; -#else - elevation = 0; -#endif } if ( st_ivas->hEFAPdata != NULL ) { -#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_azimuth, elevation, EFAP_MODE_EFAP ); -#else - efap_determine_gains( st_ivas->hEFAPdata, st_ivas->hIsmRendererData->gains[i], azimuth, elevation, EFAP_MODE_EFAP ); -#endif v_multc( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_gain, st_ivas->hIsmRendererData->gains[i], st_ivas->hEFAPdata->numSpk ); } } @@ -791,13 +773,11 @@ void ivas_ism_dec_digest_tc( st_ivas->renderer_type == RENDERER_OSBA_AMBI || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) { -#ifdef NONBE_1412_AVOID_ROUNDING_AZ_ELEV // TODO tmu review when #215 is resolved int16_t azimuth, elevation; azimuth = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_azimuth + 0.5f ); elevation = (int16_t) floorf( st_ivas->hIsmMetaData[i]->edited_elevation + 0.5f ); -#endif /*get HOA gets for direction (ACN/SN3D)*/ ivas_dirac_dec_get_response( azimuth, elevation, st_ivas->hIsmRendererData->gains[i], st_ivas->hIntSetup.ambisonics_order ); v_multc( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmMetaData[i]->edited_gain, st_ivas->hIsmRendererData->gains[i], ivas_sba_get_nchan( st_ivas->hIntSetup.ambisonics_order, 0 ) ); @@ -1288,11 +1268,7 @@ void ivas_param_ism_params_to_masa_param_mapping( if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence[0], 2.0f ); -#else - energy_ratio = powf( st_ivas->hSCE[0]->hCoreCoder[0]->hFdCngDec->hFdCngCom->coherence, 2.0f ); -#endif hSpatParamRendCom->numSimultaneousDirections = 1; azimuth[0] = (int16_t) roundf( hParamIsmDec->azimuth_values[0] ); diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 38ef231629..cd8d87a410 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -301,9 +301,6 @@ void ivas_ism_get_stereo_gains( { float aziRad, eleRad; float y, mappedX, aziRadMapped, A, A2, A3; -#ifndef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL - const float LsAngleRad = 30.0f * PI_OVER_180; -#endif /* Convert azi and ele to an azi value of the cone of confusion */ aziRad = azimuth * PI_OVER_180; @@ -313,31 +310,19 @@ void ivas_ism_get_stereo_gains( aziRadMapped = atan2f( y, mappedX ); /* Determine the amplitude panning gains */ -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL if ( aziRadMapped >= LS_ANGLE_RAD_30_DEG ) -#else - if ( aziRadMapped >= LsAngleRad ) -#endif { /* Left side */ *left_gain = 1.0f; *right_gain = 0.0f; } -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL else if ( aziRadMapped <= -LS_ANGLE_RAD_30_DEG ) -#else - else if ( aziRadMapped <= -LsAngleRad ) -#endif { /* Right side */ *left_gain = 0.0f; *right_gain = 1.0f; } else /* Tangent panning law */ { -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL A = tanf( aziRadMapped ) * INV_TAN_LS_ANGLE_RAD_30_DEG; -#else - A = tanf( aziRadMapped ) / tanf( LsAngleRad ); -#endif A2 = ( A - 1.0f ) / max( 0.001f, A + 1.0f ); A3 = 1.0f / ( A2 * A2 + 1.0f ); *left_gain = sqrtf( A3 ); diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 7bf613e70a..91f1cf49e2 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -791,9 +791,7 @@ void ivas_jbm_dec_feed_tc_to_renderer( for ( ch = 0; ch < max( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ); ch++ ) { hTcBuffer->tc[ch] = &hTcBuffer->tc_buffer[offset]; -#ifdef FIX_1330_JBM_MEMORY_FIX st_ivas->p_output_f[ch] = hTcBuffer->tc[ch]; -#endif offset += len_offset; } } @@ -937,25 +935,15 @@ ivas_error ivas_jbm_dec_render( { ivas_jbm_dec_tc_buffer_playout( st_ivas, nSamplesAskedLocal, nSamplesRendered, p_output ); } -#ifdef FIX_1419_MONO_STEREO_UMX else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) -#else - else if ( st_ivas->ivas_format == STEREO_FORMAT ) -#endif { -#ifdef FIX_1419_MONO_STEREO_UMX *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#endif /* Rendering */ if ( st_ivas->renderer_type == RENDERER_MC ) { -#ifndef FIX_1419_MONO_STEREO_UMX - *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal ); -#endif ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output ); } -#ifdef FIX_1419_MONO_STEREO_UMX else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) { if ( st_ivas->ivas_format == MONO_FORMAT ) @@ -974,7 +962,6 @@ ivas_error ivas_jbm_dec_render( } } } -#endif /* FIX_1419_MONO_STEREO_UMX */ } else if ( st_ivas->ivas_format == ISM_FORMAT ) { @@ -1961,15 +1948,7 @@ int16_t ivas_jbm_dec_get_num_tc_channels( ivas_total_brate = st_ivas->hDecoderConfig->ivas_total_brate; -#ifndef FIX_1419_MONO_STEREO_UMX /* since we support more output formats for mono, this is no longer sensible; leave it at the default from above */ - if ( st_ivas->ivas_format == MONO_FORMAT ) - { - num_tc = st_ivas->hDecoderConfig->nchan_out; - } - else if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) -#else if ( st_ivas->ivas_format == STEREO_FORMAT && st_ivas->hDecoderConfig->nchan_out == 1 ) -#endif { num_tc = 1; } @@ -2321,16 +2300,13 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( const int16_t n_samples_granularity /* i : new granularity of the renderer/buffer */ ) { -#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP int16_t ch_idx, num_tc_buffer_mem, n_samples_still_available; float tc_buffer_mem[MAX_INTERN_CHANNELS][L_FRAME48k / MAX_PARAM_SPATIAL_SUBFRAMES - 1]; -#endif ivas_error error; DECODER_TC_BUFFER_HANDLE hTcBuffer; hTcBuffer = st_ivas->hTcBuffer; -#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP num_tc_buffer_mem = 0; n_samples_still_available = 0; @@ -2349,7 +2325,6 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( } } -#endif /* if granularity changes, adapt subframe_nb_slots */ if ( n_samples_granularity != hTcBuffer->n_samples_granularity ) { @@ -2389,12 +2364,6 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( hTcBuffer->nchan_buffer_full = nchan_full; hTcBuffer->n_samples_granularity = n_samples_granularity; -#ifndef NONBE_1324_TC_BUFFER_MEMOERY_KEEP -#ifdef DEBUGGING - /* what is remaining from last frames needs always be smaller than n_samples_granularity */ - assert( ( hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered ) < n_samples_granularity ); -#endif -#endif /* reallocate TC audio buffers */ ivas_jbm_dec_tc_audio_deallocate( hTcBuffer ); @@ -2404,14 +2373,12 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure( return error; } -#ifdef NONBE_1324_TC_BUFFER_MEMOERY_KEEP /* propagate samples of the TC buffer from the previous frame */ for ( ch_idx = 0; ch_idx < num_tc_buffer_mem; ch_idx++ ) { mvr2r( tc_buffer_mem[ch_idx], hTcBuffer->tc_buffer_old[ch_idx], n_samples_still_available ); } -#endif return IVAS_ERR_OK; } @@ -2837,11 +2804,7 @@ void ivas_dec_prepare_renderer( ivas_omasa_gain_masa_tc( st_ivas->hTcBuffer->tc, st_ivas->hMasaIsmData->gain_masa_edited, st_ivas->nchan_ism, st_ivas->hTcBuffer->n_samples_available ); } } -#ifdef FIX_1419_MONO_STEREO_UMX else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) -#else - else if ( st_ivas->ivas_format == STEREO_FORMAT ) -#endif { ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas ); } @@ -2954,7 +2917,6 @@ void ivas_dec_prepare_renderer( nchan_transport_ism = st_ivas->nchan_ism; } -#ifdef NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES if ( st_ivas->hDecoderConfig->Opt_tsm && st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_DIRAC ) { /* Gain MASA part, if edited */ @@ -2966,7 +2928,6 @@ void ivas_dec_prepare_renderer( } } } -#endif for ( n = 0; n < nchan_transport_ism; n++ ) { diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 18c8fe3721..f689275098 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -401,11 +401,7 @@ ivas_error ivas_param_mc_dec_open( ivas_param_mc_dec_compute_interpolator( 0, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hParamMC->h_output_synthesis_params.interpolator ); /* Head or external rotation */ -#ifdef IVAS_RTPDUMP if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) ) -#else - if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) -#endif { if ( ( hParamMC->hoa_encoder = (float *) malloc( st_ivas->hTransSetup.nchan_out_woLFE * MAX_INTERN_CHANNELS * sizeof( float ) ) ) == NULL ) { @@ -1783,16 +1779,11 @@ void ivas_param_mc_dec_render( { for ( ch = 0; ch < nchan_out_cldfb; ch++ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_Push( st_ivas->hSplitBinRend->hMultiBinCldfbData[pos_idx * BINAURAL_CHANNELS + ch], Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], hParamMC->num_freq_bands ); -#else - mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_idx_start + slot_idx], hParamMC->num_freq_bands ); - mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_idx_start + slot_idx], hParamMC->num_freq_bands ); -#endif } } } diff --git a/lib_dec/ivas_mc_paramupmix_dec.c b/lib_dec/ivas_mc_paramupmix_dec.c index 3724372ab0..65904b2183 100644 --- a/lib_dec/ivas_mc_paramupmix_dec.c +++ b/lib_dec/ivas_mc_paramupmix_dec.c @@ -349,11 +349,7 @@ ivas_error ivas_mc_paramupmix_dec_open( } /* Head or external rotation */ -#ifdef IVAS_RTPDUMP if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) ) -#else - if ( ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) -#endif { if ( ( hMCParamUpmix->hoa_encoder = (float *) malloc( st_ivas->hTransSetup.nchan_out_woLFE * MAX_INTERN_CHANNELS * sizeof( float ) ) ) == NULL ) { @@ -795,16 +791,11 @@ static void ivas_mc_paramupmix_dec_sf( { for ( ch = 0; ch < st_ivas->hDecoderConfig->nchan_out; ch++ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_Push( st_ivas->hSplitBinRend->hMultiBinCldfbData[pos_idx * BINAURAL_CHANNELS + ch], Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], maxBand ); -#else - mvr2r( Cldfb_RealBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand ); - mvr2r( Cldfb_ImagBuffer_Binaural[pos_idx][ch][slot_idx], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[( pos_idx * BINAURAL_CHANNELS ) + ch][slot_index_start + slot_idx], maxBand ); -#endif } } } diff --git a/lib_dec/ivas_mct_dec.c b/lib_dec/ivas_mct_dec.c index 6ffd1b4f7e..bc492bd1ab 100644 --- a/lib_dec/ivas_mct_dec.c +++ b/lib_dec/ivas_mct_dec.c @@ -1142,11 +1142,7 @@ static ivas_error ivas_mc_dec_reconfig( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); -#ifdef IVAS_RTPDUMP if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) ) -#else - if ( ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) ) -#endif { efap_free_data( &st_ivas->hEFAPdata ); } diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index 83e69cc96b..4f69fd6b0c 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -160,13 +160,11 @@ static void dec_prm_tcx_sidebits( st->last_core_from_bs = st->last_core; } -#ifdef FIX_BASOP_ISSUE_1585_CUT_BS_CRASH /* for first frame reset last_core to initialization value for better error-robustness*/ if ( st->ini_frame == 0 ) { st->last_core = TCX_20_CORE; } -#endif getTCXWindowing( st->core, st->last_core, st->element_mode, st->hTcxCfg, st0 ); st->hTcxDec->kernel_type[0] = st->hTcxDec->kernel_type[1] = MDCT_IV; diff --git a/lib_dec/ivas_omasa_dec.c b/lib_dec/ivas_omasa_dec.c index f3e0b90aa9..e9d347e15d 100644 --- a/lib_dec/ivas_omasa_dec.c +++ b/lib_dec/ivas_omasa_dec.c @@ -680,11 +680,7 @@ void ivas_omasa_dirac_rend_jbm( { mvr2r( &output_f[CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[0], *nSamplesRendered ); -#ifdef NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES if ( st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) -#else - if ( !st_ivas->hDecoderConfig->Opt_tsm && st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) -#endif { /* Gain separated object, if edited */ for ( n = 0; n < st_ivas->nchan_ism; n++ ) @@ -703,11 +699,7 @@ void ivas_omasa_dirac_rend_jbm( mvr2r( &output_f[n + CPE_CHANNELS][st_ivas->hTcBuffer->n_samples_rendered], data_separated_objects[n], *nSamplesRendered ); /* Gain discrete objects, if edited */ -#ifdef NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES if ( st_ivas->hMasaIsmData->ism_gain_is_edited[n] ) -#else - if ( !st_ivas->hDecoderConfig->Opt_tsm && st_ivas->hMasaIsmData->ism_gain_is_edited[n] ) -#endif { v_multc( data_separated_objects[n], st_ivas->hMasaIsmData->gain_ism_edited[n], data_separated_objects[n], *nSamplesRendered ); } @@ -752,13 +744,7 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( float data_separated_objects[BINAURAL_CHANNELS][L_FRAME48k]; ivas_error error; float *p_sepobj[BINAURAL_CHANNELS]; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *re, *im; -#else - int16_t slot_idx_start; - - slot_idx_start = st_ivas->hSpatParamRendCom->slots_rendered; -#endif for ( n = 0; n < BINAURAL_CHANNELS; n++ ) { @@ -799,14 +785,9 @@ ivas_error ivas_omasa_dirac_td_binaural_jbm( { cldfbAnalysis_ts( &( p_rend_obj[n][num_cldfb_bands * slot_idx] ), Cldfb_RealBuffer, Cldfb_ImagBuffer, num_cldfb_bands, st_ivas->hSplitBinRend->splitrend.hCldfbHandles->cldfbAna[n] ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_GetByIdx( st_ivas->hSplitBinRend->hMultiBinCldfbData[n], &re, &im, slot_idx - cldfb_slots ); v_add( re, Cldfb_RealBuffer, re, num_cldfb_bands ); v_add( im, Cldfb_ImagBuffer, im, num_cldfb_bands ); -#else - v_add( st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx], Cldfb_RealBuffer, st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx], num_cldfb_bands ); - v_add( st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx], Cldfb_ImagBuffer, st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx], num_cldfb_bands ); -#endif } } } diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 185f905306..9b3041c09a 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -137,13 +137,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( float output_separated_objects[BINAURAL_CHANNELS][L_FRAME48k]; float *p_sepobj[BINAURAL_CHANNELS]; int16_t channel_offset; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *re, *im; -#else - int16_t slot_idx_start; - - slot_idx_start = st_ivas->hSpatParamRendCom->slots_rendered; -#endif for ( n = 0; n < BINAURAL_CHANNELS; n++ ) { @@ -162,9 +156,6 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { int16_t slot_idx, num_cldfb_bands, nchan_transport_orig; -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - int16_t b; -#endif int16_t cldfb_slots; float Cldfb_RealBuffer[CLDFB_NO_CHANNELS_MAX]; float Cldfb_ImagBuffer[CLDFB_NO_CHANNELS_MAX]; @@ -187,21 +178,9 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( { cldfbAnalysis_ts( &( output_f[n][num_cldfb_bands * slot_idx] ), Cldfb_RealBuffer, Cldfb_ImagBuffer, num_cldfb_bands, st_ivas->hSplitBinRend->splitrend.hCldfbHandles->cldfbAna[n] ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_GetByIdx( st_ivas->hSplitBinRend->hMultiBinCldfbData[n], &re, &im, slot_idx - cldfb_slots ); v_add( re, Cldfb_RealBuffer, re, num_cldfb_bands ); v_add( im, Cldfb_ImagBuffer, im, num_cldfb_bands ); -#else - for ( b = 0; b < num_cldfb_bands; b++ ) - { - st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] = - st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[n][slot_idx_start + slot_idx][b] + - Cldfb_RealBuffer[b]; - st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] = - st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[n][slot_idx_start + slot_idx][b] + - Cldfb_ImagBuffer[b]; - } -#endif } } } diff --git a/lib_dec/ivas_output_config.c b/lib_dec/ivas_output_config.c index f5b4d577b1..e825acb373 100644 --- a/lib_dec/ivas_output_config.c +++ b/lib_dec/ivas_output_config.c @@ -41,7 +41,6 @@ #endif #include "wmc_auto.h" -#ifdef FIX_1419_MONO_STEREO_UMX static void ms_bin_upmix_renderer_select( const IVAS_FORMAT ivas_format, /* i : Decoder format */ @@ -62,7 +61,6 @@ static void ms_bin_upmix_renderer_select( } return; } -#endif /*-------------------------------------------------------------------------* * ivas_renderer_select() @@ -93,18 +91,13 @@ void ivas_renderer_select( * Binaural rendering configurations *-----------------------------------------------------------------*/ -#ifdef IVAS_RTPDUMP if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) -#else - if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) -#endif { st_ivas->hCombinedOrientationData->shd_rot_max_order = -1; } if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) { -#ifdef FIX_1419_MONO_STEREO_UMX if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { ms_bin_upmix_renderer_select( st_ivas->ivas_format, @@ -112,9 +105,6 @@ void ivas_renderer_select( renderer_type ); } else if ( st_ivas->ivas_format == ISM_FORMAT ) -#else - if ( st_ivas->ivas_format == ISM_FORMAT ) -#endif { if ( st_ivas->ism_mode == ISM_MODE_PARAM ) { @@ -178,11 +168,7 @@ void ivas_renderer_select( *internal_config = IVAS_AUDIO_CONFIG_7_1_4; } -#ifdef IVAS_RTPDUMP if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) -#else - if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) -#endif { nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); @@ -225,11 +211,7 @@ void ivas_renderer_select( if ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) { -#ifdef IVAS_RTPDUMP if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) && st_ivas->mc_mode == MC_MODE_MCT ) -#else - if ( ( st_ivas->transport_config == IVAS_AUDIO_CONFIG_5_1 || st_ivas->transport_config == IVAS_AUDIO_CONFIG_7_1 ) && ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) && st_ivas->mc_mode == MC_MODE_MCT ) -#endif { *renderer_type = RENDERER_BINAURAL_OBJECTS_TD; } @@ -244,11 +226,7 @@ void ivas_renderer_select( *renderer_type = RENDERER_BINAURAL_FASTCONV; } -#ifdef IVAS_RTPDUMP if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation || st_ivas->hCombinedOrientationData ) -#else - if ( st_ivas->hDecoderConfig->Opt_Headrotation || st_ivas->hDecoderConfig->Opt_ExternalOrientation ) -#endif { /* force HOA3 domain for rotation*/ *internal_config = IVAS_AUDIO_CONFIG_HOA3; @@ -284,7 +262,6 @@ void ivas_renderer_select( * Non-binaural rendering configurations *-----------------------------------------------------------------*/ -#ifdef FIX_1419_MONO_STEREO_UMX else if ( st_ivas->ivas_format == MONO_FORMAT || st_ivas->ivas_format == STEREO_FORMAT ) { *internal_config = ( st_ivas->ivas_format == MONO_FORMAT ) ? IVAS_AUDIO_CONFIG_MONO : IVAS_AUDIO_CONFIG_STEREO; @@ -322,22 +299,6 @@ void ivas_renderer_select( break; } } -#else - else if ( st_ivas->ivas_format == MONO_FORMAT ) - { - if ( output_config == IVAS_AUDIO_CONFIG_STEREO ) - { - *renderer_type = RENDERER_NON_DIEGETIC_DOWNMIX; - } - } - else if ( st_ivas->ivas_format == STEREO_FORMAT ) - { - if ( output_config != IVAS_AUDIO_CONFIG_STEREO && output_config != IVAS_AUDIO_CONFIG_MONO && output_config != IVAS_AUDIO_CONFIG_EXTERNAL ) - { - *renderer_type = RENDERER_MC; - } - } -#endif else if ( st_ivas->ivas_format == ISM_FORMAT ) { if ( ( output_config == IVAS_AUDIO_CONFIG_STEREO ) && ( st_ivas->hDecoderConfig->Opt_non_diegetic_pan ) ) @@ -571,20 +532,11 @@ RENDERER_TYPE ivas_renderer_secondary_select( output_config = st_ivas->hDecoderConfig->output_config; if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->ism_mode == ISM_MASA_MODE_DISC && -#ifdef FIX_1119_SPLIT_RENDERING_VOIP - ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) -#else - output_config == IVAS_AUDIO_CONFIG_BINAURAL -#endif - ) + ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) { renderer_type = RENDERER_BINAURAL_OBJECTS_TD; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP else if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) -#else - else if ( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC && ( output_config == IVAS_AUDIO_CONFIG_BINAURAL || output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) -#endif { renderer_type = RENDERER_BINAURAL_OBJECTS_TD; } diff --git a/lib_dec/ivas_sba_dirac_stereo_dec.c b/lib_dec/ivas_sba_dirac_stereo_dec.c index b20afdca41..c755bb6041 100644 --- a/lib_dec/ivas_sba_dirac_stereo_dec.c +++ b/lib_dec/ivas_sba_dirac_stereo_dec.c @@ -187,9 +187,6 @@ static float get_panning( { float aziRad, eleRad, y, mappedX, aziRadMapped, panning; float A, A2, A3; -#ifndef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL - const float LsAngleRad = 30.0f * PI_OVER_180; -#endif aziRad = aziDeg * PI_OVER_180; eleRad = eleDeg * PI_OVER_180; y = ( sinf( aziRad ) * cosf( eleRad ) ); @@ -198,29 +195,17 @@ static float get_panning( /* Determine the real valued amplitude panning gains */ panning = 0.0f; -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL if ( aziRadMapped >= LS_ANGLE_RAD_30_DEG ) -#else - if ( aziRadMapped >= LsAngleRad ) -#endif { /* Left side */ panning = 1.0f; } -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL else if ( aziRadMapped <= -LS_ANGLE_RAD_30_DEG ) -#else - else if ( aziRadMapped <= -LsAngleRad ) -#endif { /* Right side */ panning = -1.0f; } else /* Tangent panning law */ { -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL A = tanf( aziRadMapped ) * INV_TAN_LS_ANGLE_RAD_30_DEG; -#else - A = tanf( aziRadMapped ) / tanf( LsAngleRad ); -#endif A2 = ( A - 1.0f ) / max( 0.001f, A + 1.0f ); A3 = 1.0f / ( A2 * A2 + 1.0f ); panning = 2 * A3 - 1.0f; diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 6b6a99b32b..dcfb151479 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -821,36 +821,18 @@ typedef struct renderer_struct * IVAS decoder specific ISAR wrapper structures *----------------------------------------------------------------------------------*/ -#ifndef FIX_1119_SPLIT_RENDERING_VOIP typedef struct { - float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - -} ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA, *ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE; - -#endif -typedef struct -{ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][2 * CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; /* Double space to account for TSM */ float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][2 * CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; -#else - float Cldfb_RealBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer[MAX_OUTPUT_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; -#endif IVAS_AUDIO_CONFIG config; } ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA, *ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE; typedef struct { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP TD_RINGBUF_HANDLE hMultiBinTdData; ISAR_CLDFB_RINGBUF_HANDLE hMultiBinCldfbData[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS]; -#else - ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE hMultiBinCldfbData; /*scratch buffer for frame by frame processing*/ -#endif ISAR_SPLIT_REND_BITS_HANDLE hSplitRendBits; /*scratch buffer for frame by frame processing*/ SPLIT_REND_WRAPPER splitrend; ISAR_DEC_SPLIT_REND_CLDFB_OUT_DATA_HANDLE hCldfbDataOut; /*buffer to store cldfb data before binauralization*/ @@ -1007,18 +989,16 @@ typedef struct jbm_metadata_structure typedef struct decoder_config_structure { - int32_t ivas_total_brate; /* IVAS total bitrate in bps */ - int32_t last_ivas_total_brate; /* last IVAS total bitrate in bps */ - int32_t output_Fs; /* output signal sampling frequency in Hz */ - int16_t nchan_out; /* number of output audio channels */ - AUDIO_CONFIG output_config; /* output audio configuration */ - int16_t Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */ - int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ - int16_t Opt_Headrotation; /* indicates whether head-rotation is used */ - int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE - IVAS_ROOM_SIZE_T Opt_RoomSize; /* Selected room size */ -#endif + int32_t ivas_total_brate; /* IVAS total bitrate in bps */ + int32_t last_ivas_total_brate; /* last IVAS total bitrate in bps */ + int32_t output_Fs; /* output signal sampling frequency in Hz */ + int16_t nchan_out; /* number of output audio channels */ + AUDIO_CONFIG output_config; /* output audio configuration */ + int16_t Opt_LsCustom; /* indicates whether loudspeaker custom setup is used */ + int16_t Opt_HRTF_binary; /* indicates whether HRTF binary file is used */ + int16_t Opt_Headrotation; /* indicates whether head-rotation is used */ + int16_t Opt_RendConfigCustom; /* indicates whether Renderer configuration custom setup is used */ + IVAS_ROOM_SIZE_T Opt_RoomSize; /* Selected room size */ IVAS_HEAD_ORIENT_TRK_T orientation_tracking; /* indicates orientation tracking type */ int16_t Opt_non_diegetic_pan; /* indicates diegetic or not */ float non_diegetic_pan_gain; /* non diegetic panning gain*/ @@ -1131,10 +1111,8 @@ typedef struct Decoder_Struct MASA_ISM_DATA_HANDLE hMasaIsmData; /* OMASA rendering handle */ SBA_ISM_DATA_HANDLE hSbaIsmData; /* OSBA rendering handle */ -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pAcousticEnvironments; /* Acoustic environment array */ uint16_t acousticEnvironmentsCount; /* Number of acoustic environments in the array*/ -#endif int16_t flag_omasa_brate; ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE hSplitBinRend; /* ISAR split binaural rendering handle */ @@ -1154,9 +1132,7 @@ typedef struct Decoder_Struct #ifdef TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR int16_t flushing; #endif -#ifdef DECODER_FORMAT_SWITCHING int16_t restartNeeded; /* Flag to signal decoder restart */ -#endif } Decoder_Struct; diff --git a/lib_dec/ivas_stereo_dft_dec.c b/lib_dec/ivas_stereo_dft_dec.c index 7b86528878..5b44051de4 100644 --- a/lib_dec/ivas_stereo_dft_dec.c +++ b/lib_dec/ivas_stereo_dft_dec.c @@ -1384,16 +1384,11 @@ void stereo_dft_dec( if ( pgIpd[0] != 0.f ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c0 = cosf( pgIpd_tmp ); s0 = sinf( pgIpd_tmp ); -#else - c0 = cosf( pgIpd[0] ); - s0 = sinf( pgIpd[0] ); -#endif for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) { /*rotate L*/ @@ -1574,16 +1569,11 @@ void stereo_dft_dec( /* Active Upmix */ if ( pgIpd[0] != 0.f ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c0 = cosf( pgIpd_tmp ); s0 = sinf( pgIpd_tmp ); -#else - c0 = cosf( pgIpd[0] ); - s0 = sinf( pgIpd[0] ); -#endif for ( i = hStereoDft->band_limits[b]; i < hStereoDft->band_limits[b + 1]; i++ ) { /*rotate L*/ diff --git a/lib_dec/ivas_stereo_dft_plc.c b/lib_dec/ivas_stereo_dft_plc.c index f311b60aff..26c2e8b6c4 100644 --- a/lib_dec/ivas_stereo_dft_plc.c +++ b/lib_dec/ivas_stereo_dft_plc.c @@ -251,9 +251,7 @@ void stereo_dft_res_subst_spec( /* Apply phase adjustment of identified peaks, including Np=1 peak neighbors on each side */ for ( i = *num_plocs - 1; i >= 0; i-- ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float corr_phase_tmp; -#endif if ( k == 0 ) { /* For 1st subframe, apply reversed time ECU to get correct analysis window */ @@ -271,14 +269,9 @@ void stereo_dft_res_subst_spec( conj_sign = 1.0f; } -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 corr_phase_tmp = corr_phase; cos_F = cosf( corr_phase_tmp ); sin_F = sinf( corr_phase_tmp ); -#else - cos_F = cosf( corr_phase ); - sin_F = sinf( corr_phase ); -#endif idx = max( 0, plocs[i] - Np ); /* Iterate over plocs[i]-1:plocs[i]+1, considering the edges of the spectrum */ while ( ( idx < plocs[i] + Np + 1 ) && ( idx < L_res ) ) diff --git a/lib_dec/ivas_stereo_mdct_stereo_dec.c b/lib_dec/ivas_stereo_mdct_stereo_dec.c index 3fd4b3184f..4ff298dcf9 100644 --- a/lib_dec/ivas_stereo_mdct_stereo_dec.c +++ b/lib_dec/ivas_stereo_mdct_stereo_dec.c @@ -523,11 +523,7 @@ void synchonize_channels_mdct_sid( sts[1]->L_frame = sts[0]->L_frame; sts[1]->cng_type = sts[0]->cng_type; sts[1]->bwidth = sts[0]->bwidth; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG sts[0]->hFdCngDec->hFdCngCom->coherence[0] = sts[1]->hFdCngDec->hFdCngCom->coherence[0]; /* coherence is stored in sts[1] - see ivas_decision_matrix_dec() and FdCngDecodeMDCTStereoSID() */ -#else - sts[0]->hFdCngDec->hFdCngCom->coherence = sts[1]->hFdCngDec->hFdCngCom->coherence; /* coherence is stored in sts[1] - see ivas_decision_matrix_dec() */ -#endif sts[0]->hFdCngDec->hFdCngCom->no_side_flag = sts[1]->hFdCngDec->hFdCngCom->no_side_flag; /* configure when there is a switching from DFT CNG to MDCT CNG */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index de95304301..46eff67b23 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -41,9 +41,7 @@ #include "jbm_jb4sb.h" #include "jbm_pcmdsp_apa.h" #include "jbm_pcmdsp_fifo.h" -#ifdef IVAS_RTPDUMP #include "ivas_rtp_pi_data.h" -#endif #include #include #ifdef DEBUGGING @@ -117,11 +115,7 @@ static void store_JbmData( IVAS_DEC_VOIP *hVoIP, JB4_DATAUNIT_HANDLE dataUnit, c static ivas_error evs_dec_main( Decoder_Struct *st_ivas ); static ivas_error input_format_API_to_internal( IVAS_DEC_INPUT_FORMAT input_format, int16_t *bitstream_format_internal, int16_t *sdp_hf_only, const bool is_voip_enabled ); static void init_decoder_config( DECODER_CONFIG_HANDLE hDecoderConfig ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP static ivas_error ivas_dec_setup_all( IVAS_DEC_HANDLE hIvasDec, uint8_t *nTransportChannels, ISAR_SPLIT_REND_BITS_DATA *splitRendBits ); -#else -static ivas_error ivas_dec_setup_all( IVAS_DEC_HANDLE hIvasDec, uint8_t *nTransportChannels, const int16_t isSplitRend, ISAR_SPLIT_REND_BITS_DATA *splitRendBits ); -#endif static ivas_error apa_setup( IVAS_DEC_HANDLE hIvasDec, const bool isInitialized_voip, const uint16_t nTransportChannels ); static PCM_RESOLUTION pcm_type_API_to_internal( const IVAS_DEC_PCM_TYPE pcmType ); static void *pcm_buffer_offset( void *buffer, const IVAS_DEC_PCM_TYPE pcmType, const int32_t offset ); @@ -132,10 +126,8 @@ static ivas_error ivas_dec_init_split_rend( Decoder_Struct *st_ivas ); static ivas_error ivas_create_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend_out ); static void ivas_destroy_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend_out ); static int16_t get_render_frame_size_ms( IVAS_RENDER_FRAMESIZE render_framesize ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP static int16_t get_render_frame_size_samples( const DECODER_CONFIG_HANDLE hDecoderConfig ); static int16_t ivas_dec_split_rend_cldfb_in( const RENDERER_TYPE renderer_type ); -#endif static void update_voip_rendered20ms( IVAS_DEC_HANDLE hIvasDec, const int16_t nSamplesRendered ); @@ -225,9 +217,7 @@ ivas_error IVAS_DEC_Open( /* initialize pointers to handles to NULL */ ivas_initialize_handles_dec( st_ivas ); -#ifdef DECODER_FORMAT_SWITCHING st_ivas->restartNeeded = 0; -#endif /* set high-level parameters */ if ( mode == IVAS_DEC_MODE_EVS ) @@ -317,9 +307,7 @@ static void init_decoder_config( hDecoderConfig->Opt_HRTF_binary = 0; hDecoderConfig->Opt_Headrotation = 0; hDecoderConfig->Opt_RendConfigCustom = 0; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE hDecoderConfig->Opt_RoomSize = IVAS_ROOM_SIZE_AUTO; -#endif hDecoderConfig->orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE; hDecoderConfig->Opt_non_diegetic_pan = 0; hDecoderConfig->non_diegetic_pan_gain = 0; @@ -356,17 +344,11 @@ void IVAS_DEC_Close( ( *phIvasDec )->hVoIP = NULL; } -#ifndef IVAS_RTPDUMP - /* destroy Split binaural renderer (ISAR) handle */ - ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); -#endif if ( ( *phIvasDec )->st_ivas ) { -#ifdef IVAS_RTPDUMP /* destroy Split binaural renderer (ISAR) handle */ ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); -#endif ivas_destroy_dec( ( *phIvasDec )->st_ivas ); ( *phIvasDec )->st_ivas = NULL; } @@ -462,15 +444,13 @@ ivas_error IVAS_DEC_Configure( const bool enableExternalOrientation, /* i : enable external orientations */ const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE - const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ -#endif - const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ - const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ - const bool dpidEnabled, /* i : enable directivity pattern option */ - const uint16_t acousticEnvironmentId, /* i : Acoustic environment ID */ - const bool objEditEnabled, /* i : enable object editing */ - const bool delayCompensationEnabled /* i : enable delay compensation */ + const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ + const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ + const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ + const bool dpidEnabled, /* i : enable directivity pattern option */ + const uint16_t acousticEnvironmentId, /* i : Acoustic environment ID */ + const bool objEditEnabled, /* i : enable object editing */ + const bool delayCompensationEnabled /* i : enable delay compensation */ ) { Decoder_Struct *st_ivas; @@ -487,7 +467,6 @@ ivas_error IVAS_DEC_Configure( return IVAS_ERR_WRONG_PARAMS; } -#ifdef FIX_1419_MONO_STEREO_UMX if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && ( outputConfig == IVAS_AUDIO_CONFIG_INVALID || outputConfig == IVAS_AUDIO_CONFIG_ISM1 || @@ -498,10 +477,6 @@ ivas_error IVAS_DEC_Configure( outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || outputConfig == IVAS_AUDIO_CONFIG_MASA1 || outputConfig == IVAS_AUDIO_CONFIG_MASA2 ) ) -#else /* we now support all output formats, so this validation is redundant */ - if ( hIvasDec->mode == IVAS_DEC_MODE_EVS && !( ( outputConfig == IVAS_AUDIO_CONFIG_MONO && !non_diegetic_pan_enabled ) || - ( outputConfig == IVAS_AUDIO_CONFIG_STEREO && non_diegetic_pan_enabled ) ) ) -#endif { return IVAS_ERR_WRONG_MODE; } @@ -534,9 +509,7 @@ ivas_error IVAS_DEC_Configure( hDecoderConfig->orientation_tracking = orientation_tracking; hDecoderConfig->Opt_HRTF_binary = (int16_t) hrtfReaderEnabled; hDecoderConfig->Opt_RendConfigCustom = (int16_t) renderConfigEnabled; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE hDecoderConfig->Opt_RoomSize = roomSize; -#endif hDecoderConfig->Opt_non_diegetic_pan = (int16_t) non_diegetic_pan_enabled; hDecoderConfig->non_diegetic_pan_gain = non_diegetic_pan_gain; hDecoderConfig->Opt_delay_comp = (int16_t) delayCompensationEnabled; @@ -677,7 +650,6 @@ ivas_error IVAS_DEC_GetRenderFramesize( } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * get_render_frame_size_samples( ) * @@ -690,7 +662,6 @@ static int16_t get_render_frame_size_samples( { return (int16_t) ( hDecoderConfig->output_Fs * hDecoderConfig->render_framesize / ( FRAMES_PER_SEC * IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) ); } -#endif /*---------------------------------------------------------------------* @@ -709,11 +680,7 @@ ivas_error IVAS_DEC_GetRenderFramesizeSamples( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP *render_framesize = get_render_frame_size_samples( hIvasDec->st_ivas->hDecoderConfig ); -#else - *render_framesize = (int16_t) ( hIvasDec->st_ivas->hDecoderConfig->output_Fs * hIvasDec->st_ivas->hDecoderConfig->render_framesize / ( FRAMES_PER_SEC * IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ) ); -#endif return IVAS_ERR_OK; } @@ -1031,9 +998,6 @@ ivas_error IVAS_DEC_ReadFormat( { ivas_error error; Decoder_Struct *st_ivas; -#ifndef DECODER_FORMAT_SWITCHING - IVAS_FORMAT ivas_format_old; -#endif ISM_MODE ism_mode_old; MC_MODE mc_mode_old; int16_t nchan_transport_old; @@ -1046,9 +1010,6 @@ ivas_error IVAS_DEC_ReadFormat( } st_ivas = hIvasDec->st_ivas; -#ifndef DECODER_FORMAT_SWITCHING - ivas_format_old = st_ivas->ivas_format; -#endif ism_mode_old = st_ivas->ism_mode; mc_mode_old = st_ivas->mc_mode; nchan_transport_old = st_ivas->nchan_transport; @@ -1071,17 +1032,10 @@ ivas_error IVAS_DEC_ReadFormat( return error; } -#ifdef DECODER_FORMAT_SWITCHING if ( st_ivas->restartNeeded == 1 ) { return IVAS_ERR_OK; } -#else - if ( ivas_format_old != st_ivas->ivas_format && st_ivas->ini_frame > 0 && !( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) ) - { - return ( IVAS_ERROR( IVAS_ERR_INVALID_INPUT_FORMAT, "IVAS format switching is not allowed." ) ); - } -#endif /* Select binaural renderer */ ivas_renderer_select( st_ivas ); @@ -1182,10 +1136,7 @@ ivas_error IVAS_DEC_ReadFormat( *---------------------------------------------------------------------*/ ivas_error IVAS_DEC_GetSamplesDecoder( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - const int16_t isSplitRend, /* i : split rendering enabled flag */ -#endif + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ ) { @@ -1216,11 +1167,7 @@ ivas_error IVAS_DEC_GetSamplesDecoder( * Setup all decoder parts (IVAS decoder, ISAR) *-----------------------------------------------------------------*/ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( ( error = ivas_dec_setup_all( hIvasDec, &nTransportChannels, splitRendBits ) ) != IVAS_ERR_OK ) -#else - if ( ( error = ivas_dec_setup_all( hIvasDec, &nTransportChannels, isSplitRend, splitRendBits ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -1555,7 +1502,6 @@ ivas_error IVAS_DEC_SetEditableParameters( st_ivas->hIsmMetaData[obj]->edited_radius = hIvasEditableParameters.ism_metadata[obj].radius; st_ivas->hIsmMetaData[obj]->edited_yaw = hIvasEditableParameters.ism_metadata[obj].yaw; st_ivas->hIsmMetaData[obj]->edited_pitch = hIvasEditableParameters.ism_metadata[obj].pitch; -#ifdef FIX_GAIN_EDIT_LIMITS if ( hIvasEditableParameters.ism_metadata[obj].gain > EDIT_GAIN_MAX ) { st_ivas->hIsmMetaData[obj]->edited_gain = EDIT_GAIN_MAX; @@ -1564,15 +1510,11 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hIsmMetaData[obj]->edited_gain = hIvasEditableParameters.ism_metadata[obj].gain; } -#else - st_ivas->hIsmMetaData[obj]->edited_gain = hIvasEditableParameters.ism_metadata[obj].gain; -#endif st_ivas->hIsmMetaData[obj]->non_diegetic_flag = hIvasEditableParameters.ism_metadata[obj].non_diegetic_flag; } if ( ism_mode == ISM_SBA_MODE_DISC ) { -#ifdef FIX_GAIN_EDIT_LIMITS if ( hIvasEditableParameters.gain_bed > EDIT_GAIN_MAX ) { st_ivas->hSbaIsmData->gain_bed = EDIT_GAIN_MAX; @@ -1581,9 +1523,6 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hSbaIsmData->gain_bed = hIvasEditableParameters.gain_bed; } -#else - st_ivas->hSbaIsmData->gain_bed = hIvasEditableParameters.gain_bed; -#endif } } else if ( ism_mode == ISM_MODE_PARAM ) @@ -1598,7 +1537,6 @@ ivas_error IVAS_DEC_SetEditableParameters( if ( st_ivas->hMasaIsmData != NULL ) { -#ifdef FIX_GAIN_EDIT_LIMITS /* Limit gain edit to a range of +12dB to -24dB with parametric ISM mode */ if ( hIvasEditableParameters.ism_metadata[obj].gain > EDIT_GAIN_MAX ) { @@ -1612,9 +1550,6 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hMasaIsmData->gain_ism_edited[obj] = hIvasEditableParameters.ism_metadata[obj].gain; } -#else - st_ivas->hMasaIsmData->gain_ism_edited[obj] = hIvasEditableParameters.ism_metadata[obj].gain; -#endif /* Detect direction editing in Param-ISM mode */ if ( fabsf( st_ivas->hParamIsmDec->azimuth_values[obj] - hIvasEditableParameters.ism_metadata[obj].azimuth ) > OMASA_AZI_EDIT_THR || @@ -1748,7 +1683,6 @@ ivas_error IVAS_DEC_SetEditableParameters( if ( fabsf( st_ivas->hIsmMetaData[obj]->edited_gain - hIvasEditableParameters.ism_metadata[obj].gain ) > OMASA_GAIN_EDIT_THR ) { st_ivas->hMasaIsmData->ism_gain_is_edited[obj] = 1u; -#ifdef FIX_GAIN_EDIT_LIMITS /* Limit masa gain edit to a range of +12dB to -infdB with discrete OMASA mode and +12dB to -24dB with parametric OMASA mode */ if ( hIvasEditableParameters.ism_metadata[obj].gain > EDIT_GAIN_MAX ) { @@ -1762,9 +1696,6 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hMasaIsmData->gain_ism_edited[obj] = hIvasEditableParameters.ism_metadata[obj].gain; } -#else - st_ivas->hMasaIsmData->gain_ism_edited[obj] = hIvasEditableParameters.ism_metadata[obj].gain; -#endif } else { @@ -1777,19 +1708,12 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hIsmMetaData[obj]->edited_azimuth = hIvasEditableParameters.ism_metadata[obj].azimuth; st_ivas->hIsmMetaData[obj]->edited_elevation = hIvasEditableParameters.ism_metadata[obj].elevation; -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA // Disable editing extended metadata for OMASA Param ISM if ( ism_mode == ISM_MASA_MODE_DISC ) { st_ivas->hIsmMetaData[obj]->edited_yaw = hIvasEditableParameters.ism_metadata[obj].yaw; st_ivas->hIsmMetaData[obj]->edited_pitch = hIvasEditableParameters.ism_metadata[obj].pitch; st_ivas->hIsmMetaData[obj]->edited_radius = hIvasEditableParameters.ism_metadata[obj].radius; } -#else - st_ivas->hIsmMetaData[obj]->edited_yaw = hIvasEditableParameters.ism_metadata[obj].yaw; - st_ivas->hIsmMetaData[obj]->edited_pitch = hIvasEditableParameters.ism_metadata[obj].pitch; - st_ivas->hIsmMetaData[obj]->edited_radius = hIvasEditableParameters.ism_metadata[obj].radius; -#endif -#ifdef FIX_GAIN_EDIT_LIMITS if ( hIvasEditableParameters.ism_metadata[obj].gain > EDIT_GAIN_MAX ) { st_ivas->hIsmMetaData[obj]->edited_gain = EDIT_GAIN_MAX; @@ -1802,16 +1726,12 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hIsmMetaData[obj]->edited_gain = hIvasEditableParameters.ism_metadata[obj].gain; } -#else - st_ivas->hIsmMetaData[obj]->edited_gain = hIvasEditableParameters.ism_metadata[obj].gain; -#endif st_ivas->hIsmMetaData[obj]->non_diegetic_flag = hIvasEditableParameters.ism_metadata[obj].non_diegetic_flag; } } if ( fabsf( hIvasEditableParameters.gain_bed - 1.0f ) > OMASA_GAIN_EDIT_THR ) { -#ifdef FIX_GAIN_EDIT_LIMITS /* Limit masa gain edit to a range of +12dB to -infdB with discrete OMASA mode and +12dB to -24dB with parametric OMASA mode */ if ( hIvasEditableParameters.gain_bed > EDIT_GAIN_MAX ) { @@ -1825,9 +1745,6 @@ ivas_error IVAS_DEC_SetEditableParameters( { st_ivas->hMasaIsmData->gain_masa_edited = hIvasEditableParameters.gain_bed; } -#else - st_ivas->hMasaIsmData->gain_masa_edited = hIvasEditableParameters.gain_bed; -#endif st_ivas->hMasaIsmData->masa_gain_is_edited = 1u; } else @@ -1998,7 +1915,6 @@ ivas_error IVAS_DEC_GetSamplesRenderer( } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * isar_get_frame_size( ) * @@ -2188,7 +2104,6 @@ static ivas_error isar_generate_metadata_and_bitstream( return IVAS_ERR_OK; } -#endif /* FIX_1119_SPLIT_RENDERING_VOIP */ /*---------------------------------------------------------------------* @@ -2205,7 +2120,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( bool *needNewFrame /* o : indication that the decoder needs a new frame */ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP Decoder_Struct *st_ivas; ivas_error error; float head_pose_buf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; @@ -2268,194 +2182,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( #endif ivas_syn_output( p_head_pose_buf, numSamplesPerChannelToOutput, st_ivas->hDecoderConfig->nchan_out, (int16_t *) pcmBuf_out ); } -#else - Decoder_Struct *st_ivas; - AUDIO_CONFIG output_config; - int32_t output_Fs; - float *pOutput[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES]; - float output[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES][L_FRAME48k]; - float pcmBuf[BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES * L_FRAME48k]; - float Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - float Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX]; - int16_t numSamplesPerChannelToDecode; - int16_t i, j; - ivas_error error; - ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE hSplitBinRend; - int16_t max_band; - int16_t pcm_out_flag; - int16_t td_input; - int16_t numPoses; - int16_t slots_rendered, slots_rendered_new; - int16_t ro_md_flag; - IVAS_QUATERNION Quaternion; - - if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) - { - return IVAS_ERR_UNEXPECTED_NULL_POINTER; - } - - error = IVAS_ERR_OK; - st_ivas = hIvasDec->st_ivas; - output_config = st_ivas->hDecoderConfig->output_config; - output_Fs = st_ivas->hDecoderConfig->output_Fs; - numSamplesPerChannelToDecode = (int16_t) ( output_Fs / FRAMES_PER_SEC ); - - *needNewFrame = false; - hSplitBinRend = st_ivas->hSplitBinRend; - - numPoses = hSplitBinRend->splitrend.multiBinPoseData.num_poses; - - /* init flush buffer for rate switch if not already initizalized */ - if ( hIvasDec->flushbuffer == NULL ) - { - hIvasDec->flushbuffer = (void *) malloc( numPoses * BINAURAL_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( float ) ); - if ( hIvasDec->flushbuffer == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate flush buffer" ); - } - hIvasDec->pcmType = IVAS_DEC_PCM_FLOAT; - set_zero( (float *) hIvasDec->flushbuffer, numPoses * BINAURAL_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES ); - } - - if ( st_ivas->hDecoderConfig->render_framesize != IVAS_RENDER_FRAMESIZE_20MS && - ( st_ivas->hRenderConfig->split_rend_config.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE || - st_ivas->hRenderConfig->split_rend_config.dof == 0 ) ) - { - numSamplesPerChannelToDecode = (int16_t) ( output_Fs / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ); - numSamplesPerChannelToDecode *= (int16_t) st_ivas->hDecoderConfig->render_framesize; - } - - if ( is_split_rendering_enabled( st_ivas->hDecoderConfig, st_ivas->hRenderConfig ) == 0 ) - { - return IVAS_ERR_WRONG_PARAMS; - } - - if ( st_ivas->hTcBuffer == NULL || hIvasDec->hasBeenFedFrame ) - { - slots_rendered = 0; - } - else - { - /* this is needed for OMASA-DISC, because the td-rend granularity is 240 samples at 48kHz, leading to wrong slot count. */ - if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) - { - slots_rendered = st_ivas->hTcBuffer->n_samples_rendered / NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); - } - else - { - slots_rendered = st_ivas->hTcBuffer->n_samples_rendered / st_ivas->hTcBuffer->n_samples_granularity; - } - } - - /* render */ - if ( ( error = IVAS_DEC_GetSamplesRenderer( hIvasDec, numSamplesPerChannelToDecode, IVAS_DEC_PCM_FLOAT, pcmBuf, nOutSamples, needNewFrame ) ) != IVAS_ERR_OK ) - { - return error; - } - - if ( !hIvasDec->hasBeenFedFirstGoodFrame ) - { - return IVAS_ERR_OK; - } - - /* change buffer layout */ - for ( i = 0; i < numSamplesPerChannelToDecode; ++i ) - { - for ( j = 0; j < BINAURAL_CHANNELS * numPoses; ++j ) - { - output[j][i] = pcmBuf[i * BINAURAL_CHANNELS * numPoses + j]; - } - } - for ( i = 0; i < BINAURAL_CHANNELS * MAX_HEAD_ROT_POSES; ++i ) - { - pOutput[i] = output[i]; - } - - if ( st_ivas->hTcBuffer == NULL ) - { - slots_rendered_new = 0; - } - else - { - /* this is needed for OMASA-DISC, because the td-rend granularity is 240 samples at 48kHz, leading to wrong slot count. */ - if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->ism_mode == ISM_MASA_MODE_DISC ) - { - slots_rendered_new = st_ivas->hTcBuffer->n_samples_rendered / NS2SA( st_ivas->hDecoderConfig->output_Fs, CLDFB_SLOT_NS ); - } - else - { - slots_rendered_new = st_ivas->hTcBuffer->n_samples_rendered / st_ivas->hTcBuffer->n_samples_granularity; - } - } - - for ( i = 0; i < BINAURAL_CHANNELS * numPoses; ++i ) - { - for ( j = slots_rendered; j < slots_rendered_new; ++j ) - { - mvr2r( hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[i][j], Cldfb_RealBuffer_Binaural[i][j - slots_rendered], CLDFB_NO_CHANNELS_MAX ); - mvr2r( hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[i][j], Cldfb_ImagBuffer_Binaural[i][j - slots_rendered], CLDFB_NO_CHANNELS_MAX ); - } - } - - max_band = (int16_t) ( ( BINAURAL_MAXBANDS * output_Fs ) / 48000 ); - pcm_out_flag = ( output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; - td_input = st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC_ROOM && st_ivas->renderer_type != RENDERER_STEREO_PARAMETRIC; - - if ( st_ivas->hBinRendererTd != NULL ) - { - ro_md_flag = 1; - } - else - { - ro_md_flag = 0; - } - - if ( st_ivas->hHeadTrackData != NULL ) - { - Quaternion = st_ivas->hHeadTrackData->Quaternions[0]; - } - else - { - Quaternion.w = -3.0f; - Quaternion.x = 0.0f; - Quaternion.y = 0.0f; - Quaternion.z = 0.0f; - } - - if ( ( error = ISAR_PRE_REND_MultiBinToSplitBinaural( &hSplitBinRend->splitrend, - Quaternion, - st_ivas->hRenderConfig->split_rend_config.splitRendBitRate, - st_ivas->hRenderConfig->split_rend_config.codec, - st_ivas->hRenderConfig->split_rend_config.isar_frame_size_ms, - st_ivas->hRenderConfig->split_rend_config.codec_frame_size_ms, - splitRendBits, - Cldfb_RealBuffer_Binaural, - Cldfb_ImagBuffer_Binaural, - max_band, pOutput, 1, !td_input, pcm_out_flag, ro_md_flag ) ) != IVAS_ERR_OK ) - { - return error; - } - - /* convert to int16 with limiting for BINAURAL_SPLIT_PCM */ - if ( pcm_out_flag ) - { - if ( st_ivas->hDecoderConfig->render_framesize == IVAS_RENDER_FRAMESIZE_5MS ) - { -#ifndef DISABLE_LIMITER - ivas_limiter_dec( st_ivas->hLimiter, pOutput, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToDecode, st_ivas->BER_detect ); -#endif - } - else - { - ivas_limiter_dec( st_ivas->hLimiter, pOutput, st_ivas->hDecoderConfig->nchan_out, numSamplesPerChannelToDecode, st_ivas->BER_detect ); - } - -#ifdef DEBUGGING - st_ivas->noClipping += -#endif - ivas_syn_output( pOutput, numSamplesPerChannelToDecode, st_ivas->hDecoderConfig->nchan_out, (int16_t *) pcmBuf_out ); - } -#endif return IVAS_ERR_OK; } @@ -2468,11 +2194,8 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( *---------------------------------------------------------------------*/ static ivas_error ivas_dec_setup_all( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - const int16_t isSplitRend, /* i : split rendering enabled flag */ -#endif + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ ) { @@ -2496,11 +2219,7 @@ static ivas_error ivas_dec_setup_all( st_ivas = hIvasDec->st_ivas; /* Setup IVAS split rendering */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( splitRendBits != NULL ) -#else - if ( isSplitRend ) -#endif { if ( ( error = isar_set_split_rend_setup( st_ivas->hSplitBinRend, &st_ivas->hRenderConfig->split_rend_config, st_ivas->hCombinedOrientationData, splitRendBits ) ) != IVAS_ERR_OK ) { @@ -2532,11 +2251,7 @@ static ivas_error ivas_dec_setup_all( * - reconfigure the ISAR handle in case of bitrate switching (renderer might change) *-----------------------------------------------------------------*/ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( st_ivas->ini_frame == 0 && splitRendBits != NULL ) -#else - if ( st_ivas->ini_frame == 0 && isSplitRend ) -#endif { if ( ( error = ivas_dec_init_split_rend( st_ivas ) ) != IVAS_ERR_OK ) { @@ -2623,7 +2338,6 @@ ivas_error IVAS_DEC_GetFormat( *format = IVAS_DEC_BS_UNKOWN; } -#ifdef DECODER_FORMAT_SWITCHING if ( *format == IVAS_DEC_BS_MASA && hIvasDec->st_ivas->hMasa != NULL ) { if ( hIvasDec->st_ivas->hMasa->config.input_ivas_format == MASA_ISM_FORMAT ) @@ -2631,12 +2345,6 @@ ivas_error IVAS_DEC_GetFormat( *format = IVAS_DEC_BS_MASA_ISM; } } -#else - if ( *format == IVAS_DEC_BS_MASA && hIvasDec->st_ivas->hMasa->config.input_ivas_format == MASA_ISM_FORMAT ) - { - *format = IVAS_DEC_BS_MASA_ISM; - } -#endif return IVAS_ERR_OK; } @@ -3321,7 +3029,6 @@ ivas_error IVAS_DEC_HRTF_binary_close( } -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT /*---------------------------------------------------------------------* * IVAS_DEC_AddAcousticEnvironment( ) * @@ -3496,7 +3203,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( return found ? IVAS_ERR_OK : IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING; } -#endif /*---------------------------------------------------------------------* @@ -3528,9 +3234,7 @@ static ivas_error copyRendererConfigStruct( break; } #endif -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT hRCout->roomAcoustics.aeID = hRCin->roomAcoustics.aeID; -#endif hRCout->roomAcoustics.nBands = hRCin->roomAcoustics.nBands; hRCout->roomAcoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; hRCout->roomAcoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; @@ -3628,9 +3332,7 @@ ivas_error IVAS_DEC_FeedRenderConfig( hRenderConfig->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_CREND; } #endif -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT hRenderConfig->roomAcoustics.aeID = renderConfig.roomAcoustics.aeID; -#endif hRenderConfig->roomAcoustics.nBands = renderConfig.roomAcoustics.nBands; hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.roomAcoustics.acousticPreDelay; hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.roomAcoustics.inputPreDelay; @@ -3717,7 +3419,6 @@ ivas_error IVAS_DEC_FeedRenderConfig( } -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT /*---------------------------------------------------------------------* * feedAcousticEnvPI( ) * @@ -3845,7 +3546,6 @@ static ivas_error feedAcousticEnvPI( return IVAS_ERR_OK; } -#endif /*---------------------------------------------------------------------* * IVAS_DEC_GetDelay( ) @@ -4176,7 +3876,6 @@ ivas_error IVAS_DEC_TSM_SetQuality( #endif -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * ivas_dec_voip_get_samples_common( ) @@ -4187,24 +3886,13 @@ ivas_error IVAS_DEC_TSM_SetQuality( static ivas_error ivas_dec_voip_get_samples_common -#else -/*---------------------------------------------------------------------* - * IVAS_DEC_VoIP_GetSamples( ) - * - * Main function to decode one frame in VoIP - *---------------------------------------------------------------------*/ - -ivas_error IVAS_DEC_VoIP_GetSamples -#endif ( - IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ - uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ - const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ - void *pcmBuf, /* o : output synthesis signal */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP + IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ + uint16_t nSamplesPerChannel, /* i : number of samples per channel requested to be written to output buffer */ + const IVAS_DEC_PCM_TYPE pcmType, /* i : type for the decoded PCM resolution */ + void *pcmBuf, /* o : output synthesis signal */ ISAR_SPLIT_REND_BITS_DATA *splitRendBits, /* o : output split rendering bits */ float **p_head_pose_buf, /* i : PCM buffer with head-pose data */ -#endif #ifdef SUPPORT_JBM_TRACEFILE JbmTraceFileWriterFn jbmWriterFn, void *jbmWriter, @@ -4241,21 +3929,12 @@ ivas_error IVAS_DEC_VoIP_GetSamples return IVAS_ERR_WRONG_PARAMS; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && splitRendBits == NULL ) { return IVAS_ERR_UNEXPECTED_NULL_POINTER; } -#else - if ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM || - hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) - { - return IVAS_ERROR( IVAS_ERR_NOT_IMPLEMENTED, "Split rendering is not integrated with VoIP mode" ); - } - -#endif /* make sure that the FIFO after decoder/scaler contains at least one sound card frame (i.e. 20ms) */ while ( *nSamplesRendered < nSamplesPerChannel ) @@ -4401,11 +4080,7 @@ ivas_error IVAS_DEC_VoIP_GetSamples { if ( hIvasDec->nSamplesAvailableNext == 0 || hIvasDec->nSamplesAvailableNext == hIvasDec->nSamplesFrame ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, splitRendBits ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IVAS_DEC_GetSamplesDecoder( hIvasDec, 0, NULL ) ) != IVAS_ERR_OK ) -#endif { return error; } @@ -4427,7 +4102,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples } } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( splitRendBits != NULL ) { /* Render head poses from time-scaled transport channels */ @@ -4438,22 +4112,18 @@ ivas_error IVAS_DEC_VoIP_GetSamples } else { -#endif /* render IVAS frames directly to the output buffer */ if ( ( error = IVAS_DEC_GetSamplesRenderer( hIvasDec, nSamplesToRender, pcmType, pcm_buffer_offset( pcmBuf, pcmType, *nSamplesRendered * nOutChannels ), &nSamplesRendered_loop, &tmp ) ) != IVAS_ERR_OK ) { return error; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP } -#endif *nSamplesRendered += nSamplesRendered_loop; update_voip_rendered20ms( hIvasDec, nSamplesRendered_loop ); } } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( hIvasDec->hasDecodedFirstGoodFrame && splitRendBits != NULL ) { /* Analyse head poses over entire frame, generate ISAR metadata and maybe encode if split coded */ @@ -4482,12 +4152,10 @@ ivas_error IVAS_DEC_VoIP_GetSamples ivas_syn_output( p_head_pose_buf, *nSamplesRendered, st_ivas->hDecoderConfig->nchan_out, (int16_t *) pcmBuf ); } } -#endif return IVAS_ERR_OK; } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_GetSamples( ) @@ -4583,7 +4251,6 @@ ivas_error IVAS_DEC_VoIP_GetSplitBinauralBitstream( parametersAvailableForEditing, systemTimestamp_ms ); } -#endif /*---------------------------------------------------------------------* @@ -4662,7 +4329,6 @@ ivas_error IVAS_DEC_Flush( } -#ifdef DECODER_FORMAT_SWITCHING /*---------------------------------------------------------------------* * IVAS_DEC_isRestartNeeded( ) * @@ -4686,7 +4352,6 @@ ivas_error IVAS_DEC_isRestartNeeded( } -#endif /*---------------------------------------------------------------------* * IVAS_DEC_VoIP_IsEmpty( ) * @@ -4904,7 +4569,6 @@ static ivas_error printConfigInfo_dec( } else { -#ifdef FIX_1419_MONO_STEREO_UMX output_config = st_ivas->hDecoderConfig->output_config; if ( output_config != IVAS_AUDIO_CONFIG_MONO ) { @@ -4913,11 +4577,8 @@ static ivas_error printConfigInfo_dec( } else { -#endif fprintf( stdout, "Output configuration: mono EVS bit-exact decoding\n" ); -#ifdef FIX_1419_MONO_STEREO_UMX } -#endif } } else @@ -5164,11 +4825,7 @@ static ivas_error evs_dec_main( { DEC_CORE_HANDLE *hCoreCoder; float mixer_left, mixer_rigth; -#ifdef FIX_1419_MONO_STEREO_UMX /* required now that mono can render to a higher number of output channels */ float *p_output[MAX_TRANSPORT_CHANNELS]; -#else - float *p_output[MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN]; -#endif int16_t ch, nOutSamples; ivas_error error; @@ -5178,19 +4835,13 @@ static ivas_error evs_dec_main( mdct_switching_dec( hCoreCoder[0] ); -#ifdef FIX_1419_MONO_STEREO_UMX for ( ch = 0; ch < MAX_TRANSPORT_CHANNELS; ch++ ) -#else - for ( ch = 0; ch < MAX_OUTPUT_CHANNELS_IN_DIEGETIC_PAN; ch++ ) -#endif { p_output[ch] = st_ivas->p_output_f[ch]; -#ifdef FIX_1419_MONO_STEREO_UMX if ( p_output[ch] != NULL ) { set_zero( p_output[ch], L_FRAME48k ); } -#endif } /* run the main EVS decoding routine */ @@ -5246,11 +4897,7 @@ static ivas_error evs_dec_main( v_multc( p_output[0], mixer_left, p_output[0], nOutSamples ); } -#ifdef FIX_1419_MONO_STEREO_UMX if ( st_ivas->hDecoderConfig->Opt_tsm && st_ivas->hDecoderConfig->nchan_out == 1 ) -#else - if ( st_ivas->hDecoderConfig->Opt_tsm ) -#endif { /* BE workaround: in order to keep EVS bit-exact wrt. TS 26.443, convert 'float' output data to 'short' before the TSM */ int16_t pcm_buf_local[L_FRAME48k]; @@ -5675,9 +5322,7 @@ static ivas_error ivas_create_handle_isar( ) { ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE hSplitBinRend; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP int16_t i; -#endif if ( ( hSplitBinRend = (ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE) malloc( sizeof( ISAR_DEC_SPLIT_REND_WRAPPER ) ) ) == NULL ) { @@ -5686,15 +5331,11 @@ static ivas_error ivas_create_handle_isar( isar_init_split_rend_handles( &hSplitBinRend->splitrend ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP hSplitBinRend->hMultiBinTdData = NULL; for ( i = 0; i < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; ++i ) { hSplitBinRend->hMultiBinCldfbData[i] = NULL; } -#else - hSplitBinRend->hMultiBinCldfbData = NULL; -#endif hSplitBinRend->hCldfbDataOut = NULL; hSplitBinRend->numTdSamplesPerChannelCached = 0; @@ -5714,13 +5355,10 @@ static void ivas_destroy_handle_isar( ISAR_DEC_SPLIT_REND_WRAPPER_HANDLE *hSplitBinRend /* i/o: ISAR split binaural rendering handle */ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP int16_t i; -#endif if ( *hSplitBinRend != NULL ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( ( *hSplitBinRend )->hMultiBinTdData != NULL ) { ivas_TD_RINGBUF_Close( &( *hSplitBinRend )->hMultiBinTdData ); @@ -5732,10 +5370,6 @@ static void ivas_destroy_handle_isar( ivas_CLDFB_RINGBUF_Close( &( *hSplitBinRend )->hMultiBinCldfbData[i] ); } } -#else - free( ( *hSplitBinRend )->hMultiBinCldfbData ); - ( *hSplitBinRend )->hMultiBinCldfbData = NULL; -#endif ISAR_PRE_REND_close( &( *hSplitBinRend )->splitrend, NULL ); @@ -5910,7 +5544,6 @@ static ivas_error ivas_dec_reconfig_split_rend( } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*-------------------------------------------------------------------* * ivas_dec_split_rend_cldfb_in() * @@ -5933,7 +5566,6 @@ static int16_t ivas_dec_split_rend_cldfb_in( return 0; } } -#endif /*-------------------------------------------------------------------* @@ -5949,26 +5581,13 @@ static ivas_error ivas_dec_init_split_rend( ivas_error error; int16_t cldfb_in_flag, pcm_out_flag; int16_t mixed_td_cldfb_flag; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP int16_t i, num_poses; -#endif pcm_out_flag = ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ? 1 : 0; cldfb_in_flag = 0; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP cldfb_in_flag = ivas_dec_split_rend_cldfb_in( st_ivas->renderer_type ); -#else - if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV || - st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || - st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || - st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM ) - { - cldfb_in_flag = 1; - } -#endif -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS ); num_poses = st_ivas->hSplitBinRend->splitrend.multiBinPoseData.num_poses; @@ -5992,15 +5611,6 @@ static ivas_error ivas_dec_init_split_rend( return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for split rendering structure" ); } } -#else - /* note: this is intra-frame heap memory */ - if ( ( st_ivas->hSplitBinRend->hMultiBinCldfbData = (ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA_HANDLE) malloc( sizeof( ISAR_DEC_SPLIT_REND_MULTI_BIN_CLDFB_DATA ) ) ) == NULL ) - { - return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Cannot allocate memory for split rendering structure" ); - } - - ISAR_PRE_REND_GetMultiBinPoseData( &st_ivas->hRenderConfig->split_rend_config, &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, ( st_ivas->hHeadTrackData != NULL ) ? st_ivas->hHeadTrackData->sr_pose_pred_axis : DEFAULT_AXIS ); -#endif if ( cldfb_in_flag == 1 && ( st_ivas->hSplitBinRend->splitrend.multiBinPoseData.poseCorrectionMode == ISAR_SPLIT_REND_POSE_CORRECTION_MODE_NONE ) ) { @@ -6111,7 +5721,6 @@ static ivas_error feedSinglePIorientation( } -#ifdef RTP_S4_251135_CR26253_0016_REV1 /*---------------------------------------------------------------------* * setDiegeticInput( ) * @@ -6137,10 +5746,8 @@ static void setDiegeticInputPI( return; } -#endif -#ifdef IVAS_RTPDUMP /*---------------------------------------------------------------------* * IVAS_DEC_FeedPiDataToDecoder( ) * @@ -6190,7 +5797,6 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder( } break; -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT case IVAS_PI_ACOUSTIC_ENVIRONMENT: { uint16_t aeid = piData->data.acousticEnv.aeid; @@ -6204,9 +5810,7 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder( } } break; -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_PI_DIEGETIC_TYPE: { #ifdef DEBUGGING @@ -6215,7 +5819,6 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder( setDiegeticInputPI( st_ivas, piData->data.digeticIndicator.isDiegetic ); } break; -#endif default: { @@ -6234,4 +5837,3 @@ ivas_error IVAS_DEC_FeedPiDataToDecoder( return IVAS_ERR_OK; } -#endif diff --git a/lib_dec/lib_dec.h b/lib_dec/lib_dec.h index 24a663bd35..f62087b9af 100644 --- a/lib_dec/lib_dec.h +++ b/lib_dec/lib_dec.h @@ -119,9 +119,7 @@ ivas_error IVAS_DEC_Configure( const bool enableExternalOrientation, /* i : enable external orientations */ const IVAS_HEAD_ORIENT_TRK_T orientation_tracking, /* i : head orientation tracking type */ const bool renderConfigEnabled, /* i : enable Renderer config. file for binaural output */ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE const IVAS_ROOM_SIZE_T roomSize, /* i : room size selector for reverb */ -#endif const bool non_diegetic_pan_enabled, /* i : enabled diegetic panning */ const float non_diegetic_pan_gain, /* i : non diegetic panning gain */ const bool dpidEnabled, /* i : enable directivity pattern option */ @@ -155,9 +153,6 @@ ivas_error IVAS_DEC_ReadFormat( /*! r: decoder error code */ ivas_error IVAS_DEC_GetSamplesDecoder( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ -#ifndef FIX_1119_SPLIT_RENDERING_VOIP - const int16_t isSplitRend, /* i : split rendering enabled flag */ -#endif ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ ); @@ -316,7 +311,6 @@ ivas_error IVAS_DEC_VoIP_GetSamples( const uint32_t systemTimestamp_ms /* i : current system timestamp */ ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*! r: error code */ ivas_error IVAS_DEC_VoIP_GetSplitBinauralBitstream( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ @@ -332,7 +326,6 @@ ivas_error IVAS_DEC_VoIP_GetSplitBinauralBitstream( bool *parametersAvailableForEditing, /* o : indicates whether objects editing is available */ const uint32_t systemTimestamp_ms /* i : current system timestamp */ ); -#endif ivas_error IVAS_DEC_Flush( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ @@ -342,13 +335,11 @@ ivas_error IVAS_DEC_Flush( int16_t *nSamplesFlushed /* o : number of samples flushed */ ); -#ifdef DECODER_FORMAT_SWITCHING ivas_error IVAS_DEC_isRestartNeeded( IVAS_DEC_HANDLE hIvasDec, /* i : IVAS decoder handle */ bool *restartNeeded /* o : flag to signal decoder restart */ ); -#endif /* Setter functions - apply changes to decoder configuration */ /*! r: error code */ @@ -485,7 +476,6 @@ ivas_error IVAS_DEC_HRTF_binary_close( const IVAS_BIN_RENDERER_TYPE binaural_renderer_old /* i : previous binaural renderer type */ ); -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT ivas_error IVAS_DEC_AddAcousticEnvironment( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ const IVAS_ROOM_ACOUSTICS_CONFIG_DATA roomAcousticsConfig /* i : Room acoustic configuration */ @@ -496,7 +486,6 @@ ivas_error IVAS_DEC_GetAcousticEnvironment( uint16_t aeID, /* i : Acoustic environment ID */ IVAS_ROOM_ACOUSTICS_CONFIG_DATA *pAcEnv /* o : Room acoustic environment data pointer */ ); -#endif /*! r: error code*/ ivas_error IVAS_DEC_GetRenderConfig( @@ -548,13 +537,11 @@ ivas_error IVAS_DEC_GetJbmData( ); #endif -#ifdef IVAS_RTPDUMP ivas_error IVAS_DEC_FeedPiDataToDecoder( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ hPiDataTs piData, /* i : PI data received in rtp packet */ uint32_t numPiData /* i : number of PI data received in rtp packet */ ); -#endif /* Utility functions */ diff --git a/lib_enc/fd_cng_enc.c b/lib_enc/fd_cng_enc.c index 84282281a4..c8bc3302d5 100644 --- a/lib_enc/fd_cng_enc.c +++ b/lib_enc/fd_cng_enc.c @@ -45,9 +45,7 @@ #include #include "rom_enc.h" #include "rom_com.h" -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG #include "ivas_rom_com.h" -#endif #include "prot.h" #include "ivas_prot.h" #include "stat_enc.h" @@ -159,14 +157,10 @@ void initFdCngEnc( set_f( hFdCngEnc->msLogPeriodog, 0.0f, NPART ); set_f( hFdCngEnc->msLogNoiseEst, 0.0f, NPART ); -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG for ( int16_t i = 0; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { set_f( hFdCngEnc->mem_coherence[i], EPSILON, 4 ); } -#else - set_f( hFdCngEnc->mem_coherence, EPSILON, 4 ); -#endif return; } @@ -903,14 +897,10 @@ void stereoFdCngCoherence( if ( last_element_mode != IVAS_CPE_MDCT ) { -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG for ( i = 0; i < MDCT_ST_DTX_NUM_COHERENCE_BANDS; i++ ) { set_f( sts[0]->hFdCngEnc->mem_coherence[i], EPSILON, 4 ); } -#else - set_f( sts[0]->hFdCngEnc->mem_coherence, EPSILON, 4 ); -#endif } if ( sts[0]->core_brate == -1 || sts[1]->core_brate == -1 ) @@ -960,9 +950,6 @@ void stereoFdCngCoherence( pt_fftL = fft_buff[0]; pt_fftR = fft_buff[1]; -#ifndef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG - mem = sts[0]->hFdCngEnc->mem_coherence; -#endif /* only estimate coherence in inactive frames (or in the first 50 frames to build an initial value) */ if ( !( sts[0]->ini_frame <= 50 || ( sts[0]->vad_flag == 0 && sts[1]->vad_flag == 0 ) ) ) @@ -970,7 +957,6 @@ void stereoFdCngCoherence( return; } -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG for ( i_subfr = 0; i_subfr < 2; i_subfr++ ) { int16_t band_len_cum; @@ -1018,38 +1004,6 @@ void stereoFdCngCoherence( pt_fftR += L_FFT; } -#else - for ( i_subfr = 0; i_subfr < 2; i_subfr++ ) - { - cr = ci = eL = eR = EPSILON; - - cr += pt_fftL[0] * pt_fftR[0] + pt_fftL[L_FFT / 2] * pt_fftR[L_FFT / 2]; - eL += pt_fftL[0] * pt_fftL[0] + pt_fftL[L_FFT / 2] * pt_fftL[L_FFT / 2]; - eR += pt_fftR[0] * pt_fftR[0] + pt_fftR[L_FFT / 2] * pt_fftR[L_FFT / 2]; - - for ( i = 1; i < L_FFT / 2; i++ ) - { - cr += pt_fftL[i] * pt_fftR[i] + pt_fftL[L_FFT - i] * pt_fftR[L_FFT - i]; - ci += -pt_fftL[i] * pt_fftR[L_FFT - i] + pt_fftR[i] * pt_fftL[L_FFT - i]; - eL += pt_fftL[i] * pt_fftL[i] + pt_fftL[L_FFT - i] * pt_fftL[L_FFT - i]; - eR += pt_fftR[i] * pt_fftR[i] + pt_fftR[L_FFT - i] * pt_fftR[L_FFT - i]; - } - - if ( sts[0]->ini_frame <= 50 || ( sts[0]->vad_flag == 0 && sts[1]->vad_flag == 0 ) ) - { - mem[0] = 0.95f * mem[0] + 0.05f * cr; - mem[1] = 0.95f * mem[1] + 0.05f * ci; - mem[2] = 0.95f * mem[2] + 0.05f * eL; - mem[3] = 0.95f * mem[3] + 0.05f * eR; - } - - pt_fftL += L_FFT; - pt_fftR += L_FFT; - } -#endif -#ifndef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG - sts[0]->hFdCngEnc->hFdCngCom->coherence = sqrtf( ( mem[0] * mem[0] + mem[1] * mem[1] ) / ( mem[2] * mem[3] ) ); -#endif return; } @@ -1250,11 +1204,7 @@ void FdCngEncodeMDCTStereoSID( } /* quantize channel coherence */ -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG coh_idx = (int16_t) floor( sts[0]->hFdCngEnc->hFdCngCom->coherence[0] * 15.f + 0.5f ); -#else - coh_idx = (int16_t) floor( sts[0]->hFdCngEnc->hFdCngCom->coherence * 15.f + 0.5f ); -#endif coh_idx = max( 0, min( coh_idx, 15 ) ); /* ---- Write SID bitstream ---- */ @@ -1288,7 +1238,6 @@ void FdCngEncodeMDCTStereoSID( push_indice( sts[ch]->hBstr, IND_ENERGY, gain_idx[ch], 7 ); } -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* write the four additional coherence values */ for ( int16_t b = 1; b < MDCT_ST_DTX_NUM_COHERENCE_BANDS; b++ ) { @@ -1296,10 +1245,6 @@ void FdCngEncodeMDCTStereoSID( coh_idx = max( 0, min( coh_idx, 15 ) ); push_indice( sts[1]->hBstr, IND_ENERGY, coh_idx, 4 ); } -#else - /* pad with zeros to reach common SID frame size */ - push_indice( sts[1]->hBstr, IND_ENERGY, 0, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC ); -#endif return; @@ -1440,13 +1385,8 @@ void FdCngEncodeDiracMDCTStereoSID( sts[ch]->hDtxEnc->last_CNG_L_frame = sts[ch]->L_frame; } -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG sts[0]->hFdCngEnc->hFdCngCom->coherence[0] = 0.0f; sts[1]->hFdCngEnc->hFdCngCom->coherence[0] = 0.0f; -#else - sts[0]->hFdCngEnc->hFdCngCom->coherence = 0.0f; - sts[1]->hFdCngEnc->hFdCngCom->coherence = 0.0f; -#endif /* ---- Write SID bitstream ---- */ diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index 188ea1ea34..fb5d6f63b0 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -528,10 +528,8 @@ ivas_error ivas_cpe_enc( * Core codec configuration *----------------------------------------------------------------*/ -#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING if ( !( sts[0]->core_brate == SID_2k40 || sts[0]->core_brate == FRAME_NO_DATA ) ) /* Reconfigurations not needed with DTX*/ { -#endif if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->hMCT == NULL ) { /* set coded BW for MDCT stereo */ @@ -556,11 +554,7 @@ ivas_error ivas_cpe_enc( /* IGF reconfiguration */ for ( n = 0; n < n_CoreChannels; n++ ) { - if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth -#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING - || ( sts[n]->last_core_brate == SID_2k40 || sts[n]->last_core_brate == FRAME_NO_DATA ) -#endif - ) && + if ( ( hCPE->last_element_brate != hCPE->element_brate || hCPE->element_mode != hCPE->last_element_mode || ( hCPE->element_mode == IVAS_CPE_TD && sts[0]->bits_frame_nominal != last_bits_frame_nominal ) || sts[n]->last_bwidth != sts[n]->bwidth || ( sts[n]->last_core_brate == SID_2k40 || sts[n]->last_core_brate == FRAME_NO_DATA ) ) && ( n == 0 || hCPE->element_mode == IVAS_CPE_MDCT ) ) { int16_t igf; @@ -568,19 +562,13 @@ ivas_error ivas_cpe_enc( bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : max_bwidth; igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->rf_mode ); -#ifdef FIX_1413_IGF_INIT_PRINTOUT if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) -#else - if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) -#endif { return error; } } } -#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING } -#endif /* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */ for ( n = 0; n < n_CoreChannels; n++ ) diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index 0cb0cf6e60..317b36264f 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -838,11 +838,7 @@ static ivas_error ivas_spar_enc_process( { /*cross fade between new active W channels and old passive W channel*/ -#ifdef BE_FIX_1391_COVERAGE_SPAR_DYN__CHANNEL if ( dyn_active_w_flag == 1 || hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag == 1 ) -#else - if ( dyn_active_w_flag == 1 ) -#endif { if ( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag != dyn_active_w_flag ) { diff --git a/lib_enc/ivas_stat_enc.h b/lib_enc/ivas_stat_enc.h index 1dcf4f2536..106f18c75b 100644 --- a/lib_enc/ivas_stat_enc.h +++ b/lib_enc/ivas_stat_enc.h @@ -1081,11 +1081,9 @@ typedef struct stereo_dmx_evs_correlation_filter_structure { float isd_rate_s; float iccr_s; -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING float phitd; float iccres_s; float lvlin[CPE_CHANNELS]; -#endif float ipd_ff[STEREO_DMX_EVS_NB_SUBBAND_MAX]; float Pr[STEREO_DMX_EVS_NB_SUBBAND_MAX]; diff --git a/lib_enc/ivas_stereo_dft_enc.c b/lib_enc/ivas_stereo_dft_enc.c index e59dfa7c98..6c87583ee6 100644 --- a/lib_enc/ivas_stereo_dft_enc.c +++ b/lib_enc/ivas_stereo_dft_enc.c @@ -1316,24 +1316,17 @@ void stereo_dft_enc_process( if ( hStereoDft->hItd->deltaItd[k_offset] != 0 && hStereoDft->hConfig->dmx_active ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS /* Note: this variable is used as an in-between step when passing the angle to the trig functions. * this keeps the compilter from applying optimizations at higher optimizaton levels which can break bit-exactness */ volatile float alpha_tmp; -#endif /*time shift channels*/ alpha = -2.0f * EVS_PI * hStereoDft->hItd->deltaItd[k_offset] / hStereoDft->NFFT; c = 1.f; /*cos(0)*/ s = 0.f; /*sin(0)*/ -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS alpha_tmp = alpha; c1 = cosf( alpha_tmp ); s1 = sinf( alpha_tmp ); -#else - c1 = cosf( alpha ); - s1 = sinf( alpha ); -#endif if ( alpha >= 0 ) { @@ -1453,16 +1446,11 @@ void stereo_dft_enc_process( if ( pgIpd[0] != 0.f ) { -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float pgIpd_tmp; pgIpd_tmp = pgIpd[0]; c = cosf( pgIpd_tmp ); s = sinf( pgIpd_tmp ); -#else - c = cosf( pgIpd[0] ); - s = sinf( pgIpd[0] ); -#endif for ( i = hStereoDft->band_limits_dmx[b]; i < hStereoDft->band_limits_dmx[b + 1]; i++ ) { /*rotate L*/ diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index 839cc3b104..c3e13f4b71 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -869,18 +869,11 @@ void stereo_dft_enc_compute_itd( if ( hCPE->element_mode == IVAS_CPE_DFT && ( hItd->td_itd[k_offset] - hItd->td_itd[k_offset - 1] ) ) { float alphaD, c, s, c1, s1, ctmp, vtmp; -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 volatile float alphaD_tmp; -#endif alphaD = -2.f * EVS_PI * ( (float) hItd->td_itd[k_offset] - hItd->td_itd[k_offset - 1] ) / hStereoDft->NFFT; -#ifdef NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2 alphaD_tmp = alphaD; c1 = cosf( alphaD_tmp ); s1 = sinf( alphaD_tmp ); -#else - c1 = cosf( alphaD ); - s1 = sinf( alphaD ); -#endif c = 1.f; /* cos(0) */ s = 0.f; /* sin(0) */ diff --git a/lib_enc/ivas_stereo_dmx_evs.c b/lib_enc/ivas_stereo_dmx_evs.c index e25ce350a4..8017d101c9 100644 --- a/lib_enc/ivas_stereo_dmx_evs.c +++ b/lib_enc/ivas_stereo_dmx_evs.c @@ -78,14 +78,12 @@ #define STEREO_DMX_EVS_ICCR_HYST_L 0.75f #define STEREO_DMX_EVS_ICCR_HYST_H 0.85f -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING #define STEREO_DMX_EVS_ICCRES_FORGETTING 0.92f #define STEREO_DMX_EVS_LVLU_FORGETTING 0.5f #define STEREO_DMX_EVS_LVLD_FORGETTING 0.92f #define STEREO_DMX_EVS_ICLD_THRESH 3.f #define STEREO_DMX_EVS_ICCRES_THRESH 0.4f #define STEREO_DMX_EVS_DICLD_THRESH 1.49623566f -#endif #define STEREO_DMX_EVS_SWTCH_HYS_THRES 1 #define STEREO_DMX_EVS_LR_EGY 15.0f @@ -135,13 +133,8 @@ static void weighted_ave( const float src1[], const float src2[], float dst[], c static void adapt_gain( const float src[], float dst[], const float gain, const float old_gain, const int16_t input_frame, const float wnd[] ); static float find_poc_peak( STEREO_DMX_EVS_POC_HANDLE hPOC, float itd[], const int16_t input_frame, const float ratio ); static float spectral_flatness( const float sig[], const int16_t sig_length ); -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING static void create_M_signal( const float srcL[], const float srcR[], float dmx[], const float w_curr, const int16_t input_frame, const float wnd[], float *w_prev, float *dmx_energy, float *src_energy, STEREO_DMX_EVS_PHA_HANDLE hPHA ); static void calc_energy( const float src1[], const float src2[], float energy[], float *lvl, const int16_t input_frame, const float ratio ); -#else -static void create_M_signal( const float srcL[], const float srcR[], float dmx[], const float w_curr, const int16_t input_frame, const float wnd[], float *w_prev, float *dmx_energy, float *src_energy ); -static void calc_energy( const float src1[], const float src2[], float energy[], const int16_t input_frame, const float ratio ); -#endif /*-------------------------------------------------------------------* * estimate_itd_wnd_fft() @@ -499,11 +492,9 @@ static void calc_poc( Ni = 0; eneL = 0; eneR = 0; -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING step = n0 >> 3; tmp1 = 0.0f; tmp2 = 0.0f; -#endif for ( n = 1, i = 1; n < nsbd; n++ ) { tPr = 0.0f; @@ -537,13 +528,11 @@ static void calc_poc( eneL += ( specLr[i] * specLr[i] + specLi[i] * specLi[i] ); eneR += ( specRr[i] * specRr[i] + specRi[i] * specRi[i] ); -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING if ( i == step - 1 ) { tmp1 = eneL; tmp2 = eneR; } -#endif } Pn = inv_sqrtf( ( tPr * tPr + tPi * tPi ) + EPSILON ); @@ -561,12 +550,7 @@ static void calc_poc( } /* Computes Spectral flatness on one channel */ -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING if ( spectral_flatness( &tEl[1], nsbd - 1 ) < hPHA->pha_ipd_sf_Threshold ) -#else - tmp1 = spectral_flatness( &tEl[1], nsbd - 1 ); - if ( tmp1 < hPHA->pha_ipd_sf_Threshold ) -#endif { hPHA->pha_ipd_chanswitch_allowed = 0; } @@ -578,7 +562,6 @@ static void calc_poc( ICCr = sqrtf( ( Nr * Nr + Ni * Ni ) / ( eneL * eneR + EPSILON ) ); hPHA->iccr_s = STEREO_DMX_EVS_ICCR_FORGETTING * hPHA->iccr_s + ( 1.0f - STEREO_DMX_EVS_ICCR_FORGETTING ) * ICCr; -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING eneL -= tmp1; eneR -= tmp2; @@ -604,7 +587,6 @@ static void calc_poc( } ICCr = 0.5f * ( ICCr + ( sqrtf( ( Nr * Nr + Ni * Ni ) / ( eneL * eneR + EPSILON ) ) ) ); hPHA->iccres_s = STEREO_DMX_EVS_ICCRES_FORGETTING * hPHA->iccres_s + ( 1.0f - STEREO_DMX_EVS_ICCRES_FORGETTING ) * ICCr; -#endif if ( hPHA->curr_pha == STEREO_DMX_EVS_PHA_IPD ) { @@ -1199,7 +1181,6 @@ static float spectral_flatness( * * calculate energy *-------------------------------------------------------------------*/ -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING static void calc_energy( const float src1[], /* i : Lch input signal */ const float src2[], /* i : Rch input signal */ @@ -1208,21 +1189,8 @@ static void calc_energy( const int16_t input_frame, /* i : input frame length per channel */ const float ratio /* i : adapting ratio */ ) -#else -static void calc_energy( - const float src1[], /* i : Lch input signal */ - const float src2[], /* i : Rch input signal */ - float energy[], /* o : calculated energy */ - const int16_t input_frame, /* i : input frame length per channel */ - const float ratio /* i : adapting ratio */ -) -#endif { -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING float E, wnd, wnd_diff, lvli, lvlff; -#else - float E, wnd, wnd_diff; -#endif int16_t i, adaptlen; /* Initialization */ @@ -1250,14 +1218,12 @@ static void calc_energy( *energy = *energy * ratio + ( E / (float) input_frame ) * ( 1.0f - ratio ); -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING if ( lvl != NULL ) { lvli = log10f( E + EPSILON ); lvlff = ( lvli > *lvl ) ? STEREO_DMX_EVS_LVLU_FORGETTING : STEREO_DMX_EVS_LVLD_FORGETTING; *lvl = lvlff * *lvl + ( 1.0f - lvlff ) * lvli; } -#endif return; } @@ -1326,7 +1292,6 @@ static void adapt_gain( * * create downmix signal *-------------------------------------------------------------------*/ -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING static void create_M_signal( const float srcL[], /* i : Lch input signal */ const float srcR[], /* i : Rch input signal */ @@ -1339,19 +1304,6 @@ static void create_M_signal( float *src_energy, /* i/o: input signal energy */ STEREO_DMX_EVS_PHA_HANDLE hPHA /* i/o: correlation filter structure */ ) -#else -static void create_M_signal( - const float srcL[], /* i : Lch input signal */ - const float srcR[], /* i : Rch input signal */ - float dmx[], /* o : output signal */ - const float w_curr, /* i : adapting weight */ - const int16_t input_frame, /* i : input frame length per channel */ - const float wnd[], /* i : window coef */ - float *w_prev, /* i/o: adapting prev weight */ - float *dmx_energy, /* i/o: downmix signal energy */ - float *src_energy /* i/o: input signal energy */ -) -#endif { float weighted[L_FRAME48k], eps, amp_mod[CPE_CHANNELS], Lbias; @@ -1361,15 +1313,9 @@ static void create_M_signal( weighted_ave( srcL, srcR, dmx, w_curr, w_prev[0], input_frame, wnd ); -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING calc_energy( srcL, srcL, src_energy, hPHA->lvlin, input_frame, STEREO_DMX_EVS_DMX_EGY_FORGETTING ); calc_energy( srcR, srcR, src_energy + 1, hPHA->lvlin + 1, input_frame, STEREO_DMX_EVS_DMX_EGY_FORGETTING ); calc_energy( dmx, dmx, dmx_energy, NULL, input_frame, STEREO_DMX_EVS_DMX_EGY_FORGETTING ); -#else - calc_energy( srcL, srcL, src_energy, input_frame, STEREO_DMX_EVS_DMX_EGY_FORGETTING ); - calc_energy( srcR, srcR, src_energy + 1, input_frame, STEREO_DMX_EVS_DMX_EGY_FORGETTING ); - calc_energy( dmx, dmx, dmx_energy, input_frame, STEREO_DMX_EVS_DMX_EGY_FORGETTING ); -#endif if ( src_energy[0] * Lbias > src_energy[1] ) { @@ -1459,11 +1405,7 @@ void stereo_dmx_evs_enc( float ftmp, *fad_g, *p_dmx_data, *p_dmx_data_fo; bool is_transient; -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING STEREO_DMX_EVS_PRC prev_prc, req_prc; -#else - STEREO_DMX_EVS_PRC prev_prc; -#endif STEREO_DMX_EVS_PHA_HANDLE hPHA; if ( is_binaural ) @@ -1523,14 +1465,9 @@ void stereo_dmx_evs_enc( dmx_weight = 0.5f; } -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING hPHA->phitd = hStereoDmxEVS->itd * PI2 / input_frame; create_M_signal( data_f[0], data_f[1], dmx_poc_data, dmx_weight, input_frame, hStereoDmxEVS->s_wnd, hStereoDmxEVS->dmx_weight, hStereoDmxEVS->pre_dmx_energy, hStereoDmxEVS->aux_dmx_energy, hPHA ); -#else - create_M_signal( data_f[0], data_f[1], dmx_poc_data, dmx_weight, input_frame, hStereoDmxEVS->s_wnd, - hStereoDmxEVS->dmx_weight, hStereoDmxEVS->pre_dmx_energy, hStereoDmxEVS->aux_dmx_energy ); -#endif /* pha */ @@ -1600,7 +1537,6 @@ void stereo_dmx_evs_enc( prev_prc = hPHA->curr_prc; if ( abs( (int16_t) hStereoDmxEVS->itd ) > hPHA->prc_thres ) -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING { req_prc = STEREO_DMX_EVS_PRC_POC; if ( ( fabs( hPHA->lvlin[0] - hPHA->lvlin[1] ) < STEREO_DMX_EVS_ICLD_THRESH ) && ( hPHA->iccres_s < STEREO_DMX_EVS_ICCRES_THRESH ) && ( ( ( dmx_weight + hStereoDmxEVS->dmx_weight[1] ) > STEREO_DMX_EVS_DICLD_THRESH * ( 1 - dmx_weight + hStereoDmxEVS->dmx_weight[2] ) ) || ( ( 1 - dmx_weight + hStereoDmxEVS->dmx_weight[2] ) > STEREO_DMX_EVS_DICLD_THRESH * ( dmx_weight + hStereoDmxEVS->dmx_weight[1] ) ) ) ) @@ -1631,47 +1567,6 @@ void stereo_dmx_evs_enc( } } hPHA->prev_prc = req_prc; -#else - { - if ( hPHA->curr_prc != STEREO_DMX_EVS_PRC_POC ) - { - if ( hPHA->prev_prc == STEREO_DMX_EVS_PRC_POC ) - { - hPHA->prc_hys_cnt += 1; - } - else - { - hPHA->prc_hys_cnt = 0; - } - - if ( hPHA->prc_hys_cnt >= STEREO_DMX_EVS_SWTCH_PRC_HYS_THRES ) - { - hPHA->curr_prc = STEREO_DMX_EVS_PRC_POC; - } - } - hPHA->prev_prc = STEREO_DMX_EVS_PRC_POC; - } - else - { - if ( hPHA->curr_prc != STEREO_DMX_EVS_PRC_PHA ) - { - if ( hPHA->prev_prc == STEREO_DMX_EVS_PRC_PHA ) - { - hPHA->prc_hys_cnt += 1; - } - else - { - hPHA->prc_hys_cnt = 0; - } - - if ( hPHA->prc_hys_cnt >= STEREO_DMX_EVS_SWTCH_PRC_HYS_THRES ) - { - hPHA->curr_prc = STEREO_DMX_EVS_PRC_PHA; - } - } - hPHA->prev_prc = STEREO_DMX_EVS_PRC_PHA; - } -#endif if ( is_transient || ( hStereoDmxEVS->aux_dmx_energy[0] > STEREO_DMX_EVS_ILDS_EGY * hStereoDmxEVS->aux_dmx_energy[1] ) || ( hStereoDmxEVS->aux_dmx_energy[1] > STEREO_DMX_EVS_ILDS_EGY * hStereoDmxEVS->aux_dmx_energy[0] ) || ( hPHA->force_poc ) ) { @@ -1975,14 +1870,12 @@ ivas_error stereo_dmx_evs_init_encoder( hStereoDmxEVS->hPHA->pha_len = len / 2; hStereoDmxEVS->hPHA->isd_rate_s = 0.0f; hStereoDmxEVS->hPHA->iccr_s = 0.0f; -#ifdef FIX_1430_EVS_STEREO_DMX_CHANNEL_DISAPPEARING hStereoDmxEVS->hPHA->iccres_s = 0.0f; hStereoDmxEVS->hPHA->phitd = 0.0f; for ( n = 0; n < CPE_CHANNELS; n++ ) { hStereoDmxEVS->hPHA->lvlin[n] = 0.0f; } -#endif pha_len = hStereoDmxEVS->hPHA->pha_len; fad_len = hStereoDmxEVS->hPHA->fad_len; diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index 4d6fe1134b..dbd2753bdd 100755 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -359,11 +359,7 @@ typedef struct fd_cng_enc_structure int16_t nFFTpartDec; int16_t partDec[NPART]; -#ifdef NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG float mem_coherence[MDCT_ST_DTX_NUM_COHERENCE_BANDS][4]; -#else - float mem_coherence[4]; -#endif } FD_CNG_ENC, *HANDLE_FD_CNG_ENC; diff --git a/lib_enc/swb_pre_proc.c b/lib_enc/swb_pre_proc.c index 921e68bd2a..27e58927da 100644 --- a/lib_enc/swb_pre_proc.c +++ b/lib_enc/swb_pre_proc.c @@ -442,11 +442,7 @@ void swb_pre_proc( if ( st->last_extl != SWB_BWE && st->last_extl != FB_BWE ) { /* resample 48 kHz to 32kHz */ -#ifdef NONBE_1244_FIX_SWB_BWE_MEMORY if ( ( st->last_bwidth == FB && st->element_mode == EVS_MONO ) || ( st->bwidth == FB && st->element_mode > EVS_MONO ) ) // note: once EVS i CR fixed, the condition will simplify to "if ( st->bwidth == FB )" only -#else - if ( st->last_bwidth == FB ) -#endif { inner_frame = L_FRAME48k; inner_Fs = 48000; diff --git a/lib_isar/isar_prot.h b/lib_isar/isar_prot.h index 53d70184f0..dd224e741b 100644 --- a/lib_isar/isar_prot.h +++ b/lib_isar/isar_prot.h @@ -67,13 +67,8 @@ void isar_splitBinPreRendClose( void lc3plusTimeAlignCldfbPoseCorr( SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renderer handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, real part */ float *Cldfb_In_BinImag[][CLDFB_NO_COL_MAX] /* i/o: Binaural signals, imag. part */ -#else - float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: Binaural signals, real part */ - float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] /* i/o: Binaural signals, imag. part */ -#endif ); ivas_error splitRendLc3plusEncodeAndWrite( @@ -188,13 +183,8 @@ void isar_splitBinLCLDEncClose( void isar_splitBinLCLDEncProcess( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE hSplitBinLCLDEnc, /* i/o: ISAR LCLD encoder handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *Cldfb_In_Real[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, real part */ float *Cldfb_In_Imag[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, imag. part */ -#else - float Cldfb_In_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], -#endif const int32_t available_bits, /* i : available bit-budget */ ISAR_SPLIT_REND_BITS_HANDLE pBits /* i/o: ISAR bits handle */ ); @@ -281,13 +271,8 @@ void isar_rend_CldfbSplitPreRendProcess( const ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, /* i : binaural pre-renderer handle */ const IVAS_QUATERNION headPosition, /* i : head rotation QUATERNION */ MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float* Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i : Binaural signals, real part */ float* Cldfb_In_BinImag[][CLDFB_NO_COL_MAX], /* i : Binaural signals, imag. part */ -#else - float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Binaural signals, real part */ - float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Binaural signals, imag. part */ -#endif ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits handle */ const int32_t target_md_bits, /* i : ISAR MD bitrate */ const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ diff --git a/lib_isar/isar_splitRend_lcld_enc.c b/lib_isar/isar_splitRend_lcld_enc.c index 1ecb83887b..797eae7e92 100644 --- a/lib_isar/isar_splitRend_lcld_enc.c +++ b/lib_isar/isar_splitRend_lcld_enc.c @@ -158,15 +158,10 @@ void isar_splitBinLCLDEncClose( void isar_splitBinLCLDEncProcess( ISAR_BIN_HR_SPLIT_LCLD_ENC_HANDLE hSplitBinLCLDEnc, /* i/o: ISAR LCLD encoder handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP - float *Cldfb_In_Real[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, real part */ - float *Cldfb_In_Imag[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, imag. part */ -#else - float Cldfb_In_Real[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_In_Imag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], -#endif - const int32_t available_bits, /* i : available bit-budget */ - ISAR_SPLIT_REND_BITS_HANDLE pBits /* i/o: ISAR bits handle */ + float *Cldfb_In_Real[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, real part */ + float *Cldfb_In_Imag[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, imag. part */ + const int32_t available_bits, /* i : available bit-budget */ + ISAR_SPLIT_REND_BITS_HANDLE pBits /* i/o: ISAR bits handle */ ) { int32_t iBitsWritten, itr, available_bits_itr, rem_itr, available_bits_local; diff --git a/lib_isar/isar_splitRendererPre.c b/lib_isar/isar_splitRendererPre.c index bd1c9c1b2d..cd5a75cefb 100644 --- a/lib_isar/isar_splitRendererPre.c +++ b/lib_isar/isar_splitRendererPre.c @@ -53,16 +53,7 @@ * Local function declarations *---------------------------------------------------------------------*/ -static void isar_SplitRenderer_GetRotMd( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP - float *Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX], - float *Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX], -#else - float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], -#endif - const int16_t low_res, - const int16_t ro_md_flag ); +static void isar_SplitRenderer_GetRotMd( ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, float *Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX], float *Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX], const int16_t low_res, const int16_t ro_md_flag ); /*------------------------------------------------------------------------- @@ -280,21 +271,11 @@ static void ComputePostPredCov( static void ComputeBandedCrossCov( -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *Cldfb_RealBuffer1[][CLDFB_NO_COL_MAX], float *Cldfb_ImagBuffer1[][CLDFB_NO_COL_MAX], -#else - float Cldfb_RealBuffer1[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_ImagBuffer1[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], -#endif const int16_t ch_start_idx1, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *Cldfb_RealBuffer2[][CLDFB_NO_COL_MAX], float *Cldfb_ImagBuffer2[][CLDFB_NO_COL_MAX], -#else - float Cldfb_RealBuffer2[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_ImagBuffer2[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], -#endif const int16_t ch_start_idx2, float out_cov_re[BINAURAL_CHANNELS][BINAURAL_CHANNELS], float out_cov_im[BINAURAL_CHANNELS][BINAURAL_CHANNELS], @@ -359,13 +340,8 @@ static void ComputeBandedCrossCov( static void ComputeBandedCov( -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *Cldfb_RealBuffer[][CLDFB_NO_COL_MAX], float *Cldfb_ImagBuffer[][CLDFB_NO_COL_MAX], -#else - float Cldfb_RealBuffer[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], - float Cldfb_ImagBuffer[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], -#endif const int16_t ch_start_idx, float out_cov_re[][BINAURAL_CHANNELS], float out_cov_im[][BINAURAL_CHANNELS], @@ -1369,15 +1345,10 @@ static void isar_SplitRenderer_quant_code( *------------------------------------------------------------------------*/ static void isar_SplitRenderer_GetRotMd( - ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, /* i/o: binaural renderer handle */ - MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP + ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, /* i/o: binaural renderer handle */ + MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ float *Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX], /* o : Reference Binaural signals */ float *Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX], /* o : Reference Binaural signals */ -#else - float Cldfb_RealBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Reference Binaural signals */ - float Cldfb_ImagBuffer_Ref_Binaural[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* o : Reference Binaural signals */ -#endif const int16_t low_res, const int16_t ro_md_flag /* i : Flag to indicate real only metadata for yaw */ ) @@ -1462,17 +1433,12 @@ void isar_rend_CldfbSplitPreRendProcess( const ISAR_BIN_HR_SPLIT_PRE_REND_HANDLE hBinHrSplitPreRend, /* i : binaural pre-renderer handle */ const IVAS_QUATERNION headPosition, /* i : head rotation QUATERNION */ MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData, /* i/o: pose correction data handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP - float *Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i : Binaural signals, real part */ - float *Cldfb_In_BinImag[][CLDFB_NO_COL_MAX], /* i : Binaural signals, imag. part */ -#else - float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Binaural signals, real part */ - float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i : Binaural signals, imag. part */ -#endif - ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits handle */ - const int32_t target_md_bits, /* i : ISAR MD bitrate */ - const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ - const int16_t ro_md_flag /* i : real only metadata for yaw flag */ + float *Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i : Binaural signals, real part */ + float *Cldfb_In_BinImag[][CLDFB_NO_COL_MAX], /* i : Binaural signals, imag. part */ + ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits handle */ + const int32_t target_md_bits, /* i : ISAR MD bitrate */ + const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ + const int16_t ro_md_flag /* i : real only metadata for yaw flag */ ) { push_wmops( "isar_rend_CldfbSplitPreRendProcess" ); @@ -1894,9 +1860,7 @@ ivas_error splitRendLc3plusEncodeAndWrite( pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; pBits->codec_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 ); pBits->isar_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.isar_frame_duration_us / 1000 ); -#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES pBits->lc3plus_highres = hSplitBin->hLc3plusEnc->config.high_res_mode_enabled; -#endif return IVAS_ERR_OK; } @@ -1930,11 +1894,9 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( uint8_t useLc3plus; float *in_delayed[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS]; int16_t i; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP int16_t j; float *p_Cldfb_In_BinReal[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX]; float *p_Cldfb_In_BinImag[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX]; -#endif int32_t num_slots; push_wmops( "isar_renderMultiTDBinToSplitBinaural" ); @@ -1944,7 +1906,6 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( useLc3plus = hSplitBin->hLc3plusEnc != NULL; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP for ( i = 0; i < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; ++i ) { for ( j = 0; j < CLDFB_NO_COL_MAX; ++j ) @@ -1953,7 +1914,6 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( p_Cldfb_In_BinImag[i][j] = Cldfb_In_BinImag[i][j]; } } -#endif if ( useLc3plus ) { @@ -2020,13 +1980,8 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( hSplitBin->hBinHrSplitPreRend, headPosition, &hSplitBin->multiBinPoseData, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP p_Cldfb_In_BinReal, p_Cldfb_In_BinImag, -#else - Cldfb_In_BinReal, - Cldfb_In_BinImag, -#endif pBits, target_md_bits, low_res_pre_rend_rot, @@ -2047,13 +2002,8 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( isar_splitBinLCLDEncProcess( hSplitBin->hSplitBinLCLDEnc, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP p_Cldfb_In_BinReal, p_Cldfb_In_BinImag, -#else - Cldfb_In_BinReal, - Cldfb_In_BinImag, -#endif available_bits, pBits ); } @@ -2116,14 +2066,9 @@ ivas_error isar_renderMultiTDBinToSplitBinaural( *------------------------------------------------------------------------*/ void lc3plusTimeAlignCldfbPoseCorr( - SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renderer handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP + SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renderer handle */ float *Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i/o: Binaural signals, real part */ float *Cldfb_In_BinImag[][CLDFB_NO_COL_MAX] /* i/o: Binaural signals, imag. part */ -#else - float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: Binaural signals, real part */ - float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX] /* ii/: Binaural signals, imag. part */ -#endif ) { float Cldfb_In_BinReal_tmp[MAX_HEAD_ROT_POSES][BINAURAL_CHANNELS][2][CLDFB_NO_CHANNELS_MAX]; diff --git a/lib_isar/isar_stat.h b/lib_isar/isar_stat.h index 4ed75ee97e..a517f2ee8c 100644 --- a/lib_isar/isar_stat.h +++ b/lib_isar/isar_stat.h @@ -345,7 +345,6 @@ typedef struct } SPLIT_REND_WRAPPER; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP typedef struct { float *real; @@ -356,6 +355,5 @@ typedef struct int16_t is_full; } ISAR_CLDFB_RINGBUF, *ISAR_CLDFB_RINGBUF_HANDLE; -#endif #endif /* ISAR_STAT_H */ diff --git a/lib_isar/lib_isar_pre_rend.c b/lib_isar/lib_isar_pre_rend.c index 5318d217b2..c552cefca3 100644 --- a/lib_isar/lib_isar_pre_rend.c +++ b/lib_isar/lib_isar_pre_rend.c @@ -272,26 +272,21 @@ void ISAR_PRE_REND_GetMultiBinPoseData( *------------------------------------------------------------------------*/ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( - SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renerer handle */ - const IVAS_QUATERNION headPosition, /* i : head rotation QUATERNION */ - const int32_t SplitRendBitRate, /* i : Split renderer bitrate */ - ISAR_SPLIT_REND_CODEC splitCodec, /* i/o: Split renderer codec */ - const int16_t isar_frame_size_ms, /* i : ISAR framesize */ - int16_t codec_frame_size_ms, /* i/o: ISAR transport codec framesize */ - ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits struct handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP + SPLIT_REND_WRAPPER *hSplitBin, /* i/o: Split renderer pre-renerer handle */ + const IVAS_QUATERNION headPosition, /* i : head rotation QUATERNION */ + const int32_t SplitRendBitRate, /* i : Split renderer bitrate */ + ISAR_SPLIT_REND_CODEC splitCodec, /* i/o: Split renderer codec */ + const int16_t isar_frame_size_ms, /* i : ISAR framesize */ + int16_t codec_frame_size_ms, /* i/o: ISAR transport codec framesize */ + ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits struct handle */ float *Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i/o: CLDFB real buffer */ float *Cldfb_In_BinImag[][CLDFB_NO_COL_MAX], /* i/o: CLDFB imag buffer */ -#else - float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB real buffer */ - float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB imag buffer */ -#endif - const int16_t max_bands, /* i : CLDFB bands */ - float *output[], /* i/o: PCM in/out buffer */ - const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ - const int16_t cldfb_in_flag, /* i : Flag to indicate CLDFB or time domain input */ - const int16_t pcm_out_flag, /* i : Flag to indicate PCM output */ - const int16_t ro_md_flag /* i : Flag to indicate real only metadata for yaw */ + const int16_t max_bands, /* i : CLDFB bands */ + float *output[], /* i/o: PCM in/out buffer */ + const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ + const int16_t cldfb_in_flag, /* i : Flag to indicate CLDFB or time domain input */ + const int16_t pcm_out_flag, /* i : Flag to indicate PCM output */ + const int16_t ro_md_flag /* i : Flag to indicate real only metadata for yaw */ ) { ivas_error error; diff --git a/lib_isar/lib_isar_pre_rend.h b/lib_isar/lib_isar_pre_rend.h index e1124a714c..f0ffbf430e 100644 --- a/lib_isar/lib_isar_pre_rend.h +++ b/lib_isar/lib_isar_pre_rend.h @@ -71,13 +71,8 @@ ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural( const int16_t isar_frame_size_ms, /* i : ISAR framesize */ int16_t codec_frame_size_ms, /* i/o: ISAR transport codec framesize */ ISAR_SPLIT_REND_BITS_HANDLE pBits, /* i/o: ISAR bits struct handle */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float* Cldfb_In_BinReal[][CLDFB_NO_COL_MAX], /* i/o: CLDFB real buffer */ float* Cldfb_In_BinImag[][CLDFB_NO_COL_MAX], /* i/o: CLDFB imag buffer */ -#else - float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB real buffer */ - float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB imag buffer */ -#endif const int16_t max_bands, /* i : CLDFB bands */ float *output[], /* i/o: PCM in/out buffer */ const int16_t low_res_pre_rend_rot, /* i : low time resolution pre-renderer flag */ diff --git a/lib_rend/ivas_cldfb_ring_buffer.c b/lib_rend/ivas_cldfb_ring_buffer.c index 669227540e..b78b899d2d 100644 --- a/lib_rend/ivas_cldfb_ring_buffer.c +++ b/lib_rend/ivas_cldfb_ring_buffer.c @@ -41,7 +41,6 @@ #endif #include "wmc_auto.h" -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * CLDFB ring-buffer functions needed in split-rendering outputs *---------------------------------------------------------------------*/ @@ -295,4 +294,3 @@ void ivas_CLDFB_RINGBUF_GetByIdx( return; } -#endif diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index ad63a5b2e9..f8e7211fe7 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -795,12 +795,7 @@ static void ivas_dirac_dec_binaural_internal( { for ( i = 0; i < hSpatParamRendCom->subframe_nbslots[subframe]; i++ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_Push( st_ivas->hSplitBinRend->hMultiBinCldfbData[ch], tmp_Cldfb_out_re[ch][i], tmp_Cldfb_out_im[ch][i], CLDFB_NO_CHANNELS_MAX ); -#else - mvr2r( tmp_Cldfb_out_re[ch][i], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[ch][hSpatParamRendCom->slots_rendered + i], CLDFB_NO_CHANNELS_MAX ); - mvr2r( tmp_Cldfb_out_im[ch][i], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[ch][hSpatParamRendCom->slots_rendered + i], CLDFB_NO_CHANNELS_MAX ); -#endif } } } @@ -850,19 +845,11 @@ static void ivas_dirac_dec_binaural_internal( mvr2r( st_ivas->hDiracDecBin[0]->ChCrossIm, hDiracDecBin->ChCrossIm, hSpatParamRendCom->num_freq_bands ); ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, -#else - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, -#endif subFrameTotalEne, IIReneLimiter, st_ivas->hMasaIsmData ); ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, -#else - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, -#endif nchanSeparateChannels, st_ivas->hMasaIsmData ); /* re-use reverb and decorr from main direction for the sides */ @@ -875,12 +862,7 @@ static void ivas_dirac_dec_binaural_internal( { for ( i = 0; i < hSpatParamRendCom->subframe_nbslots[subframe]; i++ ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_CLDFB_RINGBUF_Push( st_ivas->hSplitBinRend->hMultiBinCldfbData[pos_idx * BINAURAL_CHANNELS + ch], tmp_Cldfb_out_re[ch][i], tmp_Cldfb_out_im[ch][i], CLDFB_NO_CHANNELS_MAX ); -#else - mvr2r( tmp_Cldfb_out_re[ch][i], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_RealBuffer_Binaural[pos_idx * BINAURAL_CHANNELS + ch][hSpatParamRendCom->slots_rendered + i], CLDFB_NO_CHANNELS_MAX ); - mvr2r( tmp_Cldfb_out_im[ch][i], st_ivas->hSplitBinRend->hMultiBinCldfbData->Cldfb_ImagBuffer_Binaural[pos_idx * BINAURAL_CHANNELS + ch][hSpatParamRendCom->slots_rendered + i], CLDFB_NO_CHANNELS_MAX ); -#endif } } @@ -2450,9 +2432,6 @@ static void getDirectPartGains( { float aziRad, eleRad; float y, mappedX, aziRadMapped, A, A2, A3; -#ifndef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL - const float LsAngleRad = 30.0f * PI_OVER_180; -#endif if ( renderStereoOutputInsteadOfBinaural ) /* In stereo (i.e. non-binaural) rendering mode */ { @@ -2473,31 +2452,19 @@ static void getDirectPartGains( aziRadMapped = atan2f( y, mappedX ); /* Determine the real valued amplitude panning gains */ -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL if ( aziRadMapped >= LS_ANGLE_RAD_30_DEG ) -#else - if ( aziRadMapped >= LsAngleRad ) -#endif { /* Left side */ *lRealp = 1.0f; *rRealp = 0.0f; } -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL else if ( aziRadMapped <= -LS_ANGLE_RAD_30_DEG ) -#else - else if ( aziRadMapped <= -LsAngleRad ) -#endif { /* Right side */ *lRealp = 0.0f; *rRealp = 1.0f; } else /* Tangent panning law */ { -#ifdef NONBE_FIX_1426_STEREO_PANNING_BETWEEN_OPT_LEVEL A = tanf( aziRadMapped ) * INV_TAN_LS_ANGLE_RAD_30_DEG; -#else - A = tanf( aziRadMapped ) / tanf( LsAngleRad ); -#endif A2 = ( A - 1.0f ) / max( 0.001f, A + 1.0f ); A3 = 1.0f / ( A2 * A2 + 1.0f ); *lRealp = sqrtf( A3 ); @@ -3126,12 +3093,10 @@ void ivas_omasa_preProcessStereoTransportsForEditedObjects( } /* Limit target energies to non-negative values */ -#ifdef NONBE_1399_1400_FIX_OBJ_EDIT_ISSUES for ( ch = 0; ch < BINAURAL_CHANNELS; ch++ ) { totalTargetEneCh[ch] = max( totalTargetEneCh[ch], 0.0f ); } -#endif /* due to rounding, the sum may exceed 1.0f ever so slightly, so clip it */ ratioAccOrig = min( ratioAccOrig, 1.0f ); @@ -3441,15 +3406,9 @@ static void ivas_masa_ext_rend_parambin_internal( ivas_dirac_dec_binaural_formulate_input_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, subframe, subFrameTotalEne, IIReneLimiter ); -#ifdef NONBE_FIX_1442_MASA_EXT_REND_ORIENT_IDX ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, subFrameTotalEne, IIReneLimiter, NULL ); -#else - ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat, subframe, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, - subFrameTotalEne, IIReneLimiter, NULL ); -#endif ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, 0, NULL ); @@ -3513,7 +3472,6 @@ static void ivas_masa_ext_rend_parambin_internal( mvr2r( hMasaExtRend->hDiracDecBin[0]->ChCrossRe, hDiracDecBin->ChCrossRe, hSpatParamRendCom->num_freq_bands ); mvr2r( hMasaExtRend->hDiracDecBin[0]->ChCrossIm, hDiracDecBin->ChCrossIm, hSpatParamRendCom->num_freq_bands ); -#ifdef NONBE_FIX_1442_MASA_EXT_REND_ORIENT_IDX ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, subFrameTotalEne, IIReneLimiter, NULL ); @@ -3521,15 +3479,6 @@ static void ivas_masa_ext_rend_parambin_internal( ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe, hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[hCombinedOrientationData->subframe_idx] > 0, 0, NULL ); -#else - ivas_dirac_dec_binaural_formulate_target_covariance_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, Rmat_local, subframe, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, - subFrameTotalEne, IIReneLimiter, NULL ); - - ivas_dirac_dec_binaural_determine_processing_matrices( hDiracDecBin, hSpatParamRendCom, &config_data, max_band_decorr, Rmat_local, subframe, - hCombinedOrientationData && hCombinedOrientationData->enableCombinedOrientation[subframe] > 0, - 0, NULL ); -#endif /* re-use reverb and decorr from main direction for the sides */ ivas_dirac_dec_binaural_process_output( hDiracDecBin, hSpatParamRendCom, hMasaExtRend->cldfbSynRend, output_f, Cldfb_RealBuffer_in, Cldfb_ImagBuffer_in, diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h index 14c2e65941..967d70bb8e 100644 --- a/lib_rend/ivas_prot_rend.h +++ b/lib_rend/ivas_prot_rend.h @@ -1343,31 +1343,16 @@ ivas_error ivas_render_config_init_from_rom( RENDER_CONFIG_HANDLE *hRenderConfig /* i/o: Renderer config handle */ ); -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE ivas_error ivas_render_config_change_defaults( RENDER_CONFIG_HANDLE hRenderConfig, /* i/o: Renderer config handle */ IVAS_DefaultReverbSize reverbDefault /* i: Reverb default size */ ); -#endif /*----------------------------------------------------------------------------------* * Quaternion operations *----------------------------------------------------------------------------------*/ -#ifndef IVAS_RTPDUMP -void QuaternionProduct( - const IVAS_QUATERNION q1, - const IVAS_QUATERNION q2, - IVAS_QUATERNION *const r -); - -void QuaternionInverse( - const IVAS_QUATERNION q, - IVAS_QUATERNION *const r -); - -#endif void QuaternionSlerp( const IVAS_QUATERNION q1, const IVAS_QUATERNION q2, @@ -1614,7 +1599,6 @@ void ivas_TD_RINGBUF_Close( TD_RINGBUF_HANDLE *ph /* i/o: Ring buffer handle */ ); -#ifdef FIX_1119_SPLIT_RENDERING_VOIP void ivas_TD_RINGBUF_PushInterleaved( TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ const float *data, /* i : Input audio in interleaved channels layout */ @@ -1638,24 +1622,6 @@ void ivas_TD_RINGBUF_PopChannels( float *p_channels[], /* i : Array of pointers to each output channel */ const int16_t num_samples_per_channel /* i : Number of samples per channel to pop */ ); -#else -void ivas_TD_RINGBUF_Push( - TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ - const float *data, /* i : Input data */ - const uint16_t num_samples_per_channel /* i : Number of samples per channel to store */ -); - -void ivas_TD_RINGBUF_PushZeros( - TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ - const uint16_t num_samples_per_channel /* i : Number of zeros per channel to store */ -); - -void ivas_TD_RINGBUF_Pop( - TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ - float *data, /* i : Output data */ - const uint16_t num_samples_per_channel /* i : Number of samples per channel to retrieve*/ -); -#endif int16_t ivas_TD_RINGBUF_Size( const TD_RINGBUF_HANDLE h /* i : Ring buffer handle */ diff --git a/lib_rend/ivas_render_config.c b/lib_rend/ivas_render_config.c index dc44c003f2..27af0fe19a 100644 --- a/lib_rend/ivas_render_config.c +++ b/lib_rend/ivas_render_config.c @@ -45,7 +45,6 @@ * Local constants *-----------------------------------------------------------------------*/ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE #define IVAS_REVERB_DEFAULT_L_PRE_DELAY 0.016f #define IVAS_REVERB_DEFAULT_L_INPUT_DELAY 0.1f @@ -54,10 +53,6 @@ #define IVAS_REVERB_DEFAULT_M_PRE_DELAY 0.0125f #define IVAS_REVERB_DEFAULT_M_INPUT_DELAY 0.0f -#else -#define IVAS_REVERB_DEFAULT_PRE_DELAY 0.016f -#define IVAS_REVERB_DEFAULT_INPUT_DELAY 0.1f -#endif #define IVAS_REVERB_DEFAULT_USE_ER 0 @@ -124,32 +119,18 @@ ivas_error ivas_render_config_init_from_rom( #ifdef DEBUGGING ( *hRenderConfig )->renderer_type_override = IVAS_RENDER_TYPE_OVERRIDE_NONE; #endif -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT ( *hRenderConfig )->roomAcoustics.aeID = IVAS_DEFAULT_AEID; -#endif -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_L_N_BANDS; ( *hRenderConfig )->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_L_PRE_DELAY; ( *hRenderConfig )->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_L_INPUT_DELAY; -#else - ( *hRenderConfig )->roomAcoustics.nBands = IVAS_REVERB_DEFAULT_N_BANDS; - ( *hRenderConfig )->roomAcoustics.acousticPreDelay = IVAS_REVERB_DEFAULT_PRE_DELAY; - ( *hRenderConfig )->roomAcoustics.inputPreDelay = IVAS_REVERB_DEFAULT_INPUT_DELAY; -#endif ( *hRenderConfig )->roomAcoustics.use_er = IVAS_REVERB_DEFAULT_USE_ER; set_zero( &( *hRenderConfig )->roomAcoustics.pFc_input[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &( *hRenderConfig )->roomAcoustics.pAcoustic_rt60[0], CLDFB_NO_CHANNELS_MAX ); set_zero( &( *hRenderConfig )->roomAcoustics.pAcoustic_dsr[0], CLDFB_NO_CHANNELS_MAX ); -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE mvr2r( ivas_reverb_default_large_fc, ( *hRenderConfig )->roomAcoustics.pFc_input, IVAS_REVERB_DEFAULT_L_N_BANDS ); mvr2r( ivas_reverb_default_large_RT60, ( *hRenderConfig )->roomAcoustics.pAcoustic_rt60, IVAS_REVERB_DEFAULT_L_N_BANDS ); mvr2r( ivas_reverb_default_large_DSR, ( *hRenderConfig )->roomAcoustics.pAcoustic_dsr, IVAS_REVERB_DEFAULT_L_N_BANDS ); -#else - mvr2r( ivas_reverb_default_fc, ( *hRenderConfig )->roomAcoustics.pFc_input, IVAS_REVERB_DEFAULT_N_BANDS ); - mvr2r( ivas_reverb_default_RT60, ( *hRenderConfig )->roomAcoustics.pAcoustic_rt60, IVAS_REVERB_DEFAULT_N_BANDS ); - mvr2r( ivas_reverb_default_DSR, ( *hRenderConfig )->roomAcoustics.pAcoustic_dsr, IVAS_REVERB_DEFAULT_N_BANDS ); -#endif for ( i = 0; i < MAX_NUM_OBJECTS; i++ ) { @@ -177,7 +158,6 @@ ivas_error ivas_render_config_init_from_rom( return IVAS_ERR_OK; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /*-------------------------------------------------------------------* * ivas_render_config_change_defaults() @@ -237,4 +217,3 @@ ivas_error ivas_render_config_change_defaults( return IVAS_ERR_OK; } -#endif diff --git a/lib_rend/ivas_rom_rend.c b/lib_rend/ivas_rom_rend.c index 46f29eafa7..4240efa808 100644 --- a/lib_rend/ivas_rom_rend.c +++ b/lib_rend/ivas_rom_rend.c @@ -346,7 +346,6 @@ const float t_design_11_elevation[70] = * Reverberator ROM tables *-----------------------------------------------------------------------*/ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE const float ivas_reverb_default_small_fc[IVAS_REVERB_DEFAULT_S_N_BANDS] = { 200.0f, 600.0f, 1000.0f, 1400.0f, 1800.0f, 2200.0f, 2600.0f, 3000.0f, 3400.0f, 3800.0f, @@ -412,13 +411,8 @@ const float ivas_reverb_default_medium_DSR[IVAS_REVERB_DEFAULT_M_N_BANDS] = 1.271521e-05f, 6.951610e-06f, 6.154952e-06f, 1.181682e-05f, 7.084896e-06f, 3.571991e-06f, 2.210372e-06f }; -#endif -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE const float ivas_reverb_default_large_fc[IVAS_REVERB_DEFAULT_L_N_BANDS] = -#else -const float ivas_reverb_default_fc[IVAS_REVERB_DEFAULT_N_BANDS] = -#endif { 20.0f, 25.0f, 31.5f, 40.0f, 50.0f, 63.0f, 80.0f, 100.0f, @@ -430,11 +424,7 @@ const float ivas_reverb_default_fc[IVAS_REVERB_DEFAULT_N_BANDS] = 12500.0f, 16000.0f, 20000.0f }; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE const float ivas_reverb_default_large_RT60[IVAS_REVERB_DEFAULT_L_N_BANDS] = -#else -const float ivas_reverb_default_RT60[IVAS_REVERB_DEFAULT_N_BANDS] = -#endif { 1.3622f, 1.4486f, 1.3168f, 1.5787f, 1.4766f, 1.3954f, 1.2889f, 1.3462f, @@ -446,11 +436,7 @@ const float ivas_reverb_default_RT60[IVAS_REVERB_DEFAULT_N_BANDS] = 0.71945f, 0.61682f, 0.60031f }; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE const float ivas_reverb_default_large_DSR[IVAS_REVERB_DEFAULT_L_N_BANDS] = -#else -const float ivas_reverb_default_DSR[IVAS_REVERB_DEFAULT_N_BANDS] = -#endif { 1.8811e-08f, 2.1428e-08f, 1.3972e-08f, 1.51e-08f, 1.287e-08f, 1.8747e-08f, 2.413e-08f, 3.9927e-08f, @@ -699,7 +685,6 @@ const LS_CONVERSION_MATRIX ls_conversion_cicp19_cicp16[] = }; /* Upmix matrices */ -#ifdef FIX_1419_MONO_STEREO_UMX const LS_CONVERSION_MATRIX ls_conversion_mono_cicpX[] = { /* First row indicates the number of non-zero elements and the number of matrix columns */ {1, 12.0f}, @@ -707,7 +692,6 @@ const LS_CONVERSION_MATRIX ls_conversion_mono_cicpX[] = { {2, 1.0f}, }; -#endif const LS_CONVERSION_MATRIX ls_conversion_cicp12_cicp14[] = { /* First row indicates the number of non-zero elements and the number of matrix columns */ @@ -793,9 +777,7 @@ const LS_CONVERSION_MATRIX ls_conversion_cicp16_cicp19[] = const LS_CONVERSION_MAPPING ls_conversion_mapping[LS_SETUP_CONVERSION_NUM_MAPPINGS] = { /* Dowmix mappings - NULL is a special case for MONO / STEREO downmix */ -#ifdef FIX_1419_MONO_STEREO_UMX {IVAS_AUDIO_CONFIG_STEREO, IVAS_AUDIO_CONFIG_MONO, NULL}, -#endif {IVAS_AUDIO_CONFIG_5_1, IVAS_AUDIO_CONFIG_MONO, NULL}, {IVAS_AUDIO_CONFIG_7_1, IVAS_AUDIO_CONFIG_MONO, NULL}, {IVAS_AUDIO_CONFIG_5_1_2, IVAS_AUDIO_CONFIG_MONO, NULL}, @@ -823,14 +805,12 @@ const LS_CONVERSION_MAPPING ls_conversion_mapping[LS_SETUP_CONVERSION_NUM_MAPPIN {IVAS_AUDIO_CONFIG_7_1_4, IVAS_AUDIO_CONFIG_5_1_4, ls_conversion_cicp19_cicp16}, /* Upmix mappings - NULL implies a 1:1 upmix */ -#ifdef FIX_1419_MONO_STEREO_UMX {IVAS_AUDIO_CONFIG_MONO, IVAS_AUDIO_CONFIG_5_1, ls_conversion_mono_cicpX}, {IVAS_AUDIO_CONFIG_MONO, IVAS_AUDIO_CONFIG_7_1, ls_conversion_mono_cicpX}, {IVAS_AUDIO_CONFIG_MONO, IVAS_AUDIO_CONFIG_5_1_2, ls_conversion_mono_cicpX}, {IVAS_AUDIO_CONFIG_MONO, IVAS_AUDIO_CONFIG_5_1_4, ls_conversion_mono_cicpX}, {IVAS_AUDIO_CONFIG_MONO, IVAS_AUDIO_CONFIG_7_1_4, ls_conversion_mono_cicpX}, -#endif {IVAS_AUDIO_CONFIG_STEREO, IVAS_AUDIO_CONFIG_5_1, NULL}, {IVAS_AUDIO_CONFIG_STEREO, IVAS_AUDIO_CONFIG_7_1, NULL}, {IVAS_AUDIO_CONFIG_STEREO, IVAS_AUDIO_CONFIG_5_1_2, NULL}, diff --git a/lib_rend/ivas_rom_rend.h b/lib_rend/ivas_rom_rend.h index 9d14bf325f..880408e69d 100644 --- a/lib_rend/ivas_rom_rend.h +++ b/lib_rend/ivas_rom_rend.h @@ -113,7 +113,6 @@ extern const float t_design_11_elevation[70]; * Reverberator ROM tables *-----------------------------------------------------------------------*/ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE extern const float ivas_reverb_default_small_fc[]; extern const float ivas_reverb_default_small_RT60[]; extern const float ivas_reverb_default_small_DSR[]; @@ -125,11 +124,6 @@ extern const float ivas_reverb_default_medium_DSR[]; extern const float ivas_reverb_default_large_fc[]; extern const float ivas_reverb_default_large_RT60[]; extern const float ivas_reverb_default_large_DSR[]; -#else -extern const float ivas_reverb_default_fc[]; -extern const float ivas_reverb_default_RT60[]; -extern const float ivas_reverb_default_DSR[]; -#endif /*----------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_rotation.c b/lib_rend/ivas_rotation.c index 534661af35..3910ddea87 100644 --- a/lib_rend/ivas_rotation.c +++ b/lib_rend/ivas_rotation.c @@ -824,14 +824,12 @@ ivas_error ivas_combined_orientation_open( ( *hCombinedOrientationData )->subframe_idx = 0; ( *hCombinedOrientationData )->subframe_size = (int16_t) ( fs / ( FRAMES_PER_SEC * MAX_PARAM_SPATIAL_SUBFRAMES ) ); ( *hCombinedOrientationData )->cur_subframe_samples_rendered = 0; -#ifdef RTP_S4_251135_CR26253_0016_REV1 for ( i = 0; i < ( 1 + IVAS_MAX_NUM_OBJECTS ); i++ ) { ( *hCombinedOrientationData )->isDiegeticInputPI[i] = true; } ( *hCombinedOrientationData )->isDiegeticInputPISet = false; -#endif return IVAS_ERR_OK; } @@ -989,7 +987,6 @@ ivas_error combine_external_and_head_orientations( } else if ( hExtOrientationData == NULL && headRotQuaternions != NULL ) { -#ifdef RTP_S4_251135_CR26253_0016_REV1 /* Disable head rotation if diegetic PI data indicating non-diegetic audio is received */ if ( hCombinedOrientationData->isDiegeticInputPISet && !hCombinedOrientationData->isDiegeticInputPI[0] && !hCombinedOrientationData->isDiegeticInputPI[1] && !hCombinedOrientationData->isDiegeticInputPI[2] && !hCombinedOrientationData->isDiegeticInputPI[3] && !hCombinedOrientationData->isDiegeticInputPI[4] ) { @@ -1006,13 +1003,6 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternions[i] = headRotQuaternions[i]; } } -#else - /* Head rotation only */ - for ( i = 0; i < hCombinedOrientationData->num_subframes; i++ ) - { - hCombinedOrientationData->Quaternions[i] = headRotQuaternions[i]; - } -#endif } if ( hExtOrientationData != NULL ) @@ -1089,7 +1079,6 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->Quaternion_frozen_head = identity; hCombinedOrientationData->isHeadRotationFrozen = 0; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 /* Disable head rotation if diegetic PI data indicating non-diegetic audio is received */ if ( hCombinedOrientationData->isDiegeticInputPISet && !hCombinedOrientationData->isDiegeticInputPI[0] && !hCombinedOrientationData->isDiegeticInputPI[1] && !hCombinedOrientationData->isDiegeticInputPI[2] && !hCombinedOrientationData->isDiegeticInputPI[3] && !hCombinedOrientationData->isDiegeticInputPI[4] ) { @@ -1122,32 +1111,6 @@ ivas_error combine_external_and_head_orientations( } } } -#else - /* Use the most recent head rotation */ - if ( hExtOrientationData->enableHeadRotation[i] == 1 ) - { - if ( hExtOrientationData->enableExternalOrientation[i] > 0 ) - { - QuaternionProduct( hCombinedOrientationData->Quaternions[i], headRotQuaternions[i], &hCombinedOrientationData->Quaternions[i] ); - } - else - { - hCombinedOrientationData->Quaternions[i] = headRotQuaternions[i]; - } - } - /* Use the freezed head rotation */ - else if ( hExtOrientationData->enableHeadRotation[i] == 2 ) - { - if ( hExtOrientationData->enableExternalOrientation[i] > 0 ) - { - QuaternionProduct( hCombinedOrientationData->Quaternions[i], hCombinedOrientationData->Quaternion_frozen_head, &hCombinedOrientationData->Quaternions[i] ); - } - else - { - hCombinedOrientationData->Quaternions[i] = hCombinedOrientationData->Quaternion_frozen_head; - } - } -#endif /* Reset the combined orientations to identity */ if ( hExtOrientationData->enableHeadRotation[i] == 0 && hExtOrientationData->enableExternalOrientation[i] == 0 ) @@ -1246,7 +1209,6 @@ ivas_error combine_external_and_head_orientations( hCombinedOrientationData->subframe_idx_start = 0; hCombinedOrientationData->cur_subframe_samples_rendered_start = 0; -#ifdef IVAS_RTPDUMP /* Reset external orientations */ if ( hExtOrientationData != NULL ) { @@ -1255,7 +1217,6 @@ ivas_error combine_external_and_head_orientations( hExtOrientationData->Quaternions[i] = identity; } } -#endif return IVAS_ERR_OK; } diff --git a/lib_rend/ivas_stat_rend.h b/lib_rend/ivas_stat_rend.h index 4a2a2b0fb5..bcb948d05d 100644 --- a/lib_rend/ivas_stat_rend.h +++ b/lib_rend/ivas_stat_rend.h @@ -710,10 +710,8 @@ typedef struct ivas_combined_orientation_struct int16_t cur_subframe_samples_rendered; int16_t subframe_idx_start; int16_t cur_subframe_samples_rendered_start; -#ifdef RTP_S4_251135_CR26253_0016_REV1 bool isDiegeticInputPI[1 + IVAS_MAX_NUM_OBJECTS]; bool isDiegeticInputPISet; -#endif } COMBINED_ORIENTATION_DATA, *COMBINED_ORIENTATION_HANDLE; /*----------------------------------------------------------------------------------* diff --git a/lib_rend/ivas_td_ring_buffer.c b/lib_rend/ivas_td_ring_buffer.c index 98b3e4d15b..d80fefeaca 100644 --- a/lib_rend/ivas_td_ring_buffer.c +++ b/lib_rend/ivas_td_ring_buffer.c @@ -74,7 +74,6 @@ static int16_t ivas_td_ringbuf_has_space_for_num_samples( } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP static void ivas_td_ringbuf_push_interleaved( TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ const float *data, /* i : Input audio in interleaved channels layout */ @@ -107,7 +106,6 @@ static void ivas_td_ringbuf_push_interleaved( return; } -#endif /*-----------------------------------------------------------------------* @@ -192,7 +190,6 @@ void ivas_TD_RINGBUF_Close( } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * ivas_TD_RINGBUF_PushInterleaved() * @@ -222,43 +219,23 @@ void ivas_TD_RINGBUF_PushChannels( const float *p_channels[], /* i : Array of pointers to each input channel */ const int16_t num_samples_per_channel /* i : Number of samples per channel to push */ ) -#else -/*---------------------------------------------------------------------* - * ivas_TD_RINGBUF_Push() - * - * Push samples onto the back of the TD ring buffer. - * Returns total number of buffered samples (includes number of channels) - *---------------------------------------------------------------------*/ - -void ivas_TD_RINGBUF_Push( - TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ - const float *data, /* i : Input data */ - const uint16_t num_samples_per_channel /* i : Number of samples per channel to store */ -) -#endif { int32_t s; int16_t c; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP assert( h != NULL ); assert( p_channels != NULL ); for ( c = 0; c < h->num_channels; ++c ) { assert( p_channels[c] != NULL ); } -#endif assert( ivas_td_ringbuf_has_space_for_num_samples( h, (int32_t) num_samples_per_channel * h->num_channels ) ); for ( s = 0; s < num_samples_per_channel; ++s ) { for ( c = 0; c < h->num_channels; ++c ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP h->data[h->write_pos] = p_channels[c][s]; -#else - h->data[h->write_pos] = *( data + c * num_samples_per_channel + s ); -#endif ++h->write_pos; if ( h->write_pos == h->capacity ) @@ -277,7 +254,6 @@ void ivas_TD_RINGBUF_Push( } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * ivas_TD_RINGBUF_PushConstant() * @@ -294,51 +270,8 @@ void ivas_TD_RINGBUF_PushConstant( return; } -#else -/*---------------------------------------------------------------------* - * ivas_TD_RINGBUF_PushZeros() - * - * Push zero samples onto the back of the TD ring buffer. - *---------------------------------------------------------------------*/ -void ivas_TD_RINGBUF_PushZeros( - TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ - const uint16_t num_samples_per_channel /* i : Number of zeros per channel to store */ -) -{ - uint16_t c, s; - assert( ivas_td_ringbuf_has_space_for_num_samples( h, num_samples_per_channel * h->num_channels ) ); - if ( !num_samples_per_channel ) - { - return; - } - - for ( s = 0; s < num_samples_per_channel; ++s ) - { - for ( c = 0; c < h->num_channels; ++c ) - { - h->data[h->write_pos] = 0.f; - ++h->write_pos; - - if ( h->write_pos == h->capacity ) - { - h->write_pos = 0; - } - } - } - - if ( h->read_pos == h->write_pos ) - { - h->is_full = 1; - } - - return; -} -#endif - - -#ifdef FIX_1119_SPLIT_RENDERING_VOIP /*---------------------------------------------------------------------* * ivas_TD_RINGBUF_PopChannels() * @@ -350,42 +283,23 @@ void ivas_TD_RINGBUF_PopChannels( float *p_channels[], /* i : Array of pointers to each output channel */ const int16_t num_samples_per_channel /* i : Number of samples per channel to pop */ ) -#else -/*---------------------------------------------------------------------* - * ivas_TD_RINGBUF_Pop() - * - * Pop samples from the front of the TD ring buffer. - *---------------------------------------------------------------------*/ - -void ivas_TD_RINGBUF_Pop( - TD_RINGBUF_HANDLE h, /* i/o: Ring buffer handle */ - float *data, /* i : Output data */ - const uint16_t num_samples_per_channel /* i : Number of samples per channel to retrieve */ -) -#endif { int32_t s; int16_t c; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP assert( h != NULL ); assert( p_channels != NULL ); for ( c = 0; c < h->num_channels; ++c ) { assert( p_channels[c] != NULL ); } -#endif assert( ivas_td_ringbuf_total_size( h ) >= (int32_t) num_samples_per_channel * h->num_channels ); for ( s = 0; s < num_samples_per_channel; ++s ) { for ( c = 0; c < h->num_channels; ++c ) { -#ifdef FIX_1119_SPLIT_RENDERING_VOIP p_channels[c][s] = h->data[h->read_pos]; -#else - *( data + c * num_samples_per_channel + s ) = h->data[h->read_pos]; -#endif ++h->read_pos; if ( h->read_pos == h->capacity ) @@ -395,17 +309,10 @@ void ivas_TD_RINGBUF_Pop( } } -#ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( num_samples_per_channel != 0 ) { h->is_full = 0; } -#else - if ( h->is_full ) - { - h->is_full = 0; - } -#endif return; } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 5f1af59a95..d4992ef43e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -44,9 +44,7 @@ #include #include #include "wmc_auto.h" -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER #include -#endif /*-------------------------------------------------------------------* @@ -93,9 +91,7 @@ typedef struct const int16_t *pSplitRendBFI; const SPLIT_REND_WRAPPER *pSplitRendWrapper; const COMBINED_ORIENTATION_HANDLE *pCombinedOrientationData; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE const IVAS_DefaultReverbSize *pSelectedRoomReverbSize; -#endif } rendering_context; /* Common base for input structs */ @@ -129,11 +125,7 @@ typedef struct OMASA_ANA_HANDLE hOMasa; uint16_t total_num_objects; int16_t object_id; -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER int16_t ism_metadata_delay_ms; -#else - float ism_metadata_delay_ms; -#endif } input_ism; typedef struct @@ -231,9 +223,7 @@ struct IVAS_REND int8_t rendererConfigEnabled; RENDER_CONFIG_DATA *hRendererConfig; /* Renderer config pointer */ -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE IVAS_DefaultReverbSize selectedRoomReverbSize; -#endif int16_t num_subframes; hrtf_handles hHrtfs; @@ -1248,9 +1238,7 @@ static rendering_context getRendCtx( ctx.pSplitRendBFI = &hIvasRend->splitRendBFI; ctx.pSplitRendWrapper = hIvasRend->splitRendWrapper; ctx.pCombinedOrientationData = &hIvasRend->hCombinedOrientationData; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE ctx.pSelectedRoomReverbSize = &hIvasRend->selectedRoomReverbSize; -#endif return ctx; } @@ -1495,11 +1483,9 @@ static ivas_error alignInputDelay( input_ism *inputIsm; int16_t maxGlobalDelaySamples, numSamplesToPop, numSamplesToPush; uint16_t ringBufferSize, preDelay; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP int16_t i; const float *p_read_channels[MAX_INPUT_CHANNELS]; float *p_write_channels[MAX_INPUT_CHANNELS]; -#endif maxGlobalDelaySamples = latencyNsToSamples( sampleRateOut, maxGlobalDelayNs ); maxGlobalDelaySamples *= cldfb2tdSampleFact; @@ -1522,21 +1508,13 @@ static ivas_error alignInputDelay( /* for the first frame we need to push zeros to align the input delay to the global delay * and then push a frame of actual data */ -#ifdef FIX_1119_SPLIT_RENDERING_VOIP ivas_TD_RINGBUF_PushConstant( inputBase->delayBuffer, 0, preDelay ); -#else - ivas_TD_RINGBUF_PushZeros( inputBase->delayBuffer, preDelay ); -#endif /* for ISM inputs, ensure the metadata sync delay is updated */ if ( getAudioConfigType( inputBase->inConfig ) == IVAS_REND_AUDIO_CONFIG_TYPE_OBJECT_BASED ) { inputIsm = (input_ism *) inputBase; -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER inputIsm->ism_metadata_delay_ms = (int16_t) roundf( inputIsm->ism_metadata_delay_ms + maxGlobalDelayNs / 1e6f ); -#else - inputIsm->ism_metadata_delay_ms = maxGlobalDelayNs / 1e6f; -#endif } } } @@ -1548,7 +1526,6 @@ static ivas_error alignInputDelay( numSamplesToPush = flushInputs ? 0 : inputAudio.config.numSamplesPerChannel; numSamplesToPop = flushInputs ? ivas_TD_RINGBUF_Size( inputBase->delayBuffer ) : inputAudio.config.numSamplesPerChannel; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP for ( i = 0; i < inputAudio.config.numChannels; ++i ) { p_read_channels[i] = inputAudio.data + i * numSamplesToPush; @@ -1560,10 +1537,6 @@ static ivas_error alignInputDelay( p_write_channels[i] = inputBase->inputBuffer.data + i * numSamplesToPop; } ivas_TD_RINGBUF_PopChannels( inputBase->delayBuffer, p_write_channels, (int16_t) numSamplesToPop ); -#else - ivas_TD_RINGBUF_Push( inputBase->delayBuffer, inputAudio.data, numSamplesToPush ); - ivas_TD_RINGBUF_Pop( inputBase->delayBuffer, inputBase->inputBuffer.data, numSamplesToPop ); -#endif } else { @@ -3128,9 +3101,7 @@ ivas_error IVAS_REND_Open( hIvasRend->hLimiter = NULL; hIvasRend->efapOutWrapper.hEfap = NULL; hIvasRend->efapOutWrapper.pCustomLsSetup = NULL; -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE hIvasRend->selectedRoomReverbSize = DEFAULT_REVERB_UNSET; -#endif #ifdef DEBUGGING hIvasRend->numClipping = 0; #endif @@ -3809,7 +3780,6 @@ static ivas_error isar_pre_rend_init( return IVAS_ERR_OK; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE static IVAS_ROOM_SIZE_T getDefaultReverbSize( input_ism *ismInputs, input_masa *masaInputs, @@ -3887,7 +3857,6 @@ static IVAS_ROOM_SIZE_T getDefaultReverbSize( return selectedReverb; } -#endif /*-------------------------------------------------------------------* @@ -3987,7 +3956,6 @@ ivas_error IVAS_REND_AddInput( /* set global maximum delay after adding an input */ setMaxGlobalDelayNs( hIvasRend ); -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /* select default reverb size after adding an input */ if ( hIvasRend->selectedRoomReverbSize == DEFAULT_REVERB_UNSET ) @@ -3998,7 +3966,6 @@ ivas_error IVAS_REND_AddInput( hIvasRend->inputsMc, hIvasRend->inputsSba ) ); } -#endif return IVAS_ERR_OK; } @@ -4644,9 +4611,7 @@ ivas_error IVAS_REND_GetRenderConfig( break; } #endif -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT hRCout->roomAcoustics.aeID = hRCin->roomAcoustics.aeID; -#endif hRCout->roomAcoustics.nBands = hRCin->roomAcoustics.nBands; hRCout->roomAcoustics.acousticPreDelay = hRCin->roomAcoustics.acousticPreDelay; hRCout->roomAcoustics.inputPreDelay = hRCin->roomAcoustics.inputPreDelay; @@ -4703,9 +4668,7 @@ ivas_error IVAS_REND_FeedRenderConfig( #ifdef DEBUGGING hRenderConfig->renderer_type_override = renderConfig.renderer_type_override; #endif -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT hRenderConfig->roomAcoustics.aeID = renderConfig.roomAcoustics.aeID; -#endif hRenderConfig->roomAcoustics.nBands = renderConfig.roomAcoustics.nBands; hRenderConfig->roomAcoustics.acousticPreDelay = renderConfig.roomAcoustics.acousticPreDelay; hRenderConfig->roomAcoustics.inputPreDelay = renderConfig.roomAcoustics.inputPreDelay; @@ -5232,7 +5195,6 @@ ivas_error IVAS_REND_GetCombinedOrientation( return IVAS_ERR_OK; } -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE /*---------------------------------------------------------------------* * IVAS_REND_GetCombinedOrientation() @@ -5308,8 +5270,6 @@ ivas_error IVAS_REND_SetReverbRoomSize( return IVAS_ERR_OK; } -#endif - /*-------------------------------------------------------------------* * Local functions @@ -5681,11 +5641,7 @@ static ivas_error renderIsmToBinaural( push_wmops( "renderIsmToBinaural" ); /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */ -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / (float) BINAURAL_RENDERING_FRAME_SIZE_MS ); -#else - ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / ( 1000.f / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); -#endif copyBufferTo2dArray( ismInput->base.inputBuffer, tmpTDRendBuffer ); @@ -5890,11 +5846,7 @@ static ivas_error renderIsmToBinauralReverb( push_wmops( "renderIsmToBinauralRoom" ); /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */ -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / (float) BINAURAL_RENDERING_FRAME_SIZE_MS ); -#else - ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / ( 1000.f / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); -#endif copyBufferTo2dArray( ismInput->base.inputBuffer, tmpRendBuffer ); @@ -6074,11 +6026,7 @@ static ivas_error renderIsmToSplitBinaural( pMultiBinPoseData = &pSplitRendWrapper->multiBinPoseData; /* Metadata Delay to sync with audio delay converted from ms to 5ms (1000/50/4) subframe index */ -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / (float) BINAURAL_RENDERING_FRAME_SIZE_MS ); -#else - ism_md_subframe_update_ext = (int16_t) roundf( ismInput->ism_metadata_delay_ms / ( 1000.f / FRAMES_PER_SEC / MAX_PARAM_SPATIAL_SUBFRAMES ) ); -#endif pCombinedOrientationData = *ismInput->base.ctx.pCombinedOrientationData; @@ -7894,11 +7842,7 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects( ivas_error IVAS_REND_SetIsmMetadataDelay( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER const int16_t sync_md_delay /* i : ISM Metadata Delay in ms to sync with audio delay */ -#else - const float sync_md_delay /* i : ISM Metadata Delay in ms to sync with audio delay */ -#endif ) { int16_t i; @@ -8086,7 +8030,6 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( IVAS_REND_AudioBufferConfig *pSplitEncBufConfig; ISAR_SPLIT_REND_CONFIG_HANDLE pSplitRendConfig; ISAR_SPLIT_REND_BITS_DATA bits; -#ifdef FIX_1119_SPLIT_RENDERING_VOIP float *p_Cldfb_RealBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX]; float *p_Cldfb_ImagBuffer_Binaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][CLDFB_NO_COL_MAX]; int16_t j; @@ -8099,7 +8042,6 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( p_Cldfb_ImagBuffer_Binaural[i][j] = Cldfb_ImagBuffer_Binaural[i][j]; } } -#endif for ( ch = 0; ch < MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS; ch++ ) { @@ -8168,13 +8110,8 @@ ivas_error IVAS_REND_GetSplitBinauralBitstream( pSplitRendConfig->isar_frame_size_ms, pSplitRendConfig->codec_frame_size_ms, &bits, -#ifdef FIX_1119_SPLIT_RENDERING_VOIP p_Cldfb_RealBuffer_Binaural, p_Cldfb_ImagBuffer_Binaural, -#else - Cldfb_RealBuffer_Binaural, - Cldfb_ImagBuffer_Binaural, -#endif ( const int16_t )( ( BINAURAL_MAXBANDS * hIvasRend->sampleRateOut ) / 48000 ), tmpBinaural, 1, @@ -8223,12 +8160,8 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader( ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ int16_t *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ -#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES - int16_t *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ - int16_t *pLc3plusHighRes /* o : pointer to LC3plus High-Res setting */ -#else - int16_t *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ -#endif + int16_t *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ + int16_t *pLc3plusHighRes /* o : pointer to LC3plus High-Res setting */ ) { if ( hIvasRend == NULL || hIvasRend->hRendererConfig == NULL ) @@ -8240,9 +8173,7 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader( *pCodec_frame_size_ms = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms; *pIsar_frame_size_ms = hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms; *poseCorrection = hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode; -#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES *pLc3plusHighRes = hIvasRend->hRendererConfig->split_rend_config.lc3plus_highres; -#endif return IVAS_ERR_OK; } diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index c4faf090ea..267b24b6ea 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -261,7 +261,6 @@ ivas_error IVAS_REND_FeedRenderConfig( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_RENDER_CONFIG_DATA renderConfig /* i : Render configuration struct */ ); -#ifdef FIX_1318_ROOM_SIZE_CMD_LINE ivas_error IVAS_REND_GetReverbRoomSize( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ @@ -272,7 +271,6 @@ ivas_error IVAS_REND_SetReverbRoomSize( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ const IVAS_ROOM_SIZE_T reverbRoomSize /* i : Reverb room size */ ); -#endif ivas_error IVAS_REND_FeedSplitBinauralBitstream( IVAS_REND_HANDLE hIvasRend, /* i/o: Renderer handle */ @@ -297,12 +295,8 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader( ISAR_SPLIT_REND_CODEC *pCodec, /* o : pointer to codec setting */ ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o : pointer to pose correction mode */ int16_t *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ -#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES int16_t *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ int16_t *pLc3plusHighRes /* o : pointer to LC3plus High-Res setting */ -#else - int16_t *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ -#endif ); ivas_error IVAS_REND_SetHeadRotation( @@ -388,11 +382,7 @@ ivas_error IVAS_REND_SetTotalNumberOfObjects( ivas_error IVAS_REND_SetIsmMetadataDelay( IVAS_REND_HANDLE hIvasRend, /* i/o: IVAS renderer handle */ -#ifdef RENDERER_MD_SYNC_DELAY_TO_INTEGER const int16_t sync_md_delay /* i : Metadata Delay in ms to sync with audio delay */ -#else - const float sync_md_delay /* i : Metadata Delay in ms to sync with audio delay */ -#endif ); ivas_error IVAS_REND_GetNumAllObjects( diff --git a/lib_util/g192.c b/lib_util/g192.c index a5eb030a4f..531e702158 100644 --- a/lib_util/g192.c +++ b/lib_util/g192.c @@ -482,11 +482,7 @@ G192_ERROR G192_WriteVoipFrame_short( const uint16_t *serial, const int16_t numBits, uint16_t const rtpSequenceNumber, -#ifdef IVAS_RTPDUMP uint32_t const rtpTimeStamp, -#else - uint16_t const rtpTimeStamp, -#endif uint32_t const rcvTime_ms ) { int16_t G192_HEADER[2], G192_DATA[IVAS_MAX_BITS_PER_FRAME]; diff --git a/lib_util/g192.h b/lib_util/g192.h index 0c22b739b9..06fd7c4c15 100644 --- a/lib_util/g192.h +++ b/lib_util/g192.h @@ -93,13 +93,7 @@ G192_ERROR G192_Writer_Open_filename( G192_HANDLE *phG192, const char *filename G192_ERROR G192_WriteFrame( G192_HANDLE const hG192, const uint16_t *serial, const int16_t numBits ); -G192_ERROR G192_WriteVoipFrame_short( G192_HANDLE const hG192, const uint16_t *serial, const int16_t num_bits, uint16_t const rtpSequenceNumber, -#ifdef IVAS_RTPDUMP - uint32_t const rtpTimeStamp, -#else - uint16_t const rtpTimeStamp, -#endif - uint32_t const rcvTime_ms ); +G192_ERROR G192_WriteVoipFrame_short( G192_HANDLE const hG192, const uint16_t *serial, const int16_t num_bits, uint16_t const rtpSequenceNumber, uint32_t const rtpTimeStamp, uint32_t const rcvTime_ms ); G192_ERROR G192_Writer_Close( G192_HANDLE *phG192 ); diff --git a/lib_util/ivas_rtp_api.h b/lib_util/ivas_rtp_api.h index 78fb6144b7..bce34092d0 100644 --- a/lib_util/ivas_rtp_api.h +++ b/lib_util/ivas_rtp_api.h @@ -123,7 +123,6 @@ typedef enum IVAS_FMT_NO_REQ, /* No preference */ } IVAS_RTP_FORMAT; -#ifdef RTP_S4_251135_CR26253_0016_REV1 /* Coded Subformat Requests */ typedef enum { @@ -204,7 +203,6 @@ typedef struct uint32_t roll : 1; /* transmission metadata for correction around roll axis */ uint32_t reserved : 27; /* reserved */ } IVAS_RTP_SPLITRENDER; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ /* Remote Requests Types (Keys) */ typedef enum @@ -214,25 +212,21 @@ typedef enum IVAS_REQUEST_BANDWIDTH, /* Request bandwidth, value of type IVAS_RTP_BANDWIDTH */ IVAS_REQUEST_FORMAT, /* Request format, value of type IVAS_RTP_FORMAT */ IVAS_REQUEST_CA_MODE, /* Request channel awareness, value of type IVAS_RTP_CA_MODE */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_REQUEST_SUBFORMAT, /* Request subFormat, value of type IVAS_RTP_SUBFORMAT */ IVAS_REQUEST_SR_CONFIG, /* Request spit rendering, value of type IVAS_RTP_SPLITRENDER */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ IVAS_REQUEST_MAX /* Max number of requests */ } IVAS_RTP_REQUEST_TYPE; /* Remote Request Values */ typedef union { - uint32_t bitrate; /* bitrate in kbps when request type is IVAS_REQUEST_BITRATE */ - IVAS_RTP_CODEC codec; /* codec id when request type is IVAS_REQUEST_CODEC */ - IVAS_RTP_BANDWIDTH bandwidth; /* badwidth when request type is IVAS_REQUEST_BANDWIDTH */ - IVAS_RTP_FORMAT formatType; /* format type when request type is IVAS_REQUEST_FORMAT */ - IVAS_RTP_CA_MODE caMode; /* channel aware mode when request type is IVAS_REQUEST_CA_MODE */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 + uint32_t bitrate; /* bitrate in kbps when request type is IVAS_REQUEST_BITRATE */ + IVAS_RTP_CODEC codec; /* codec id when request type is IVAS_REQUEST_CODEC */ + IVAS_RTP_BANDWIDTH bandwidth; /* badwidth when request type is IVAS_REQUEST_BANDWIDTH */ + IVAS_RTP_FORMAT formatType; /* format type when request type is IVAS_REQUEST_FORMAT */ + IVAS_RTP_CA_MODE caMode; /* channel aware mode when request type is IVAS_REQUEST_CA_MODE */ IVAS_RTP_SUBFORMAT subFormatType; /* sub-format type when request type is IVAS_REQUEST_SUBFORMAT */ IVAS_RTP_SPLITRENDER srConfig; /* split rendering config when request type is IVAS_REQUEST_SR_CONFIG */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ } IVAS_RTP_REQUEST_VALUE; /* Template for pi data types, all defined pi data follow this template @@ -263,7 +257,6 @@ typedef struct uint8_t *buffer; /* pointer to the payload buffer */ } IVAS_DATA_BUFFER; -#ifdef RTP_S4_251135_CR26253_0016_REV1 typedef enum { IVAS_SR_TRANSPORT_LCLD, @@ -272,15 +265,12 @@ typedef enum typedef struct { - bool valid; /* Valid Split Rendering Info for/in the ToC */ - bool diegetic; /* SR content digetic */ - uint32_t bitrateKbps; /* SR bitrate in kbps */ -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE - uint32_t codecFrameSizeMs; /* SR transport codec framesize in ms (5/10/20) */ -#endif + bool valid; /* Valid Split Rendering Info for/in the ToC */ + bool diegetic; /* SR content digetic */ + uint32_t bitrateKbps; /* SR bitrate in kbps */ + uint32_t codecFrameSizeMs; /* SR transport codec framesize in ms (5/10/20) */ IVAS_RTP_SR_TRANSPORT codec; /* SR Transport Codec used*/ } IVAS_RTP_SR_INFO; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ /**********************************************/ /* IVAS RTP PACKER API */ @@ -312,7 +302,6 @@ void IVAS_RTP_PACK_Close( ); /* Update the RTP Header structure */ -#ifdef FIXED_RTP_SEQUENCE_NUM ivas_error IVAS_RTP_PACK_UpdateHeader( IVAS_RTP_PACK_HANDLE hIvasPack, /* i/o: pointer to an IVAS rtp packer handle to be opened */ uint16_t seqNumInitVal, /* i : Initial sequence number to be used for 1st packet */ @@ -323,17 +312,6 @@ ivas_error IVAS_RTP_PACK_UpdateHeader( uint16_t numExtensionBytes, /* i : length of the extension data */ uint8_t *extData /* i : extension data pointer */ ); -#else -ivas_error IVAS_RTP_PACK_UpdateHeader( - IVAS_RTP_PACK_HANDLE hIvasPack, /* i/o: pointer to an IVAS rtp packer handle to be opened */ - uint32_t ssrc, /* i : Unique 32-bit Source ID as negotiated during SDP */ - uint8_t numCC, /* i : numCC indicates no. of contributing sources */ - uint32_t *csrc, /* i : SSRCs of contributing Sources for a mixed stream */ - uint16_t extHeaderId, /* i : extension header ID */ - uint16_t numExtensionBytes, /* i : length of the extension data */ - uint8_t *extData /* i : extension data pointer */ -); -#endif /* Add requests for remote sender using a key value pair api * each key must be provided with a corresponding value type @@ -358,11 +336,9 @@ ivas_error IVAS_RTP_PACK_PushRemoteRequest( * */ ivas_error IVAS_RTP_PACK_PushFrame( - IVAS_RTP_PACK_HANDLE hIvasPack, /* i/o : IVAS rtp packer handle */ - IVAS_RTP_CODEC codecId, /* i : Codec type (IVAS/EVS) */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 + IVAS_RTP_PACK_HANDLE hIvasPack, /* i/o : IVAS rtp packer handle */ + IVAS_RTP_CODEC codecId, /* i : Codec type (IVAS/EVS) */ const IVAS_RTP_SR_INFO *srInfo, /* i : Split Rendering Info (NULL if absent) */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ const IVAS_DATA_BUFFER *frameBuffer /* i : packed frame bitstream for IVAS/EVS */ ); @@ -423,11 +399,6 @@ typedef struct IVAS_RTP_UNPACK *IVAS_RTP_UNPACK_HANDLE; /* rtp unpacker handle t typedef struct { uint32_t maxFramesPerPacket; /* maximum no of frame per packet expected during the session */ -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 - uint32_t srCodecFrameSizeMs; /* split rendering transport codec frame size in ms (5/10/20) set by sdp negotiation */ -#endif -#endif } IVAS_RTP_UNPACK_CONFIG; /* Open an instance of the RTP unpacker and return a handle to rtp unpacker on success @@ -588,15 +559,13 @@ ivas_error IVAS_RTP_UNPACK_GetRequest( ivas_error IVAS_RTP_UNPACK_PullFrame( IVAS_RTP_UNPACK_HANDLE hIvasUnpack, /* i/o : IVAS rtp unpacker handle */ IVAS_RTP_CODEC *receivedCodecId, /* o : Codec type (IVAS/EVS) */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - IVAS_RTP_SR_INFO *srInfo, /* o : Split Rendering Info */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ - IVAS_DATA_BUFFER *frameBuffer, /* o : packed frame bitstream for IVAS/EVS */ - int16_t *frameSizeInBits, /* o : exact frame size in bits (AMRWB IO) */ - uint32_t *timestamp, /* o : timestamp in RTP Clock @ 16KHz */ - uint16_t *sequenceNumber, /* o : sequence number from rtp header */ - bool *speechLostIndicated, /* o : Is current frame indicated as Lost */ - bool *isAMRWB_IOmode /* o : Is AMRWB_IO mode EVS frame */ + IVAS_RTP_SR_INFO *srInfo, /* o : Split Rendering Info */ + IVAS_DATA_BUFFER *frameBuffer, /* o : packed frame bitstream for IVAS/EVS */ + int16_t *frameSizeInBits, /* o : exact frame size in bits (AMRWB IO) */ + uint32_t *timestamp, /* o : timestamp in RTP Clock @ 16KHz */ + uint16_t *sequenceNumber, /* o : sequence number from rtp header */ + bool *speechLostIndicated, /* o : Is current frame indicated as Lost */ + bool *isAMRWB_IOmode /* o : Is AMRWB_IO mode EVS frame */ ); /* Pull a single PI data from rtp unpacker instance for current packet diff --git a/lib_util/ivas_rtp_file.c b/lib_util/ivas_rtp_file.c index 009a158c49..8c06948635 100644 --- a/lib_util/ivas_rtp_file.c +++ b/lib_util/ivas_rtp_file.c @@ -156,21 +156,15 @@ void IVAS_RTP_LogPiData( uint32_t nPiDataPresent /* i : Number of valid elements in the piData array */ ) { -#ifdef ISM_PI_DATA uint16_t n; -#endif uint32_t timestamp = ~0u; if ( f_piDataOut == NULL || piData == NULL || nPiDataPresent == 0 ) { return; } -#if defined IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT || defined ISM_PI_DATA #ifdef _WIN32 if ( ftell( f_piDataOut ) > 3 ) -#else - if ( ftell( f_piDataOut ) > 2 ) -#endif #else if ( ftell( f_piDataOut ) > 2 ) #endif @@ -200,13 +194,8 @@ void IVAS_RTP_LogPiData( case IVAS_PI_SCENE_ORIENTATION: case IVAS_PI_DEVICE_ORIENTATION_COMPENSATED: case IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED: -#ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_PI_PLAYBACK_DEVICE_ORIENTATION: case IVAS_PI_HEAD_ORIENTATION: -#ifndef REVERSE_ISM_PI_DATA - case IVAS_PI_R_ISM_ORIENTATION: -#endif -#endif { fprintf( f_piDataOut, "{\n\t\t\t\"w\": %f,\n\t\t\t\"x\": %f,\n\t\t\t\"y\": %f,\n\t\t\t\"z\": %f \n\t\t}", cur->data.scene.orientation.w, cur->data.scene.orientation.x, cur->data.scene.orientation.y, cur->data.scene.orientation.z ); @@ -229,11 +218,7 @@ void IVAS_RTP_LogPiData( fprintf( f_piDataOut, "\n\t\t}" ); } break; -#ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_PI_LISTENER_POSITION: -#ifndef REVERSE_ISM_PI_DATA - case IVAS_PI_R_ISM_POSITION: -#endif { fprintf( f_piDataOut, "{\n\t\t\t\"x\": %f,\n\t\t\t\"y\": %f,\n\t\t\t\"z\": %f \n\t\t}", cur->data.listnerPosition.position.x, cur->data.listnerPosition.position.y, cur->data.listnerPosition.position.z ); @@ -334,22 +319,13 @@ void IVAS_RTP_LogPiData( fprintf( f_piDataOut, "\n\t\t}" ); } break; -#ifdef RTP_S4_251135_CR26253_0016_REV1 - case IVAS_PI_RESERVED27: - case IVAS_PI_RESERVED28: - case IVAS_PI_RESERVED29: -#else - case IVAS_PI_RESERVED15: case IVAS_PI_RESERVED27: case IVAS_PI_RESERVED28: case IVAS_PI_RESERVED29: - case IVAS_PI_RESERVED30: -#endif { fprintf( f_piDataOut, "{}" ); } break; -#ifdef ISM_PI_DATA case IVAS_PI_ISM_ORIENTATION: { fprintf( f_piDataOut, "[\n" ); @@ -418,7 +394,6 @@ void IVAS_RTP_LogPiData( fprintf( f_piDataOut, "\n\t\t]" ); } break; -#ifdef RTP_UPDATES_SA4_134 case IVAS_PI_ISM_POSITION_COMPACT: { fprintf( f_piDataOut, "[\n" ); @@ -433,7 +408,6 @@ void IVAS_RTP_LogPiData( fprintf( f_piDataOut, "\n\t\t]" ); } break; -#endif case IVAS_PI_ISM_DISTANCE_ATTENUATION: { fprintf( f_piDataOut, "[\n" ); @@ -462,19 +436,6 @@ void IVAS_RTP_LogPiData( fprintf( f_piDataOut, "\n\t\t]" ); } break; -#else - case IVAS_PI_ISM_NUM: - case IVAS_PI_ISM_ID: - case IVAS_PI_ISM_GAIN: - case IVAS_PI_ISM_ORIENTATION: - case IVAS_PI_ISM_POSITION: - case IVAS_PI_ISM_DISTANCE_ATTENUATION: - case IVAS_PI_ISM_DIRECTIVITY: - { - fprintf( f_piDataOut, "{}" ); - } - break; -#endif case IVAS_PI_PI_LATENCY: { fprintf( f_piDataOut, "{" ); @@ -484,16 +445,13 @@ void IVAS_RTP_LogPiData( } break; case IVAS_PI_R_ISM_ID: -#ifdef REVERSE_ISM_PI_DATA { fprintf( f_piDataOut, "{\n" ); fprintf( f_piDataOut, "\t\t\t\"id\": %d", cur->data.ismEditId.id ); fprintf( f_piDataOut, "\n\t\t}" ); } break; -#endif case IVAS_PI_R_ISM_GAIN: -#ifdef REVERSE_ISM_PI_DATA { fprintf( f_piDataOut, "{\n" ); fprintf( f_piDataOut, "\t\t\t\"gain\": %d", cur->data.ismEditGain.dB ); @@ -512,24 +470,18 @@ void IVAS_RTP_LogPiData( cur->data.ismEditPosition.position.x, cur->data.ismEditPosition.position.y, cur->data.ismEditPosition.position.z ); } break; -#ifdef RTP_UPDATES_SA4_134 case IVAS_PI_R_ISM_POSITION_COMPACT: { fprintf( f_piDataOut, "{\n\t\t\t\"x\": %f,\n\t\t\t\"y\": %f,\n\t\t\t\"z\": %f \n\t\t}", cur->data.ismEditPositionCompact.position.x, cur->data.ismEditPositionCompact.position.y, cur->data.ismEditPositionCompact.position.z ); } break; -#endif -#endif case IVAS_PI_R_ISM_DIRECTION: -#ifdef REVERSE_ISM_PI_DATA { fprintf( f_piDataOut, "{\n\t\t\t\"azi\": %f,\n\t\t\t\"elev\": %f \n\t\t}", cur->data.ismEditDirection.azimuth, cur->data.ismEditDirection.elevation ); } break; -#endif -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ case IVAS_PI_NO_DATA: { fprintf( f_piDataOut, "{}" ); @@ -594,7 +546,6 @@ void IVAS_RTP_WriteExtPiData( } } break; -#ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_PI_AUDIO_DESCRIPTION: { uint32_t nEntries = cur->data.audioDesc.nValidEntries; @@ -660,7 +611,6 @@ void IVAS_RTP_WriteExtPiData( } } break; -#ifdef RTP_UPDATES_SA4_134 case IVAS_PI_ISM_POSITION_COMPACT: { for ( i = 0; i < numObj; ++i ) @@ -673,7 +623,6 @@ void IVAS_RTP_WriteExtPiData( } } break; -#endif case IVAS_PI_ISM_DISTANCE_ATTENUATION: { for ( i = 0; i < numObj; ++i ) @@ -789,31 +738,20 @@ void IVAS_RTP_WriteExtPiData( fprintf( f_piDataOut, "%f,%f,%f", cur->data.ismEditPosition.position.x, cur->data.ismEditPosition.position.y, cur->data.ismEditPosition.position.z ); } break; -#ifdef RTP_UPDATES_SA4_134 case IVAS_PI_R_ISM_POSITION_COMPACT: { fprintf( f_piDataOut, "%f,%f,%f", cur->data.ismEditPositionCompact.position.x, cur->data.ismEditPositionCompact.position.y, cur->data.ismEditPositionCompact.position.z ); } break; -#endif case IVAS_PI_R_ISM_DIRECTION: { fprintf( f_piDataOut, "%f,%f", cur->data.ismEditDirection.azimuth, cur->data.ismEditDirection.elevation ); } break; -#ifdef RTP_UPDATES_SA4_134 - case IVAS_PI_RESERVED27: - case IVAS_PI_RESERVED28: - case IVAS_PI_RESERVED29: -#else - case IVAS_PI_RESERVED15: case IVAS_PI_RESERVED27: case IVAS_PI_RESERVED28: case IVAS_PI_RESERVED29: - case IVAS_PI_RESERVED30: -#endif break; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ } fprintf( f_piDataOut, "\n" ); } @@ -881,18 +819,11 @@ void IVAS_RTP_Term( ivas_error IVAS_RTP_WRITER_Init( IVAS_RTP *rtp, /* i/o : IVAS RTP File writer handle */ const char *outputBitstreamFilename, /* i : RTP Dump filename */ -#ifdef FIXED_RTP_SEQUENCE_NUM - uint32_t numFramesPerPacket, /* i : No. of frames per packet desired */ - uint32_t SSRC, /* i : SSRC for RTP Header */ - uint16_t seqNumInitVal /* i : Initial seq number in rtp header */ -#else - uint32_t numFramesPerPacket /* i : No. of frames per packet desired */ -#endif + uint32_t numFramesPerPacket, /* i : No. of frames per packet desired */ + uint32_t SSRC, /* i : SSRC for RTP Header */ + uint16_t seqNumInitVal /* i : Initial seq number in rtp header */ ) { -#ifndef FIXED_RTP_SEQUENCE_NUM - uint32_t SSRC = ( rand() & 0xFFFF ) | ( (uint32_t) rand() << 16 ); -#endif ivas_error error = IVAS_ERR_OK; memset( rtp, 0, sizeof( IVAS_RTP ) ); @@ -911,11 +842,7 @@ ivas_error IVAS_RTP_WRITER_Init( return error; } -#ifdef FIXED_RTP_SEQUENCE_NUM error = IVAS_RTP_PACK_UpdateHeader( rtp->hPack, seqNumInitVal, SSRC, 0, NULL, 0, 0, NULL ); -#else - error = IVAS_RTP_PACK_UpdateHeader( rtp->hPack, SSRC, 0, NULL, 0, 0, NULL ); -#endif if ( error != IVAS_ERR_OK ) { fprintf( stderr, "error in IVAS_RTP_PACK_UpdateHeader(): %d\n", error ); @@ -926,12 +853,7 @@ ivas_error IVAS_RTP_WRITER_Init( } ivas_error IVAS_RTP_READER_Init( - IVAS_RTP *rtp, /* i/o : IVAS RTP File reader handle */ -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 - uint32_t srCodecFrameSizeMs, /* i : SR Codec Framesize in ms */ -#endif -#endif + IVAS_RTP *rtp, /* i/o : IVAS RTP File reader handle */ const char *inputBitstreamFilename, /* i : Input rtpdump filename */ const char *piOutputFilename, /* i : Output PI data json filename */ bool isExtOutput, /* i : External output mode */ @@ -943,9 +865,6 @@ ivas_error IVAS_RTP_READER_Init( memset( rtp, 0, sizeof( IVAS_RTP ) ); rtp->unpackCfg.maxFramesPerPacket = IVAS_MAX_FRAMES_PER_RTP_PACKET; -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE - rtp->unpackCfg.srCodecFrameSizeMs = srCodecFrameSizeMs; -#endif rtp->rtpPacket.buffer = rtp->packet; rtp->rtpPacket.capacity = sizeof( rtp->packet ); @@ -995,14 +914,12 @@ ivas_error IVAS_RTP_READER_Init( } ivas_error IVAS_RTP_WriteNextFrame( - IVAS_RTP *rtp, /* i/o : IVAS RTP File writer handle */ - uint8_t *au, /* i : IVAS Compressed AU (Packed frame) */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 + IVAS_RTP *rtp, /* i/o : IVAS RTP File writer handle */ + uint8_t *au, /* i : IVAS Compressed AU (Packed frame) */ const IVAS_RTP_SR_INFO *srInfo, /* i : Split rendering info in present, else NULL */ -#endif - int16_t auSizeBits, /* i : Frame size in bits */ - bool isMono, /* i : input was evs(true) or ivas(false) */ - bool forcePacket /* i : force packets with whatever frames pushed so far */ + int16_t auSizeBits, /* i : Frame size in bits */ + bool isMono, /* i : input was evs(true) or ivas(false) */ + bool forcePacket /* i : force packets with whatever frames pushed so far */ ) { ivas_error error = IVAS_ERR_OK; @@ -1017,9 +934,7 @@ ivas_error IVAS_RTP_WriteNextFrame( /* Push Encoded Stream to */ error = IVAS_RTP_PACK_PushFrame( rtp->hPack, isMono ? IVAS_RTP_EVS : IVAS_RTP_IVAS, -#ifdef RTP_S4_251135_CR26253_0016_REV1 srInfo, -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ &packedFrame ); if ( error != IVAS_ERR_OK ) { @@ -1065,10 +980,8 @@ ivas_error IVAS_RTP_ReadNextFrame( uint32_t *rtpTimeStamp, /* o : RTP Timestamp for this frame */ uint16_t *rtpSequenceNumber, /* o : RTP sequence number for this packet */ uint32_t *nextPacketRcvTime_ms, /* i/o : Clock indicating packet receive times need in JBM */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - IVAS_RTP_SR_INFO *srInfo, /* o : Split Rendering info if SR RTP frame unpacked */ -#endif - bool *qBit /* o : AMRWB Q bite as indicated in the RTP packet */ + IVAS_RTP_SR_INFO *srInfo, /* o : Split Rendering info if SR RTP frame unpacked */ + bool *qBit /* o : AMRWB Q bite as indicated in the RTP packet */ ) { ivas_error error = IVAS_ERR_OK; @@ -1113,11 +1026,7 @@ ivas_error IVAS_RTP_ReadNextFrame( IVAS_RTP_LogPiData( rtp->f_piDataOut, rtp->piData, rtp->nReadPiData ); } -#ifdef RTP_S4_251135_CR26253_0016_REV1 error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &codecId, &rtp->srInfo, &packedFrame, auSizeBits, rtpTimeStamp, rtpSequenceNumber, &rtp->speechLostIndicated, &isAMRWB_IOmode ); -#else - error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &codecId, &packedFrame, auSizeBits, rtpTimeStamp, rtpSequenceNumber, &rtp->speechLostIndicated, &isAMRWB_IOmode ); -#endif if ( error != IVAS_ERR_OK ) { fprintf( stderr, "failed to pull frame after unpack\n" ); @@ -1146,12 +1055,10 @@ ivas_error IVAS_RTP_ReadNextFrame( rtp->isAMRWB_IOmode = isAMRWB_IOmode; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( srInfo != NULL ) { *srInfo = rtp->srInfo; } -#endif *qBit = !rtp->speechLostIndicated; rtp->numFramesInPacket--; rtp->numFramesProduced++; diff --git a/lib_util/ivas_rtp_file.h b/lib_util/ivas_rtp_file.h index b57d387cf4..ce2cc183d0 100644 --- a/lib_util/ivas_rtp_file.h +++ b/lib_util/ivas_rtp_file.h @@ -65,31 +65,14 @@ typedef struct IVAS_RTP_UNPACK_HANDLE hUnpack; IVAS_RTP_PACK_CONFIG packCfg; IVAS_RTP_UNPACK_CONFIG unpackCfg; -#ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP_SR_INFO srInfo; -#endif } IVAS_RTP; -#ifdef FIXED_RTP_SEQUENCE_NUM ivas_error IVAS_RTP_WRITER_Init( IVAS_RTP *rtp, const char *outputBitstreamFilename, uint32_t numFramesPerPacket, uint32_t SSRC, uint16_t seqNumInitVal ); -#else -ivas_error IVAS_RTP_WRITER_Init( IVAS_RTP *rtp, const char *outputBitstreamFilename, uint32_t numFramesPerPacket ); -#endif -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 -ivas_error IVAS_RTP_READER_Init( IVAS_RTP *rtp, uint32_t srCodecFrameSizeMs, const char *inputBitstreamFilename, const char *piOutputFilename, bool isExtOutput, const char *outputWavFilename ); -#endif -#else ivas_error IVAS_RTP_READER_Init( IVAS_RTP *rtp, const char *inputBitstreamFilename, const char *piOutputFilename, bool isExtOutput, const char *outputWavFilename ); -#endif void IVAS_RTP_Term( IVAS_RTP *rtp ); -#ifdef RTP_S4_251135_CR26253_0016_REV1 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 ); -#else -ivas_error IVAS_RTP_WriteNextFrame( IVAS_RTP *rtp, uint8_t *au, 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, bool *qBit ); -#endif 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 ); const char *IVAS_RTP_GetExtPiFilePath( IVAS_RTP *rtp ); diff --git a/lib_util/ivas_rtp_internal.h b/lib_util/ivas_rtp_internal.h index 2ab816fab7..1fd4def72b 100644 --- a/lib_util/ivas_rtp_internal.h +++ b/lib_util/ivas_rtp_internal.h @@ -36,7 +36,6 @@ #include "ivas_rtp_api.h" #include "ivas_rtp_pi_data.h" -#ifdef IVAS_RTPDUMP enum MASK_BITS { @@ -48,13 +47,9 @@ enum MASK_BITS MASK_6BIT = 0x3F, MASK_7BIT = 0x7F, MASK_8BIT = 0xFF, -#ifdef REVERSE_ISM_PI_DATA MASK_9BIT = 0x1FF, -#endif -#ifdef RTP_UPDATES_SA4_134 MASK_10BIT = 0x3FF, MASK_11BIT = 0x7FF, -#endif }; @@ -71,15 +66,13 @@ enum MASK_BITS #define MASK_DIM ( ( 1u << NBITS_DIM ) - 1 ) #define MASK_ABS ( ( 1u << NBITS_ABS ) - 1 ) -#define MAX_PI_POSITION_METERS ( 327.68f ) -#define FLOAT_FROM_Q15( q15Val ) ( (float) ( q15Val ) / 32768.0f ) -#ifdef RTP_UPDATES_SA4_134 +#define MAX_PI_POSITION_METERS ( 327.68f ) +#define FLOAT_FROM_Q15( q15Val ) ( (float) ( q15Val ) / 32768.0f ) #define MAX_PI_COMPACT_POSITION_XY_METERS ( 10.24f ) #define MAX_PI_COMPACT_POSITION_Z_METERS ( 5.12f ) #define FLOAT_FROM_Q10( q10Val ) ( (float) ( q10Val ) / 1024.0f ) #define FLOAT_FROM_Q9( q9Val ) ( (float) ( q9Val ) / 512.0f ) #define FLOAT_FROM_Q7( q7Val ) ( (float) ( q7Val ) / 128.0f ) -#endif extern const float mapDSR[1u << NBITS_DSR]; extern const float mapRT60[1u << NBITS_RT60]; @@ -110,19 +103,11 @@ enum IVAS_RTP_HEADER_BITS EBYTE_CMR_T_IVAS = 0xF0, /* Initial E-byte indicating IVAS modes */ EBYTE_CMR_T_NO_REQ = 0xFF, /* If no bitrate and no CA mode requested for IVAS/EVS */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 EBYTE_BANDWIDTH_REQUEST = 0x80, /* Subsequent E-byte for Bandwidth Request */ EBYTE_FORMAT_REQUEST = 0x90, /* Subsequent E-byte for Format Request */ EBYTE_SUBFORMAT_REQUEST = 0x9F, /* Subsequent E-byte for SubFormat Request */ EBYTE_PI_INDICATOR = 0xA0, /* Subsequent E-byte for PI Indicator */ EBYTE_SR_REQUEST = 0xB0, /* Subsequent E-byte for Split Rendering Request */ -#else - EBYTE_BANDWIDTH_REQUEST = 0x40, /* Subsequent E-byte for Bandwidth Request */ - EBYTE_FORMAT_REQUEST = 0x50, /* Subsequent E-byte for Format Request */ - EBYTE_SUBFORMAT_REQUEST = 0x9F, /* Subsequent E-byte for SubFormat Request */ - EBYTE_PI_INDICATOR = 0x60, /* Subsequent E-byte for PI Indicator */ - EBYTE_SR_REQUEST = 0x70, /* Subsequent E-byte for Split Rendering Request */ -#endif PI_HEADER_PF_LAST = 0x00, /* Last PI header of the Payload in PI Header */ PI_HEADER_PF_NOT_LAST = 0x80, /* Another PI header follows after this in PI Header */ @@ -157,6 +142,5 @@ typedef struct ivas_error PI_PackData( const IVAS_PIDATA_GENERIC *piData, PIDATA_PACKED *packed, uint8_t pmBits ); ivas_error PI_UnPackData( uint8_t piDataType, uint32_t piSize, const uint8_t *piDataBuffer, IVAS_PIDATA_GENERIC *piData ); -#endif /* IVAS_RTPDUMP */ #endif /* IVAS_RTP_INTERNAL_H */ diff --git a/lib_util/ivas_rtp_payload.c b/lib_util/ivas_rtp_payload.c index 6a816f36de..3c7c942b17 100644 --- a/lib_util/ivas_rtp_payload.c +++ b/lib_util/ivas_rtp_payload.c @@ -32,12 +32,8 @@ #include #include #include -#ifndef FIXED_RTP_SEQUENCE_NUM -#include -#endif #include "common_api_types.h" -#ifdef IVAS_RTPDUMP #include "ivas_rtp_internal.h" #include "ivas_bpool.h" @@ -80,10 +76,8 @@ static void initRequests( IVAS_RTP_REQUEST_VALUE *requests ) requests[IVAS_REQUEST_BANDWIDTH].bandwidth = IVAS_BANDWIDTH_NO_REQ; requests[IVAS_REQUEST_FORMAT].formatType = IVAS_FMT_NO_REQ; requests[IVAS_REQUEST_CA_MODE].caMode = IVAS_RTP_CA_NO_REQ; -#ifdef RTP_S4_251135_CR26253_0016_REV1 requests[IVAS_REQUEST_SUBFORMAT].subFormatType = IVAS_SUBFMT_NO_REQ; requests[IVAS_REQUEST_SR_CONFIG].srConfig.valid = false; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ } static void initPiDataFrame( PIDATA_FRAME *piDataFrm ) @@ -132,9 +126,7 @@ typedef struct uint32_t auNumBits; /* Actual frame size in bits */ bool speechLostIndicated; /* Speech Lost indicated */ bool isAMRWB_IOmode; /* EVS frame is AMRWB_IO */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - IVAS_RTP_SR_INFO srInfo; /* Split Rendering Info */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ + IVAS_RTP_SR_INFO srInfo; /* Split Rendering Info */ } TOC_INFO; typedef struct PIDATA_NODE @@ -184,9 +176,7 @@ static const uint32_t amrWBIOFrameSizeInBits[] = { /* Update the RTP Header structure */ ivas_error IVAS_RTP_PACK_UpdateHeader( IVAS_RTP_PACK_HANDLE hPack, /* i/o: pointer to an IVAS rtp packer handle to be opened */ -#ifdef FIXED_RTP_SEQUENCE_NUM - uint16_t seqNumInitVal, /* i : Initial sequence number to be used for 1st packet */ -#endif + uint16_t seqNumInitVal, /* i : Initial sequence number to be used for 1st packet */ uint32_t ssrc, /* i : Unique 32-bit Source ID as negotiated during SDP */ uint8_t numCC, /* i : numCC indicates no. of contributing sources */ uint32_t *csrc, /* i : SSRCs of contributing Sources for a mixed stream */ @@ -202,9 +192,7 @@ ivas_error IVAS_RTP_PACK_UpdateHeader( return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "CC must be less than 16" ); } -#ifdef FIXED_RTP_SEQUENCE_NUM header->seqNumber = seqNumInitVal; -#endif header->ssrc = ssrc; header->CC = numCC; if ( csrc != NULL ) @@ -237,16 +225,8 @@ static void InitRtpHeader( RTP_HEADER *header /* RTP header structure */ ) { -#ifdef FIXED_RTP_SEQUENCE_NUM memset( header, 0, sizeof( *header ) ); header->version = 2; -#else - time_t t; - memset( header, 0, sizeof( *header ) ); - srand( (uint32_t) time( &t ) ); - header->version = 2; - header->seqNumber = rand() & 0xFFFF; -#endif } static ivas_error PackRtpHeader( @@ -611,7 +591,6 @@ ivas_error IVAS_RTP_PACK_PushRemoteRequest( } } break; -#ifdef RTP_S4_251135_CR26253_0016_REV1 case IVAS_REQUEST_SUBFORMAT: { uint32_t subFormat = reqValue.subFormatType; @@ -630,7 +609,6 @@ ivas_error IVAS_RTP_PACK_PushRemoteRequest( } } break; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ default: return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Unsupported request type" ); } @@ -773,13 +751,11 @@ static void packEBytes( bool isSubFormatProvided = false; bool isSRConfigProvided = false; -#ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP_SUBFORMAT subFormat = hPack->requests[IVAS_REQUEST_SUBFORMAT].subFormatType; IVAS_RTP_SPLITRENDER srConfig = hPack->requests[IVAS_REQUEST_SR_CONFIG].srConfig; isSubFormatProvided = ( subFormat != IVAS_SUBFMT_NO_REQ ); isSRConfigProvided = srConfig.valid; -#endif /* Initial E-Byte only sent if either bitrate requested or subsequent E-byte is requested */ if ( !( ( bitrate > 0 ) || isBandwidthProvided || isFormatProvided || @@ -821,7 +797,6 @@ static void packEBytes( uint8_t fmtEByte = ( EBYTE_FORMAT_REQUEST | ( (uint8_t) format & MASK_3BIT ) ); eByte[nByte++] = isSubFormatProvided ? EBYTE_SUBFORMAT_REQUEST : fmtEByte; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( isSubFormatProvided && nByte < maxNumEBytes ) { eByte[nByte++] = ( (uint8_t) subFormat & MASK_6BIT ); /* Requested Coded subFormat */ @@ -833,7 +808,6 @@ static void packEBytes( ( (uint8_t) srConfig.diegetic << 3 ) | ( (uint8_t) srConfig.yaw << 2 ) | ( (uint8_t) srConfig.pitch << 1 ) | ( (uint8_t) srConfig.roll << 0 ); } -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ } /* Final E-byte is the PI Indicator E-Byte */ @@ -846,22 +820,17 @@ static void packEBytes( } -#ifdef RTP_S4_251135_CR26253_0016_REV1 static ivas_error getSRToCByte( const IVAS_RTP_SR_INFO *srInfo, /* i : Split Rendering Info */ uint8_t *tocByte /* o : toc byte 2 */ ) { -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE uint8_t bitIdx, codecId, digetic, codecFrameSize; if ( srInfo->codecFrameSizeMs != 5 && srInfo->codecFrameSizeMs != 10 && srInfo->codecFrameSizeMs != 20 ) { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Unsupported codec framesize for SR provided" ); } -#else - uint8_t bitIdx, codecId, digetic; -#endif if ( srInfo->bitrateKbps < 256000 || srInfo->bitrateKbps > 512000 ) { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Unsupported bitrate for SR" ); @@ -871,16 +840,11 @@ static ivas_error getSRToCByte( codecId = (uint8_t) srInfo->codec; digetic = srInfo->diegetic ? 1 : 0; -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE codecFrameSize = ( srInfo->codecFrameSizeMs == 20 ) ? 3 : (uint8_t) ( srInfo->codecFrameSizeMs / 5 ); *tocByte = ( digetic << 6 ) | ( codecId << 5 ) | ( bitIdx << 3 ) | ( codecFrameSize << 1 ); -#else - *tocByte = ( digetic << 6 ) | ( codecId << 5 ) | ( bitIdx << 3 ); -#endif return IVAS_ERR_OK; } -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ static void addPackedPiDataToFrame( PIDATA_FRAME *piDataFrm, const PIDATA_PACKED *packedPiData, uint32_t piDataType ) { @@ -905,11 +869,9 @@ static void addPackedPiDataToFrame( PIDATA_FRAME *piDataFrm, const PIDATA_PACKED } ivas_error IVAS_RTP_PACK_PushFrame( - IVAS_RTP_PACK_HANDLE hPack, /* i/o : IVAS rtp packer handle */ - IVAS_RTP_CODEC codecId, /* i : Codec type (IVAS/EVS) */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 + IVAS_RTP_PACK_HANDLE hPack, /* i/o : IVAS rtp packer handle */ + IVAS_RTP_CODEC codecId, /* i : Codec type (IVAS/EVS) */ const IVAS_RTP_SR_INFO *srInfo, /* i : Split Rendering Info */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ const IVAS_DATA_BUFFER *frameBuffer /* i : packed frame bitstream for IVAS/EVS */ ) { @@ -917,9 +879,7 @@ ivas_error IVAS_RTP_PACK_PushFrame( uint32_t bitrate = 0; uint32_t frameLengthInBits = 0; uint8_t tocByte = 0; -#ifdef RTP_S4_251135_CR26253_0016_REV1 uint8_t tocByte1 = 0; -#endif FRAME_NODE *node = NULL; PIDATA_FRAME *piDataFrame = &hPack->piDataCache; uint32_t piDataType = 0; @@ -929,7 +889,6 @@ ivas_error IVAS_RTP_PACK_PushFrame( /* Indicates a NO_DATA_FRAME in case of DTX mode */ tocByte = ( hPack->amrwbIOMode ) ? TOC_INDICATE_NO_DATA_AMRWB : TOC_INDICATE_NO_DATA; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 else if ( srInfo != NULL && srInfo->valid ) { tocByte = TOC_INDICATE_SR; @@ -937,7 +896,6 @@ ivas_error IVAS_RTP_PACK_PushFrame( error = getSRToCByte( srInfo, &tocByte1 ); ERR_CHECK_RETURN( error ); } -#endif else { error = getBitrateFromCodecAndFrameSize( codecId, frameBuffer->length, &bitrate, &frameLengthInBits, &tocByte, &hPack->amrwbIOMode ); @@ -952,12 +910,10 @@ ivas_error IVAS_RTP_PACK_PushFrame( /* Set ToC byte & frame */ node->toc[node->tocNumBytes++] = tocByte; -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( srInfo != NULL && srInfo->valid ) { node->toc[node->tocNumBytes++] = tocByte1; } -#endif node->auNumBits = frameLengthInBits; if ( frameBuffer != NULL ) @@ -1097,12 +1053,10 @@ ivas_error IVAS_RTP_PACK_GetPayload( uint8_t fBit = ( n != ( numFrame - 1 ) ) ? TOC_HEADER_FOLLOWS : 0; /* Next ToC present */ WRITE_BYTE_PAYLOAD_OR_EXIT( payload, ( node->toc[0] | fBit ) ); -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( node->tocNumBytes == 2 ) { WRITE_BYTE_PAYLOAD_OR_EXIT( payload, node->toc[1] ); } -#endif } /* Frame Data */ @@ -1366,11 +1320,7 @@ static uint32_t parseSubsequentEByte( const IVAS_DATA_BUFFER *payload, uint32_t while ( nBytes < payload->length ) { uint8_t byte = payload->buffer[nBytes]; -#ifdef RTP_S4_251135_CR26253_0016_REV1 uint8_t ET = ( byte & ( ~MASK_4BIT ) ); -#else - uint8_t ET = ( byte & ( ~MASK_3BIT ) ); -#endif if ( ( byte & EBYTE_TOC_HEADER_BIT ) == 0 ) { @@ -1388,7 +1338,6 @@ static uint32_t parseSubsequentEByte( const IVAS_DATA_BUFFER *payload, uint32_t break; case EBYTE_FORMAT_REQUEST: /* Format Request */ { -#ifdef RTP_S4_251135_CR26253_0016_REV1 bool S = ( byte >> 3 ) & MASK_1BIT; if ( S ) { @@ -1399,14 +1348,12 @@ static uint32_t parseSubsequentEByte( const IVAS_DATA_BUFFER *payload, uint32_t requests[IVAS_REQUEST_SUBFORMAT].subFormatType = byte & MASK_6BIT; } } -#endif requests[IVAS_REQUEST_FORMAT].formatType = byte & MASK_3BIT; } break; case EBYTE_PI_INDICATOR: /* PI Indication */ *piDataIndicated = true; break; -#ifdef RTP_S4_251135_CR26253_0016_REV1 case EBYTE_SR_REQUEST: /* Split Rendering Request */ { IVAS_RTP_SPLITRENDER *srConfig = &requests[IVAS_REQUEST_SR_CONFIG].srConfig; @@ -1417,7 +1364,6 @@ static uint32_t parseSubsequentEByte( const IVAS_DATA_BUFFER *payload, uint32_t srConfig->valid = true; } break; -#endif default: /* Reserved for future use - unhandled atm */ break; } @@ -1426,13 +1372,7 @@ static uint32_t parseSubsequentEByte( const IVAS_DATA_BUFFER *payload, uint32_t return nBytes; } -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 -static ivas_error parseToCByte( const IVAS_DATA_BUFFER *payload, uint32_t *numBytes, uint32_t *numFrames, TOC_INFO *toc, uint32_t maxNumberOfToCBytes, uint32_t srCodecFrameSizeMs ) -#endif -#else static ivas_error parseToCByte( const IVAS_DATA_BUFFER *payload, uint32_t *numBytes, uint32_t *numFrames, TOC_INFO *toc, uint32_t maxNumberOfToCBytes ) -#endif { bool headerFollows = true; uint32_t nBytes = *numBytes; @@ -1485,14 +1425,11 @@ static ivas_error parseToCByte( const IVAS_DATA_BUFFER *payload, uint32_t *numBy toc->codecId = IVAS_RTP_IVAS; if ( BR == 14 ) { -#ifdef RTP_S4_251135_CR26253_0016_REV1 /* Read Unconditional SR-ToC byte */ if ( nBytes < payload->length ) { uint8_t SR_BR; -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE static const uint8_t codecFrameSizeMap[4] = { 0, 5, 10, 20 }; -#endif byte = payload->buffer[nBytes++]; SR_BR = ( byte >> 3 ) & MASK_2BIT; if ( SR_BR == 0 ) @@ -1503,21 +1440,13 @@ static ivas_error parseToCByte( const IVAS_DATA_BUFFER *payload, uint32_t *numBy toc->srInfo.diegetic = ( byte >> 6 ) & MASK_1BIT; toc->srInfo.codec = IVAS_SR_TRANSPORT_LCLD + ( ( byte >> 5 ) & MASK_1BIT ); toc->srInfo.bitrateKbps = ( SR_BR + 1 ) * 128000u; -#ifdef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE toc->srInfo.codecFrameSizeMs = codecFrameSizeMap[( byte >> 1 ) & MASK_2BIT]; toc->auNumBits = toc->srInfo.bitrateKbps * toc->srInfo.codecFrameSizeMs / 1000; -#else - toc->auNumBits = toc->srInfo.bitrateKbps * srCodecFrameSizeMs / 1000; -#endif } else { return IVAS_ERROR( IVAS_ERR_RTP_UNDERFLOW, "Underflow during ToC SR byte" ); } -#else - /* Reserved bit not expected */ - return IVAS_ERROR( IVAS_ERR_RTP_UNSUPPORTED_FRAME, "Reserved BR idx reported in ToC" ); -#endif } else { @@ -1586,7 +1515,6 @@ static ivas_error parsePIData( IVAS_RTP_UNPACK_HANDLE hUnpack, uint32_t rtpTimes PM = ( piHeader0 & ( ~MASK_5BIT ) ) & MASK_7BIT; /* PI Marker Bits */ piDataType = ( piHeader0 & MASK_5BIT ); -#ifdef RTP_UPDATES_SA4_134 do { byte = payload->buffer[nBytes++]; @@ -1597,17 +1525,6 @@ static ivas_error parsePIData( IVAS_RTP_UNPACK_HANDLE hUnpack, uint32_t rtpTimes } isFirstPiSize = false; } while ( byte == 255 || piSize == 32 ); -#else - do - { - byte = payload->buffer[nBytes++]; - piSize += byte; - if ( nBytes >= payload->length ) - { - return IVAS_ERROR( IVAS_ERR_RTP_UNDERFLOW, "Underflow during reading piSize" ); - } - } while ( byte == 255 ); -#endif if ( piDataType == IVAS_PI_NO_DATA ) { @@ -1705,13 +1622,7 @@ ivas_error IVAS_RTP_UNPACK_PushPayload( /* Unpack the ToC Bytes => Extract number of frames in packet */ -#ifndef RTP_SR_CODEC_FRAME_SIZE_IN_TOC_BYTE -#ifdef RTP_S4_251135_CR26253_0016_REV1 - error = parseToCByte( payload, &nBytes, &numFrames, toc, sizeof( toc ) / sizeof( toc[0] ), hUnpack->initConfig.srCodecFrameSizeMs ); -#endif -#else error = parseToCByte( payload, &nBytes, &numFrames, toc, sizeof( toc ) / sizeof( toc[0] ) ); -#endif ERR_CHECK_RETURN( error ); /* Read frame bits */ @@ -1823,15 +1734,13 @@ ivas_error IVAS_RTP_UNPACK_GetRequest( ivas_error IVAS_RTP_UNPACK_PullFrame( IVAS_RTP_UNPACK_HANDLE hUnpack, /* i/o : IVAS rtp unpacker handle */ IVAS_RTP_CODEC *receivedCodecId, /* o : Codec type (IVAS/EVS) */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - IVAS_RTP_SR_INFO *srInfo, /* o : Split Rendering Info */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ - IVAS_DATA_BUFFER *frameBuffer, /* o : packed frame bitstream for IVAS/EVS */ - int16_t *frameSizeInBits, /* o : exact frame size in bits (AMRWB IO) */ - uint32_t *timestamp, /* o : timestamp in RTP Clock @ 16KHz */ - uint16_t *sequenceNumber, /* o : sequence number from rtp header */ - bool *speechLostIndicated, /* o : Is current frame indicated as Lost */ - bool *isAMRWB_IOmode /* o : Is AMRWB_IO mode EVS frame */ + IVAS_RTP_SR_INFO *srInfo, /* o : Split Rendering Info */ + IVAS_DATA_BUFFER *frameBuffer, /* o : packed frame bitstream for IVAS/EVS */ + int16_t *frameSizeInBits, /* o : exact frame size in bits (AMRWB IO) */ + uint32_t *timestamp, /* o : timestamp in RTP Clock @ 16KHz */ + uint16_t *sequenceNumber, /* o : sequence number from rtp header */ + bool *speechLostIndicated, /* o : Is current frame indicated as Lost */ + bool *isAMRWB_IOmode /* o : Is AMRWB_IO mode EVS frame */ ) { size_t length = 0; @@ -1860,12 +1769,10 @@ ivas_error IVAS_RTP_UNPACK_PullFrame( *receivedCodecId = node->toc.codecId; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 if ( srInfo != NULL ) { *srInfo = node->toc.srInfo; } -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ if ( timestamp != NULL ) { @@ -1920,5 +1827,3 @@ ivas_error IVAS_RTP_UNPACK_PullNextPiData( return BPOOL_FreeBuffer( hUnpack->piDataPool, node ); } - -#endif /* IVAS_RTPDUMP */ diff --git a/lib_util/ivas_rtp_pi_data.c b/lib_util/ivas_rtp_pi_data.c index 10adfc7ba6..250ea9c72c 100644 --- a/lib_util/ivas_rtp_pi_data.c +++ b/lib_util/ivas_rtp_pi_data.c @@ -32,10 +32,7 @@ #include "ivas_error_utils.h" #include "ivas_rtp_internal.h" -#ifdef REVERSE_ISM_PI_DATA #include -#endif -#ifdef ISM_PI_DATA #include #ifndef min @@ -46,9 +43,6 @@ #define max( x, y ) ( ( x ) > ( y ) ? ( x ) : ( y ) ) #endif -#endif - -#ifdef IVAS_RTPDUMP /* Generic PI data packing/unpacking functions */ typedef ivas_error ( *PACK_PI_FN )( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ); @@ -79,7 +73,6 @@ static int16_t ivasPayload_convertToQ15( float value ) return (int16_t) ( value ); } -#ifdef RTP_UPDATES_SA4_134 /*-----------------------------------------------------------------------* * ivasPayload_convertToQ10() * @@ -106,7 +99,6 @@ static int16_t ivasPayload_convertToQ9( float value ) return (int16_t) ( value ); } -#ifdef COMPACT_ORIENTATION_PI_DATA static uint32_t packQuaternion( IVAS_QUATERNION orientation, uint8_t *buffer ) { uint32_t nBytes = 0; @@ -193,22 +185,6 @@ static ivas_error unpackQuaternion( const uint8_t *buffer, IVAS_QUATERNION *orie return IVAS_ERR_OK; } -#else - -/*-----------------------------------------------------------------------* - * ivasPayload_convertToQ7() - * - * Convert a float value into a Q7 encoded value. - *-----------------------------------------------------------------------*/ -static int16_t ivasPayload_convertToQ7( float value ) -{ - value = ( value * 128.0f ); - value = value > +128.0f ? +128.0f : value; - value = value < -128.0f ? -128.0f : value; - return (int16_t) ( value ); -} -#endif -#endif static ivas_error packUnsupportedData( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { @@ -274,53 +250,25 @@ static ivas_error packOrientation( const IVAS_PIDATA_GENERIC *piData, uint8_t *b return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect size in Orientation PI data" ); } - if ( ( piData->piDataType != IVAS_PI_SCENE_ORIENTATION ) && ( piData->piDataType != IVAS_PI_DEVICE_ORIENTATION_COMPENSATED ) && ( piData->piDataType != IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED ) -#ifdef RTP_S4_251135_CR26253_0016_REV1 - && ( piData->piDataType != IVAS_PI_PLAYBACK_DEVICE_ORIENTATION ) && ( piData->piDataType != IVAS_PI_HEAD_ORIENTATION ) -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ - ) + if ( ( piData->piDataType != IVAS_PI_SCENE_ORIENTATION ) && ( piData->piDataType != IVAS_PI_DEVICE_ORIENTATION_COMPENSATED ) && ( piData->piDataType != IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED ) && ( piData->piDataType != IVAS_PI_PLAYBACK_DEVICE_ORIENTATION ) && ( piData->piDataType != IVAS_PI_HEAD_ORIENTATION ) ) { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect PI ID in Orientation PI data" ); } -#ifdef RTP_UPDATES_SA4_134 /* Orientation data is 4 bytes, header is 2 bytes */ if ( maxDataBytes < 4 + 2 ) { return IVAS_ERROR( IVAS_ERR_RTP_INSUFFICIENT_OUTPUT_SIZE, "Insufficient space to pack Orientation PI data" ); } -#else - /* Orientation data is 8 bytes, header is 2 bytes */ - if ( maxDataBytes < 8 + 2 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_INSUFFICIENT_OUTPUT_SIZE, "Insufficient space to pack Orientation PI data" ); - } -#endif buffer[nBytes++] = ( orientation->piDataType & MASK_5BIT ); /* PF/PM populated during final packing */ -#ifdef RTP_UPDATES_SA4_134 buffer[nBytes++] = 4; -#ifdef COMPACT_ORIENTATION_PI_DATA nBytes += packQuaternion( orientation->orientation, &buffer[nBytes] ); -#else - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation.w ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation.x ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation.y ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation.z ); -#endif -#else - buffer[nBytes++] = 8; - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation.w ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation.x ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation.y ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation.z ) ); -#endif *nBytesWritten = nBytes; return IVAS_ERR_OK; } -#ifdef ISM_PI_DATA static ivas_error packISMOrientation( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0; @@ -337,54 +285,26 @@ static ivas_error packISMOrientation( const IVAS_PIDATA_GENERIC *piData, uint8_t { return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect PI ID in Orientation PI data" ); } -#ifdef RTP_UPDATES_SA4_134 /* Orientation data is 4 bytes, header is 2 bytes */ if ( maxDataBytes < 4 * IVAS_MAX_NUM_OBJECTS + 2 ) { return IVAS_ERROR( IVAS_ERR_RTP_INSUFFICIENT_OUTPUT_SIZE, "Insufficient space to pack Orientation PI data" ); } -#else - /* Orientation data is 8 bytes, header is 2 bytes */ - if ( maxDataBytes < 8 * IVAS_MAX_NUM_OBJECTS + 2 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_INSUFFICIENT_OUTPUT_SIZE, "Insufficient space to pack Orientation PI data" ); - } -#endif buffer[nBytes++] = ( orientation->piDataType & MASK_5BIT ); /* PF/PM populated during final packing */ -#ifdef RTP_UPDATES_SA4_134 buffer[nBytes++] = (uint8_t) orientation->numObjects * 4; for ( n = 0; n < orientation->numObjects; n++ ) { -#ifdef COMPACT_ORIENTATION_PI_DATA nBytes += packQuaternion( orientation->orientation[n], &buffer[nBytes] ); -#else - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation[n].w ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation[n].x ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation[n].y ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( orientation->orientation[n].z ); -#endif - } -#else - buffer[nBytes++] = (uint8_t) orientation->numObjects * 8; - for ( n = 0; n < orientation->numObjects; n++ ) - { - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation[n].w ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation[n].x ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation[n].y ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( orientation->orientation[n].z ) ); } -#endif *nBytesWritten = nBytes; return IVAS_ERR_OK; } -#endif static ivas_error unpackOrientation( const uint8_t *buffer, uint32_t numDataBytes, IVAS_PIDATA_GENERIC *piData ) { IVAS_PIDATA_ORIENTATION *orientation = (IVAS_PIDATA_ORIENTATION *) piData; -#ifdef RTP_UPDATES_SA4_134 /* Orientation data is 4 bytes */ if ( numDataBytes != 4 ) { @@ -392,37 +312,14 @@ static ivas_error unpackOrientation( const uint8_t *buffer, uint32_t numDataByte } piData->size = sizeof( IVAS_PIDATA_ORIENTATION ); -#ifdef COMPACT_ORIENTATION_PI_DATA unpackQuaternion( buffer, &( orientation->orientation ) ); -#else - orientation->orientation.w = FLOAT_FROM_Q7( (int8_t) buffer[0] ); - orientation->orientation.x = FLOAT_FROM_Q7( (int8_t) buffer[1] ); - orientation->orientation.y = FLOAT_FROM_Q7( (int8_t) buffer[2] ); - orientation->orientation.z = FLOAT_FROM_Q7( (int8_t) buffer[3] ); -#endif -#else - /* Orientation data is 8 bytes */ - if ( numDataBytes != 8 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_UNPACK_PI_DATA, "Incorrect size to unpack Orientation PI data" ); - } - - piData->size = sizeof( IVAS_PIDATA_ORIENTATION ); - - orientation->orientation.w = FLOAT_FROM_Q15( readInt16( &buffer[0] ) ); - orientation->orientation.x = FLOAT_FROM_Q15( readInt16( &buffer[2] ) ); - orientation->orientation.y = FLOAT_FROM_Q15( readInt16( &buffer[4] ) ); - orientation->orientation.z = FLOAT_FROM_Q15( readInt16( &buffer[6] ) ); -#endif return IVAS_ERR_OK; } -#ifdef ISM_PI_DATA static ivas_error unpackISMOrientation( const uint8_t *buffer, uint32_t numDataBytes, IVAS_PIDATA_GENERIC *piData ) { IVAS_PIDATA_ISM_ORIENTATION *ism_orientation = (IVAS_PIDATA_ISM_ORIENTATION *) piData; -#ifdef RTP_UPDATES_SA4_134 /* Orientation data is 4 bytes */ uint16_t n; if ( numDataBytes % 4 != 0 ) @@ -435,34 +332,8 @@ static ivas_error unpackISMOrientation( const uint8_t *buffer, uint32_t numDataB for ( n = 0; n < ism_orientation->numObjects; n++ ) { -#ifdef COMPACT_ORIENTATION_PI_DATA unpackQuaternion( &buffer[4 * n], &( ism_orientation->orientation[n] ) ); -#else - ism_orientation->orientation[n].w = FLOAT_FROM_Q7( (int8_t) buffer[4 * n] ); - ism_orientation->orientation[n].x = FLOAT_FROM_Q7( (int8_t) buffer[4 * n + 1] ); - ism_orientation->orientation[n].y = FLOAT_FROM_Q7( (int8_t) buffer[4 * n + 2] ); - ism_orientation->orientation[n].z = FLOAT_FROM_Q7( (int8_t) buffer[4 * n + 3] ); -#endif - } -#else - /* Orientation data is 8 bytes */ - uint16_t n; - if ( numDataBytes % 8 != 0 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_UNPACK_PI_DATA, "Incorrect size to unpack Orientation PI data" ); - } - - ism_orientation->size = sizeof( IVAS_PIDATA_ISM_ORIENTATION ); - ism_orientation->numObjects = (uint16_t) numDataBytes / 8; - - for ( n = 0; n < ism_orientation->numObjects; n++ ) - { - ism_orientation->orientation[n].w = FLOAT_FROM_Q15( readInt16( &buffer[8 * n] ) ); - ism_orientation->orientation[n].x = FLOAT_FROM_Q15( readInt16( &buffer[8 * n + 2] ) ); - ism_orientation->orientation[n].y = FLOAT_FROM_Q15( readInt16( &buffer[8 * n + 4] ) ); - ism_orientation->orientation[n].z = FLOAT_FROM_Q15( readInt16( &buffer[8 * n + 6] ) ); } -#endif for ( ; n < IVAS_MAX_NUM_OBJECTS; n++ ) { ism_orientation->orientation[n].w = 0.0f; @@ -473,7 +344,6 @@ static ivas_error unpackISMOrientation( const uint8_t *buffer, uint32_t numDataB return IVAS_ERR_OK; } -#endif static uint32_t getIndexTable( const float *table, uint32_t tableLength, float value ) { @@ -621,7 +491,6 @@ static ivas_error unpackAcousticEnvironment( const uint8_t *buffer, uint32_t num return IVAS_ERR_OK; } -#ifdef RTP_S4_251135_CR26253_0016_REV1 static ivas_error packAudioDescription( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t n; @@ -729,7 +598,6 @@ static ivas_error unpackDynamicSuppression( const uint8_t *buffer, uint32_t numD return IVAS_ERR_OK; } -#ifdef REVERSE_ISM_PI_DATA static ivas_error packPosition( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0; @@ -778,59 +646,7 @@ static ivas_error unpackPosition( const uint8_t *buffer, uint32_t numDataBytes, position->position.z = FLOAT_FROM_Q15( readInt16( &buffer[4] ) ) * MAX_PI_POSITION_METERS; return IVAS_ERR_OK; } -#else -static ivas_error packListenerPosition( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) -{ - uint32_t nBytes = 0; - const IVAS_PIDATA_LISTENER_POSITION *listener = (const IVAS_PIDATA_LISTENER_POSITION *) piData; - - *nBytesWritten = 0; - - if ( piData->size != sizeof( IVAS_PIDATA_LISTENER_POSITION ) ) - { - return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect size in LISTENER POSITION PI data" ); - } - - if ( piData->piDataType != IVAS_PI_LISTENER_POSITION ) - { - return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect PI ID in LISTENER POSITION PI data" ); - } - - /* Position data is 6 bytes, header is 2 bytes */ - if ( maxDataBytes < 6 + 2 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_INSUFFICIENT_OUTPUT_SIZE, "Insufficient space to pack LISTENER POSITION PI data" ); - } - - buffer[nBytes++] = ( listener->piDataType & MASK_5BIT ); /* PF/PM populated during final packing */ - buffer[nBytes++] = 6; - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( listener->position.x / MAX_PI_POSITION_METERS ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( listener->position.y / MAX_PI_POSITION_METERS ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( listener->position.z / MAX_PI_POSITION_METERS ) ); - *nBytesWritten = nBytes; - return IVAS_ERR_OK; -} - -static ivas_error unpackListenerPosition( const uint8_t *buffer, uint32_t numDataBytes, IVAS_PIDATA_GENERIC *piData ) -{ - IVAS_PIDATA_LISTENER_POSITION *listener = (IVAS_PIDATA_LISTENER_POSITION *) piData; - - /* Position data is 6 bytes */ - if ( numDataBytes != 6 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_UNPACK_PI_DATA, "Incorrect size to unpack LISTENER POSITION PI data" ); - } - - listener->size = sizeof( IVAS_PIDATA_LISTENER_POSITION ); - listener->piDataType = IVAS_PI_LISTENER_POSITION; - listener->position.x = FLOAT_FROM_Q15( readInt16( &buffer[0] ) ) * MAX_PI_POSITION_METERS; - listener->position.y = FLOAT_FROM_Q15( readInt16( &buffer[2] ) ) * MAX_PI_POSITION_METERS; - listener->position.z = FLOAT_FROM_Q15( readInt16( &buffer[4] ) ) * MAX_PI_POSITION_METERS; - return IVAS_ERR_OK; -} -#endif -#ifdef RTP_UPDATES_SA4_134 static ivas_error packPositionCompact( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0; @@ -892,9 +708,7 @@ static ivas_error unpackPositionCompact( const uint8_t *buffer, uint32_t numData return IVAS_ERR_OK; } -#endif -#ifdef ISM_PI_DATA static ivas_error packISMPosition( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0, n; @@ -953,9 +767,7 @@ static ivas_error unpackISMPosition( const uint8_t *buffer, uint32_t numDataByte } return IVAS_ERR_OK; } -#endif -#ifdef RTP_UPDATES_SA4_134 static ivas_error packISMPositionCompact( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0, n; @@ -1023,7 +835,6 @@ static ivas_error unpackISMPositionCompact( const uint8_t *buffer, uint32_t numD } return IVAS_ERR_OK; } -#endif static ivas_error packDiegetic( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { @@ -1102,7 +913,6 @@ static ivas_error packAudioFocusCommon( const IVAS_PIDATA_GENERIC *piData, uint8 return IVAS_ERROR( IVAS_ERR_WRONG_PARAMS, "Incorrect size in PI data of type Audio Focus" ); } -#ifdef RTP_UPDATES_SA4_134 if ( audioFocus->availDirection && audioFocus->availLevel ) { packedSize = 5; @@ -1111,16 +921,6 @@ static ivas_error packAudioFocusCommon( const IVAS_PIDATA_GENERIC *piData, uint8 { packedSize = 4; } -#else - if ( audioFocus->availDirection && audioFocus->availLevel ) - { - packedSize = 9; - } - else if ( audioFocus->availDirection ) - { - packedSize = 8; - } -#endif else if ( audioFocus->availLevel ) { packedSize = 1; @@ -1139,35 +939,14 @@ static ivas_error packAudioFocusCommon( const IVAS_PIDATA_GENERIC *piData, uint8 buffer[nBytes++] = ( audioFocus->piDataType & MASK_5BIT ); /* PF/PM populated during final packing */ buffer[nBytes++] = packedSize; -#ifdef RTP_UPDATES_SA4_134 if ( packedSize == 5 || packedSize == 4 ) { -#ifdef COMPACT_ORIENTATION_PI_DATA nBytes += packQuaternion( audioFocus->direction, &buffer[nBytes] ); -#else - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( audioFocus->direction.w ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( audioFocus->direction.x ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( audioFocus->direction.y ); - buffer[nBytes++] = (uint8_t) ivasPayload_convertToQ7( audioFocus->direction.z ); -#endif } if ( packedSize == 5 || packedSize == 1 ) { buffer[nBytes++] = ( (uint8_t) audioFocus->flvl & MASK_4BIT ) << 4; } -#else - if ( packedSize == 9 || packedSize == 8 ) - { - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( audioFocus->direction.w ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( audioFocus->direction.x ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( audioFocus->direction.y ) ); - nBytes = writeInt16( buffer, nBytes, ivasPayload_convertToQ15( audioFocus->direction.z ) ); - } - if ( packedSize == 9 || packedSize == 1 ) - { - buffer[nBytes++] = ( (uint8_t) audioFocus->flvl & MASK_4BIT ) << 4; - } -#endif *nBytesWritten = nBytes; return IVAS_ERR_OK; @@ -1177,7 +956,6 @@ static ivas_error unpackAudioFocusCommon( const uint8_t *buffer, uint32_t numDat { IVAS_PIDATA_AUDIO_FOCUS *audioFocus = (IVAS_PIDATA_AUDIO_FOCUS *) piData; -#ifdef RTP_UPDATES_SA4_134 /* Audio Focus data is either 1, 4 or 5 bytes */ if ( numDataBytes != 1 && numDataBytes != 4 && numDataBytes != 5 ) { @@ -1194,52 +972,16 @@ static ivas_error unpackAudioFocusCommon( const uint8_t *buffer, uint32_t numDat } else { -#ifdef COMPACT_ORIENTATION_PI_DATA unpackQuaternion( buffer, &( audioFocus->direction ) ); -#else - audioFocus->direction.w = FLOAT_FROM_Q7( (int8_t) buffer[0] ); - audioFocus->direction.x = FLOAT_FROM_Q7( (int8_t) buffer[1] ); - audioFocus->direction.y = FLOAT_FROM_Q7( (int8_t) buffer[2] ); - audioFocus->direction.z = FLOAT_FROM_Q7( (int8_t) buffer[3] ); -#endif if ( numDataBytes == 5 ) { audioFocus->flvl = ( buffer[4] >> 4 ); } } -#else - /* Audio Focus data is either 1, 8 or 9 bytes */ - if ( numDataBytes != 1 && numDataBytes != 8 && numDataBytes != 9 ) - { - return IVAS_ERROR( IVAS_ERR_RTP_UNPACK_PI_DATA, "Incorrect size to unpack PI data of type Audio Focus" ); - } - - piData->size = sizeof( IVAS_PIDATA_AUDIO_FOCUS ); - audioFocus->availDirection = ( numDataBytes >= 8 ); - audioFocus->availLevel = ( numDataBytes == 1 || numDataBytes == 9 ); - - if ( numDataBytes == 1 ) - { - audioFocus->flvl = ( buffer[0] >> 4 ); - } - else - { - audioFocus->direction.w = FLOAT_FROM_Q15( readInt16( &buffer[0] ) ); - audioFocus->direction.x = FLOAT_FROM_Q15( readInt16( &buffer[2] ) ); - audioFocus->direction.y = FLOAT_FROM_Q15( readInt16( &buffer[4] ) ); - audioFocus->direction.z = FLOAT_FROM_Q15( readInt16( &buffer[6] ) ); - - if ( numDataBytes == 9 ) - { - audioFocus->flvl = ( buffer[8] >> 4 ); - } - } -#endif return IVAS_ERR_OK; } -#ifdef ISM_PI_DATA static ivas_error packISMNum( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0; @@ -1350,8 +1092,6 @@ static ivas_error unpackISMID( const uint8_t *buffer, uint32_t numDataBytes, IVA return IVAS_ERR_OK; } -#endif -#ifdef PI_LATENCY static ivas_error packPiLatency( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t typeBits; @@ -1417,8 +1157,6 @@ static ivas_error unpackPiLatency( const uint8_t *buffer, uint32_t numDataBytes, return IVAS_ERR_OK; } -#endif -#ifdef ISM_PI_DATA static ivas_error packISMGain( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0, n, idx; @@ -1676,9 +1414,7 @@ static ivas_error unpackISMDirectivity( const uint8_t *buffer, uint32_t numDataB } return IVAS_ERR_OK; } -#endif -#ifdef REVERSE_ISM_PI_DATA static ivas_error packReverseISMID( const IVAS_PIDATA_GENERIC *piData, uint8_t *buffer, uint32_t maxDataBytes, uint32_t *nBytesWritten ) { uint32_t nBytes = 0; @@ -1859,223 +1595,78 @@ static ivas_error unpackReverseISMDirection( const uint8_t *buffer, uint32_t num return IVAS_ERR_OK; } -#endif -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ static const PACK_PI_FN packPiDataFuntions[IVAS_PI_MAX_ID] = { - packOrientation, /* SCENE_ORIENTATION */ - packOrientation, /* DEVICE_ORIENTATION_COMPENSATED */ - packOrientation, /* DEVICE_ORIENTATION_UNCOMPENSATED */ - packAcousticEnvironment, /* ACOUSTIC_ENVIRONMENT */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - packAudioDescription, /* AUDIO_DESCRIPTION */ -#else - packUnsupportedData, /* AUDIO_DESCRIPTION */ -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ -#ifdef ISM_PI_DATA - packISMNum, /* ISM_NUM */ - packISMID, /* ISM_ID */ - packISMGain, /* ISM_GAIN */ - packISMOrientation, /* ISM_ORIENTATION */ - packISMPosition, /* ISM_POSITION */ -#ifdef RTP_UPDATES_SA4_134 - packISMPositionCompact, /* ISM_POSITION_COMPACT */ -#endif + packOrientation, /* SCENE_ORIENTATION */ + packOrientation, /* DEVICE_ORIENTATION_COMPENSATED */ + packOrientation, /* DEVICE_ORIENTATION_UNCOMPENSATED */ + packAcousticEnvironment, /* ACOUSTIC_ENVIRONMENT */ + packAudioDescription, /* AUDIO_DESCRIPTION */ + packISMNum, /* ISM_NUM */ + packISMID, /* ISM_ID */ + packISMGain, /* ISM_GAIN */ + packISMOrientation, /* ISM_ORIENTATION */ + packISMPosition, /* ISM_POSITION */ + packISMPositionCompact, /* ISM_POSITION_COMPACT */ packISMDistanceAttenuation, /* ISM_DISTANCE_ATTENUATION */ packISMDirectivity, /* ISM_DIRECTIVITY */ -#else - packUnsupportedData, /* ISM_NUM */ - packUnsupportedData, /* ISM_ID */ - packUnsupportedData, /* ISM_GAIN */ - packUnsupportedData, /* ISM_ORIENTATION */ - packUnsupportedData, /* ISM_POSITION */ - packUnsupportedData, /* ISM_DISTANCE_ATTENUATION */ - packUnsupportedData, /* ISM_DIRECTIVITY */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - packDiegetic, /* DIEGETIC_TYPE */ -#else - packUnsupportedData, /* DIEGETIC_TYPE */ -#endif -#ifdef RTP_UPDATES_SA4_134 - packDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_INDICATION */ -#else - packUnsupportedData, /* RESERVED13 */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - packAudioFocusCommon, /* AUDIO_FOCUS_INDICATION */ -#else - packUnsupportedData, /* AUDIO_FOCUS_INDICATION */ -#endif -#ifndef RTP_UPDATES_SA4_134 - packUnsupportedData, /* RESERVED15 */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - packOrientation, /* PLAYBACK_DEVICE_ORIENTATION */ - packOrientation, /* HEAD_ORIENTATION */ -#ifdef REVERSE_ISM_PI_DATA - packPosition, /* LISTENER_POSITION */ -#else - packListenerPosition, /* LISTENER_POSITION */ -#endif -#ifdef RTP_UPDATES_SA4_134 - packDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_REQUEST */ -#else - packDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION */ -#endif - packAudioFocusCommon, /* AUDIO_FOCUS_REQUEST */ -#ifdef PI_LATENCY - packPiLatency, /* PI_LATENCY */ -#else - packUnsupportedData, /* PI_LATENCY */ -#endif -#else - packUnsupportedData, /* PLAYBACK_DEVICE_ORIENTATION */ - packUnsupportedData, /* HEAD_ORIENTATION */ - packUnsupportedData, /* LISTENER_POSITION */ - packUnsupportedData, /* DYNAMIC_AUDIO_SUPPRESSION */ - packUnsupportedData, /* AUDIO_FOCUS_DIRECTION */ - packUnsupportedData, /* PI_LATENCY */ -#endif -#ifdef REVERSE_ISM_PI_DATA - packReverseISMID, /* R_ISM_ID */ - packReverseISMGain, /* R_ISM_GAIN */ -#else - packUnsupportedData, /* R_ISM_ID */ - packUnsupportedData, /* R_ISM_GAIN */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - packOrientation, /* R_ISM_ORIENTATION */ -#else - packUnsupportedData, /* R_ISM_ORIENTATION */ -#endif -#ifdef REVERSE_ISM_PI_DATA - packPosition, /* R_ISM_POSITION */ -#ifdef RTP_UPDATES_SA4_134 - packPositionCompact, /* R_ISM_POSITION_COMPACT */ -#endif - packReverseISMDirection, /* R_ISM_DIRECTION */ -#else - packUnsupportedData, /* R_ISM_POSITION */ - packUnsupportedData, /* R_ISM_DIRECTION */ -#endif - packUnsupportedData, /* RESERVED27 */ - packUnsupportedData, /* RESERVED28 */ - packUnsupportedData, /* RESERVED29 */ -#ifndef RTP_UPDATES_SA4_134 - packUnsupportedData, /* RESERVED30 */ -#endif - packNoPiData /* NO_DATA */ + packDiegetic, /* DIEGETIC_TYPE */ + packDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_INDICATION */ + packAudioFocusCommon, /* AUDIO_FOCUS_INDICATION */ + packOrientation, /* PLAYBACK_DEVICE_ORIENTATION */ + packOrientation, /* HEAD_ORIENTATION */ + packPosition, /* LISTENER_POSITION */ + packDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_REQUEST */ + packAudioFocusCommon, /* AUDIO_FOCUS_REQUEST */ + packPiLatency, /* PI_LATENCY */ + packReverseISMID, /* R_ISM_ID */ + packReverseISMGain, /* R_ISM_GAIN */ + packOrientation, /* R_ISM_ORIENTATION */ + packPosition, /* R_ISM_POSITION */ + packPositionCompact, /* R_ISM_POSITION_COMPACT */ + packReverseISMDirection, /* R_ISM_DIRECTION */ + packUnsupportedData, /* RESERVED27 */ + packUnsupportedData, /* RESERVED28 */ + packUnsupportedData, /* RESERVED29 */ + packNoPiData /* NO_DATA */ }; static const UNPACK_PI_FN unpackPiDataFuntions[IVAS_PI_MAX_ID] = { - unpackOrientation, /* SCENE_ORIENTATION */ - unpackOrientation, /* DEVICE_ORIENTATION_COMPENSATED */ - unpackOrientation, /* DEVICE_ORIENTATION_UNCOMPENSATED */ - unpackAcousticEnvironment, /* ACOUSTIC_ENVIRONMENT */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - unpackAudioDescription, /* AUDIO_DESCRIPTION */ -#else - unpackUnsupportedData, /* AUDIO_DESCRIPTION */ -#endif -#ifdef ISM_PI_DATA - unpackISMNum, /* ISM_NUM */ - unpackISMID, /* ISM_ID */ - unpackISMGain, /* ISM_GAIN */ - unpackISMOrientation, /* ISM_ORIENTATION */ - unpackISMPosition, /* ISM_POSITION */ -#ifdef RTP_UPDATES_SA4_134 - unpackISMPositionCompact, /* ISM_POSITION_COMPACT */ -#endif + unpackOrientation, /* SCENE_ORIENTATION */ + unpackOrientation, /* DEVICE_ORIENTATION_COMPENSATED */ + unpackOrientation, /* DEVICE_ORIENTATION_UNCOMPENSATED */ + unpackAcousticEnvironment, /* ACOUSTIC_ENVIRONMENT */ + unpackAudioDescription, /* AUDIO_DESCRIPTION */ + unpackISMNum, /* ISM_NUM */ + unpackISMID, /* ISM_ID */ + unpackISMGain, /* ISM_GAIN */ + unpackISMOrientation, /* ISM_ORIENTATION */ + unpackISMPosition, /* ISM_POSITION */ + unpackISMPositionCompact, /* ISM_POSITION_COMPACT */ unpackISMDistanceAttenuation, /* ISM_DISTANCE_ATTENUATION */ unpackISMDirectivity, /* ISM_DIRECTIVITY */ -#else - unpackUnsupportedData, /* ISM_NUM */ - unpackUnsupportedData, /* ISM_ID */ - unpackUnsupportedData, /* ISM_GAIN */ - unpackUnsupportedData, /* ISM_ORIENTATION */ - unpackUnsupportedData, /* ISM_POSITION */ - unpackUnsupportedData, /* ISM_DISTANCE_ATTENUATION */ - unpackUnsupportedData, /* ISM_DIRECTIVITY */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - unpackDiegetic, /* DIEGETIC_TYPE */ -#else - unpackUnsupportedData, /* DIEGETIC_TYPE */ -#endif -#ifdef RTP_UPDATES_SA4_134 - unpackDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_INDICATION */ -#else - unpackUnsupportedData, /* RESERVED13 */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - unpackAudioFocusCommon, /* AUDIO_FOCUS_INDICATION */ -#else - unpackUnsupportedData, /* AUDIO_FOCUS_INDICATION */ -#endif -#ifndef RTP_UPDATES_SA4_134 - unpackUnsupportedData, /* RESERVED15 */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - unpackOrientation, /* PLAYBACK_DEVICE_ORIENTATION */ - unpackOrientation, /* HEAD_ORIENTATION */ -#ifdef REVERSE_ISM_PI_DATA - unpackPosition, /* LISTENER_POSITION */ -#else - unpackListenerPosition, /* LISTENER_POSITION */ -#endif -#ifdef RTP_UPDATES_SA4_134 - unpackDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_REQUEST */ -#else - unpackDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION */ -#endif - unpackAudioFocusCommon, /* AUDIO_FOCUS_REQUEST */ -#ifdef PI_LATENCY - unpackPiLatency, /* PI_LATENCY */ -#else - unpackUnsupportedData, /* PI_LATENCY */ -#endif -#else - unpackUnsupportedData, /* PLAYBACK_DEVICE_ORIENTATION */ - unpackUnsupportedData, /* HEAD_ORIENTATION */ - unpackUnsupportedData, /* LISTENER_POSITION */ - unpackUnsupportedData, /* DYNAMIC_AUDIO_SUPPRESSION */ - unpackUnsupportedData, /* PI_LATENCY */ - unpackUnsupportedData, /* AUDIO_FOCUS_DIRECTION */ -#endif -#ifdef REVERSE_ISM_PI_DATA - unpackReverseISMID, /* R_ISM_ID */ - unpackReverseISMGain, /* R_ISM_GAIN */ -#else - unpackUnsupportedData, /* R_ISM_ID */ - unpackUnsupportedData, /* R_ISM_GAIN */ -#endif -#ifdef RTP_S4_251135_CR26253_0016_REV1 - unpackOrientation, /* R_ISM_ORIENTATION */ -#else - unpackUnsupportedData, /* R_ISM_ORIENTATION */ -#endif -#ifdef REVERSE_ISM_PI_DATA - unpackPosition, /* R_ISM_POSITION */ -#ifdef RTP_UPDATES_SA4_134 - unpackPositionCompact, /* R_ISM_POSITION_COMPACT */ -#endif - unpackReverseISMDirection, /* R_ISM_DIRECTION */ -#else - unpackUnsupportedData, /* R_ISM_POSITION */ - unpackUnsupportedData, /* R_ISM_DIRECTION */ -#endif - unpackUnsupportedData, /* RESERVED27 */ - unpackUnsupportedData, /* RESERVED28 */ - unpackUnsupportedData, /* RESERVED29 */ -#ifndef RTP_UPDATES_SA4_134 - unpackUnsupportedData, /* RESERVED30 */ -#endif - unpackNoPiData /* NO_DATA */ + unpackDiegetic, /* DIEGETIC_TYPE */ + unpackDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_INDICATION */ + unpackAudioFocusCommon, /* AUDIO_FOCUS_INDICATION */ + unpackOrientation, /* PLAYBACK_DEVICE_ORIENTATION */ + unpackOrientation, /* HEAD_ORIENTATION */ + unpackPosition, /* LISTENER_POSITION */ + unpackDynamicSuppression, /* DYNAMIC_AUDIO_SUPPRESSION_REQUEST */ + unpackAudioFocusCommon, /* AUDIO_FOCUS_REQUEST */ + unpackPiLatency, /* PI_LATENCY */ + unpackReverseISMID, /* R_ISM_ID */ + unpackReverseISMGain, /* R_ISM_GAIN */ + unpackOrientation, /* R_ISM_ORIENTATION */ + unpackPosition, /* R_ISM_POSITION */ + unpackPositionCompact, /* R_ISM_POSITION_COMPACT */ + unpackReverseISMDirection, /* R_ISM_DIRECTION */ + unpackUnsupportedData, /* RESERVED27 */ + unpackUnsupportedData, /* RESERVED28 */ + unpackUnsupportedData, /* RESERVED29 */ + unpackNoPiData /* NO_DATA */ }; -#ifdef RTP_UPDATES_SA4_134 static const uint32_t maxPiDataSize[IVAS_PI_MAX_ID] = { 4, /* IVAS_PI_SCENE_ORIENTATION */ 4, /* IVAS_PI_DEVICE_ORIENTATION_COMPENSATED */ @@ -2110,42 +1701,6 @@ static const uint32_t maxPiDataSize[IVAS_PI_MAX_ID] = { 0, /* IVAS_PI_RESERVED29 */ 0, /* NO_DATA */ }; -#else -static const uint32_t maxPiDataSize[IVAS_PI_MAX_ID] = { - 8, /* IVAS_PI_SCENE_ORIENTATION */ - 8, /* IVAS_PI_DEVICE_ORIENTATION_COMPENSATED */ - 8, /* IVAS_PI_DEVICE_ORIENTATION_UNCOMPENSATED */ - 8, /* IVAS_PI_ACOUSTIC_ENVIRONMENT */ - 5, /* IVAS_PI_AUDIO_DESCRIPTION */ - 1, /* IVAS_PI_ISM_NUM */ - 4, /* IVAS_PI_ISM_ID */ - 4, /* IVAS_PI_ISM_GAIN */ - 32, /* IVAS_PI_ISM_ORIENTATION */ - 24, /* IVAS_PI_ISM_POSITION */ - 12, /* IVAS_PI_ISM_DISTANCE_ATTENUATION */ - 8, /* IVAS_PI_ISM_DIRECTIVITY */ - 1, /* IVAS_PI_DIEGETIC_TYPE */ - 0, /* IVAS_PI_RESERVED13 */ - 9, /* IVAS_PI_AUDIO_FOCUS_INDICATION */ - 0, /* IVAS_PI_RESERVED15 */ - 8, /* IVAS_PI_PLAYBACK_DEVICE_ORIENTATION */ - 8, /* IVAS_PI_HEAD_ORIENTATION */ - 6, /* IVAS_PI_LISTENER_POSITION */ - 2, /* IVAS_PI_DYNAMIC_AUDIO_SUPPRESSION */ - 9, /* IVAS_PI_AUDIO_FOCUS_REQUEST */ - 4, /* IVAS_PI_PI_LATENCY */ - 1, /* IVAS_PI_R_ISM_ID */ - 1, /* IVAS_PI_R_ISM_GAIN */ - 8, /* IVAS_PI_R_ISM_ORIENTATION */ - 6, /* IVAS_PI_R_ISM_POSITION */ - 2, /* IVAS_PI_R_ISM_DIRECTION */ - 0, /* IVAS_PI_RESERVED27 */ - 0, /* IVAS_PI_RESERVED28 */ - 0, /* IVAS_PI_RESERVED29 */ - 0, /* IVAS_PI_RESERVED30 */ - 0, /* IVAS_PI_NO_DATA = 31 */ -}; -#endif ivas_error PI_PackData( const IVAS_PIDATA_GENERIC *piData, PIDATA_PACKED *packed, uint8_t pmBits ) { @@ -2205,5 +1760,3 @@ const float mapRoomDims[1u << NBITS_DIM] = { const float mapAbsorbtion[1u << NBITS_ABS] = { 0.0800f, 0.1656f, 0.3430f, 0.7101f }; - -#endif /* IVAS_RTPDUMP */ diff --git a/lib_util/ivas_rtp_pi_data.h b/lib_util/ivas_rtp_pi_data.h index fa319c6b2e..4b2d8e927a 100644 --- a/lib_util/ivas_rtp_pi_data.h +++ b/lib_util/ivas_rtp_pi_data.h @@ -35,43 +35,34 @@ #include "common_api_types.h" -#ifdef IVAS_RTPDUMP #define IVAS_PI_MAX_DATA_SIZE ( 32 + 2 ) /* max packed PI data bytes + pi header bytes */ -#ifdef REVERSE_ISM_PI_DATA #define REVERSE_ISM_DIRECTION_AZIMUTH_STEP 0.703125f #define REVERSE_ISM_DIRECTION_ELEVATION_STEP 1.417322835f #define REVERSE_ISM_DIRECTION_AZIMUTH_STEP_INV 1.4222222222f #define REVERSE_ISM_DIRECTION_ELEVATION_STEP_INV 0.7055555556f -#endif /* 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 */ -#ifdef RTP_S4_251135_CR26253_0016_REV1 - 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 */ -#ifdef RTP_UPDATES_SA4_134 - IVAS_PI_ISM_POSITION_COMPACT, /* position of each object in compact representation */ -#endif + 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) */ -#ifndef RTP_UPDATES_SA4_134 - IVAS_PI_RESERVED15, /* reserved */ -#endif /* Reverse direction PI types */ IVAS_PI_PLAYBACK_DEVICE_ORIENTATION, /* orientation of the playback device in quaternions */ @@ -84,19 +75,13 @@ typedef enum 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 */ -#ifdef RTP_UPDATES_SA4_134 - IVAS_PI_R_ISM_POSITION_COMPACT, /* editing request for position for received object in a compact representation*/ -#endif - IVAS_PI_R_ISM_DIRECTION, /* editing request for direction for received object */ - IVAS_PI_RESERVED27, /* reserved */ - IVAS_PI_RESERVED28, /* reserved */ - IVAS_PI_RESERVED29, /* reserved */ -#ifndef RTP_UPDATES_SA4_134 - IVAS_PI_RESERVED30, /* reserved */ -#endif -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ - IVAS_PI_NO_DATA = 31, /* Indicates an empty PI data frame */ - IVAS_PI_MAX_ID /* Max number of PI data IDs supprted */ + 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 */ @@ -141,14 +126,12 @@ typedef enum IVAS_PI_AE_NUM_BANDS /* number of ae bands */ } IVAS_PI_AE_BANDS; -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT 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; -#endif typedef enum { @@ -178,7 +161,6 @@ typedef struct float absorbCoeffs[IVAS_PI_AE_NUM_SURFACE]; /* absorption coefficients for all surfaces */ } IVAS_PIDATA_ACOUSTIC_ENV; -#ifdef RTP_S4_251135_CR26253_0016_REV1 /* Audio Description corresponding to IVAS_PI_AUDIO_DESCRIPTION * Describe the following audio decriptors per object/type :- * - audio content type is speech/music/ambiance @@ -231,44 +213,36 @@ typedef struct /* ISM ID */ typedef struct { - size_t size; /* sizeof(IVAS_PIDATA_ISM_ID) */ - uint32_t piDataType; /* IVAS_PI_ISM_ID */ -#ifdef ISM_PI_DATA - uint16_t numObjects; /* number of objects */ -#endif + 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 */ -#ifdef ISM_PI_DATA - uint16_t numObjects; /* number of objects */ -#endif + 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 */ -#ifdef ISM_PI_DATA - uint16_t numObjects; /* number of objects */ -#endif + 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 */ -#ifdef ISM_PI_DATA - uint16_t numObjects; /* number of objects */ -#endif + 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; @@ -286,11 +260,9 @@ typedef struct typedef struct { - size_t size; /* sizeof(IVAS_PIDATA_ISM_ATTENUATION) */ - uint32_t piDataType; /* IVAS_PI_ISM_DISTANCE_ATTENUATION */ -#ifdef ISM_PI_DATA - uint16_t numObjects; /* number of objects */ -#endif + 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; @@ -308,11 +280,9 @@ typedef struct typedef struct { - size_t size; /* sizeof(IVAS_PIDATA_ISM_DIRECTIVITY) */ - uint32_t piDataType; /* IVAS_PI_ISM_DIRECTIVITY */ -#ifdef ISM_PI_DATA - uint16_t numObjects; /* number of objects */ -#endif + 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; @@ -364,7 +334,6 @@ typedef struct IVAS_FLVL flvl; /* audio focus level */ } IVAS_PIDATA_AUDIO_FOCUS; -#ifdef REVERSE_ISM_PI_DATA /* Position data corresponding to any of the following pi data types :- * - IVAS_PI_LISTENER_POSITION * - IVAS_PI_R_ISM_POSITION @@ -377,15 +346,6 @@ typedef struct uint32_t piDataType; /* one of supported position data types */ IVAS_COORDINATE position; /* Position data */ } IVAS_PIDATA_POSITION; -#else -/* Listener position */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_LISTENER_POSITION) */ - uint32_t piDataType; /* IVAS_PI_LISTENER_POSITION */ - IVAS_COORDINATE position; /* Position of audio objects in ISM(s) */ -} IVAS_PIDATA_LISTENER_POSITION; -#endif /* 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 @@ -460,15 +420,6 @@ typedef struct IVAS_QUATERNION orientation; /* orientation editing request for received ISM */ } IVAS_PIDATA_ISM_EDIT_ORIENTATION; -#ifndef REVERSE_ISM_PI_DATA -/* Editing request for ISM position */ -typedef struct -{ - size_t size; /* sizeof(IVAS_PIDATA_ISM_EDIT_POSITION) */ - uint32_t piDataType; /* IVAS_PI_R_ISM_POSITION */ - IVAS_COORDINATE position; /* Positional editing request for received ISM */ -} IVAS_PIDATA_ISM_EDIT_POSITION; -#endif /* Editing request for ISM direction */ typedef struct @@ -478,7 +429,6 @@ typedef struct float azimuth; /* azimuth angle in degrees [-180, 180] */ float elevation; /* elevation angle in degrees [-90°, 90°] */ } IVAS_PIDATA_ISM_EDIT_DIRECTION; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ typedef struct { @@ -493,7 +443,6 @@ typedef union IVAS_PIDATA_ORIENTATION deviceCompensated; IVAS_PIDATA_ORIENTATION deviceUnCompensated; IVAS_PIDATA_ACOUSTIC_ENV acousticEnv; -#ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_PIDATA_AUDIO_DESC audioDesc; IVAS_PIDATA_ISM_NUM ismNum; IVAS_PIDATA_ISM_ID ismId; @@ -509,25 +458,16 @@ typedef union IVAS_PIDATA_ORIENTATION playbackOrientation; IVAS_PIDATA_ORIENTATION headOrientation; -#ifdef REVERSE_ISM_PI_DATA IVAS_PIDATA_POSITION listnerPosition; -#else - IVAS_PIDATA_LISTENER_POSITION listnerPosition; -#endif 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; -#ifdef REVERSE_ISM_PI_DATA IVAS_PIDATA_POSITION ismEditPosition; -#else - IVAS_PIDATA_ISM_EDIT_POSITION ismEditPosition; -#endif IVAS_PIDATA_POSITION ismEditPositionCompact; IVAS_PIDATA_ISM_EDIT_DIRECTION ismEditDirection; -#endif /* RTP_S4_251135_CR26253_0016_REV1 */ IVAS_PIDATA_NO_DATA noPiData; } PIDATA; @@ -537,6 +477,5 @@ typedef struct pidata_ts_struct uint32_t timestamp; } PIDATA_TS; -#endif /* IVAS_RTPDUMP */ #endif /* IVAS_RTP_PI_DATA_H */ diff --git a/lib_util/obj_edit_file_reader.c b/lib_util/obj_edit_file_reader.c index f4140ad3c5..2d3419282c 100644 --- a/lib_util/obj_edit_file_reader.c +++ b/lib_util/obj_edit_file_reader.c @@ -77,11 +77,7 @@ ivas_error ObjectEditFileReader_open( } self = (ObjectEditFileReader *) calloc( 1, sizeof( ObjectEditFileReader ) ); -#ifndef FIX_1427_OBJ_EDITING_EXT_METADATA - self->maxLineLen = 256; -#else self->maxLineLen = 1024; -#endif self->editFileHandle = fileHandle; self->inLine = (char *) calloc( self->maxLineLen, sizeof( char ) ); @@ -100,7 +96,6 @@ ivas_error ObjectEditFileReader_open( self->readInfo->obj_ele[obj_idx] = 0.0f; self->readInfo->obj_ele_edited[obj_idx] = false; self->readInfo->obj_ele_relative[obj_idx] = false; -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA self->readInfo->obj_radius[obj_idx] = 0.0f; self->readInfo->obj_radius_edited[obj_idx] = false; self->readInfo->obj_radius_relative[obj_idx] = false; @@ -110,7 +105,6 @@ ivas_error ObjectEditFileReader_open( self->readInfo->obj_pitch[obj_idx] = 0.0f; self->readInfo->obj_pitch_edited[obj_idx] = false; self->readInfo->obj_pitch_relative[obj_idx] = false; -#endif } self->rewound = false; @@ -157,14 +151,12 @@ ivas_error ObjectEditFileReader_readNextFrame( readEdits->obj_azi_relative[obj_idx] = false; readEdits->obj_ele_edited[obj_idx] = false; readEdits->obj_ele_relative[obj_idx] = false; -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA readEdits->obj_radius_edited[obj_idx] = false; readEdits->obj_radius_relative[obj_idx] = false; readEdits->obj_yaw_edited[obj_idx] = false; readEdits->obj_yaw_relative[obj_idx] = false; readEdits->obj_pitch_edited[obj_idx] = false; readEdits->obj_pitch_relative[obj_idx] = false; -#endif } /* tokenize the line by comma */ @@ -236,7 +228,6 @@ ivas_error ObjectEditFileReader_readNextFrame( { readEdits->obj_ele_relative[obj_idx] = ( strcmp( paramValue, "1" ) == 0 ); } -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA else if ( strcmp( param, "radius" ) == 0 ) { readEdits->obj_radius[obj_idx] = strtof( paramValue, NULL ); @@ -264,7 +255,6 @@ ivas_error ObjectEditFileReader_readNextFrame( { readEdits->obj_pitch_relative[obj_idx] = ( strcmp( paramValue, "1" ) == 0 ); } -#endif } } } @@ -288,7 +278,6 @@ ivas_error ObjectEditFileReader_readNextFrame( { readEdits->obj_ele[obj_idx] = max( min( readEdits->obj_ele[obj_idx], 90.f ), -90.f ); } -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA if ( readEdits->obj_radius_edited[obj_idx] && !readEdits->obj_radius_relative[obj_idx] ) { readEdits->obj_radius[obj_idx] = max( min( readEdits->obj_radius[obj_idx], OBJ_EDIT_RADIUS_MAX ), 0.0f ); @@ -301,7 +290,6 @@ ivas_error ObjectEditFileReader_readNextFrame( { readEdits->obj_pitch[obj_idx] = max( min( readEdits->obj_pitch[obj_idx], 90.f ), -90.f ); } -#endif } } else diff --git a/lib_util/obj_edit_file_reader.h b/lib_util/obj_edit_file_reader.h index 5f6864281f..9a9277d949 100644 --- a/lib_util/obj_edit_file_reader.h +++ b/lib_util/obj_edit_file_reader.h @@ -40,17 +40,10 @@ the United Nations Convention on Contracts on the International Sales of Goods. /*---------------------------------------------------------------------* * Constants ans structures *---------------------------------------------------------------------*/ -#ifdef FIX_GAIN_EDIT_LIMITS #define OBJ_EDIT_GAIN_MIN 0.0f /* -inf dB */ #define OBJ_EDIT_GAIN_MAX 3.9810719f /* +12 dB */ -#else -#define OBJ_EDIT_GAIN_MIN 0.06309573f /* -24 dB */ -#define OBJ_EDIT_GAIN_MAX 15.84893f /* +24 dB */ -#endif -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA #define OBJ_EDIT_RADIUS_MAX 15.75f /* Max radius = (2^ISM_RADIUS_NBITS-1)*0.25 = 15.75 */ -#endif typedef struct ObjectEditFileReader ObjectEditFileReader; typedef struct ReadObjectEditInfo ReadObjectEditInfo; @@ -72,7 +65,6 @@ struct ReadObjectEditInfo bool obj_ele_edited[IVAS_MAX_NUM_OBJECTS]; bool obj_ele_relative[IVAS_MAX_NUM_OBJECTS]; -#ifdef FIX_1427_OBJ_EDITING_EXT_METADATA float obj_radius[IVAS_MAX_NUM_OBJECTS]; bool obj_radius_edited[IVAS_MAX_NUM_OBJECTS]; bool obj_radius_relative[IVAS_MAX_NUM_OBJECTS]; @@ -84,7 +76,6 @@ struct ReadObjectEditInfo float obj_pitch[IVAS_MAX_NUM_OBJECTS]; bool obj_pitch_edited[IVAS_MAX_NUM_OBJECTS]; bool obj_pitch_relative[IVAS_MAX_NUM_OBJECTS]; -#endif }; struct ObjectEditFileReader diff --git a/lib_util/render_config_reader.c b/lib_util/render_config_reader.c index 761b203cb0..2508eae95c 100644 --- a/lib_util/render_config_reader.c +++ b/lib_util/render_config_reader.c @@ -36,9 +36,7 @@ #include #include #include "cmdl_tools.h" -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT #include "ivas_cnst.h" -#endif /*------------------------------------------------------------------------------------------* * PreProc Local Macros @@ -2959,7 +2957,6 @@ ivas_error RenderConfigReader_read( return IVAS_ERR_OK; } -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT /*------------------------------------------------------------------------------------------* * RenderConfigReader_getAcousticEnvironmentCount() * @@ -3039,7 +3036,6 @@ ivas_error RenderConfigReader_getAcousticEnvironments( return IVAS_ERR_OK; } -#endif /*------------------------------------------------------------------------------------------* * RenderConfigReader_getAcousticEnvironment() @@ -3062,11 +3058,7 @@ ivas_error RenderConfigReader_getAcousticEnvironment( } /* case when -aeid is not specified, select first ID from config file */ -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT if ( id == IVAS_DEFAULT_AEID && pRenderConfigReader->nAE > 0 ) -#else - if ( id == 65535 && pRenderConfigReader->nAE > 0 ) -#endif { id = (uint16_t) pRenderConfigReader->pAE[0].id; } diff --git a/lib_util/render_config_reader.h b/lib_util/render_config_reader.h index d69249734f..885f9ceb17 100644 --- a/lib_util/render_config_reader.h +++ b/lib_util/render_config_reader.h @@ -51,7 +51,6 @@ ivas_error RenderConfigReader_open( RenderConfigReader **ppRenderConfigReader /* o : RenderConfigReader handle */ ); -#ifdef IVAS_RTPDUMP_ACOUSTIC_ENVIRONMENT /* Get number of acoustic environments */ uint32_t RenderConfigReader_getAcousticEnvironmentCount( RenderConfigReader *pRenderConfigReader /* i : RenderConfigReader handle */ @@ -62,7 +61,6 @@ ivas_error RenderConfigReader_getAcousticEnvironments( RenderConfigReader *pRenderConfigReader, /* i : RenderConfigReader handle */ IVAS_ROOM_ACOUSTICS_CONFIG_DATA **ppAcEnv /* o : Acoustic environment array pointer */ ); -#endif /* Get an acoustic environment */ ivas_error RenderConfigReader_getAcousticEnvironment( diff --git a/lib_util/rtpdump.c b/lib_util/rtpdump.c index f89b36f82a..c0cc9faf54 100644 --- a/lib_util/rtpdump.c +++ b/lib_util/rtpdump.c @@ -110,17 +110,10 @@ static int readShort( FILE *file, unsigned short *value ) static int writeLong( FILE *file, unsigned int value ) { char buffer[4] = { 0 }; -#ifdef IVAS_RTPDUMP buffer[3] = (char) ( value & 0xff ); buffer[2] = (char) ( ( value >> 8 ) & 0xff ); buffer[1] = (char) ( ( value >> 16 ) & 0xff ); buffer[0] = (char) ( ( value >> 24 ) & 0xff ); -#else - buffer[3] = value & 0xff; - buffer[2] = ( value >> 8 ) & 0xff; - buffer[1] = ( value >> 16 ) & 0xff; - buffer[0] = ( value >> 24 ) & 0xff; -#endif if ( fwrite( buffer, 4, 1, file ) != 1U ) { return -1; @@ -132,13 +125,8 @@ static int writeLong( FILE *file, unsigned int value ) static int writeShort( FILE *file, unsigned short value ) { char buffer[2] = { 0 }; -#ifdef IVAS_RTPDUMP buffer[1] = (char) ( value & 0xff ); buffer[0] = (char) ( ( value >> 8 ) & 0xff ); -#else - buffer[1] = value & 0xff; - buffer[0] = ( value >> 8 ) & 0xff; -#endif if ( fwrite( buffer, 2, 1, file ) != 1U ) { return -1; -- GitLab From c9335723250986217c910b1a10736cbf47407054 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 27 Nov 2025 03:48:10 -0600 Subject: [PATCH 2/2] Fix missing removal of FIX_1318_ROOM_SIZE_CMD_LINE in options.h --- lib_com/options.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6e70bb1bec..df9d70b75c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,7 +164,6 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ -#define FIX_1318_ROOM_SIZE_CMD_LINE /* Philips/Nokia: Default room sizes support */ /* #################### End BE switches ################################## */ -- GitLab