Loading CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ file(GLOB libDecSrcs "lib_dec/*.c") file(GLOB libDecHeaders "lib_dec/*.h") add_library(lib_dec ${libDecSrcs} ${libDecHeaders}) target_link_libraries(lib_dec lib_com lib_rend lib_debug lib_isar) target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar lib_util) target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") Loading @@ -175,7 +175,7 @@ target_include_directories(lib_util PRIVATE lib_lc3plus lib_isar) if(NOT WMOPS) add_executable(ivas_lc3plus_unit_test scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c) target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug lib_isar) target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_com lib_debug lib_isar) endif() file(GLOB libISARSrcs "lib_isar/*.c") Loading Workspace_msvc/lib_dec.vcxproj +2 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ </Midl> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling /> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> Loading Loading @@ -109,7 +109,7 @@ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> <OmitFramePointers>false</OmitFramePointers> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <ExceptionHandling /> Loading apps/decoder.c +17 −40 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ static #endif #define RANDOM_INITSEED_DEC ( 0xFADE ) /*------------------------------------------------------------------------------------------* * Local structure for storing cmdln arguments *------------------------------------------------------------------------------------------*/ Loading Loading @@ -149,7 +150,6 @@ typedef struct uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; char *objEditFileName; bool evsMode; IVAS_ROOM_SIZE_T roomSize; } DecArguments; Loading Loading @@ -179,31 +179,8 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_DEC_HANDLE *phIvasDec, 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 static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); Loading Loading @@ -471,8 +448,8 @@ int main( asked_frame_size = arg.renderFramesize; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : IVAS_DEFAULT_AEID; arg.enableHeadRotation = arg.enableHeadRotation || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM; 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 ) Loading Loading @@ -618,7 +595,6 @@ int main( if ( arg.renderConfigEnabled ) { /* 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 && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false ) Loading Loading @@ -807,11 +783,7 @@ int main( if ( arg.voipMode ) { error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &renderConfig, &hIvasDec, pcmBuf ); error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &renderConfig, &hIvasDec, pcmBuf ); } else { Loading Loading @@ -1035,7 +1007,6 @@ static bool parseCmdlIVAS_dec( arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; arg->evsMode = false; arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; Loading Loading @@ -1589,7 +1560,6 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( argv_to_upper, "-EVS" ) == 0 ) { arg->evsMode = true; arg->decMode = IVAS_DEC_MODE_EVS; i++; } Loading Loading @@ -1680,7 +1650,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->evsMode ) else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->decMode == IVAS_DEC_MODE_EVS ) { fprintf( stderr, "Error: Both non-diegetic panning and stereo output specified!\n\n" ); usage_dec(); Loading Loading @@ -3107,6 +3077,7 @@ static ivas_error printBitstreamInfoVoip( else { auPtr = au; /* might have been set to RTP packet in prev call */ error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSizeBits, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ Loading Loading @@ -3200,6 +3171,7 @@ static ivas_error decodeVoIP( int32_t delayTimeScale = -1; int16_t i; IVAS_DEC_HANDLE hIvasDec = *phIvasDec; bool restartNeeded; IVAS_RTP ivasRtp = { 0 }; IVAS_RTP srRtp = { 0 }; Loading Loading @@ -3282,7 +3254,6 @@ static ivas_error decodeVoIP( goto cleanup; } #ifdef SUPPORT_JBM_TRACEFILE if ( arg.jbmTraceFilename != NULL ) { Loading Loading @@ -3314,7 +3285,9 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); initialTsOffsetSystemAndRTP = rtpTimeStamp - systemTime_ms * 16; /* For time mapping */ /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ Loading Loading @@ -3510,6 +3483,7 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ error = IVAS_RTP_ReadNextFrame( &ivasRtp, au, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); /* IVAS RTP payload format has timescale 16000, JBM uses 1000 internally */ Loading Loading @@ -3564,6 +3538,7 @@ static ivas_error decodeVoIP( ivasRtp.nProcPiData += numPiData; } if ( isSplitRend ) { #ifdef SUPPORT_JBM_TRACEFILE Loading Loading @@ -3801,6 +3776,7 @@ static ivas_error decodeVoIP( srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms; srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD; srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms; if ( ( error = IVAS_RTP_WriteNextFrame( &srRtp, splitRendBits->bits_buf, &srInfo, (int16_t) splitRendBits->bits_written, false, false ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while pushing SR audio bitstream to RTP pack\n", ivas_error_to_string( error ) ); Loading Loading @@ -4052,7 +4028,8 @@ static void do_object_editing( editableParameters->ism_metadata[obj_idx].elevation = readInfo->obj_ele[obj_idx]; } } /* object direction editing only for diegetic objects */ /* object orientation editing only for diegetic objects */ if ( readInfo->obj_yaw_edited[obj_idx] ) { if ( readInfo->obj_yaw_relative[obj_idx] ) Loading Loading @@ -4348,9 +4325,10 @@ static ivas_error restartDecoder( hIvasDec = *phIvasDec; uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : 65535; uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : IVAS_DEFAULT_AEID; IVAS_AUDIO_CONFIG outputConfig = ( decMode == IVAS_DEC_MODE_IVAS ) ? arg->outputConfig : IVAS_AUDIO_CONFIG_MONO; 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 ) Loading @@ -4365,7 +4343,6 @@ static ivas_error restartDecoder( goto cleanup; } if ( arg->voipMode ) { if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg->inputFormat ) ) != IVAS_ERR_OK ) Loading apps/encoder.c +4 −4 Original line number Diff line number Diff line Loading @@ -834,10 +834,10 @@ int main( /* scene orientation */ if ( sceneOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *scene = &piDataTs->data.scene; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); scene->size = sizeof( IVAS_PIDATA_ORIENTATION ); scene->piDataType = IVAS_PI_SCENE_ORIENTATION; Loading @@ -851,10 +851,10 @@ int main( /* device orientation */ if ( deviceOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *device = &piDataTs->data.deviceUnCompensated; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); device->size = sizeof( IVAS_PIDATA_ORIENTATION ); device->piDataType = IVAS_PI_DEVICE_ORIENTATION_COMPENSATED; Loading apps/encoder_fmtsw.c +5 −5 Original line number Diff line number Diff line Loading @@ -256,6 +256,7 @@ int main( cleanup: IVAS_RTP_Term( &ivasRtp ); if ( FmtSWFile ) { fclose( FmtSWFile ); Loading Loading @@ -941,10 +942,10 @@ int encoder_main( /* scene orientation */ if ( sceneOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *scene = &piDataTs->data.scene; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); scene->size = sizeof( IVAS_PIDATA_ORIENTATION ); scene->piDataType = IVAS_PI_SCENE_ORIENTATION; Loading @@ -958,10 +959,10 @@ int encoder_main( /* device orientation */ if ( deviceOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *device = &piDataTs->data.deviceUnCompensated; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); device->size = sizeof( IVAS_PIDATA_ORIENTATION ); device->piDataType = IVAS_PI_DEVICE_ORIENTATION_COMPENSATED; Loading Loading @@ -1156,7 +1157,6 @@ static bool parseCmdlIVAS_enc( arg->rtpdumpOutput = false; arg->sceneOrientationTrajFileName = NULL; arg->deviceOrientationTrajFileName = NULL; #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; arg->forcedModeFile = NULL; Loading Loading
CMakeLists.txt +2 −2 Original line number Diff line number Diff line Loading @@ -165,7 +165,7 @@ file(GLOB libDecSrcs "lib_dec/*.c") file(GLOB libDecHeaders "lib_dec/*.h") add_library(lib_dec ${libDecSrcs} ${libDecHeaders}) target_link_libraries(lib_dec lib_com lib_rend lib_debug lib_isar) target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar lib_util) target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") Loading @@ -175,7 +175,7 @@ target_include_directories(lib_util PRIVATE lib_lc3plus lib_isar) if(NOT WMOPS) add_executable(ivas_lc3plus_unit_test scripts/split_rendering/lc3plus_float/ivas_lc3plus_unit_test.c) target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_util lib_com lib_debug lib_isar) target_link_libraries(ivas_lc3plus_unit_test lib_rend lib_dec lib_com lib_debug lib_isar) endif() file(GLOB libISARSrcs "lib_isar/*.c") Loading
Workspace_msvc/lib_dec.vcxproj +2 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ </Midl> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling /> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> Loading Loading @@ -109,7 +109,7 @@ <FavorSizeOrSpeed>Neither</FavorSizeOrSpeed> <OmitFramePointers>false</OmitFramePointers> <EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <ExceptionHandling /> Loading
apps/decoder.c +17 −40 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ static #endif #define RANDOM_INITSEED_DEC ( 0xFADE ) /*------------------------------------------------------------------------------------------* * Local structure for storing cmdln arguments *------------------------------------------------------------------------------------------*/ Loading Loading @@ -149,7 +150,6 @@ typedef struct uint16_t directivityPatternId[IVAS_MAX_NUM_OBJECTS]; bool objEditEnabled; char *objEditFileName; bool evsMode; IVAS_ROOM_SIZE_T roomSize; } DecArguments; Loading Loading @@ -179,31 +179,8 @@ typedef struct static bool parseCmdlIVAS_dec( int16_t argc, char **argv, DecArguments *arg ); static void usage_dec( void ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ); static ivas_error decodeG192( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtfBinary, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); static ivas_error decodeVoIP( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HRTF_BINARY_WRAPPER *hHrtf, RotFileReader *headRotReader, RotFileReader *externalOrientationFileReader, RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, ISAR_SPLIT_REND_BITS_DATA *splitRendBits, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_DEC_HANDLE *phIvasDec, 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 static ivas_error printBitstreamInfoVoip( DecArguments arg, BS_READER_HANDLE hBsReader, IVAS_DEC_HANDLE hIvasDec ); Loading Loading @@ -471,8 +448,8 @@ int main( asked_frame_size = arg.renderFramesize; uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : IVAS_DEFAULT_AEID; arg.enableHeadRotation = arg.enableHeadRotation || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || arg.outputConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM; 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 ) Loading Loading @@ -618,7 +595,6 @@ int main( if ( arg.renderConfigEnabled ) { /* 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 && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED && arg.outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM && arg.non_diegetic_pan_enabled == false ) Loading Loading @@ -807,11 +783,7 @@ int main( if ( arg.voipMode ) { error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &renderConfig, &hIvasDec, pcmBuf ); error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &splitRendBits, &renderConfig, &hIvasDec, pcmBuf ); } else { Loading Loading @@ -1035,7 +1007,6 @@ static bool parseCmdlIVAS_dec( arg->output_Fs = IVAS_MAX_SAMPLING_RATE; arg->outputConfig = IVAS_AUDIO_CONFIG_MONO; arg->decMode = IVAS_DEC_MODE_IVAS; arg->evsMode = false; arg->quietModeEnabled = false; arg->delayCompensationEnabled = true; arg->voipMode = false; Loading Loading @@ -1589,7 +1560,6 @@ static bool parseCmdlIVAS_dec( } else if ( strcmp( argv_to_upper, "-EVS" ) == 0 ) { arg->evsMode = true; arg->decMode = IVAS_DEC_MODE_EVS; i++; } Loading Loading @@ -1680,7 +1650,7 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->evsMode ) else if ( arg->non_diegetic_pan_enabled && arg->outputConfig == IVAS_AUDIO_CONFIG_STEREO && arg->decMode == IVAS_DEC_MODE_EVS ) { fprintf( stderr, "Error: Both non-diegetic panning and stereo output specified!\n\n" ); usage_dec(); Loading Loading @@ -3107,6 +3077,7 @@ static ivas_error printBitstreamInfoVoip( else { auPtr = au; /* might have been set to RTP packet in prev call */ error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSizeBits, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ Loading Loading @@ -3200,6 +3171,7 @@ static ivas_error decodeVoIP( int32_t delayTimeScale = -1; int16_t i; IVAS_DEC_HANDLE hIvasDec = *phIvasDec; bool restartNeeded; IVAS_RTP ivasRtp = { 0 }; IVAS_RTP srRtp = { 0 }; Loading Loading @@ -3282,7 +3254,6 @@ static ivas_error decodeVoIP( goto cleanup; } #ifdef SUPPORT_JBM_TRACEFILE if ( arg.jbmTraceFilename != NULL ) { Loading Loading @@ -3314,7 +3285,9 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); initialTsOffsetSystemAndRTP = rtpTimeStamp - systemTime_ms * 16; /* For time mapping */ /* EVS RTP payload format has timescale 16000, JBM uses 1000 internally */ Loading Loading @@ -3510,6 +3483,7 @@ static ivas_error decodeVoIP( else { auPtr = au; /* might have been set to RTP packet in prev call */ error = IVAS_RTP_ReadNextFrame( &ivasRtp, au, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, NULL, &qBit ); /* IVAS RTP payload format has timescale 16000, JBM uses 1000 internally */ Loading Loading @@ -3564,6 +3538,7 @@ static ivas_error decodeVoIP( ivasRtp.nProcPiData += numPiData; } if ( isSplitRend ) { #ifdef SUPPORT_JBM_TRACEFILE Loading Loading @@ -3801,6 +3776,7 @@ static ivas_error decodeVoIP( srInfo.bitrateKbps = splitRendBits->bits_written * 1000 / splitRendBits->codec_frame_size_ms; srInfo.codec = ( splitRendBits->codec == ISAR_SPLIT_REND_CODEC_LC3PLUS ) ? IVAS_SR_TRANSPORT_LC3PLUS : IVAS_SR_TRANSPORT_LCLD; srInfo.codecFrameSizeMs = (uint32_t) splitRendBits->codec_frame_size_ms; if ( ( error = IVAS_RTP_WriteNextFrame( &srRtp, splitRendBits->bits_buf, &srInfo, (int16_t) splitRendBits->bits_written, false, false ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while pushing SR audio bitstream to RTP pack\n", ivas_error_to_string( error ) ); Loading Loading @@ -4052,7 +4028,8 @@ static void do_object_editing( editableParameters->ism_metadata[obj_idx].elevation = readInfo->obj_ele[obj_idx]; } } /* object direction editing only for diegetic objects */ /* object orientation editing only for diegetic objects */ if ( readInfo->obj_yaw_edited[obj_idx] ) { if ( readInfo->obj_yaw_relative[obj_idx] ) Loading Loading @@ -4348,9 +4325,10 @@ static ivas_error restartDecoder( hIvasDec = *phIvasDec; uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : 65535; uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : IVAS_DEFAULT_AEID; IVAS_AUDIO_CONFIG outputConfig = ( decMode == IVAS_DEC_MODE_IVAS ) ? arg->outputConfig : IVAS_AUDIO_CONFIG_MONO; 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 ) Loading @@ -4365,7 +4343,6 @@ static ivas_error restartDecoder( goto cleanup; } if ( arg->voipMode ) { if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg->inputFormat ) ) != IVAS_ERR_OK ) Loading
apps/encoder.c +4 −4 Original line number Diff line number Diff line Loading @@ -834,10 +834,10 @@ int main( /* scene orientation */ if ( sceneOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *scene = &piDataTs->data.scene; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); scene->size = sizeof( IVAS_PIDATA_ORIENTATION ); scene->piDataType = IVAS_PI_SCENE_ORIENTATION; Loading @@ -851,10 +851,10 @@ int main( /* device orientation */ if ( deviceOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp.piData[ivasRtp.nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *device = &piDataTs->data.deviceUnCompensated; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); device->size = sizeof( IVAS_PIDATA_ORIENTATION ); device->piDataType = IVAS_PI_DEVICE_ORIENTATION_COMPENSATED; Loading
apps/encoder_fmtsw.c +5 −5 Original line number Diff line number Diff line Loading @@ -256,6 +256,7 @@ int main( cleanup: IVAS_RTP_Term( &ivasRtp ); if ( FmtSWFile ) { fclose( FmtSWFile ); Loading Loading @@ -941,10 +942,10 @@ int encoder_main( /* scene orientation */ if ( sceneOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *scene = &piDataTs->data.scene; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); scene->size = sizeof( IVAS_PIDATA_ORIENTATION ); scene->piDataType = IVAS_PI_SCENE_ORIENTATION; Loading @@ -958,10 +959,10 @@ int encoder_main( /* device orientation */ if ( deviceOrientationFileReader ) { PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_TS *piDataTs = &ivasRtp->piData[ivasRtp->nWrittenPiData++]; IVAS_PIDATA_ORIENTATION *device = &piDataTs->data.deviceUnCompensated; memset( piDataTs, 0, sizeof( PIDATA_TS ) ); memset( piDataTs, 0, sizeof( IVAS_PIDATA_TS ) ); device->size = sizeof( IVAS_PIDATA_ORIENTATION ); device->piDataType = IVAS_PI_DEVICE_ORIENTATION_COMPENSATED; Loading Loading @@ -1156,7 +1157,6 @@ static bool parseCmdlIVAS_enc( arg->rtpdumpOutput = false; arg->sceneOrientationTrajFileName = NULL; arg->deviceOrientationTrajFileName = NULL; #ifdef DEBUGGING arg->forcedMode = IVAS_ENC_FORCE_UNFORCED; arg->forcedModeFile = NULL; Loading