diff options
Diffstat (limited to 'recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch')
-rw-r--r-- | recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch b/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch deleted file mode 100644 index 423614ac..00000000 --- a/recipes-multimedia/libva/files/0002-Add-DRM-format-mappings-for-JPEG-decoder-output.patch +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | From ea6cd2db43bab97744884001e0d98ba2ff5d3903 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Langdale <philipl@overt.org> | ||
3 | Date: Sat, 5 Aug 2023 11:46:26 +0800 | ||
4 | Subject: [PATCH 2/4] Add DRM format mappings for JPEG decoder output | ||
5 | |||
6 | The output formats from the JPEG decoder are currently not included | ||
7 | in the DRM format mapping functions. This means that any attempt to | ||
8 | call vaExportSurface on JPEG images will fail. | ||
9 | |||
10 | However, there is no functional gap beyond the missing mappings, so if | ||
11 | we add them in, exporting will then work correctly. | ||
12 | |||
13 | The four formats in question are IMC3, 422H, 422V, and 444P. | ||
14 | |||
15 | * 422H and 444P have trivial 1:1 mappings. | ||
16 | * IMC3 can be treated the same as I420, because the only difference is | ||
17 | the chroma pitch, and that's explicitly set in the descriptor | ||
18 | * 422V (aka 440P) has the same memory layout as 422H - it's just a | ||
19 | difference in how the consumer handle the chroma | ||
20 | |||
21 | I also added the missing XYUV composite object mapping - it was already | ||
22 | present for separate planes. | ||
23 | |||
24 | Tested with ffmpeg+mpv. | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/c7cd5a68315674d44ac97ec7cc78856fa90b8036] | ||
27 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
28 | --- | ||
29 | media_driver/linux/common/ddi/media_libva.cpp | 21 ++++++++++++++++++- | ||
30 | 1 file changed, 20 insertions(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/media_driver/linux/common/ddi/media_libva.cpp b/media_driver/linux/common/ddi/media_libva.cpp | ||
33 | index af35be841..1706138a1 100755 | ||
34 | --- a/media_driver/linux/common/ddi/media_libva.cpp | ||
35 | +++ b/media_driver/linux/common/ddi/media_libva.cpp | ||
36 | @@ -6981,8 +6981,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
37 | { | ||
38 | case VA_FOURCC_NV12: | ||
39 | case VA_FOURCC_I420: | ||
40 | + case VA_FOURCC_IMC3: | ||
41 | case VA_FOURCC_YV12: | ||
42 | case VA_FOURCC_YV16: | ||
43 | + case VA_FOURCC_422H: | ||
44 | + case VA_FOURCC_422V: | ||
45 | + case VA_FOURCC_444P: | ||
46 | case VA_FOURCC_Y800: | ||
47 | case VA_FOURCC_RGBP: | ||
48 | case VA_FOURCC_BGRP: | ||
49 | @@ -7055,8 +7059,12 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
50 | case VA_FOURCC_NV12: | ||
51 | return DRM_FORMAT_GR88; | ||
52 | case VA_FOURCC_I420: | ||
53 | + case VA_FOURCC_IMC3: | ||
54 | case VA_FOURCC_YV12: | ||
55 | case VA_FOURCC_YV16: | ||
56 | + case VA_FOURCC_422H: | ||
57 | + case VA_FOURCC_422V: | ||
58 | + case VA_FOURCC_444P: | ||
59 | case VA_FOURCC_RGBP: | ||
60 | case VA_FOURCC_BGRP: | ||
61 | return DRM_FORMAT_R8; | ||
62 | @@ -7070,7 +7078,6 @@ static uint32_t DdiMedia_GetDrmFormatOfSeparatePlane(uint32_t fourcc, int plane) | ||
63 | } | ||
64 | return 0; | ||
65 | } | ||
66 | - | ||
67 | static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
68 | { | ||
69 | switch (fourcc) | ||
70 | @@ -7079,10 +7086,18 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
71 | return DRM_FORMAT_NV12; | ||
72 | case VA_FOURCC_I420: | ||
73 | return DRM_FORMAT_YUV420; | ||
74 | + case VA_FOURCC_IMC3: | ||
75 | + return DRM_FORMAT_YUV420; | ||
76 | case VA_FOURCC_YV12: | ||
77 | return DRM_FORMAT_YVU420; | ||
78 | case VA_FOURCC_YV16: | ||
79 | return DRM_FORMAT_YVU422; | ||
80 | + case VA_FOURCC_422H: | ||
81 | + return DRM_FORMAT_YUV422; | ||
82 | + case VA_FOURCC_422V: | ||
83 | + return DRM_FORMAT_YUV422; | ||
84 | + case VA_FOURCC_444P: | ||
85 | + return DRM_FORMAT_YUV444; | ||
86 | case VA_FOURCC_YUY2: | ||
87 | return DRM_FORMAT_YUYV; | ||
88 | case VA_FOURCC_YVYU: | ||
89 | @@ -7093,6 +7108,10 @@ static uint32_t DdiMedia_GetDrmFormatOfCompositeObject(uint32_t fourcc) | ||
90 | return DRM_FORMAT_UYVY; | ||
91 | case VA_FOURCC_AYUV: | ||
92 | return DRM_FORMAT_AYUV; | ||
93 | +#if VA_CHECK_VERSION(1, 13, 0) | ||
94 | + case VA_FOURCC_XYUV: | ||
95 | + return DRM_FORMAT_XYUV8888; | ||
96 | +#endif | ||
97 | case VA_FOURCC_Y210: | ||
98 | return DRM_FORMAT_Y210; | ||
99 | #if VA_CHECK_VERSION(1, 9, 0) | ||
100 | -- | ||
101 | 2.40.1 | ||
102 | |||