Loading CMakeLists.txt +1 −1 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) target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar lib_util) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") 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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <ExceptionHandling /> Loading apps/decoder.c +36 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ typedef struct bool tsmEnabled; IVAS_RENDER_FRAMESIZE renderFramesize; #ifdef IVAS_RTPDUMP bool applyPiData; char *piOutputFilename; #endif #ifdef DEBUGGING Loading Loading @@ -976,6 +977,7 @@ static bool parseCmdlIVAS_dec( arg->enableExternalOrientation = false; arg->externalOrientationTrajFileName = NULL; #ifdef IVAS_RTPDUMP arg->applyPiData = false; arg->piOutputFilename = NULL; #endif Loading Loading @@ -1077,6 +1079,11 @@ static bool parseCmdlIVAS_dec( arg->piOutputFilename = argv[i++]; } else if ( strcmp( argv_to_upper, "-APPLYPIDATA" ) == 0 ) { arg->applyPiData = true; i++; } #endif #ifdef SUPPORT_JBM_TRACEFILE else if ( strcmp( argv_to_upper, "-TRACEFILE" ) == 0 ) Loading Loading @@ -1669,6 +1676,7 @@ static void usage_dec( void ) fprintf( stdout, " IVAS 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" ); fprintf( stdout, "-PiDataFile PF Log the timestampped PI data.\n" ); fprintf( stdout, "-ApplyPiData Apply the PI data found in the rtp packet.\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" ); Loading Loading @@ -3090,6 +3098,8 @@ static ivas_error decodeVoIP( int16_t i; #ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp = { 0 }; int32_t initialTsOffsetSystemAndRTP = 0; uint32_t nProcPiData = 0; #else FILE *f_rtpstream = NULL; EVS_RTPDUMP_DEPACKER rtpdumpDepacker; Loading Loading @@ -3232,6 +3242,7 @@ static ivas_error decodeVoIP( auPtr = au; /* might have been set to RTP packet in prev call */ #ifdef IVAS_RTPDUMP error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit ); 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 Loading Loading @@ -3459,6 +3470,28 @@ 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 */ uint32_t piTs = systemTime_ms * 16 + initialTsOffsetSystemAndRTP; uint32_t numPiData = 0; while ( nProcPiData + numPiData < ivasRtp.nReadPiData && ivasRtp.piData[nProcPiData + numPiData].timestamp <= piTs ) { numPiData++; } if ( ( error = IVAS_RTP_ApplyPiData( hIvasDec, &ivasRtp.piData[nProcPiData], numPiData ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } nProcPiData += numPiData; } #endif #ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( isSplitRend ) { Loading Loading @@ -3675,6 +3708,9 @@ static ivas_error decodeVoIP( } } } #ifdef IVAS_RTPDUMP IVAS_DEC_resetExternalOrientations( hIvasDec ); #endif vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( vec_pos_update == 0 ) Loading lib_com/ivas_prot.h +12 −0 Original line number Diff line number Diff line Loading @@ -806,7 +806,19 @@ 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, IVAS_QUATERNION *const r ); void QuaternionInverse( const IVAS_QUATERNION q, IVAS_QUATERNION *const r ); #endif /*----------------------------------------------------------------------------------* * JBM prototypes *----------------------------------------------------------------------------------*/ Loading lib_dec/ivas_binRenderer_internal.c +4 −0 Original line number Diff line number Diff line Loading @@ -1026,7 +1026,11 @@ 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 ) { Loading Loading
CMakeLists.txt +1 −1 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) target_include_directories(lib_dec PUBLIC lib_dec lib_rend PRIVATE lib_enc lib_isar lib_util) file(GLOB libUtilSrcs "lib_util/*.c") file(GLOB libUtilHeaders "lib_util/*.h") 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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(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;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\lib_com;..\lib_debug;..\lib_dec;..\lib_enc;..\lib_isar;..\lib_rend;..\lib_lc3plus;..\lib_util;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(Macros);WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <StringPooling>true</StringPooling> <ExceptionHandling /> Loading
apps/decoder.c +36 −0 Original line number Diff line number Diff line Loading @@ -133,6 +133,7 @@ typedef struct bool tsmEnabled; IVAS_RENDER_FRAMESIZE renderFramesize; #ifdef IVAS_RTPDUMP bool applyPiData; char *piOutputFilename; #endif #ifdef DEBUGGING Loading Loading @@ -976,6 +977,7 @@ static bool parseCmdlIVAS_dec( arg->enableExternalOrientation = false; arg->externalOrientationTrajFileName = NULL; #ifdef IVAS_RTPDUMP arg->applyPiData = false; arg->piOutputFilename = NULL; #endif Loading Loading @@ -1077,6 +1079,11 @@ static bool parseCmdlIVAS_dec( arg->piOutputFilename = argv[i++]; } else if ( strcmp( argv_to_upper, "-APPLYPIDATA" ) == 0 ) { arg->applyPiData = true; i++; } #endif #ifdef SUPPORT_JBM_TRACEFILE else if ( strcmp( argv_to_upper, "-TRACEFILE" ) == 0 ) Loading Loading @@ -1669,6 +1676,7 @@ static void usage_dec( void ) fprintf( stdout, " IVAS 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" ); fprintf( stdout, "-PiDataFile PF Log the timestampped PI data.\n" ); fprintf( stdout, "-ApplyPiData Apply the PI data found in the rtp packet.\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" ); Loading Loading @@ -3090,6 +3098,8 @@ static ivas_error decodeVoIP( int16_t i; #ifdef IVAS_RTPDUMP IVAS_RTP ivasRtp = { 0 }; int32_t initialTsOffsetSystemAndRTP = 0; uint32_t nProcPiData = 0; #else FILE *f_rtpstream = NULL; EVS_RTPDUMP_DEPACKER rtpdumpDepacker; Loading Loading @@ -3232,6 +3242,7 @@ static ivas_error decodeVoIP( auPtr = au; /* might have been set to RTP packet in prev call */ #ifdef IVAS_RTPDUMP error = IVAS_RTP_ReadNextFrame( &ivasRtp, auPtr, &auSize, &rtpTimeStamp, &rtpSequenceNumber, &nextPacketRcvTime_ms, &qBit ); 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 Loading Loading @@ -3459,6 +3470,28 @@ 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 */ uint32_t piTs = systemTime_ms * 16 + initialTsOffsetSystemAndRTP; uint32_t numPiData = 0; while ( nProcPiData + numPiData < ivasRtp.nReadPiData && ivasRtp.piData[nProcPiData + numPiData].timestamp <= piTs ) { numPiData++; } if ( ( error = IVAS_RTP_ApplyPiData( hIvasDec, &ivasRtp.piData[nProcPiData], numPiData ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_GetSamples: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } nProcPiData += numPiData; } #endif #ifdef FIX_1119_SPLIT_RENDERING_VOIP if ( isSplitRend ) { Loading Loading @@ -3675,6 +3708,9 @@ static ivas_error decodeVoIP( } } } #ifdef IVAS_RTPDUMP IVAS_DEC_resetExternalOrientations( hIvasDec ); #endif vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; if ( vec_pos_update == 0 ) Loading
lib_com/ivas_prot.h +12 −0 Original line number Diff line number Diff line Loading @@ -806,7 +806,19 @@ 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, IVAS_QUATERNION *const r ); void QuaternionInverse( const IVAS_QUATERNION q, IVAS_QUATERNION *const r ); #endif /*----------------------------------------------------------------------------------* * JBM prototypes *----------------------------------------------------------------------------------*/ Loading
lib_dec/ivas_binRenderer_internal.c +4 −0 Original line number Diff line number Diff line Loading @@ -1026,7 +1026,11 @@ 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 ) { Loading