Loading Workspace_msvc/lib_util.vcxproj +4 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,10 @@ <ClCompile Include="..\lib_util\evs_rtp_payload.c" /> <ClCompile Include="..\lib_util\g192.c" /> <ClCompile Include="..\lib_util\ivas_rtp_payload.c" /> <ClCompile Include="..\lib_util\ivas_rtp_pi_data.c" /> <ClCompile Include="..\lib_util\ivas_rtp_rom.c" /> <ClCompile Include="..\lib_util\ivas_bpool.c" /> <ClCompile Include="..\lib_util\ivas_queue.c" /> <ClCompile Include="..\lib_util\vector3_pair_file_reader.c" /> <ClCompile Include="..\lib_util\hrtf_file_reader.c" /> <ClCompile Include="..\lib_util\ism_file_reader.c" /> Loading Workspace_msvc/lib_util.vcxproj.filters +12 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,18 @@ <ClCompile Include="..\lib_util\ivas_rtp_payload.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_rtp_pi_data.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_rtp_rom.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_bpool.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_queue.c"> <Filter>util_c</Filter> </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\lib_util\aeid_file_reader.h"> Loading apps/decoder.c +200 −17 Original line number Diff line number Diff line Loading @@ -168,6 +168,12 @@ typedef struct } IVAS_DEC_HRTF_BINARY_WRAPPER; #ifdef IVAS_RTPDUMP #define JITTER_DURATION_MS ( 60 ) #ifdef DEBUGGING #define DEBUG_PRINT fprintf #else #define DEBUG_PRINT( ... ) #endif typedef struct { Loading @@ -177,8 +183,8 @@ typedef struct typedef struct { uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * MAX_FRAMES_PER_RTP_PACKET]; PIDATA_TS piData[IVAS_PI_MAX_ID * MAX_FRAMES_PER_RTP_PACKET]; uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * IVAS_MAX_FRAMES_PER_RTP_PACKET]; PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; FILE *f_rtpstream; IVAS_RTP_CODEC codecId; Loading @@ -187,11 +193,18 @@ typedef struct uint32_t numFramesInPacket; uint32_t numPiDataInPacket; uint32_t remoteRequestBitmap; bool speechLostIndicated; bool restartNeeded; bool isAMRWB_IOmode; size_t numFramesProduced; IVAS_DATA_BUFFER rtpPacket; IVAS_RTP_UNPACK_HANDLE hUnpack; IVAS_RTP_UNPACK_CONFIG unpackCfg; PI_DATA_DEPACKER_STATE piDataDepackerState; #ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP_SR_INFO srInfo; #endif } IVAS_RTP; static void IVAS_RTP_Term( IVAS_RTP *rtp ) Loading @@ -210,6 +223,8 @@ static ivas_error IVAS_RTP_Init( IVAS_RTP *rtp, FILE *f_rtpstream ) memset( rtp, 0, sizeof( IVAS_RTP ) ); rtp->unpackCfg.jitterMarginMs = JITTER_DURATION_MS; error = IVAS_RTP_UNPACK_Open( &rtp->hUnpack, &rtp->unpackCfg ); rtp->f_rtpstream = f_rtpstream; Loading @@ -223,11 +238,9 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ { ivas_error error = IVAS_ERR_OK; IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL }; uint32_t packetLen = 0u; bool speechLostIndicated = false; #ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP_SR_INFO srInfo; #endif size_t packetLen = 0u; IVAS_RTP_CODEC codecId = IVAS_RTP_IVAS; bool isAMRWB_IOmode = false; packedFrame.buffer = au; packedFrame.capacity = ( IVAS_MAX_BITS_PER_FRAME / 8 ); Loading @@ -245,7 +258,7 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ } nread = fread( rtp->packet, sizeof( uint8_t ), packetLen, rtp->f_rtpstream ); /* Read Packet */ if ( nread == 0 ) if ( nread < packetLen ) { return IVAS_ERR_END_OF_FILE; } Loading @@ -257,7 +270,7 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ &rtp->numFramesInPacket, &rtp->numPiDataInPacket, &rtp->remoteRequestBitmap ) ) != IVAS_ERR_OK ) { fprintf( stderr, "failed to unpack RTP packet\n" ); fprintf( stderr, "failed to unpack RTP packet error = %s\n", ivas_error_to_string( error ) ); return error; } Loading @@ -279,9 +292,9 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ } #ifdef RTP_S4_251135_CR26253_0016_REV1 error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &rtp->codecId, &srInfo, &packedFrame, rtpTimeStamp, rtpSequenceNumber, &speechLostIndicated ); 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, &rtp->codecId, &packedFrame, rtpTimeStamp, rtpSequenceNumber, &speechLostIndicated ); error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &codecId, &packedFrame, auSizeBits, rtpTimeStamp, rtpSequenceNumber, &rtp->speechLostIndicated, &isAMRWB_IOmode ); #endif if ( error != IVAS_ERR_OK ) { Loading @@ -289,9 +302,31 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ return error; } *auSizeBits = (int16_t) ( packedFrame.length * 8 ); *qBit = !speechLostIndicated; rtp->restartNeeded = false; if ( *auSizeBits == 0 ) { /* NO_DATA_FRAME/SPEECH_LOST for IVAS and EVS is indicated by same bits Do not restart decoder on codec/amrwb mode change in this case */ } else { rtp->restartNeeded = ( rtp->codecId != codecId ) || ( codecId == IVAS_RTP_EVS && ( rtp->isAMRWB_IOmode != isAMRWB_IOmode ) ); if ( rtp->restartNeeded ) { fprintf( stdout, "\nRTP packet codec changed %s -> %s\n", ( rtp->codecId == IVAS_RTP_EVS ) ? ( rtp->isAMRWB_IOmode ? "AMRWB_IO" : "EVS" ) : "IVAS", ( codecId == IVAS_RTP_EVS ) ? ( isAMRWB_IOmode ? "AMRWB_IO" : "EVS" ) : "IVAS" ); } rtp->codecId = codecId; rtp->isAMRWB_IOmode = isAMRWB_IOmode; } *qBit = !rtp->speechLostIndicated; rtp->numFramesInPacket--; rtp->numFramesProduced++; *nextPacketRcvTime_ms += 20; while ( rtp->nProcPiData < rtp->nReadPiData && Loading @@ -305,13 +340,17 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ { case IVAS_PI_SCENE_ORIENTATION: { error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, &piData->data.scene.orientation ); IVAS_QUATERNION *quat = &piData->data.scene.orientation; DEBUG_PRINT( stdout, "PI_SCENE_ORIENTATION : %f, %f, %f, %f\n", quat->w, quat->x, quat->y, quat->z ); error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, quat ); } break; case IVAS_PI_DEVICE_ORIENTATION_COMPENSATED: { error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, &piData->data.deviceCompensated.orientation ); IVAS_QUATERNION *quat = &piData->data.deviceCompensated.orientation; DEBUG_PRINT( stdout, "PI_DEVICE_ORIENTATION : %f, %f, %f, %f\n", quat->w, quat->x, quat->y, quat->z ); error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, quat ); } break; Loading Loading @@ -339,7 +378,6 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ 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 *hHrtf, 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, IVAS_DEC_HANDLE hIvasDec, 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 @@ -348,6 +386,117 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeCha #endif static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); #ifdef IVAS_RTPDUMP 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, IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ); static int restartDecoder( IVAS_DEC_HANDLE *phIvasDec, IVAS_DEC_MODE codec, DecArguments *arg, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_CUSTOM_LS_DATA *hLsCustomData ) { ivas_error error = IVAS_ERR_OK; IVAS_DEC_HANDLE hIvasDec; if ( phIvasDec == NULL ) { return -1; } if ( NULL != *phIvasDec ) { IVAS_DEC_Close( phIvasDec ); } if ( ( error = IVAS_DEC_Open( phIvasDec, codec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } arg->decMode = codec; hIvasDec = *phIvasDec; uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : 65535; IVAS_AUDIO_CONFIG outputConfig = ( codec == 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->non_diegetic_pan_enabled, arg->non_diegetic_pan_gain, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure 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; } 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; } if ( arg->voipMode ) { if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, JITTER_DURATION_MS, arg->inputFormat ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg->voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( arg->renderConfigEnabled && renderConfig != NULL ) { if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, *renderConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } if ( arg->customLsOutputEnabled && hLsCustomData != NULL ) { if ( ( error = IVAS_DEC_FeedCustomLsData( hIvasDec, *hLsCustomData ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedCustomLsData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } return 0; cleanup: IVAS_DEC_Close( phIvasDec ); return -1; } #else 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, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #endif /*------------------------------------------------------------------------------------------* * main() * Loading Loading @@ -648,7 +797,11 @@ int main( if ( arg.voipMode ) { #ifdef IVAS_RTPDUMP if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, JITTER_DURATION_MS, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -920,7 +1073,11 @@ int main( if ( arg.voipMode ) { #ifdef IVAS_RTPDUMP error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &hIvasDec, pcmBuf ); #else error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf ); #endif } else { Loading Loading @@ -3178,7 +3335,11 @@ static ivas_error decodeVoIP( RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, #ifdef IVAS_RTPDUMP IVAS_DEC_HANDLE *phIvasDec, #else IVAS_DEC_HANDLE hIvasDec, #endif int16_t *pcmBuf ) { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ Loading Loading @@ -3212,7 +3373,8 @@ static ivas_error decodeVoIP( int16_t i; FILE *f_rtpstream = NULL; #ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp; IVAS_RTP ivasRtp = {0}; IVAS_DEC_HANDLE hIvasDec = *phIvasDec; #else EVS_RTPDUMP_DEPACKER rtpdumpDepacker; EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR; Loading Loading @@ -3375,6 +3537,27 @@ static ivas_error decodeVoIP( { nSamplesRendered = 0; #ifdef IVAS_RTPDUMP if ( ivasRtp.restartNeeded ) { IVAS_DEC_MODE newCodecInPacket = ( ivasRtp.codecId == IVAS_RTP_EVS ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; int err = restartDecoder( &hIvasDec, newCodecInPacket, &arg, NULL, /* ToDo : Provide rendererConfig */ NULL /* ToDo : Provide LS Custom Data */ ); if ( err < 0 ) { fprintf( stderr, "\nFailed to restart decoder from %d to %d\n", arg.decMode, newCodecInPacket ); goto cleanup; } *phIvasDec = hIvasDec; /* Update for main()' s free */ ivasRtp.restartNeeded = false; } #endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) { Loading apps/encoder.c +31 −16 Original line number Diff line number Diff line Loading @@ -223,6 +223,17 @@ int main( #ifdef IVAS_RTPDUMP FILE *f_rtpstream = NULL; IVAS_RTP_PACK_HANDLE hPack = NULL; uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * IVAS_MAX_FRAMES_PER_RTP_PACKET]; IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL }; IVAS_DATA_BUFFER rtpPacket = { 0, 0, NULL }; uint32_t numFramesInPayload = 0, packetLength = 0; packedFrame.capacity = sizeof( au ); packedFrame.buffer = au; rtpPacket.capacity = sizeof( packet ); rtpPacket.buffer = packet; #endif /*------------------------------------------------------------------------------------------* Loading Loading @@ -729,11 +740,7 @@ int main( goto cleanup; } #ifdef IVAS_RTPDUMP if ( ( numSamplesRead == 0 ) && ( IVAS_RTP_PACK_GetNumFrames( hPack ) == 0 ) ) #else if ( numSamplesRead == 0 ) #endif { /* end of input data */ break; Loading Loading @@ -863,19 +870,12 @@ int main( #ifdef IVAS_RTPDUMP if ( hPack ) { uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * MAX_FRAMES_PER_RTP_PACKET]; uint32_t n = numBits / 8, x = 0, numFramesInPayload = 0, packetLength = 0; uint32_t n = numBits / 8, x = 0; uint16_t *bitstrm = bitStream; IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL }; IVAS_DATA_BUFFER rtpPacket = { 0, 0, NULL }; packedFrame.capacity = sizeof( au ); packedFrame.buffer = au; rtpPacket.capacity = sizeof( packet ); rtpPacket.buffer = packet; /* Pack Encoded Stream */ packedFrame.length = 0; rtpPacket.length = 0; while ( n ) { x = ( ( bitstrm[0] << 7 ) | ( bitstrm[1] << 6 ) | ( bitstrm[2] << 5 ) | ( bitstrm[3] << 4 ) | Loading Loading @@ -1059,6 +1059,21 @@ cleanup: #ifdef IVAS_RTPDUMP if ( hPack ) { /* Complete the last packet */ if ( IVAS_RTP_PACK_GetNumFrames( hPack ) != 0 ) { if ( ( error = IVAS_RTP_PACK_GetPacket( hPack, &rtpPacket, &numFramesInPayload ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while packing RTP Packet\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; } /* File Format = Packet Length (uint32_t) + Packet bytes */ packetLength = (uint32_t) rtpPacket.length; fwrite( &packetLength, sizeof( packetLength ), 1, f_rtpstream ); fwrite( rtpPacket.buffer, sizeof( uint8_t ), packetLength, f_rtpstream ); } IVAS_RTP_PACK_Close( &hPack ); } Loading Loading @@ -1965,9 +1980,9 @@ static bool parseCmdlIVAS_enc( else { arg->numFramesPerPacket = atoi( argv[i++] ); if ( arg->numFramesPerPacket > MAX_FRAMES_PER_RTP_PACKET ) if ( arg->numFramesPerPacket > IVAS_MAX_FRAMES_PER_RTP_PACKET ) { fprintf( stderr, "numFramesPerPacket(%d) exceeds max frames per packet (%d) \n", arg->numFramesPerPacket, MAX_FRAMES_PER_RTP_PACKET ); fprintf( stderr, "numFramesPerPacket(%d) exceeds max frames per packet (%d) \n", arg->numFramesPerPacket, IVAS_MAX_FRAMES_PER_RTP_PACKET ); arg->numFramesPerPacket = 1; } } Loading lib_dec/lib_dec.c +1 −2 Original line number Diff line number Diff line Loading @@ -339,10 +339,9 @@ void IVAS_DEC_Close( } /* destroy Split binaural renderer (ISAR) handle */ ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); if ( ( *phIvasDec )->st_ivas ) { ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); ivas_destroy_dec( ( *phIvasDec )->st_ivas ); ( *phIvasDec )->st_ivas = NULL; } Loading Loading
Workspace_msvc/lib_util.vcxproj +4 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,10 @@ <ClCompile Include="..\lib_util\evs_rtp_payload.c" /> <ClCompile Include="..\lib_util\g192.c" /> <ClCompile Include="..\lib_util\ivas_rtp_payload.c" /> <ClCompile Include="..\lib_util\ivas_rtp_pi_data.c" /> <ClCompile Include="..\lib_util\ivas_rtp_rom.c" /> <ClCompile Include="..\lib_util\ivas_bpool.c" /> <ClCompile Include="..\lib_util\ivas_queue.c" /> <ClCompile Include="..\lib_util\vector3_pair_file_reader.c" /> <ClCompile Include="..\lib_util\hrtf_file_reader.c" /> <ClCompile Include="..\lib_util\ism_file_reader.c" /> Loading
Workspace_msvc/lib_util.vcxproj.filters +12 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,18 @@ <ClCompile Include="..\lib_util\ivas_rtp_payload.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_rtp_pi_data.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_rtp_rom.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_bpool.c"> <Filter>util_c</Filter> </ClCompile> <ClCompile Include="..\lib_util\ivas_queue.c"> <Filter>util_c</Filter> </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\lib_util\aeid_file_reader.h"> Loading
apps/decoder.c +200 −17 Original line number Diff line number Diff line Loading @@ -168,6 +168,12 @@ typedef struct } IVAS_DEC_HRTF_BINARY_WRAPPER; #ifdef IVAS_RTPDUMP #define JITTER_DURATION_MS ( 60 ) #ifdef DEBUGGING #define DEBUG_PRINT fprintf #else #define DEBUG_PRINT( ... ) #endif typedef struct { Loading @@ -177,8 +183,8 @@ typedef struct typedef struct { uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * MAX_FRAMES_PER_RTP_PACKET]; PIDATA_TS piData[IVAS_PI_MAX_ID * MAX_FRAMES_PER_RTP_PACKET]; uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * IVAS_MAX_FRAMES_PER_RTP_PACKET]; PIDATA_TS piData[IVAS_PI_MAX_ID * IVAS_MAX_FRAMES_PER_RTP_PACKET]; FILE *f_rtpstream; IVAS_RTP_CODEC codecId; Loading @@ -187,11 +193,18 @@ typedef struct uint32_t numFramesInPacket; uint32_t numPiDataInPacket; uint32_t remoteRequestBitmap; bool speechLostIndicated; bool restartNeeded; bool isAMRWB_IOmode; size_t numFramesProduced; IVAS_DATA_BUFFER rtpPacket; IVAS_RTP_UNPACK_HANDLE hUnpack; IVAS_RTP_UNPACK_CONFIG unpackCfg; PI_DATA_DEPACKER_STATE piDataDepackerState; #ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP_SR_INFO srInfo; #endif } IVAS_RTP; static void IVAS_RTP_Term( IVAS_RTP *rtp ) Loading @@ -210,6 +223,8 @@ static ivas_error IVAS_RTP_Init( IVAS_RTP *rtp, FILE *f_rtpstream ) memset( rtp, 0, sizeof( IVAS_RTP ) ); rtp->unpackCfg.jitterMarginMs = JITTER_DURATION_MS; error = IVAS_RTP_UNPACK_Open( &rtp->hUnpack, &rtp->unpackCfg ); rtp->f_rtpstream = f_rtpstream; Loading @@ -223,11 +238,9 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ { ivas_error error = IVAS_ERR_OK; IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL }; uint32_t packetLen = 0u; bool speechLostIndicated = false; #ifdef RTP_S4_251135_CR26253_0016_REV1 IVAS_RTP_SR_INFO srInfo; #endif size_t packetLen = 0u; IVAS_RTP_CODEC codecId = IVAS_RTP_IVAS; bool isAMRWB_IOmode = false; packedFrame.buffer = au; packedFrame.capacity = ( IVAS_MAX_BITS_PER_FRAME / 8 ); Loading @@ -245,7 +258,7 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ } nread = fread( rtp->packet, sizeof( uint8_t ), packetLen, rtp->f_rtpstream ); /* Read Packet */ if ( nread == 0 ) if ( nread < packetLen ) { return IVAS_ERR_END_OF_FILE; } Loading @@ -257,7 +270,7 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ &rtp->numFramesInPacket, &rtp->numPiDataInPacket, &rtp->remoteRequestBitmap ) ) != IVAS_ERR_OK ) { fprintf( stderr, "failed to unpack RTP packet\n" ); fprintf( stderr, "failed to unpack RTP packet error = %s\n", ivas_error_to_string( error ) ); return error; } Loading @@ -279,9 +292,9 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ } #ifdef RTP_S4_251135_CR26253_0016_REV1 error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &rtp->codecId, &srInfo, &packedFrame, rtpTimeStamp, rtpSequenceNumber, &speechLostIndicated ); 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, &rtp->codecId, &packedFrame, rtpTimeStamp, rtpSequenceNumber, &speechLostIndicated ); error = IVAS_RTP_UNPACK_PullFrame( rtp->hUnpack, &codecId, &packedFrame, auSizeBits, rtpTimeStamp, rtpSequenceNumber, &rtp->speechLostIndicated, &isAMRWB_IOmode ); #endif if ( error != IVAS_ERR_OK ) { Loading @@ -289,9 +302,31 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ return error; } *auSizeBits = (int16_t) ( packedFrame.length * 8 ); *qBit = !speechLostIndicated; rtp->restartNeeded = false; if ( *auSizeBits == 0 ) { /* NO_DATA_FRAME/SPEECH_LOST for IVAS and EVS is indicated by same bits Do not restart decoder on codec/amrwb mode change in this case */ } else { rtp->restartNeeded = ( rtp->codecId != codecId ) || ( codecId == IVAS_RTP_EVS && ( rtp->isAMRWB_IOmode != isAMRWB_IOmode ) ); if ( rtp->restartNeeded ) { fprintf( stdout, "\nRTP packet codec changed %s -> %s\n", ( rtp->codecId == IVAS_RTP_EVS ) ? ( rtp->isAMRWB_IOmode ? "AMRWB_IO" : "EVS" ) : "IVAS", ( codecId == IVAS_RTP_EVS ) ? ( isAMRWB_IOmode ? "AMRWB_IO" : "EVS" ) : "IVAS" ); } rtp->codecId = codecId; rtp->isAMRWB_IOmode = isAMRWB_IOmode; } *qBit = !rtp->speechLostIndicated; rtp->numFramesInPacket--; rtp->numFramesProduced++; *nextPacketRcvTime_ms += 20; while ( rtp->nProcPiData < rtp->nReadPiData && Loading @@ -305,13 +340,17 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ { case IVAS_PI_SCENE_ORIENTATION: { error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, &piData->data.scene.orientation ); IVAS_QUATERNION *quat = &piData->data.scene.orientation; DEBUG_PRINT( stdout, "PI_SCENE_ORIENTATION : %f, %f, %f, %f\n", quat->w, quat->x, quat->y, quat->z ); error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, quat ); } break; case IVAS_PI_DEVICE_ORIENTATION_COMPENSATED: { error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, &piData->data.deviceCompensated.orientation ); IVAS_QUATERNION *quat = &piData->data.deviceCompensated.orientation; DEBUG_PRINT( stdout, "PI_DEVICE_ORIENTATION : %f, %f, %f, %f\n", quat->w, quat->x, quat->y, quat->z ); error = IVAS_DEC_feedSinglePIorientation( hIvasDec, true, quat ); } break; Loading Loading @@ -339,7 +378,6 @@ static ivas_error readNextFrame( IVAS_RTP *rtp, IVAS_DEC_HANDLE hIvasDec, uint8_ 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 *hHrtf, 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, IVAS_DEC_HANDLE hIvasDec, 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 @@ -348,6 +386,117 @@ static IVAS_DEC_FORCED_REND_MODE parseForcedRendModeDec( char *forcedRendModeCha #endif static void do_object_editing( IVAS_EDITABLE_PARAMETERS *editableParameters, ObjectEditFileReader *objectEditFileReader ); #ifdef IVAS_RTPDUMP 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, IVAS_DEC_HANDLE *phIvasDec, int16_t *pcmBuf ); static int restartDecoder( IVAS_DEC_HANDLE *phIvasDec, IVAS_DEC_MODE codec, DecArguments *arg, IVAS_RENDER_CONFIG_DATA *renderConfig, IVAS_CUSTOM_LS_DATA *hLsCustomData ) { ivas_error error = IVAS_ERR_OK; IVAS_DEC_HANDLE hIvasDec; if ( phIvasDec == NULL ) { return -1; } if ( NULL != *phIvasDec ) { IVAS_DEC_Close( phIvasDec ); } if ( ( error = IVAS_DEC_Open( phIvasDec, codec ) ) != IVAS_ERR_OK ) { fprintf( stderr, "Open failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } arg->decMode = codec; hIvasDec = *phIvasDec; uint16_t aeID = arg->aeSequence.count > 0 ? arg->aeSequence.pID[0] : 65535; IVAS_AUDIO_CONFIG outputConfig = ( codec == 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->non_diegetic_pan_enabled, arg->non_diegetic_pan_gain, arg->dpidEnabled, aeID, arg->objEditEnabled, arg->delayCompensationEnabled ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nConfigure 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; } 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; } if ( arg->voipMode ) { if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, JITTER_DURATION_MS, arg->inputFormat ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg->voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( arg->renderConfigEnabled && renderConfig != NULL ) { if ( ( error = IVAS_DEC_FeedRenderConfig( hIvasDec, *renderConfig ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedRenderConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } if ( arg->customLsOutputEnabled && hLsCustomData != NULL ) { if ( ( error = IVAS_DEC_FeedCustomLsData( hIvasDec, *hLsCustomData ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_FeedCustomLsData failed: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } } return 0; cleanup: IVAS_DEC_Close( phIvasDec ); return -1; } #else 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, IVAS_DEC_HANDLE hIvasDec, int16_t *pcmBuf ); #endif /*------------------------------------------------------------------------------------------* * main() * Loading Loading @@ -648,7 +797,11 @@ int main( if ( arg.voipMode ) { #ifdef IVAS_RTPDUMP if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, JITTER_DURATION_MS, arg.inputFormat ) ) != IVAS_ERR_OK ) #else if ( ( error = IVAS_DEC_EnableVoIP( hIvasDec, 60, arg.inputFormat ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nCould not enable VOIP: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; Loading Loading @@ -920,7 +1073,11 @@ int main( if ( arg.voipMode ) { #ifdef IVAS_RTPDUMP error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, &hIvasDec, pcmBuf ); #else error = decodeVoIP( arg, hBsReader, &hHrtfBinary, headRotReader, externalOrientationFileReader, refRotReader, referenceVectorReader, objectEditFileReader, hIvasDec, pcmBuf ); #endif } else { Loading Loading @@ -3178,7 +3335,11 @@ static ivas_error decodeVoIP( RotFileReader *refRotReader, Vector3PairFileReader *referenceVectorReader, ObjectEditFileReader *objectEditFileReader, #ifdef IVAS_RTPDUMP IVAS_DEC_HANDLE *phIvasDec, #else IVAS_DEC_HANDLE hIvasDec, #endif int16_t *pcmBuf ) { bool decodingFailed = true; /* Assume failure until cleanup is reached without errors */ Loading Loading @@ -3212,7 +3373,8 @@ static ivas_error decodeVoIP( int16_t i; FILE *f_rtpstream = NULL; #ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp; IVAS_RTP ivasRtp = {0}; IVAS_DEC_HANDLE hIvasDec = *phIvasDec; #else EVS_RTPDUMP_DEPACKER rtpdumpDepacker; EVS_RTPDUMP_DEPACKER_ERROR rtpdumpDepackerError = EVS_RTPDUMP_DEPACKER_NO_ERROR; Loading Loading @@ -3375,6 +3537,27 @@ static ivas_error decodeVoIP( { nSamplesRendered = 0; #ifdef IVAS_RTPDUMP if ( ivasRtp.restartNeeded ) { IVAS_DEC_MODE newCodecInPacket = ( ivasRtp.codecId == IVAS_RTP_EVS ) ? IVAS_DEC_MODE_EVS : IVAS_DEC_MODE_IVAS; int err = restartDecoder( &hIvasDec, newCodecInPacket, &arg, NULL, /* ToDo : Provide rendererConfig */ NULL /* ToDo : Provide LS Custom Data */ ); if ( err < 0 ) { fprintf( stderr, "\nFailed to restart decoder from %d to %d\n", arg.decMode, newCodecInPacket ); goto cleanup; } *phIvasDec = hIvasDec; /* Update for main()' s free */ ivasRtp.restartNeeded = false; } #endif /* reference vector */ if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 ) { Loading
apps/encoder.c +31 −16 Original line number Diff line number Diff line Loading @@ -223,6 +223,17 @@ int main( #ifdef IVAS_RTPDUMP FILE *f_rtpstream = NULL; IVAS_RTP_PACK_HANDLE hPack = NULL; uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * IVAS_MAX_FRAMES_PER_RTP_PACKET]; IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL }; IVAS_DATA_BUFFER rtpPacket = { 0, 0, NULL }; uint32_t numFramesInPayload = 0, packetLength = 0; packedFrame.capacity = sizeof( au ); packedFrame.buffer = au; rtpPacket.capacity = sizeof( packet ); rtpPacket.buffer = packet; #endif /*------------------------------------------------------------------------------------------* Loading Loading @@ -729,11 +740,7 @@ int main( goto cleanup; } #ifdef IVAS_RTPDUMP if ( ( numSamplesRead == 0 ) && ( IVAS_RTP_PACK_GetNumFrames( hPack ) == 0 ) ) #else if ( numSamplesRead == 0 ) #endif { /* end of input data */ break; Loading Loading @@ -863,19 +870,12 @@ int main( #ifdef IVAS_RTPDUMP if ( hPack ) { uint8_t au[IVAS_MAX_BITS_PER_FRAME / 8]; uint8_t packet[IVAS_NOMINAL_RTP_BYTES_PER_FRAME * MAX_FRAMES_PER_RTP_PACKET]; uint32_t n = numBits / 8, x = 0, numFramesInPayload = 0, packetLength = 0; uint32_t n = numBits / 8, x = 0; uint16_t *bitstrm = bitStream; IVAS_DATA_BUFFER packedFrame = { 0, 0, NULL }; IVAS_DATA_BUFFER rtpPacket = { 0, 0, NULL }; packedFrame.capacity = sizeof( au ); packedFrame.buffer = au; rtpPacket.capacity = sizeof( packet ); rtpPacket.buffer = packet; /* Pack Encoded Stream */ packedFrame.length = 0; rtpPacket.length = 0; while ( n ) { x = ( ( bitstrm[0] << 7 ) | ( bitstrm[1] << 6 ) | ( bitstrm[2] << 5 ) | ( bitstrm[3] << 4 ) | Loading Loading @@ -1059,6 +1059,21 @@ cleanup: #ifdef IVAS_RTPDUMP if ( hPack ) { /* Complete the last packet */ if ( IVAS_RTP_PACK_GetNumFrames( hPack ) != 0 ) { if ( ( error = IVAS_RTP_PACK_GetPacket( hPack, &rtpPacket, &numFramesInPayload ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError %s while packing RTP Packet\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; } /* File Format = Packet Length (uint32_t) + Packet bytes */ packetLength = (uint32_t) rtpPacket.length; fwrite( &packetLength, sizeof( packetLength ), 1, f_rtpstream ); fwrite( rtpPacket.buffer, sizeof( uint8_t ), packetLength, f_rtpstream ); } IVAS_RTP_PACK_Close( &hPack ); } Loading Loading @@ -1965,9 +1980,9 @@ static bool parseCmdlIVAS_enc( else { arg->numFramesPerPacket = atoi( argv[i++] ); if ( arg->numFramesPerPacket > MAX_FRAMES_PER_RTP_PACKET ) if ( arg->numFramesPerPacket > IVAS_MAX_FRAMES_PER_RTP_PACKET ) { fprintf( stderr, "numFramesPerPacket(%d) exceeds max frames per packet (%d) \n", arg->numFramesPerPacket, MAX_FRAMES_PER_RTP_PACKET ); fprintf( stderr, "numFramesPerPacket(%d) exceeds max frames per packet (%d) \n", arg->numFramesPerPacket, IVAS_MAX_FRAMES_PER_RTP_PACKET ); arg->numFramesPerPacket = 1; } } Loading
lib_dec/lib_dec.c +1 −2 Original line number Diff line number Diff line Loading @@ -339,10 +339,9 @@ void IVAS_DEC_Close( } /* destroy Split binaural renderer (ISAR) handle */ ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); if ( ( *phIvasDec )->st_ivas ) { ivas_destroy_handle_isar( &( *phIvasDec )->st_ivas->hSplitBinRend ); ivas_destroy_dec( ( *phIvasDec )->st_ivas ); ( *phIvasDec )->st_ivas = NULL; } Loading