diff options
Diffstat (limited to 'recipes-multimedia/libva/files/0001-Change-RGB-mask-and-order.patch')
-rw-r--r-- | recipes-multimedia/libva/files/0001-Change-RGB-mask-and-order.patch | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/recipes-multimedia/libva/files/0001-Change-RGB-mask-and-order.patch b/recipes-multimedia/libva/files/0001-Change-RGB-mask-and-order.patch new file mode 100644 index 00000000..08d15529 --- /dev/null +++ b/recipes-multimedia/libva/files/0001-Change-RGB-mask-and-order.patch | |||
@@ -0,0 +1,126 @@ | |||
1 | From 3e4c7a15148178e670c46bcccd89e48c4c10f370 Mon Sep 17 00:00:00 2001 | ||
2 | From: WenshengZhang <wensheng.zhang@intel.com> | ||
3 | Date: Tue, 22 Oct 2024 14:49:11 +0800 | ||
4 | Subject: [PATCH] Change RGB mask and order | ||
5 | |||
6 | Change RGB mask and order. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/8c7b05bf8a81961c1f111b75cae99818a8bd8aa9] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | |||
11 | --- | ||
12 | media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp | 10 ++++++---- | ||
13 | media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp | 10 ++++++---- | ||
14 | media_driver/linux/gen8/ddi/media_libva_caps_g8.cpp | 10 ++++++---- | ||
15 | media_driver/linux/gen9/ddi/media_libva_caps_g9.cpp | 10 ++++++---- | ||
16 | .../linux/Xe_M_plus/ddi/media_libva_caps_mtl_base.cpp | 10 ++++++---- | ||
17 | 5 files changed, 30 insertions(+), 20 deletions(-) | ||
18 | |||
19 | diff --git a/media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp b/media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp | ||
20 | index 49d252a6b..a04a73a6d 100755 | ||
21 | --- a/media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp | ||
22 | +++ b/media_driver/linux/gen11/ddi/media_libva_caps_g11.cpp | ||
23 | @@ -36,10 +36,12 @@ | ||
24 | #include "media_libva_vp.h" | ||
25 | |||
26 | const VAImageFormat m_supportedImageformatsG11[] = | ||
27 | -{ {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff}, /* [31:0] B:G:R:A 8:8:8:8 little endian */ | ||
28 | - {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff}, /* [31:0] R:G:B:A 8:8:8:8 little endian */ | ||
29 | - {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x0000ff00, 0x00ff0000, 0xff000000, 0}, /* [31:0] B:G:R:x 8:8:8:8 little endian */ | ||
30 | - {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0xff000000, 0x00ff0000, 0x0000ff00, 0}, /* [31:0] R:G:B:x 8:8:8:8 little endian */ | ||
31 | +{ | ||
32 | + // "VA_LSB_FIRST" is to identify how following bit masks mapped to address instead of char order in VA_FOURCC_RGBA naming. | ||
33 | + {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, /* [31:0] A:R:G:B 8:8:8:8 little endian */ | ||
34 | + {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000}, /* [31:0] A:B:G:R 8:8:8:8 little endian */ | ||
35 | + {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0}, /* [31:0] X:R:G:B 8:8:8:8 little endian */ | ||
36 | + {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0}, /* [31:0] X:B:G:R 8:8:8:8 little endian */ | ||
37 | {VA_FOURCC_A2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0x30000000}, /* [31:0] A:R:G:B 2:10:10:10 little endian */ | ||
38 | {VA_FOURCC_A2B10G10R10, VA_LSB_FIRST, 32, 30, 0x000003ff, 0x000ffc00, 0x3ff00000, 0x30000000}, /* [31:0] A:B:G:R 2:10:10:10 little endian */ | ||
39 | {VA_FOURCC_X2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0}, /* [31:0] X:R:G:B 2:10:10:10 little endian */ | ||
40 | diff --git a/media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp b/media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp | ||
41 | index 39b069c78..870e8dcc8 100644 | ||
42 | --- a/media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp | ||
43 | +++ b/media_driver/linux/gen12/ddi/media_libva_caps_g12.cpp | ||
44 | @@ -48,10 +48,12 @@ | ||
45 | #endif | ||
46 | |||
47 | const VAImageFormat m_supportedImageformatsG12[] = | ||
48 | -{ {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff}, /* [31:0] B:G:R:A 8:8:8:8 little endian */ | ||
49 | - {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff}, /* [31:0] R:G:B:A 8:8:8:8 little endian */ | ||
50 | - {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x0000ff00, 0x00ff0000, 0xff000000, 0}, /* [31:0] B:G:R:x 8:8:8:8 little endian */ | ||
51 | - {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0xff000000, 0x00ff0000, 0x0000ff00, 0}, /* [31:0] R:G:B:x 8:8:8:8 little endian */ | ||
52 | +{ | ||
53 | + // "VA_LSB_FIRST" is to identify how following bit masks mapped to address instead of char order in VA_FOURCC_RGBA naming. | ||
54 | + {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, /* [31:0] A:R:G:B 8:8:8:8 little endian */ | ||
55 | + {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000}, /* [31:0] A:B:G:R 8:8:8:8 little endian */ | ||
56 | + {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0}, /* [31:0] X:R:G:B 8:8:8:8 little endian */ | ||
57 | + {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0}, /* [31:0] X:B:G:R 8:8:8:8 little endian */ | ||
58 | {VA_FOURCC_A2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0x30000000}, /* [31:0] A:R:G:B 2:10:10:10 little endian */ | ||
59 | {VA_FOURCC_A2B10G10R10, VA_LSB_FIRST, 32, 30, 0x000003ff, 0x000ffc00, 0x3ff00000, 0x30000000}, /* [31:0] A:B:G:R 2:10:10:10 little endian */ | ||
60 | {VA_FOURCC_X2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0}, /* [31:0] X:R:G:B 2:10:10:10 little endian */ | ||
61 | diff --git a/media_driver/linux/gen8/ddi/media_libva_caps_g8.cpp b/media_driver/linux/gen8/ddi/media_libva_caps_g8.cpp | ||
62 | index 3ec2e1e39..b31315cf4 100644 | ||
63 | --- a/media_driver/linux/gen8/ddi/media_libva_caps_g8.cpp | ||
64 | +++ b/media_driver/linux/gen8/ddi/media_libva_caps_g8.cpp | ||
65 | @@ -31,10 +31,12 @@ | ||
66 | #include "media_libva_caps_factory.h" | ||
67 | |||
68 | const VAImageFormat m_supportedImageformatsG8[] = | ||
69 | -{ {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, | ||
70 | - {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000}, | ||
71 | - {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0}, | ||
72 | - {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0}, | ||
73 | +{ | ||
74 | + // "VA_LSB_FIRST" is to identify how following bit masks mapped to address instead of char order in VA_FOURCC_RGBA naming. | ||
75 | + {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, /* [31:0] A:R:G:B 8:8:8:8 little endian */ | ||
76 | + {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000}, /* [31:0] A:B:G:R 8:8:8:8 little endian */ | ||
77 | + {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0}, /* [31:0] X:R:G:B 8:8:8:8 little endian */ | ||
78 | + {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0}, /* [31:0] X:B:G:R 8:8:8:8 little endian */ | ||
79 | {VA_FOURCC_RGB565, VA_LSB_FIRST, 16, 16, 0xf800, 0x07e0, 0x001f, 0}, | ||
80 | {VA_FOURCC_NV12, VA_LSB_FIRST, 12, 0,0,0,0,0}, | ||
81 | {VA_FOURCC_NV21, VA_LSB_FIRST, 12, 0,0,0,0,0}, | ||
82 | diff --git a/media_driver/linux/gen9/ddi/media_libva_caps_g9.cpp b/media_driver/linux/gen9/ddi/media_libva_caps_g9.cpp | ||
83 | index cdf891a26..4c2f82041 100755 | ||
84 | --- a/media_driver/linux/gen9/ddi/media_libva_caps_g9.cpp | ||
85 | +++ b/media_driver/linux/gen9/ddi/media_libva_caps_g9.cpp | ||
86 | @@ -32,10 +32,12 @@ | ||
87 | #include "media_libva_caps_factory.h" | ||
88 | |||
89 | const VAImageFormat m_supportedImageformatsG9[] = | ||
90 | -{ {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff}, /* [31:0] B:G:R:A 8:8:8:8 little endian */ | ||
91 | - {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff}, /* [31:0] R:G:B:A 8:8:8:8 little endian */ | ||
92 | - {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x0000ff00, 0x00ff0000, 0xff000000, 0}, /* [31:0] B:G:R:x 8:8:8:8 little endian */ | ||
93 | - {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0xff000000, 0x00ff0000, 0x0000ff00, 0}, /* [31:0] R:G:B:x 8:8:8:8 little endian */ | ||
94 | +{ | ||
95 | + // "VA_LSB_FIRST" is to identify how following bit masks mapped to address instead of char order in VA_FOURCC_RGBA naming. | ||
96 | + {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, /* [31:0] A:R:G:B 8:8:8:8 little endian */ | ||
97 | + {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000}, /* [31:0] A:B:G:R 8:8:8:8 little endian */ | ||
98 | + {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0}, /* [31:0] X:R:G:B 8:8:8:8 little endian */ | ||
99 | + {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0}, /* [31:0] X:B:G:R 8:8:8:8 little endian */ | ||
100 | {VA_FOURCC_A2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0x30000000}, /* [31:0] A:R:G:B 2:10:10:10 little endian */ | ||
101 | {VA_FOURCC_A2B10G10R10, VA_LSB_FIRST, 32, 30, 0x000003ff, 0x000ffc00, 0x3ff00000, 0x30000000}, /* [31:0] A:B:G:R 2:10:10:10 little endian */ | ||
102 | {VA_FOURCC_X2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0}, /* [31:0] X:R:G:B 2:10:10:10 little endian */ | ||
103 | diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl_base.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl_base.cpp | ||
104 | index d985fccba..ac9bb5c62 100644 | ||
105 | --- a/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl_base.cpp | ||
106 | +++ b/media_softlet/linux/Xe_M_plus/ddi/media_libva_caps_mtl_base.cpp | ||
107 | @@ -39,10 +39,12 @@ | ||
108 | #include "drm_fourcc.h" | ||
109 | |||
110 | const VAImageFormat m_supportedImageformatsXe_Lpm_Plus_Base[] = | ||
111 | -{ {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff}, /* [31:0] B:G:R:A 8:8:8:8 little endian */ | ||
112 | - {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff}, /* [31:0] R:G:B:A 8:8:8:8 little endian */ | ||
113 | - {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x0000ff00, 0x00ff0000, 0xff000000, 0}, /* [31:0] B:G:R:x 8:8:8:8 little endian */ | ||
114 | - {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0xff000000, 0x00ff0000, 0x0000ff00, 0}, /* [31:0] R:G:B:x 8:8:8:8 little endian */ | ||
115 | +{ | ||
116 | + // "VA_LSB_FIRST" is to identify how following bit masks mapped to address instead of char order in VA_FOURCC_RGBA naming. | ||
117 | + {VA_FOURCC_BGRA, VA_LSB_FIRST, 32, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000}, /* [31:0] A:R:G:B 8:8:8:8 little endian */ | ||
118 | + {VA_FOURCC_RGBA, VA_LSB_FIRST, 32, 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000}, /* [31:0] A:B:G:R 8:8:8:8 little endian */ | ||
119 | + {VA_FOURCC_BGRX, VA_LSB_FIRST, 32, 24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0}, /* [31:0] X:R:G:B 8:8:8:8 little endian */ | ||
120 | + {VA_FOURCC_RGBX, VA_LSB_FIRST, 32, 24, 0x000000ff, 0x0000ff00, 0x00ff0000, 0}, /* [31:0] X:B:G:R 8:8:8:8 little endian */ | ||
121 | {VA_FOURCC_A2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0x30000000}, /* [31:0] A:R:G:B 2:10:10:10 little endian */ | ||
122 | {VA_FOURCC_A2B10G10R10, VA_LSB_FIRST, 32, 30, 0x000003ff, 0x000ffc00, 0x3ff00000, 0x30000000}, /* [31:0] A:B:G:R 2:10:10:10 little endian */ | ||
123 | {VA_FOURCC_X2R10G10B10, VA_LSB_FIRST, 32, 30, 0x3ff00000, 0x000ffc00, 0x000003ff, 0}, /* [31:0] X:R:G:B 2:10:10:10 little endian */ | ||
124 | -- | ||
125 | 2.43.2 | ||
126 | |||