summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/vpl/files/0003-Enable-YUV400-JPEG-Enc-for-linux-vaapi-only.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/vpl/files/0003-Enable-YUV400-JPEG-Enc-for-linux-vaapi-only.patch')
-rw-r--r--recipes-multimedia/vpl/files/0003-Enable-YUV400-JPEG-Enc-for-linux-vaapi-only.patch76
1 files changed, 0 insertions, 76 deletions
diff --git a/recipes-multimedia/vpl/files/0003-Enable-YUV400-JPEG-Enc-for-linux-vaapi-only.patch b/recipes-multimedia/vpl/files/0003-Enable-YUV400-JPEG-Enc-for-linux-vaapi-only.patch
deleted file mode 100644
index 7e735556..00000000
--- a/recipes-multimedia/vpl/files/0003-Enable-YUV400-JPEG-Enc-for-linux-vaapi-only.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1From a876f3bd8d31ae47e4f8148ec89edef1eb5dee5f Mon Sep 17 00:00:00 2001
2From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com>
3Date: Wed, 12 Jun 2024 10:58:13 +0800
4Subject: [PATCH 3/9] Enable YUV400 JPEG Enc for linux vaapi only
5
6Upstream-Status: Backport [https://github.com/intel/libvpl-tools/commit/ef82b8a608999e56a2449937d1fa4cbee274d9ab]
7Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8---
9 .../sample_encode/src/pipeline_encode.cpp | 28 +++++++++++++++----
10 .../sample_encode/src/sample_encode.cpp | 2 +-
11 2 files changed, 23 insertions(+), 7 deletions(-)
12
13diff --git a/tools/legacy/sample_encode/src/pipeline_encode.cpp b/tools/legacy/sample_encode/src/pipeline_encode.cpp
14index cda607b..b29dc29 100644
15--- a/tools/legacy/sample_encode/src/pipeline_encode.cpp
16+++ b/tools/legacy/sample_encode/src/pipeline_encode.cpp
17@@ -846,9 +846,15 @@ mfxStatus CEncodingPipeline::CheckHyperEncodeParams(mfxHyperMode hyperMode) {
18 #endif
19
20 mfxU32 CEncodingPipeline::FileFourCC2EncFourCC(mfxU32 fcc) {
21- // File reader automatically converts I420 and YV12 to NV12
22- if (fcc == MFX_FOURCC_I420 || fcc == MFX_FOURCC_YV12)
23+ // File reader automatically converts I420, YV12 to NV12
24+ // On windows, YUV400 is automatically converts to NV12.
25+ if (fcc == MFX_FOURCC_I420 || fcc == MFX_FOURCC_YV12
26+#if (defined(_WIN64) || defined(_WIN32))
27+ || fcc == MFX_FOURCC_YUV400
28+#endif
29+ ) {
30 return MFX_FOURCC_NV12;
31+ }
32 else
33 return fcc;
34 }
35@@ -1652,11 +1658,21 @@ mfxStatus CEncodingPipeline::Init(sInputParams* pParams) {
36
37 // FileReader can convert yv12->nv12 without vpp, when hw impl
38 if (pParams->bUseHWLib) {
39- m_InputFourCC = (pParams->FileInputFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12
40- : pParams->FileInputFourCC;
41+ m_InputFourCC = ((pParams->FileInputFourCC == MFX_FOURCC_I420)
42+#if (defined(_WIN64) || defined(_WIN32))
43+ || (pParams->FileInputFourCC == MFX_FOURCC_YUV400)
44+#endif
45+ )
46+ ? MFX_FOURCC_NV12
47+ : pParams->FileInputFourCC;
48
49- pParams->EncodeFourCC =
50- (pParams->EncodeFourCC == MFX_FOURCC_I420) ? MFX_FOURCC_NV12 : pParams->EncodeFourCC;
51+ pParams->EncodeFourCC = ((pParams->EncodeFourCC == MFX_FOURCC_I420)
52+#if (defined(_WIN64) || defined(_WIN32))
53+ || (pParams->EncodeFourCC == MFX_FOURCC_YUV400)
54+#endif
55+ )
56+ ? MFX_FOURCC_NV12
57+ : pParams->EncodeFourCC;
58 }
59 else {
60 m_InputFourCC = pParams->FileInputFourCC;
61diff --git a/tools/legacy/sample_encode/src/sample_encode.cpp b/tools/legacy/sample_encode/src/sample_encode.cpp
62index 7c722ea..ed142f5 100644
63--- a/tools/legacy/sample_encode/src/sample_encode.cpp
64+++ b/tools/legacy/sample_encode/src/sample_encode.cpp
65@@ -95,7 +95,7 @@ void PrintHelp(char* strAppName, const char* strErrorMessage, ...) {
66 printf(
67 " [-nv12|nv16|yuy2|uyvy|ayuv|rgb4|bgr4|p010|y210|y410|a2rgb10|p016|p210|y216|i010|i420] - input color format (by default YUV420 is expected).\n");
68 printf(
69- " [-yuv400] - input color format is YUV400 (grayscale) and will be converted to NV12 for encoding (JPEG only).\n");
70+ " [-yuv400] - input color format is YUV400 (grayscale) and will be converted to NV12 for encoding (JPEG Windows only).\n");
71 printf(
72 " [-msb10] - 10-bit color format is expected to have data in Most Significant Bits of words.\n (LSB data placement is expected by default).\n This option also disables data shifting during file reading.\n");
73 printf(
74--
752.43.2
76