depot/third_party/nixpkgs/pkgs/development/libraries/intel-media-driver/32bit.patch
Default email 7d542a9f98 Project import generated by Copybara.
GitOrigin-RevId: b72b8b94cf0c012b0252a9100a636cad69696666
2022-12-02 08:20:57 +00:00

49 lines
2.3 KiB
Diff

diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp
index 25b4cb0b5..49254c2f0 100755
--- a/media_driver/linux/common/ddi/media_libva_util.cpp
+++ b/media_driver/linux/common/ddi/media_libva_util.cpp
@@ -34,6 +34,7 @@
#include <fcntl.h>
#include <dlfcn.h>
#include <errno.h>
+#include "inttypes.h"
#include "media_libva_util.h"
#include "mos_utilities.h"
@@ -91,7 +92,7 @@ void DdiMediaUtil_MediaPrintFps()
int64_t diff = (tv2.tv_sec - tv1.tv_sec)*1000000 + tv2.tv_usec - tv1.tv_usec;
float fps = frameCountFps / (diff / 1000000.0);
DDI_NORMALMESSAGE("FPS:%6.4f, Interval:%11lu.", fps,((uint64_t)tv2.tv_sec)*1000 + (tv2.tv_usec/1000));
- sprintf(temp,"FPS:%6.4f, Interval:%11lu\n", fps,((uint64_t)tv2.tv_sec)*1000 + (tv2.tv_usec/1000));
+ sprintf(temp,"FPS:%6.4f, Interval:%" PRIu64"\n", fps,((uint64_t)tv2.tv_sec)*1000 + (tv2.tv_usec/1000));
MOS_ZeroMemory(fpsFileName,LENGTH_OF_FPS_FILE_NAME);
sprintf(fpsFileName, FPS_FILE_NAME);
diff --git a/media_softlet/linux/common/ddi/media_libva_util_next.cpp b/media_softlet/linux/common/ddi/media_libva_util_next.cpp
index 66fab63de..38b1fae28 100644
--- a/media_softlet/linux/common/ddi/media_libva_util_next.cpp
+++ b/media_softlet/linux/common/ddi/media_libva_util_next.cpp
@@ -24,6 +24,7 @@
//! \brief libva util next implementaion.
//!
#include <sys/time.h>
+#include "inttypes.h"
#include "media_libva_util_next.h"
#include "mos_utilities.h"
#include "mos_os.h"
@@ -2196,7 +2197,7 @@ void MediaLibvaUtilNext::MediaPrintFps()
int64_t diff = (tv2.tv_sec - m_tv1.tv_sec)*1000000 + tv2.tv_usec - m_tv1.tv_usec;
float fps = m_frameCountFps / (diff / 1000000.0);
DDI_NORMALMESSAGE("FPS:%6.4f, Interval:%11lu.", fps,((uint64_t)tv2.tv_sec)*1000 + (tv2.tv_usec/1000));
- sprintf(temp,"FPS:%6.4f, Interval:%11lu\n", fps,((uint64_t)tv2.tv_sec)*1000 + (tv2.tv_usec/1000));
+ sprintf(temp,"FPS:%6.4f, Interval:%" PRIu64"\n", fps,((uint64_t)tv2.tv_sec)*1000 + (tv2.tv_usec/1000));
MOS_ZeroMemory(fpsFileName,LENGTH_OF_FPS_FILE_NAME);
sprintf(fpsFileName, FPS_FILE_NAME);
@@ -2213,4 +2214,4 @@ void MediaLibvaUtilNext::MediaPrintFps()
pthread_mutex_unlock(&m_fpsMutex);
return;
}
-#endif
\ No newline at end of file
+#endif