diff options
Diffstat (limited to 'recipes-multimedia')
37 files changed, 1246 insertions, 2160 deletions
diff --git a/recipes-multimedia/itt/itt_3.22.5.bb b/recipes-multimedia/itt/itt_3.24.6.bb index e598dce3..1c4759f9 100644 --- a/recipes-multimedia/itt/itt_3.22.5.bb +++ b/recipes-multimedia/itt/itt_3.24.6.bb | |||
@@ -3,13 +3,13 @@ DESCRIPTION = "The Instrumentation and Tracing Technology (ITT) API enables \ | |||
3 | application to generate and control the collection of trace data during its \ | 3 | application to generate and control the collection of trace data during its \ |
4 | execution across different Intel tools." | 4 | execution across different Intel tools." |
5 | 5 | ||
6 | LICENSE = "BSD-3-Clause & GPLv2" | 6 | LICENSE = "BSD-3-Clause & GPL-2.0-only" |
7 | LIC_FILES_CHKSUM = "file://LICENSES/BSD-3-Clause.txt;md5=c551872bcf41ce707df54c722edeca7b \ | 7 | LIC_FILES_CHKSUM = "file://LICENSES/BSD-3-Clause.txt;md5=c551872bcf41ce707df54c722edeca7b \ |
8 | file://LICENSES/GPL-2.0-only.txt;md5=e2d76e7801260c21b90eea3605508ad6 \ | 8 | file://LICENSES/GPL-2.0-only.txt;md5=e2d76e7801260c21b90eea3605508ad6 \ |
9 | " | 9 | " |
10 | 10 | ||
11 | SRC_URI = "git://github.com/intel/ittapi.git;protocol=https;branch=master" | 11 | SRC_URI = "git://github.com/intel/ittapi.git;protocol=https;branch=master" |
12 | SRCREV = "ca5e389079a08764b72c95f4ecfe6ee64f9c8848" | 12 | SRCREV = "ec077431fc725dba590b09b2cec5137878b14783" |
13 | S = "${WORKDIR}/git" | 13 | S = "${WORKDIR}/git" |
14 | PE = "1" | 14 | PE = "1" |
15 | 15 | ||
diff --git a/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch b/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch new file mode 100644 index 00000000..90dff8d1 --- /dev/null +++ b/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 1b303f417113ad1aa6b63fc024fbe4aa0c943f57 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Tue, 5 Sep 2023 16:13:42 +0800 | ||
4 | Subject: [PATCH 01/12] Disable vp9 padding on mtl. | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1720] | ||
7 | |||
8 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
9 | --- | ||
10 | media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | ||
14 | index 844545a87..72265289c 100644 | ||
15 | --- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | ||
16 | +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | ||
17 | @@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo, | ||
18 | |||
19 | MEDIA_WR_WA(waTable, WaDisableSetObjectCapture, 1); | ||
20 | |||
21 | - MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1); | ||
22 | + MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0); | ||
23 | |||
24 | MEDIA_WR_WA(waTable, Wa_15013355402, 1); | ||
25 | |||
26 | @@ -337,4 +337,4 @@ static struct LinuxDeviceInit arlDeviceInit = | ||
27 | }; | ||
28 | |||
29 | static bool arlDeviceRegister = DeviceInfoFactory<LinuxDeviceInit>:: | ||
30 | - RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); | ||
31 | \ No newline at end of file | ||
32 | + RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit); | ||
33 | -- | ||
34 | 2.40.1 | ||
35 | |||
diff --git a/recipes-multimedia/libva/files/0001-MOS-user-setting-reentrant.patch b/recipes-multimedia/libva/files/0001-MOS-user-setting-reentrant.patch deleted file mode 100644 index 9b9cfe35..00000000 --- a/recipes-multimedia/libva/files/0001-MOS-user-setting-reentrant.patch +++ /dev/null | |||
@@ -1,476 +0,0 @@ | |||
1 | From b2c07abaf546f84529b39cb4ae443ed2a5bc35e9 Mon Sep 17 00:00:00 2001 | ||
2 | From: jinchung <you@example.com> | ||
3 | Date: Wed, 3 Nov 2021 14:02:51 +0000 | ||
4 | Subject: [PATCH] [MOS] user setting reentrant | ||
5 | |||
6 | Fix for registry key reentrant on Linux during multiple processes | ||
7 | |||
8 | Upstream-Status: Submitted [internal innersource] | ||
9 | innersource PR #45124 | ||
10 | |||
11 | Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com> | ||
12 | Signed-off-by: Wang, Pingli <pingli.wang@intel.com> | ||
13 | --- | ||
14 | .../common/os/mos_utilities_specific.cpp | 2 +- | ||
15 | .../linux/common/os/mos_utilities_specific.h | 2 +- | ||
16 | .../agnostic/common/os/mos_utilities_next.cpp | 15 ++- | ||
17 | .../agnostic/common/os/mos_utilities_next.h | 2 +- | ||
18 | .../common/os/mos_utilities_specific_next.cpp | 107 +++++++----------- | ||
19 | .../common/os/mos_utilities_specific_next.h | 71 ++++++------ | ||
20 | 6 files changed, 89 insertions(+), 110 deletions(-) | ||
21 | |||
22 | diff --git a/media_driver/linux/common/os/mos_utilities_specific.cpp b/media_driver/linux/common/os/mos_utilities_specific.cpp | ||
23 | index ae414360..62eb4593 100644 | ||
24 | --- a/media_driver/linux/common/os/mos_utilities_specific.cpp | ||
25 | +++ b/media_driver/linux/common/os/mos_utilities_specific.cpp | ||
26 | @@ -589,7 +589,7 @@ static int32_t _UserFeature_FindValue(MOS_UF_KEY UFKey, char * const pcValueName | ||
27 | |||
28 | iResult = -1; | ||
29 | |||
30 | - for ( i = 0; i < (int32_t)UFKey.ulValueNum; i++ ) | ||
31 | + for ( i = 0; i < UFKey.ulValueNum; i++ ) | ||
32 | { | ||
33 | iResult = strcmp(UFKey.pValueArray[i].pcValueName, pcValueName); | ||
34 | if ( iResult == 0 ) | ||
35 | diff --git a/media_driver/linux/common/os/mos_utilities_specific.h b/media_driver/linux/common/os/mos_utilities_specific.h | ||
36 | index 81d84537..3d1cda35 100644 | ||
37 | --- a/media_driver/linux/common/os/mos_utilities_specific.h | ||
38 | +++ b/media_driver/linux/common/os/mos_utilities_specific.h | ||
39 | @@ -116,7 +116,7 @@ typedef struct _MOS_UF_VALUE { | ||
40 | typedef struct _MOS_UF_KEY { | ||
41 | void *UFKey; | ||
42 | char pcKeyName[MAX_USERFEATURE_LINE_LENGTH]; | ||
43 | - uint32_t ulValueNum; | ||
44 | + int32_t ulValueNum; | ||
45 | MOS_UF_VALUE *pValueArray; | ||
46 | } MOS_UF_KEY; | ||
47 | |||
48 | diff --git a/media_softlet/agnostic/common/os/mos_utilities_next.cpp b/media_softlet/agnostic/common/os/mos_utilities_next.cpp | ||
49 | index 8427ec17..74ba75b9 100644 | ||
50 | --- a/media_softlet/agnostic/common/os/mos_utilities_next.cpp | ||
51 | +++ b/media_softlet/agnostic/common/os/mos_utilities_next.cpp | ||
52 | @@ -1930,9 +1930,18 @@ MOS_STATUS MosUtilities::MosUserFeatureReadValueFromMapID( | ||
53 | &ufKey, | ||
54 | ufInfo)) != MOS_STATUS_SUCCESS) | ||
55 | { | ||
56 | - MOS_OS_NORMALMESSAGE("Failed to open user feature for reading eStatus:%d.", eStatus); | ||
57 | - eStatus = MOS_STATUS_USER_FEATURE_KEY_OPEN_FAILED; | ||
58 | - goto finish; | ||
59 | + MOS_OS_NORMALMESSAGE("Failed to open user feature for concurrency."); | ||
60 | + if ((eStatus = MosUserFeatureOpen( | ||
61 | + pUserFeature->Type, | ||
62 | + pUserFeature->pcPath, | ||
63 | + KEY_READ, | ||
64 | + &ufKey, | ||
65 | + ufInfo)) != MOS_STATUS_SUCCESS) | ||
66 | + { | ||
67 | + MOS_OS_NORMALMESSAGE("Failed to open user feature for reading eStatus:%d.", eStatus); | ||
68 | + eStatus = MOS_STATUS_USER_FEATURE_KEY_OPEN_FAILED; | ||
69 | + goto finish; | ||
70 | + } | ||
71 | } | ||
72 | |||
73 | // Initialize Read Value | ||
74 | diff --git a/media_softlet/agnostic/common/os/mos_utilities_next.h b/media_softlet/agnostic/common/os/mos_utilities_next.h | ||
75 | index f492a2c7..65aa3729 100644 | ||
76 | --- a/media_softlet/agnostic/common/os/mos_utilities_next.h | ||
77 | +++ b/media_softlet/agnostic/common/os/mos_utilities_next.h | ||
78 | @@ -653,7 +653,7 @@ public: | ||
79 | //! | ||
80 | //! \brief Unlink the user feature key Desc Fields table items to key value map | ||
81 | //! \details Unlink the user feature key Desc Fields table items to key value map | ||
82 | - //! according to ID sequence and do some post processing by calling MOS_DestroyUserFeatureData | ||
83 | + //! according to ID sequence and do some post processing by calling MOSDestroyUserFeatureData | ||
84 | //! \param [in] pUserFeatureKey | ||
85 | //! Pointer to the User Feature Value needed to be destroyed | ||
86 | //! \return MOS_STATUS | ||
87 | diff --git a/media_softlet/linux/common/os/mos_utilities_specific_next.cpp b/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
88 | index 81ee4bdf..584ba086 100644 | ||
89 | --- a/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
90 | +++ b/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
91 | @@ -47,7 +47,8 @@ | ||
92 | #include <unistd.h> // fork | ||
93 | #include <algorithm> | ||
94 | |||
95 | -const char *MosUtilitiesSpecificNext::m_szUserFeatureFile = USER_FEATURE_FILE; | ||
96 | +const char *MosUtilitiesSpecificNext::m_szUserFeatureFile = USER_FEATURE_FILE; | ||
97 | +MOS_PUF_KEYLIST MosUtilitiesSpecificNext::m_ufKeyList = nullptr; | ||
98 | |||
99 | double MosUtilities::MosGetTime() | ||
100 | { | ||
101 | @@ -540,7 +541,7 @@ void MosUtilities::MosSleep(uint32_t mSec) | ||
102 | |||
103 | iResult = -1; | ||
104 | |||
105 | - for ( i = 0; i < (int32_t)UFKey.ulValueNum; i++ ) | ||
106 | + for ( i = 0; i < UFKey.ulValueNum; i++ ) | ||
107 | { | ||
108 | iResult = strcmp(UFKey.pValueArray[i].pcValueName, pcValueName); | ||
109 | if ( iResult == 0 ) | ||
110 | @@ -566,7 +567,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureAdd(MOS_PUF_KEYLIST *pKeyList, M | ||
111 | return MOS_STATUS_INVALID_PARAMETER; | ||
112 | } | ||
113 | |||
114 | - pNewNode = (MOS_UF_KEYNODE*)MOS_AllocMemory(sizeof(MOS_UF_KEYNODE)); | ||
115 | + pNewNode = (MOS_UF_KEYNODE*)MOS_AllocAndZeroMemory(sizeof(MOS_UF_KEYNODE)); | ||
116 | if (pNewNode == nullptr) | ||
117 | { | ||
118 | return MOS_STATUS_NO_SPACE; | ||
119 | @@ -604,41 +605,34 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
120 | } | ||
121 | |||
122 | // Prepare the ValueBuff of the NewKey | ||
123 | - if ((ulValueBuf = MOS_AllocMemory(NewKey.pValueArray[0].ulValueLen)) == nullptr) | ||
124 | + if ((ulValueBuf = MOS_AllocAndZeroMemory(NewKey.pValueArray[0].ulValueLen)) == nullptr) | ||
125 | { | ||
126 | return MOS_STATUS_NO_SPACE; | ||
127 | } | ||
128 | + MOS_AtomicIncrement(&MosUtilities::m_mosMemAllocFakeCounter); //ulValueBuf does not count it, because it is freed after the MEMNJA final report. | ||
129 | + MOS_OS_NORMALMESSAGE("ulValueBuf %p for key %s", ulValueBuf, NewKey.pValueArray[0].pcValueName); | ||
130 | |||
131 | if ( (iPos = UserFeatureFindValue(*Key, NewKey.pValueArray[0].pcValueName)) == NOT_FOUND) | ||
132 | { | ||
133 | //not found, add a new value to key struct. | ||
134 | //reallocate memory for appending this value. | ||
135 | - pValueArray = (MOS_UF_VALUE*)MOS_AllocMemory(sizeof(MOS_UF_VALUE)*(Key->ulValueNum+1)); | ||
136 | - if (pValueArray == nullptr) | ||
137 | + iPos = MOS_AtomicIncrement(&Key->ulValueNum); | ||
138 | + if (iPos >= UF_CAPABILITY) | ||
139 | { | ||
140 | - MOS_FreeMemory(ulValueBuf); | ||
141 | - return MOS_STATUS_NO_SPACE; | ||
142 | + MOS_OS_ASSERTMESSAGE("user setting value icount %d must less than UF_CAPABILITY(64)", iPos); | ||
143 | + return MOS_STATUS_USER_FEATURE_KEY_READ_FAILED; | ||
144 | } | ||
145 | |||
146 | - MosUtilities::MosSecureMemcpy(pValueArray, | ||
147 | - sizeof(MOS_UF_VALUE)*(Key->ulValueNum), | ||
148 | - Key->pValueArray, | ||
149 | - sizeof(MOS_UF_VALUE)*(Key->ulValueNum)); | ||
150 | - | ||
151 | - MOS_FreeMemory(Key->pValueArray); | ||
152 | - | ||
153 | - Key->pValueArray = pValueArray; | ||
154 | - | ||
155 | - iPos = Key->ulValueNum; | ||
156 | - MosUtilities::MosSecureStrcpy(Key->pValueArray[Key->ulValueNum].pcValueName, | ||
157 | + MosUtilities::MosSecureStrcpy(Key->pValueArray[iPos].pcValueName, | ||
158 | MAX_USERFEATURE_LINE_LENGTH, | ||
159 | NewKey.pValueArray[0].pcValueName); | ||
160 | - Key->ulValueNum ++; | ||
161 | } | ||
162 | else | ||
163 | { | ||
164 | //if found, the previous value buffer needs to be freed before reallocating | ||
165 | MOS_FreeMemory(Key->pValueArray[iPos].ulValueBuf); | ||
166 | + MOS_AtomicDecrement(&MosUtilities::m_mosMemAllocFakeCounter); | ||
167 | + MOS_OS_NORMALMESSAGE("ulValueBuf %p for key %s", ulValueBuf, NewKey.pValueArray[0].pcValueName); | ||
168 | } | ||
169 | |||
170 | Key->pValueArray[iPos].ulValueLen = NewKey.pValueArray[0].ulValueLen; | ||
171 | @@ -733,7 +727,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureDumpFile(const char * const szF | ||
172 | iCurId = 0; | ||
173 | eStatus = MOS_STATUS_SUCCESS; | ||
174 | |||
175 | - CurKey = (MOS_UF_KEY*)MOS_AllocMemory(sizeof(MOS_UF_KEY)); | ||
176 | + CurKey = (MOS_UF_KEY*)MOS_AllocAndZeroMemory(sizeof(MOS_UF_KEY)); | ||
177 | if (CurKey == nullptr) | ||
178 | { | ||
179 | return MOS_STATUS_NO_SPACE; | ||
180 | @@ -771,7 +765,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureDumpFile(const char * const szF | ||
181 | // if the CurKey didn't be added in pKeyList, free it. | ||
182 | MOS_FreeMemory(CurKey); | ||
183 | } | ||
184 | - CurKey = (MOS_UF_KEY*)MOS_AllocMemory(sizeof(MOS_UF_KEY)); | ||
185 | + CurKey = (MOS_UF_KEY*)MOS_AllocAndZeroMemory(sizeof(MOS_UF_KEY)); | ||
186 | if (CurKey == nullptr) | ||
187 | { | ||
188 | eStatus = MOS_STATUS_NO_SPACE; | ||
189 | @@ -796,7 +790,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureDumpFile(const char * const szF | ||
190 | CurKey->ulValueNum = 0; | ||
191 | |||
192 | // allocate capability length for valuearray. | ||
193 | - CurValue = (MOS_UF_VALUE*)MOS_AllocMemory(sizeof(MOS_UF_VALUE)*UF_CAPABILITY); | ||
194 | + CurValue = (MOS_UF_VALUE*)MOS_AllocAndZeroMemory(sizeof(MOS_UF_VALUE)*UF_CAPABILITY); | ||
195 | if (CurValue == nullptr) | ||
196 | { | ||
197 | eStatus = MOS_STATUS_NO_SPACE; | ||
198 | @@ -826,6 +820,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureDumpFile(const char * const szF | ||
199 | if (iCount < 0 || iCount >= UF_CAPABILITY) | ||
200 | { | ||
201 | eStatus = MOS_STATUS_USER_FEATURE_KEY_READ_FAILED; | ||
202 | + MOS_OS_ASSERTMESSAGE("user setting value icount %d, and it must meet 0 < icount < UF_CAPABILITY(64)", iCount); | ||
203 | break; | ||
204 | } | ||
205 | |||
206 | @@ -987,7 +982,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureDumpDataToFile(const char *szFil | ||
207 | fprintf(File, "%s\n", UF_KEY_ID); | ||
208 | fprintf(File, "\t0x%.8x\n", (uint32_t)(uintptr_t)pKeyTmp->pElem->UFKey); | ||
209 | fprintf(File, "\t%s\n", pKeyTmp->pElem->pcKeyName); | ||
210 | - for ( j = 0; j < (int32_t)pKeyTmp->pElem->ulValueNum; j ++ ) | ||
211 | + for ( j = 0; j < pKeyTmp->pElem->ulValueNum; j ++ ) | ||
212 | { | ||
213 | fprintf(File, "\t\t%s\n", UF_VALUE_ID); | ||
214 | if ( strlen(pKeyTmp->pElem->pValueArray[j].pcValueName) > 0 ) | ||
215 | @@ -1015,10 +1010,9 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureDumpDataToFile(const char *szFil | ||
216 | break; | ||
217 | } //switch (pKeyTmp->pElem->pValueArray[j].ulValueType) | ||
218 | } | ||
219 | - } // for ( j = 0; j < (int32_t)pKeyTmp->pElem->ulValueNum; j ++ ) | ||
220 | + } // for ( j = 0; j < pKeyTmp->pElem->ulValueNum; j ++ ) | ||
221 | } //for (pKeyTmp = pKeyList; pKeyTmp; pKeyTmp = pKeyTmp->pNext) | ||
222 | fclose(File); | ||
223 | - MosUtilities::MosUserFeatureNotifyChangeKeyValue(nullptr, false, nullptr, true); | ||
224 | |||
225 | return MOS_STATUS_SUCCESS; | ||
226 | } | ||
227 | @@ -1055,12 +1049,10 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSetValue( | ||
228 | MOS_UF_KEY NewKey; | ||
229 | MOS_UF_VALUE NewValue; | ||
230 | MOS_STATUS eStatus; | ||
231 | - MOS_PUF_KEYLIST pKeyList; | ||
232 | |||
233 | eStatus = MOS_STATUS_UNKNOWN; | ||
234 | - pKeyList = nullptr; | ||
235 | |||
236 | - if ( (strKey== nullptr) || (pcValueName == nullptr) ) | ||
237 | + if ((strKey == nullptr) || (pcValueName == nullptr) || (m_ufKeyList == nullptr)) | ||
238 | { | ||
239 | return MOS_STATUS_INVALID_PARAMETER; | ||
240 | } | ||
241 | @@ -1083,18 +1075,11 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSetValue( | ||
242 | NewKey.pValueArray = &NewValue; | ||
243 | NewKey.ulValueNum = 1; | ||
244 | |||
245 | - if ((eStatus = UserFeatureDumpFile(m_szUserFeatureFile, &pKeyList)) != MOS_STATUS_SUCCESS) | ||
246 | + if ( ( eStatus = UserFeatureSet(&MosUtilitiesSpecificNext::m_ufKeyList, NewKey)) == MOS_STATUS_SUCCESS ) | ||
247 | { | ||
248 | - UserFeatureFreeKeyList(pKeyList); | ||
249 | - return eStatus; | ||
250 | + MosUtilities::MosUserFeatureNotifyChangeKeyValue(nullptr, false, nullptr, true); | ||
251 | } | ||
252 | |||
253 | - if ( ( eStatus = UserFeatureSet(&pKeyList, NewKey)) == MOS_STATUS_SUCCESS ) | ||
254 | - { | ||
255 | - eStatus = UserFeatureDumpDataToFile(m_szUserFeatureFile, pKeyList); | ||
256 | - } | ||
257 | - | ||
258 | - UserFeatureFreeKeyList(pKeyList); | ||
259 | return eStatus; | ||
260 | } | ||
261 | |||
262 | @@ -1114,9 +1099,9 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureQueryValue( | ||
263 | char strTempValueName[MAX_USERFEATURE_LINE_LENGTH]; | ||
264 | |||
265 | eStatus = MOS_STATUS_UNKNOWN; | ||
266 | - pKeyList = nullptr; | ||
267 | + pKeyList = MosUtilitiesSpecificNext::m_ufKeyList; | ||
268 | |||
269 | - if ( (strKey == nullptr) || (pcValueName == nullptr)) | ||
270 | + if ( (strKey == nullptr) || (pcValueName == nullptr) || (pKeyList == nullptr)) | ||
271 | { | ||
272 | return MOS_STATUS_INVALID_PARAMETER; | ||
273 | } | ||
274 | @@ -1129,21 +1114,17 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureQueryValue( | ||
275 | NewKey.pValueArray = &NewValue; | ||
276 | NewKey.ulValueNum = 1; | ||
277 | |||
278 | - if ((eStatus = UserFeatureDumpFile(m_szUserFeatureFile, &pKeyList)) == MOS_STATUS_SUCCESS) | ||
279 | + if ( (eStatus = UserFeatureQuery(pKeyList, &NewKey)) == MOS_STATUS_SUCCESS ) | ||
280 | { | ||
281 | - if ( (eStatus = UserFeatureQuery(pKeyList, &NewKey)) == MOS_STATUS_SUCCESS ) | ||
282 | + if(uiValueType != nullptr) | ||
283 | { | ||
284 | - if(uiValueType != nullptr) | ||
285 | - { | ||
286 | - *uiValueType = NewKey.pValueArray[0].ulValueType; | ||
287 | - } | ||
288 | - if (nDataSize != nullptr) | ||
289 | - { | ||
290 | - *nDataSize = NewKey.pValueArray[0].ulValueLen; | ||
291 | - } | ||
292 | + *uiValueType = NewKey.pValueArray[0].ulValueType; | ||
293 | + } | ||
294 | + if (nDataSize != nullptr) | ||
295 | + { | ||
296 | + *nDataSize = NewKey.pValueArray[0].ulValueLen; | ||
297 | } | ||
298 | } | ||
299 | - UserFeatureFreeKeyList(pKeyList); | ||
300 | |||
301 | return eStatus; | ||
302 | } | ||
303 | @@ -1155,16 +1136,9 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureGetKeyIdbyName(const char *pcKe | ||
304 | MOS_STATUS eStatus; | ||
305 | MOS_PUF_KEYLIST pTempNode; | ||
306 | |||
307 | - pKeyList = nullptr; | ||
308 | + pKeyList = MosUtilitiesSpecificNext::m_ufKeyList; | ||
309 | iResult = -1; | ||
310 | |||
311 | - if ((eStatus = UserFeatureDumpFile(m_szUserFeatureFile, &pKeyList)) != | ||
312 | - MOS_STATUS_SUCCESS ) | ||
313 | - { | ||
314 | - UserFeatureFreeKeyList(pKeyList); | ||
315 | - return eStatus; | ||
316 | - } | ||
317 | - | ||
318 | eStatus = MOS_STATUS_INVALID_PARAMETER; | ||
319 | |||
320 | for(pTempNode=pKeyList; pTempNode; pTempNode=pTempNode->pNext) | ||
321 | @@ -1177,7 +1151,6 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureGetKeyIdbyName(const char *pcKe | ||
322 | break; | ||
323 | } | ||
324 | } | ||
325 | - UserFeatureFreeKeyList(pKeyList); | ||
326 | |||
327 | return eStatus; | ||
328 | } | ||
329 | @@ -1188,7 +1161,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureGetKeyNamebyId(void *UFKey, cha | ||
330 | MOS_PUF_KEYLIST pTempNode; | ||
331 | MOS_STATUS eStatus; | ||
332 | |||
333 | - pKeyList = nullptr; | ||
334 | + pKeyList = MosUtilitiesSpecificNext::m_ufKeyList; | ||
335 | |||
336 | switch((uintptr_t)UFKey) | ||
337 | { | ||
338 | @@ -1201,13 +1174,6 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureGetKeyNamebyId(void *UFKey, cha | ||
339 | eStatus = MOS_STATUS_SUCCESS; | ||
340 | break; | ||
341 | default: | ||
342 | - if ((eStatus = UserFeatureDumpFile(m_szUserFeatureFile, &pKeyList)) != | ||
343 | - MOS_STATUS_SUCCESS ) | ||
344 | - { | ||
345 | - UserFeatureFreeKeyList(pKeyList); | ||
346 | - return eStatus; | ||
347 | - } | ||
348 | - | ||
349 | eStatus = MOS_STATUS_UNKNOWN; | ||
350 | |||
351 | for(pTempNode=pKeyList;pTempNode;pTempNode=pTempNode->pNext) | ||
352 | @@ -1219,7 +1185,6 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureGetKeyNamebyId(void *UFKey, cha | ||
353 | break; | ||
354 | } | ||
355 | } | ||
356 | - UserFeatureFreeKeyList(pKeyList); | ||
357 | break; | ||
358 | } | ||
359 | |||
360 | @@ -1364,6 +1329,7 @@ MOS_STATUS MosUtilities::MosOsUtilitiesInit(MOS_CONTEXT_HANDLE mosCtx) | ||
361 | //Init MOS User Feature Key from mos desc table | ||
362 | eStatus = MosDeclareUserFeatureKeysForAllDescFields(); | ||
363 | |||
364 | + MosUtilitiesSpecificNext::UserFeatureDumpFile(MosUtilitiesSpecificNext::m_szUserFeatureFile, &MosUtilitiesSpecificNext::m_ufKeyList); | ||
365 | #if _MEDIA_RESERVED | ||
366 | m_codecUserFeatureExt = new CodechalUserSettingsMgr(); | ||
367 | m_vpUserFeatureExt = new VphalUserSettingsMgr(); | ||
368 | @@ -1425,6 +1391,9 @@ MOS_STATUS MosUtilities::MosOsUtilitiesClose(MOS_CONTEXT_HANDLE mosCtx) | ||
369 | // so if there still is another active lib instance, logs would still be printed. | ||
370 | MosUtilDebug::MosMessageClose(); | ||
371 | #endif | ||
372 | + MosUtilitiesSpecificNext::UserFeatureDumpDataToFile(MosUtilitiesSpecificNext::m_szUserFeatureFile, MosUtilitiesSpecificNext::m_ufKeyList); | ||
373 | + MosUtilitiesSpecificNext::UserFeatureFreeKeyList(MosUtilitiesSpecificNext::m_ufKeyList); | ||
374 | + MosUtilitiesSpecificNext::m_ufKeyList = nullptr; | ||
375 | } | ||
376 | m_mutexLock.Unlock(); | ||
377 | return eStatus; | ||
378 | diff --git a/media_softlet/linux/common/os/mos_utilities_specific_next.h b/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
379 | index 792123a6..878ce4e6 100644 | ||
380 | --- a/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
381 | +++ b/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
382 | @@ -110,6 +110,41 @@ static MOS_STATUS MosUserFeatureOpenKeyFile( | ||
383 | uint32_t samDesired, | ||
384 | void **phkResult); | ||
385 | |||
386 | +/*---------------------------------------------------------------------------- | ||
387 | + | Name : UserFeatureDumpFile | ||
388 | + | Purpose : This function read the whole User Feature File and dump User Feature File | ||
389 | + | data to key linked list. | ||
390 | + | Arguments : szFileName [in] User Feature File name. | ||
391 | + | pKeyList [out] Key Linked list. | ||
392 | + | Returns : MOS_STATUS_SUCCESS Operation success. | ||
393 | + | MOS_STATUS_USER_FEATURE_KEY_READ_FAILED User Feature File can't be open as read. | ||
394 | + | MOS_STATUS_NO_SPACE no space left for allocate | ||
395 | + | MOS_STATUS_UNKNOWN unknown user feature type found in User Feature File | ||
396 | + | MOS_STATUS_INVALID_PARAMETER unknown items found in User Feature File | ||
397 | + | Comments : | ||
398 | + \---------------------------------------------------------------------------*/ | ||
399 | +static MOS_STATUS UserFeatureDumpFile(const char *const szFileName, MOS_PUF_KEYLIST *pKeyList); | ||
400 | + | ||
401 | +/*---------------------------------------------------------------------------- | ||
402 | +| Name : UserFeatureDumpDataToFile | ||
403 | +| Purpose : This function dump key linked list data to File. | ||
404 | +| Arguments : szFileName [in] A handle to the File. | ||
405 | +| pKeyList [in] Reserved, any LPDWORD type value. | ||
406 | +| Returns : MOS_STATUS_SUCCESS Operation success. | ||
407 | +| MOS_STATUS_USER_FEATURE_KEY_WRITE_FAILED File can't be written. | ||
408 | +| Comments : | ||
409 | +\---------------------------------------------------------------------------*/ | ||
410 | + | ||
411 | +static MOS_STATUS UserFeatureDumpDataToFile(const char *szFileName, MOS_PUF_KEYLIST pKeyList); | ||
412 | + | ||
413 | +/*---------------------------------------------------------------------------- | ||
414 | +| Name : UserFeatureFreeKeyList | ||
415 | +| Purpose : Free key list | ||
416 | +| Arguments : pKeyList [in] key list to be free. | ||
417 | +| Returns : None | ||
418 | +| Comments : | ||
419 | +\---------------------------------------------------------------------------*/ | ||
420 | +static void UserFeatureFreeKeyList(MOS_PUF_KEYLIST pKeyList); | ||
421 | |||
422 | private: | ||
423 | |||
424 | @@ -174,41 +209,6 @@ private: | ||
425 | |||
426 | static MOS_STATUS UserFeatureReadNextTokenFromFile(FILE *pFile, const char *szFormat, char *szToken); | ||
427 | |||
428 | - /*---------------------------------------------------------------------------- | ||
429 | - | Name : UserFeatureDumpFile | ||
430 | - | Purpose : This function read the whole User Feature File and dump User Feature File | ||
431 | - | data to key linked list. | ||
432 | - | Arguments : szFileName [in] User Feature File name. | ||
433 | - | pKeyList [out] Key Linked list. | ||
434 | - | Returns : MOS_STATUS_SUCCESS Operation success. | ||
435 | - | MOS_STATUS_USER_FEATURE_KEY_READ_FAILED User Feature File can't be open as read. | ||
436 | - | MOS_STATUS_NO_SPACE no space left for allocate | ||
437 | - | MOS_STATUS_UNKNOWN unknown user feature type found in User Feature File | ||
438 | - | MOS_STATUS_INVALID_PARAMETER unknown items found in User Feature File | ||
439 | - | Comments : | ||
440 | - \---------------------------------------------------------------------------*/ | ||
441 | - static MOS_STATUS UserFeatureDumpFile(const char * const szFileName, MOS_PUF_KEYLIST* pKeyList); | ||
442 | - | ||
443 | - /*---------------------------------------------------------------------------- | ||
444 | - | Name : UserFeatureDumpDataToFile | ||
445 | - | Purpose : This function dump key linked list data to File. | ||
446 | - | Arguments : szFileName [in] A handle to the File. | ||
447 | - | pKeyList [in] Reserved, any LPDWORD type value. | ||
448 | - | Returns : MOS_STATUS_SUCCESS Operation success. | ||
449 | - | MOS_STATUS_USER_FEATURE_KEY_WRITE_FAILED File can't be written. | ||
450 | - | Comments : | ||
451 | - \---------------------------------------------------------------------------*/ | ||
452 | - static MOS_STATUS UserFeatureDumpDataToFile(const char *szFileName, MOS_PUF_KEYLIST pKeyList); | ||
453 | - | ||
454 | - /*---------------------------------------------------------------------------- | ||
455 | - | Name : UserFeatureFreeKeyList | ||
456 | - | Purpose : Free key list | ||
457 | - | Arguments : pKeyList [in] key list to be free. | ||
458 | - | Returns : None | ||
459 | - | Comments : | ||
460 | - \---------------------------------------------------------------------------*/ | ||
461 | - static void UserFeatureFreeKeyList(MOS_PUF_KEYLIST pKeyList); | ||
462 | - | ||
463 | /*---------------------------------------------------------------------------- | ||
464 | | Name : UserFeatureSetValue | ||
465 | | Purpose : Modify or add a value of the specified user feature key. | ||
466 | @@ -290,6 +290,7 @@ private: | ||
467 | |||
468 | public: | ||
469 | static const char* m_szUserFeatureFile; | ||
470 | + static MOS_PUF_KEYLIST m_ufKeyList; | ||
471 | static int32_t m_mosTraceFd; | ||
472 | static const char* const m_mosTracePath; | ||
473 | static std::map<std::string, std::map<std::string, std::string>> m_regBuffer; | ||
474 | -- | ||
475 | 2.31.1 | ||
476 | |||
diff --git a/recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch b/recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch deleted file mode 100644 index e513e0aa..00000000 --- a/recipes-multimedia/libva/files/0001-Media-Common-Fix-the-user-setting-memory-free.patch +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | From 437e63b6c35eb5d12aac18d7f76ce1a702ad16e0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Thu, 2 Dec 2021 15:50:33 +0000 | ||
4 | Subject: [PATCH] [Media Common] Fix the user setting memory free | ||
5 | |||
6 | From 4b8a411f2b8df112cbb5dbf8562735700cd15cf1 Mon Sep 17 00:00:00 2001 | ||
7 | From: "Wang, Pingli" <pingli.wang@intel.com> | ||
8 | Date: Thu, 2 Dec 2021 17:57:50 +0800 | ||
9 | Subject: [PATCH] [Media Common]Fix the user setting memory free | ||
10 | |||
11 | This commit fix the #1300 | ||
12 | |||
13 | Signed-off-by: Wang, Pingli <pingli.wang@intel.com> | ||
14 | |||
15 | This patch was imported from iHD media-driver git server | ||
16 | (https://github.com/intel/media-driver.git) as of pull request | ||
17 | https://github.com/intel/media-driver/pull/1305. | ||
18 | |||
19 | Upstream-status: Submitted | ||
20 | |||
21 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
22 | --- | ||
23 | media_softlet/linux/common/os/mos_utilities_specific_next.cpp | 4 ++++ | ||
24 | media_softlet/linux/common/os/mos_utilities_specific_next.h | 4 ++++ | ||
25 | 2 files changed, 8 insertions(+) | ||
26 | |||
27 | diff --git a/media_softlet/linux/common/os/mos_utilities_specific_next.cpp b/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
28 | index 584ba086..c138cb08 100644 | ||
29 | --- a/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
30 | +++ b/media_softlet/linux/common/os/mos_utilities_specific_next.cpp | ||
31 | @@ -70,6 +70,7 @@ double MosUtilities::MosGetTime() | ||
32 | //! | ||
33 | const char *const MosUtilitiesSpecificNext::m_mosTracePath = "/sys/kernel/debug/tracing/trace_marker_raw"; | ||
34 | int32_t MosUtilitiesSpecificNext::m_mosTraceFd = -1; | ||
35 | +MosMutex MosUtilitiesSpecificNext::m_userSettingMutex; | ||
36 | |||
37 | std::map<std::string, std::map<std::string, std::string>> MosUtilitiesSpecificNext::m_regBuffer; | ||
38 | |||
39 | @@ -612,6 +613,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
40 | MOS_AtomicIncrement(&MosUtilities::m_mosMemAllocFakeCounter); //ulValueBuf does not count it, because it is freed after the MEMNJA final report. | ||
41 | MOS_OS_NORMALMESSAGE("ulValueBuf %p for key %s", ulValueBuf, NewKey.pValueArray[0].pcValueName); | ||
42 | |||
43 | + m_userSettingMutex.Lock(); | ||
44 | if ( (iPos = UserFeatureFindValue(*Key, NewKey.pValueArray[0].pcValueName)) == NOT_FOUND) | ||
45 | { | ||
46 | //not found, add a new value to key struct. | ||
47 | @@ -620,6 +622,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
48 | if (iPos >= UF_CAPABILITY) | ||
49 | { | ||
50 | MOS_OS_ASSERTMESSAGE("user setting value icount %d must less than UF_CAPABILITY(64)", iPos); | ||
51 | + m_userSettingMutex.Unlock(); | ||
52 | return MOS_STATUS_USER_FEATURE_KEY_READ_FAILED; | ||
53 | } | ||
54 | |||
55 | @@ -646,6 +649,7 @@ MOS_STATUS MosUtilitiesSpecificNext::UserFeatureSet(MOS_PUF_KEYLIST *pKeyList, M | ||
56 | NewKey.pValueArray[0].ulValueBuf, | ||
57 | NewKey.pValueArray[0].ulValueLen); | ||
58 | |||
59 | + m_userSettingMutex.Unlock(); | ||
60 | return MOS_STATUS_SUCCESS; | ||
61 | } | ||
62 | |||
63 | diff --git a/media_softlet/linux/common/os/mos_utilities_specific_next.h b/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
64 | index 878ce4e6..57e505d0 100644 | ||
65 | --- a/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
66 | +++ b/media_softlet/linux/common/os/mos_utilities_specific_next.h | ||
67 | @@ -30,6 +30,8 @@ | ||
68 | #include "mos_defs.h" | ||
69 | #include "mos_utilities_specific.h" | ||
70 | |||
71 | +class MosMutex; | ||
72 | + | ||
73 | class MosUtilitiesSpecificNext | ||
74 | { | ||
75 | public: | ||
76 | @@ -294,5 +296,7 @@ public: | ||
77 | static int32_t m_mosTraceFd; | ||
78 | static const char* const m_mosTracePath; | ||
79 | static std::map<std::string, std::map<std::string, std::string>> m_regBuffer; | ||
80 | +private: | ||
81 | + static MosMutex m_userSettingMutex; | ||
82 | }; | ||
83 | #endif // __MOS_UTILITIES_SPECIFIC_NEXT_H__ | ||
84 | -- | ||
85 | 2.31.1 | ||
86 | |||
diff --git a/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch b/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch new file mode 100644 index 00000000..df3d9805 --- /dev/null +++ b/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1580f01ec5ad5afdad58c39dded999494275be10 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Wed, 11 Oct 2023 15:36:21 +0800 | ||
4 | Subject: [PATCH 02/12] Force ARGB surface to tile4 for ACM | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1728] | ||
7 | |||
8 | Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com> | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | media_driver/linux/common/ddi/media_libva_util.cpp | 10 ++++++++++ | ||
12 | 1 file changed, 10 insertions(+) | ||
13 | |||
14 | diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp | ||
15 | index 63c173419..73be76366 100755 | ||
16 | --- a/media_driver/linux/common/ddi/media_libva_util.cpp | ||
17 | +++ b/media_driver/linux/common/ddi/media_libva_util.cpp | ||
18 | @@ -504,6 +504,7 @@ VAStatus DdiMediaUtil_AllocateSurface( | ||
19 | gmmCustomParams.Flags.Gpu.UnifiedAuxSurface = 0; | ||
20 | } | ||
21 | } | ||
22 | + | ||
23 | break; | ||
24 | case TILING_X: | ||
25 | gmmCustomParams.Flags.Info.TiledX = true; | ||
26 | @@ -685,6 +686,15 @@ VAStatus DdiMediaUtil_AllocateSurface( | ||
27 | } | ||
28 | } | ||
29 | } | ||
30 | + // There's no VAAPI interface for modifier query yet. As a workaround, always allocate | ||
31 | + // RGB surface as tile4. | ||
32 | + if ((format == Media_Format_A8R8G8B8 || | ||
33 | + format == Media_Format_B10G10R10A2 | | ||
34 | + format == Media_Format_A8B8G8R8 || | ||
35 | + format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY)) | ||
36 | + { | ||
37 | + gmmParams.Flags.Info.Tile4 = true; | ||
38 | + } | ||
39 | break; | ||
40 | case TILING_X: | ||
41 | gmmParams.Flags.Info.TiledX = true; | ||
42 | -- | ||
43 | 2.40.1 | ||
44 | |||
diff --git a/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch b/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch new file mode 100644 index 00000000..59fff127 --- /dev/null +++ b/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From bb860c0bfe53060925b1dce50da4e6e94cfc8cae Mon Sep 17 00:00:00 2001 | ||
2 | From: huangli2018 <li.h.huang@intel.com> | ||
3 | Date: Wed, 20 Dec 2023 15:47:43 +0800 | ||
4 | Subject: [PATCH 04/13] Add device ID for ARL | ||
5 | |||
6 | Add device ID for ARL | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/95cbfce81cafa3c24d9d4601d41a855093bc51fb] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp | 13 +++++++++++-- | ||
12 | 1 file changed, 11 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp | ||
15 | index 426bd795f..7b73dfaff 100644 | ||
16 | --- a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp | ||
17 | +++ b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp | ||
18 | @@ -1,6 +1,6 @@ | ||
19 | /*===================== begin_copyright_notice ================================== | ||
20 | |||
21 | -Copyright (c) 2022, Intel Corporation | ||
22 | +Copyright (c) 2023, Intel Corporation | ||
23 | |||
24 | Permission is hereby granted, free of charge, to any person obtaining a | ||
25 | copy of this software and associated documentation files (the "Software"), | ||
26 | @@ -218,4 +218,13 @@ static struct GfxDeviceInfo arlInfo = { | ||
27 | }; | ||
28 | |||
29 | static bool arlsDevice7d67 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
30 | - RegisterDevice(0x7D67, &arlInfo); | ||
31 | \ No newline at end of file | ||
32 | + RegisterDevice(0x7D67, &arlInfo); | ||
33 | + | ||
34 | +static bool arlhDevice7d51 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
35 | + RegisterDevice(0x7D51, &arlInfo); | ||
36 | + | ||
37 | +static bool arlhDevice7dd1 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
38 | + RegisterDevice(0x7DD1, &arlInfo); | ||
39 | + | ||
40 | +static bool arlhDevice7d41 = DeviceInfoFactory<GfxDeviceInfo>:: | ||
41 | + RegisterDevice(0x7D41, &arlInfo); | ||
42 | \ No newline at end of file | ||
43 | -- | ||
44 | 2.40.1 | ||
45 | |||
diff --git a/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch b/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch new file mode 100644 index 00000000..a9cd2317 --- /dev/null +++ b/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From bbd3af94a6146d702909ff7e25b0c0547ecbb895 Mon Sep 17 00:00:00 2001 | ||
2 | From: jlui <jonathan.ming.jun.lui@intel.com> | ||
3 | Date: Wed, 15 Nov 2023 10:48:34 +0800 | ||
4 | Subject: [PATCH 05/13] Add XR24 support to DMABuf | ||
5 | |||
6 | This is to enable XR24/BGRX support for DMABuf | ||
7 | |||
8 | Signed-off-by: Lui, Jonathan Ming Jun <jonathan.ming.jun.lui@intel.com> | ||
9 | |||
10 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/3910b7029f5416fd0b5972f940c65d0a82c48c7b] | ||
11 | |||
12 | Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com> | ||
13 | --- | ||
14 | .../vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h | 3 ++- | ||
15 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h b/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h | ||
18 | index fdcca8873..2dcf440a4 100644 | ||
19 | --- a/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h | ||
20 | +++ b/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h | ||
21 | @@ -55,8 +55,9 @@ static ProfileSurfaceAttribInfo surfaceAttribInfo_VAEntrypointVideoProc_VAProfil | ||
22 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('4', '2', '2', 'V')}}}, | ||
23 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'A')}}}, | ||
24 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('B', 'G', 'R', 'A')}}}, | ||
25 | - {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, { VA_FOURCC('R', 'G', 'B', 'P')}}}, | ||
26 | + {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'P')}}}, | ||
27 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'X')}}}, | ||
28 | + {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('X', 'R', 'G', 'B')}}}, | ||
29 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('P', '0', '1', '0')}}}, | ||
30 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', '2', '4')}}}, | ||
31 | {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC_ARGB}}}, | ||
32 | -- | ||
33 | 2.40.1 | ||
34 | |||
diff --git a/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch b/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch new file mode 100644 index 00000000..5b04201a --- /dev/null +++ b/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch | |||
@@ -0,0 +1,214 @@ | |||
1 | From 67fb6128adf8fc03d429393e98f0982b42a40e64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Zhang_Xinfeng <carl.zhang@intel.com> | ||
3 | Date: Wed, 27 Dec 2023 09:59:29 +0800 | ||
4 | Subject: [PATCH 06/12] add INTEL MEDIA ALLOC refineE to specify the memory | ||
5 | alignment | ||
6 | |||
7 | this key is used to allocate bigger pages | ||
8 | env variable INTEL_MEDIA_ALLOC_refineE also could be used | ||
9 | and was not enabled by default | ||
10 | mode 0 is default mode | ||
11 | mode 1 is < 64 align to 64 | ||
12 | mode 2 is > 1M && <= 3M align to 1M, >3M align to 2M | ||
13 | mode 3 is mode 1 & mode 2 | ||
14 | |||
15 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/765dd939dcc5562d18cca18e5eda505bda952797] | ||
16 | Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com> | ||
17 | --- | ||
18 | .../linux/common/os/i915/mos_bufmgr.c | 75 +++++++++++++++---- | ||
19 | .../common/os/i915_production/mos_bufmgr.c | 1 + | ||
20 | .../common/os/mos_context_specific_next.cpp | 21 +++++- | ||
21 | .../common/os/mos_user_setting_specific.cpp | 7 ++ | ||
22 | 4 files changed, 90 insertions(+), 14 deletions(-) | ||
23 | |||
24 | diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c | ||
25 | index c0b3ba027..b623d0129 100644 | ||
26 | --- a/media_softlet/linux/common/os/i915/mos_bufmgr.c | ||
27 | +++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c | ||
28 | @@ -138,7 +138,7 @@ struct mos_bufmgr_gem { | ||
29 | int exec_count; | ||
30 | |||
31 | /** Array of lists of cached gem objects of power-of-two sizes */ | ||
32 | - struct mos_gem_bo_bucket cache_bucket[14 * 4]; | ||
33 | + struct mos_gem_bo_bucket cache_bucket[64]; | ||
34 | int num_buckets; | ||
35 | time_t time; | ||
36 | |||
37 | @@ -3852,9 +3852,9 @@ add_bucket(struct mos_bufmgr_gem *bufmgr_gem, int size) | ||
38 | } | ||
39 | |||
40 | static void | ||
41 | -init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem) | ||
42 | +init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem, uint8_t alloc_mode) | ||
43 | { | ||
44 | - unsigned long size, cache_max_size = 64 * 1024 * 1024; | ||
45 | + unsigned long size, cache_max_size = 64 * 1024 * 1024, unit_size; | ||
46 | |||
47 | /* OK, so power of two buckets was too wasteful of memory. | ||
48 | * Give 3 other sizes between each power of two, to hopefully | ||
49 | @@ -3864,17 +3864,63 @@ init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem) | ||
50 | * width/height alignment and rounding of sizes to pages will | ||
51 | * get us useful cache hit rates anyway) | ||
52 | */ | ||
53 | - add_bucket(bufmgr_gem, 4096); | ||
54 | - add_bucket(bufmgr_gem, 4096 * 2); | ||
55 | - add_bucket(bufmgr_gem, 4096 * 3); | ||
56 | + /* alloc_mode 0 is default alloc_mode | ||
57 | + * alloc_mode 1 rounding up to 64K for all < 1M | ||
58 | + * alloc_mode 2 rounding up to 2M for size> 1M | ||
59 | + * alloc_mode 3 rounding up to 2M for size > 1M and 64K for size <= 1M */ | ||
60 | + if( alloc_mode > 3 ) | ||
61 | + alloc_mode = 0; | ||
62 | + | ||
63 | + if ( 0 == alloc_mode || 2 == alloc_mode) | ||
64 | + { | ||
65 | + // < 1M normal alloc_mode | ||
66 | + add_bucket(bufmgr_gem, 4096); | ||
67 | + add_bucket(bufmgr_gem, 4096 * 2); | ||
68 | + add_bucket(bufmgr_gem, 4096 * 3); | ||
69 | + /* Initialize the linked lists for BO reuse cache. */ | ||
70 | + for (size = 4 * 4096; size < 1024 * 1024; size *= 2) { | ||
71 | + add_bucket(bufmgr_gem, size); | ||
72 | + add_bucket(bufmgr_gem, size + size * 1 / 4); | ||
73 | + add_bucket(bufmgr_gem, size + size * 2 / 4); | ||
74 | + add_bucket(bufmgr_gem, size + size * 3 / 4); | ||
75 | + } | ||
76 | |||
77 | - /* Initialize the linked lists for BO reuse cache. */ | ||
78 | - for (size = 4 * 4096; size <= cache_max_size; size *= 2) { | ||
79 | - add_bucket(bufmgr_gem, size); | ||
80 | + add_bucket(bufmgr_gem, 1024 * 1024); | ||
81 | + } | ||
82 | + if (1 == alloc_mode || 3 == alloc_mode) | ||
83 | + { | ||
84 | + // < 1M 64k alignment | ||
85 | + unit_size = 64 * 1024; | ||
86 | + for (size = unit_size; size <= 1024 * 1024; size += unit_size) | ||
87 | + { | ||
88 | + add_bucket(bufmgr_gem, size); | ||
89 | + } | ||
90 | + } | ||
91 | + if( 0 == alloc_mode || 1 == alloc_mode) | ||
92 | + { | ||
93 | + //> 1M is normal alloc_mode | ||
94 | + add_bucket(bufmgr_gem, 1280 * 1024); | ||
95 | + add_bucket(bufmgr_gem, 1536 * 1024); | ||
96 | + add_bucket(bufmgr_gem, 1792 * 1024); | ||
97 | + | ||
98 | + for (size = 2 * 1024 * 1024; size < cache_max_size; size *= 2) { | ||
99 | + add_bucket(bufmgr_gem, size); | ||
100 | + add_bucket(bufmgr_gem, size + size * 1 / 4); | ||
101 | + add_bucket(bufmgr_gem, size + size * 2 / 4); | ||
102 | + add_bucket(bufmgr_gem, size + size * 3 / 4); | ||
103 | + } | ||
104 | + } | ||
105 | + if( 2 == alloc_mode || 3 == alloc_mode) | ||
106 | + { | ||
107 | + //> 1M rolling to 2M | ||
108 | + unit_size = 2 * 1024 * 1024; | ||
109 | + add_bucket(bufmgr_gem, unit_size); | ||
110 | + add_bucket(bufmgr_gem, 3 * 1024 * 1024); | ||
111 | |||
112 | - add_bucket(bufmgr_gem, size + size * 1 / 4); | ||
113 | - add_bucket(bufmgr_gem, size + size * 2 / 4); | ||
114 | - add_bucket(bufmgr_gem, size + size * 3 / 4); | ||
115 | + for (size = 4 * 1024 * 1024; size <= cache_max_size; size += unit_size) | ||
116 | + { | ||
117 | + add_bucket(bufmgr_gem, size); | ||
118 | + } | ||
119 | } | ||
120 | } | ||
121 | |||
122 | @@ -5100,6 +5146,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) | ||
123 | struct drm_i915_gem_get_aperture aperture; | ||
124 | drm_i915_getparam_t gp; | ||
125 | int ret, tmp; | ||
126 | + uint8_t alloc_mode; | ||
127 | bool exec2 = false; | ||
128 | |||
129 | pthread_mutex_lock(&bufmgr_list_mutex); | ||
130 | @@ -5352,10 +5399,12 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) | ||
131 | * | ||
132 | * Every 4 was too few for the blender benchmark. | ||
133 | */ | ||
134 | + alloc_mode = (uint8_t)(batch_size & 0xff); | ||
135 | + batch_size &= 0xffffff00; | ||
136 | bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2; | ||
137 | |||
138 | DRMINITLISTHEAD(&bufmgr_gem->named); | ||
139 | - init_cache_buckets(bufmgr_gem); | ||
140 | + init_cache_buckets(bufmgr_gem,alloc_mode); | ||
141 | |||
142 | DRMLISTADD(&bufmgr_gem->managers, &bufmgr_list); | ||
143 | |||
144 | diff --git a/media_softlet/linux/common/os/i915_production/mos_bufmgr.c b/media_softlet/linux/common/os/i915_production/mos_bufmgr.c | ||
145 | index 90b5685b1..b3574f7d3 100644 | ||
146 | --- a/media_softlet/linux/common/os/i915_production/mos_bufmgr.c | ||
147 | +++ b/media_softlet/linux/common/os/i915_production/mos_bufmgr.c | ||
148 | @@ -5403,6 +5403,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) | ||
149 | * | ||
150 | * Every 4 was too few for the blender benchmark. | ||
151 | */ | ||
152 | + batch_size &= 0xffffff00; | ||
153 | bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2; | ||
154 | |||
155 | DRMINITLISTHEAD(&bufmgr_gem->named); | ||
156 | diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
157 | index 9e9e3ff7e..543e262d1 100644 | ||
158 | --- a/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
159 | +++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
160 | @@ -64,6 +64,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) | ||
161 | uint32_t iDeviceId = 0; | ||
162 | MOS_STATUS eStatus = MOS_STATUS_SUCCESS; | ||
163 | uint32_t value = 0; | ||
164 | + uint32_t mode = 0; | ||
165 | MediaUserSettingSharedPtr userSettingPtr = nullptr; | ||
166 | |||
167 | MOS_OS_FUNCTION_ENTER; | ||
168 | @@ -89,7 +90,25 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) | ||
169 | |||
170 | userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext); | ||
171 | |||
172 | - m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType); | ||
173 | + mode = BATCH_BUFFER_SIZE; | ||
174 | + ReadUserSetting( | ||
175 | + userSettingPtr, | ||
176 | + value, | ||
177 | + "INTEL MEDIA ALLOC MODE", | ||
178 | + MediaUserSetting::Group::Device); | ||
179 | + | ||
180 | + if (value) | ||
181 | + { | ||
182 | + mode |= (value & 0x000000ff); | ||
183 | + } | ||
184 | + value = 0; | ||
185 | + /* no need to set batch buffer size after switch to softpin | ||
186 | + * keep it, just for test during relocation to softpin transition | ||
187 | + * now , it could be a debug method , but is actually useless | ||
188 | + * so it is safe to reuse the lowest 8bit to convey addtional information | ||
189 | + * more suitable solution is deleting it , or add additional parameter*/ | ||
190 | + | ||
191 | + m_bufmgr = mos_bufmgr_gem_init(m_fd, (int)mode, &m_deviceType); | ||
192 | if (nullptr == m_bufmgr) | ||
193 | { | ||
194 | MOS_OS_ASSERTMESSAGE("Not able to allocate buffer manager, fd=0x%d", m_fd); | ||
195 | diff --git a/media_softlet/linux/common/os/mos_user_setting_specific.cpp b/media_softlet/linux/common/os/mos_user_setting_specific.cpp | ||
196 | index 6be8b4298..caed584f4 100644 | ||
197 | --- a/media_softlet/linux/common/os/mos_user_setting_specific.cpp | ||
198 | +++ b/media_softlet/linux/common/os/mos_user_setting_specific.cpp | ||
199 | @@ -52,5 +52,12 @@ MOS_STATUS MosUserSetting::InitMosUserSettingSpecific(MediaUserSettingSharedPtr | ||
200 | 0, | ||
201 | true); //"Enable VM Bind." | ||
202 | |||
203 | + DeclareUserSettingKey( | ||
204 | + userSettingPtr, | ||
205 | + "INTEL MEDIA ALLOC MODE", | ||
206 | + MediaUserSetting::Group::Device, | ||
207 | + 0, | ||
208 | + false); // | ||
209 | + | ||
210 | return MOS_STATUS_SUCCESS; | ||
211 | } | ||
212 | -- | ||
213 | 2.40.1 | ||
214 | |||
diff --git a/recipes-multimedia/libva/files/0007-Skip-report-keys.patch b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch new file mode 100644 index 00000000..459ff490 --- /dev/null +++ b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch | |||
@@ -0,0 +1,78 @@ | |||
1 | From b1aebef4d342c77fc2b9c5efbf20aeb2aa9d634e Mon Sep 17 00:00:00 2001 | ||
2 | From: Wang_Pingli <pingli.wang@intel.com> | ||
3 | Date: Thu, 28 Dec 2023 16:44:40 +0800 | ||
4 | Subject: [PATCH 07/12] Skip report keys | ||
5 | |||
6 | Skip to report keys | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/68ce25b0a6fa90614eb4734c8680aa4e149e8323] | ||
9 | Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../os/osservice/mos_utilities_specific.cpp | 30 +++++++++++++++++-- | ||
12 | 1 file changed, 28 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp | ||
15 | index b5df29f06..96785e21e 100644 | ||
16 | --- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp | ||
17 | +++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp | ||
18 | @@ -67,6 +67,8 @@ int32_t g_mosMemoryFailSimulateAllocCounter = 0; | ||
19 | int32_t *MosUtilities::m_mosAllocMemoryFailSimulateAllocCounter = &g_mosMemoryFailSimulateAllocCounter; | ||
20 | #endif | ||
21 | |||
22 | +static bool s_skipToReportReg = false; | ||
23 | + | ||
24 | double MosUtilities::MosGetTime() | ||
25 | { | ||
26 | struct timespec ts = {}; | ||
27 | @@ -1551,6 +1553,10 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) | ||
28 | { | ||
29 | std::string id = ""; | ||
30 | |||
31 | + static const char *disableReportRegKeyList[] = { | ||
32 | + "INTEL MEDIA ALLOC MODE" | ||
33 | + }; | ||
34 | + static const uint32_t disableReportRegKeyListCount = sizeof(disableReportRegKeyList) / sizeof(disableReportRegKeyList[0]); | ||
35 | while(!regStream.eof()) | ||
36 | { | ||
37 | std::string line = ""; | ||
38 | @@ -1585,8 +1591,22 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) | ||
39 | { | ||
40 | std::string name = line.substr(0,pos); | ||
41 | std::string value = line.substr(pos+1); | ||
42 | - auto &keys = regBufferMap[id]; | ||
43 | - keys[name] = value; | ||
44 | + if (name.size() > 0 && value.size() > 0) | ||
45 | + { | ||
46 | + auto &keys = regBufferMap[id]; | ||
47 | + keys[name] = value; | ||
48 | + if (s_skipToReportReg == false && id == USER_SETTING_CONFIG_PATH) | ||
49 | + { | ||
50 | + for (uint32_t i = 0; i < disableReportRegKeyListCount; i++) | ||
51 | + { | ||
52 | + if (strcmp(name.c_str(), disableReportRegKeyList[i]) == 0) | ||
53 | + { | ||
54 | + s_skipToReportReg = true; | ||
55 | + break; | ||
56 | + } | ||
57 | + } | ||
58 | + } | ||
59 | + } | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | @@ -1606,6 +1626,12 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap ®BufferMap) | ||
64 | MOS_STATUS MosUtilities::MosUninitializeReg(RegBufferMap ®BufferMap) | ||
65 | { | ||
66 | MOS_STATUS status = MOS_STATUS_SUCCESS; | ||
67 | + | ||
68 | + if (s_skipToReportReg) | ||
69 | + { | ||
70 | + return MOS_STATUS_SUCCESS; | ||
71 | + } | ||
72 | + | ||
73 | if (regBufferMap.size() == 0) | ||
74 | { | ||
75 | return MOS_STATUS_SUCCESS; | ||
76 | -- | ||
77 | 2.40.1 | ||
78 | |||
diff --git a/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch b/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch new file mode 100644 index 00000000..ece5e00b --- /dev/null +++ b/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch | |||
@@ -0,0 +1,255 @@ | |||
1 | From ac2ffac8d4aade216cc361c6c7120c13a8780719 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Soon, Thean Siew" <thean.siew.soon@intel.com> | ||
3 | Date: Thu, 28 Dec 2023 18:42:59 +0000 | ||
4 | Subject: [PATCH 08/12] Limit INTEL MEDIA ALLOC MODE to MTL and ARL only | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754] | ||
7 | |||
8 | Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com> | ||
9 | --- | ||
10 | .../common/os/i915/include/mos_bufmgr_api.h | 1 + | ||
11 | .../common/os/i915/include/mos_bufmgr_priv.h | 2 +- | ||
12 | .../linux/common/os/i915/mos_bufmgr.c | 69 +++++++++++++++---- | ||
13 | .../linux/common/os/i915/mos_bufmgr_api.c | 19 +++++ | ||
14 | .../os/i915_production/mos_bufmgr_priv.h | 1 + | ||
15 | .../common/os/mos_context_specific_next.cpp | 36 +++++----- | ||
16 | 6 files changed, 94 insertions(+), 34 deletions(-) | ||
17 | |||
18 | diff --git a/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h b/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h | ||
19 | index 71cc01099..ab4f1ba89 100644 | ||
20 | --- a/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h | ||
21 | +++ b/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h | ||
22 | @@ -299,6 +299,7 @@ void mos_bufmgr_enable_vmbind(struct mos_bufmgr *bufmgr); | ||
23 | void mos_bufmgr_disable_object_capture(struct mos_bufmgr *bufmgr); | ||
24 | int mos_bufmgr_get_memory_info(struct mos_bufmgr *bufmgr, char *info, uint32_t length); | ||
25 | int mos_bufmgr_get_devid(struct mos_bufmgr *bufmgr); | ||
26 | +void mos_bufmgr_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode); | ||
27 | |||
28 | int mos_bo_map_unsynchronized(struct mos_linux_bo *bo); | ||
29 | int mos_bo_map_gtt(struct mos_linux_bo *bo); | ||
30 | diff --git a/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h b/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h | ||
31 | index 63f69f985..6fd58f827 100644 | ||
32 | --- a/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h | ||
33 | +++ b/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h | ||
34 | @@ -358,9 +358,9 @@ struct mos_bufmgr { | ||
35 | void (*disable_object_capture)(struct mos_bufmgr *bufmgr) = nullptr; | ||
36 | int (*get_memory_info)(struct mos_bufmgr *bufmgr, char *info, uint32_t length) = nullptr; | ||
37 | int (*get_devid)(struct mos_bufmgr *bufmgr) = nullptr; | ||
38 | + void (*realloc_cache)(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) = nullptr; | ||
39 | int (*query_engines_count)(struct mos_bufmgr *bufmgr, | ||
40 | unsigned int *nengine) = nullptr; | ||
41 | - | ||
42 | int (*query_engines)(struct mos_bufmgr *bufmgr, | ||
43 | __u16 engine_class, | ||
44 | __u64 caps, | ||
45 | diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c | ||
46 | index b623d0129..2814ddbb7 100644 | ||
47 | --- a/media_softlet/linux/common/os/i915/mos_bufmgr.c | ||
48 | +++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c | ||
49 | @@ -2426,19 +2426,9 @@ mos_gem_bo_start_gtt_access(struct mos_linux_bo *bo, int write_enable) | ||
50 | } | ||
51 | |||
52 | static void | ||
53 | -mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr) | ||
54 | +mos_bufmgr_cleanup_cache(struct mos_bufmgr_gem *bufmgr_gem) | ||
55 | { | ||
56 | - struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *) bufmgr; | ||
57 | - struct drm_gem_close close_bo; | ||
58 | - int i, ret; | ||
59 | - | ||
60 | - free(bufmgr_gem->exec2_objects); | ||
61 | - free(bufmgr_gem->exec_objects); | ||
62 | - free(bufmgr_gem->exec_bos); | ||
63 | - pthread_mutex_destroy(&bufmgr_gem->lock); | ||
64 | - | ||
65 | - /* Free any cached buffer objects we were going to reuse */ | ||
66 | - for (i = 0; i < bufmgr_gem->num_buckets; i++) { | ||
67 | + for (int i = 0; i < bufmgr_gem->num_buckets; i++) { | ||
68 | struct mos_gem_bo_bucket *bucket = | ||
69 | &bufmgr_gem->cache_bucket[i]; | ||
70 | struct mos_bo_gem *bo_gem; | ||
71 | @@ -2450,7 +2440,25 @@ mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr) | ||
72 | |||
73 | mos_gem_bo_free(&bo_gem->bo); | ||
74 | } | ||
75 | + bufmgr_gem->cache_bucket[i].size = 0; | ||
76 | } | ||
77 | + bufmgr_gem->num_buckets = 0; | ||
78 | +} | ||
79 | + | ||
80 | +static void | ||
81 | +mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr) | ||
82 | +{ | ||
83 | + struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *)bufmgr; | ||
84 | + struct drm_gem_close close_bo; | ||
85 | + int ret; | ||
86 | + | ||
87 | + free(bufmgr_gem->exec2_objects); | ||
88 | + free(bufmgr_gem->exec_objects); | ||
89 | + free(bufmgr_gem->exec_bos); | ||
90 | + pthread_mutex_destroy(&bufmgr_gem->lock); | ||
91 | + | ||
92 | + /* Free any cached buffer objects we were going to reuse */ | ||
93 | + mos_bufmgr_cleanup_cache(bufmgr_gem); | ||
94 | |||
95 | /* Release userptr bo kept hanging around for optimisation. */ | ||
96 | if (bufmgr_gem->userptr_active.ptr) { | ||
97 | @@ -3852,9 +3860,41 @@ add_bucket(struct mos_bufmgr_gem *bufmgr_gem, int size) | ||
98 | } | ||
99 | |||
100 | static void | ||
101 | -init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem, uint8_t alloc_mode) | ||
102 | +init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem) | ||
103 | +{ | ||
104 | + unsigned long size, cache_max_size = 64 * 1024 * 1024; | ||
105 | + | ||
106 | + /* OK, so power of two buckets was too wasteful of memory. | ||
107 | + * Give 3 other sizes between each power of two, to hopefully | ||
108 | + * cover things accurately enough. (The alternative is | ||
109 | + * probably to just go for exact matching of sizes, and assume | ||
110 | + * that for things like composited window resize the tiled | ||
111 | + * width/height alignment and rounding of sizes to pages will | ||
112 | + * get us useful cache hit rates anyway) | ||
113 | + */ | ||
114 | + add_bucket(bufmgr_gem, 4096); | ||
115 | + add_bucket(bufmgr_gem, 4096 * 2); | ||
116 | + add_bucket(bufmgr_gem, 4096 * 3); | ||
117 | + | ||
118 | + /* Initialize the linked lists for BO reuse cache. */ | ||
119 | + for (size = 4 * 4096; size <= cache_max_size; size *= 2) { | ||
120 | + add_bucket(bufmgr_gem, size); | ||
121 | + | ||
122 | + add_bucket(bufmgr_gem, size + size * 1 / 4); | ||
123 | + add_bucket(bufmgr_gem, size + size * 2 / 4); | ||
124 | + add_bucket(bufmgr_gem, size + size * 3 / 4); | ||
125 | + } | ||
126 | +} | ||
127 | + | ||
128 | +static void | ||
129 | +mos_gem_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) | ||
130 | { | ||
131 | unsigned long size, cache_max_size = 64 * 1024 * 1024, unit_size; | ||
132 | + struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *)bufmgr; | ||
133 | + | ||
134 | + // Clean up the pre-allocated cache before re-allocating according | ||
135 | + // to alloc_mode | ||
136 | + mos_bufmgr_cleanup_cache(bufmgr_gem); | ||
137 | |||
138 | /* OK, so power of two buckets was too wasteful of memory. | ||
139 | * Give 3 other sizes between each power of two, to hopefully | ||
140 | @@ -5218,6 +5258,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) | ||
141 | bufmgr_gem->bufmgr.disable_object_capture = mos_gem_disable_object_capture; | ||
142 | bufmgr_gem->bufmgr.get_memory_info = mos_gem_get_memory_info; | ||
143 | bufmgr_gem->bufmgr.get_devid = mos_gem_get_devid; | ||
144 | + bufmgr_gem->bufmgr.realloc_cache = mos_gem_realloc_cache; | ||
145 | bufmgr_gem->bufmgr.set_context_param = mos_gem_set_context_param; | ||
146 | bufmgr_gem->bufmgr.set_context_param_parallel = mos_gem_set_context_param_parallel; | ||
147 | bufmgr_gem->bufmgr.set_context_param_load_balance = mos_gem_set_context_param_load_balance; | ||
148 | @@ -5404,7 +5445,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size) | ||
149 | bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2; | ||
150 | |||
151 | DRMINITLISTHEAD(&bufmgr_gem->named); | ||
152 | - init_cache_buckets(bufmgr_gem,alloc_mode); | ||
153 | + init_cache_buckets(bufmgr_gem); | ||
154 | |||
155 | DRMLISTADD(&bufmgr_gem->managers, &bufmgr_list); | ||
156 | |||
157 | diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr_api.c b/media_softlet/linux/common/os/i915/mos_bufmgr_api.c | ||
158 | index abe8ef96a..d0e02c267 100644 | ||
159 | --- a/media_softlet/linux/common/os/i915/mos_bufmgr_api.c | ||
160 | +++ b/media_softlet/linux/common/os/i915/mos_bufmgr_api.c | ||
161 | @@ -1204,6 +1204,25 @@ mos_bufmgr_get_devid(struct mos_bufmgr *bufmgr) | ||
162 | } | ||
163 | } | ||
164 | |||
165 | +void | ||
166 | +mos_bufmgr_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) | ||
167 | +{ | ||
168 | + if(!bufmgr) | ||
169 | + { | ||
170 | + MOS_OS_CRITICALMESSAGE("Input null ptr\n"); | ||
171 | + return; | ||
172 | + } | ||
173 | + | ||
174 | + if (bufmgr->realloc_cache) | ||
175 | + { | ||
176 | + return bufmgr->realloc_cache(bufmgr, alloc_mode); | ||
177 | + } | ||
178 | + else | ||
179 | + { | ||
180 | + MOS_OS_CRITICALMESSAGE("Unsupported\n"); | ||
181 | + } | ||
182 | +} | ||
183 | + | ||
184 | int | ||
185 | mos_query_engines_count(struct mos_bufmgr *bufmgr, | ||
186 | unsigned int *nengine) | ||
187 | diff --git a/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h b/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h | ||
188 | index c3b765a4c..1d7f7edb0 100644 | ||
189 | --- a/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h | ||
190 | +++ b/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h | ||
191 | @@ -358,6 +358,7 @@ struct mos_bufmgr { | ||
192 | void (*disable_object_capture)(struct mos_bufmgr *bufmgr) = nullptr; | ||
193 | int (*get_memory_info)(struct mos_bufmgr *bufmgr, char *info, uint32_t length) = nullptr; | ||
194 | int (*get_devid)(struct mos_bufmgr *bufmgr) = nullptr; | ||
195 | + void (*realloc_cache)(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) = nullptr; | ||
196 | int (*query_engines_count)(struct mos_bufmgr *bufmgr, | ||
197 | unsigned int *nengine) = nullptr; | ||
198 | |||
199 | diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
200 | index 543e262d1..87059f538 100644 | ||
201 | --- a/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
202 | +++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
203 | @@ -90,25 +90,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) | ||
204 | |||
205 | userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext); | ||
206 | |||
207 | - mode = BATCH_BUFFER_SIZE; | ||
208 | - ReadUserSetting( | ||
209 | - userSettingPtr, | ||
210 | - value, | ||
211 | - "INTEL MEDIA ALLOC MODE", | ||
212 | - MediaUserSetting::Group::Device); | ||
213 | - | ||
214 | - if (value) | ||
215 | - { | ||
216 | - mode |= (value & 0x000000ff); | ||
217 | - } | ||
218 | - value = 0; | ||
219 | - /* no need to set batch buffer size after switch to softpin | ||
220 | - * keep it, just for test during relocation to softpin transition | ||
221 | - * now , it could be a debug method , but is actually useless | ||
222 | - * so it is safe to reuse the lowest 8bit to convey addtional information | ||
223 | - * more suitable solution is deleting it , or add additional parameter*/ | ||
224 | - | ||
225 | - m_bufmgr = mos_bufmgr_gem_init(m_fd, (int)mode, &m_deviceType); | ||
226 | + m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType); | ||
227 | if (nullptr == m_bufmgr) | ||
228 | { | ||
229 | MOS_OS_ASSERTMESSAGE("Not able to allocate buffer manager, fd=0x%d", m_fd); | ||
230 | @@ -151,6 +133,22 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) | ||
231 | return eStatus; | ||
232 | } | ||
233 | |||
234 | + if (m_platformInfo.eProductFamily == IGFX_METEORLAKE || | ||
235 | + m_platformInfo.eProductFamily == IGFX_ARROWLAKE) | ||
236 | + { | ||
237 | + ReadUserSetting( | ||
238 | + userSettingPtr, | ||
239 | + value, | ||
240 | + "INTEL MEDIA ALLOC MODE", | ||
241 | + MediaUserSetting::Group::Device); | ||
242 | + | ||
243 | + if (value) | ||
244 | + { | ||
245 | + mode = (value & 0x000000ff); | ||
246 | + } | ||
247 | + mos_bufmgr_realloc_cache(m_bufmgr, mode); | ||
248 | + } | ||
249 | + | ||
250 | ReadUserSetting( | ||
251 | userSettingPtr, | ||
252 | value, | ||
253 | -- | ||
254 | 2.40.1 | ||
255 | |||
diff --git a/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch b/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch new file mode 100644 index 00000000..8ee7ef14 --- /dev/null +++ b/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 18c32247cbc0e9fabff7a847add099496af9e53f Mon Sep 17 00:00:00 2001 | ||
2 | From: "Soon, Thean Siew" <thean.siew.soon@intel.com> | ||
3 | Date: Mon, 8 Jan 2024 18:12:30 +0000 | ||
4 | Subject: [PATCH 09/12] Skip cache bucket realloc for default mode 0 | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754] | ||
7 | |||
8 | Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com> | ||
9 | --- | ||
10 | .../linux/common/os/mos_context_specific_next.cpp | 7 ++++++- | ||
11 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
14 | index 87059f538..9dbd5da79 100644 | ||
15 | --- a/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
16 | +++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp | ||
17 | @@ -146,7 +146,12 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext) | ||
18 | { | ||
19 | mode = (value & 0x000000ff); | ||
20 | } | ||
21 | - mos_bufmgr_realloc_cache(m_bufmgr, mode); | ||
22 | + | ||
23 | + // Realloc cache only if it's not mode 0 | ||
24 | + if (mode) | ||
25 | + { | ||
26 | + mos_bufmgr_realloc_cache(m_bufmgr, mode); | ||
27 | + } | ||
28 | } | ||
29 | |||
30 | ReadUserSetting( | ||
31 | -- | ||
32 | 2.40.1 | ||
33 | |||
diff --git a/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch b/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch new file mode 100644 index 00000000..0100df77 --- /dev/null +++ b/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch | |||
@@ -0,0 +1,195 @@ | |||
1 | From 7291ab5206c5e172c6c94dcfbe4f1bc258f3b7a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: WenshengZhang <wensheng.zhang@intel.com> | ||
3 | Date: Wed, 10 Jan 2024 14:08:37 +0800 | ||
4 | Subject: [PATCH 10/12] Fix failed 4k video wall test case and color corruption | ||
5 | of video composition | ||
6 | |||
7 | Fix failed 4k video wall test case from 16CH video only show 1CH output and | ||
8 | corruption observed on certain number of video composition when doing | ||
9 | sample_multi_transcode. | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/38e14b1b97170b51586d00d1fa607e496b0c5825] | ||
12 | Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com> | ||
13 | --- | ||
14 | .../common/vp/kdll/hal_kerneldll_next.h | 1 + | ||
15 | .../vp/hal/packet/vp_render_fc_kernel.cpp | 7 ++ | ||
16 | .../common/vp/kdll/hal_kerneldll_next.c | 70 +++++++++++-------- | ||
17 | .../linux/common/vp/ddi/ddi_vp_functions.cpp | 20 ++---- | ||
18 | 4 files changed, 55 insertions(+), 43 deletions(-) | ||
19 | |||
20 | diff --git a/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h b/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h | ||
21 | index 6447999b7..8e2ab371e 100644 | ||
22 | --- a/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h | ||
23 | +++ b/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h | ||
24 | @@ -588,6 +588,7 @@ typedef struct tagKdll_FilterEntry | ||
25 | Kdll_Scalingratio ScalingRatio; | ||
26 | Kdll_RenderMethod RenderMethod; | ||
27 | Kdll_SetCSCCoeffMethod SetCSCCoeffMode; | ||
28 | + bool forceToTargetColorSpace; | ||
29 | } Kdll_FilterEntry, *PKdll_FilterEntry; | ||
30 | |||
31 | // Structure that defines a compositing filter | ||
32 | diff --git a/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp b/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp | ||
33 | index 8e982f67e..f8308fed1 100644 | ||
34 | --- a/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp | ||
35 | +++ b/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp | ||
36 | @@ -775,6 +775,13 @@ MOS_STATUS VpRenderFcKernel::BuildFilter( | ||
37 | |||
38 | for (i = 0; (i < (int)compParams->sourceCount) && (iMaxFilterSize > 0); i++) | ||
39 | { | ||
40 | + if (i > 0) | ||
41 | + { | ||
42 | + if (!RECT1_CONTAINS_RECT2(compParams->source[0].surf->rcDst, compParams->source[i].surf->rcDst)) | ||
43 | + { | ||
44 | + pFilter->forceToTargetColorSpace = true; | ||
45 | + } | ||
46 | + } | ||
47 | src = &compParams->source[i]; | ||
48 | |||
49 | //-------------------------------- | ||
50 | diff --git a/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c b/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c | ||
51 | index d8f7d429a..151f3b039 100644 | ||
52 | --- a/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c | ||
53 | +++ b/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c | ||
54 | @@ -2378,6 +2378,7 @@ bool KernelDll_SetupCSC( | ||
55 | Kdll_CSC_Matrix curr_matrix; | ||
56 | Kdll_CSC_Matrix *matrix = pCSC->Matrix; // Color Space conversion matrix | ||
57 | uint8_t * matrixID = pCSC->MatrixID; // CSC coefficient allocation table | ||
58 | + bool forceToTargetColorSpace = false; | ||
59 | |||
60 | // Clear all CSC matrices | ||
61 | MOS_ZeroMemory(matrix, sizeof(pCSC->Matrix)); | ||
62 | @@ -2395,6 +2396,10 @@ bool KernelDll_SetupCSC( | ||
63 | //---------------------------------------------------------------// | ||
64 | for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++) | ||
65 | { | ||
66 | + if (pFilter->forceToTargetColorSpace) | ||
67 | + { | ||
68 | + forceToTargetColorSpace = true; | ||
69 | + } | ||
70 | // Disable Procamp for all layers except Main Video | ||
71 | // Disable Procamp if source is RGB | ||
72 | if (pFilter->layer != Layer_MainVideo || | ||
73 | @@ -2456,44 +2461,51 @@ bool KernelDll_SetupCSC( | ||
74 | //---------------------------------------------------------------// | ||
75 | if (sel_cspace == CSpace_Any) | ||
76 | { | ||
77 | - int cs; | ||
78 | - for (cs = (CSpace_Any + 1); cs < CSpace_Count; cs++) | ||
79 | + if (forceToTargetColorSpace) | ||
80 | { | ||
81 | - // Skip color spaces not in use | ||
82 | - cspace = (VPHAL_CSPACE)cs; | ||
83 | - if (!cspace_in_use[cspace]) | ||
84 | - { | ||
85 | - continue; | ||
86 | - } | ||
87 | - | ||
88 | - // xvYCC and BT are treated as same for CSC considerations (BT.x to xvYCC.x matrix is I) | ||
89 | - cspace = KernelDll_TranslateCspace(cspace); | ||
90 | - | ||
91 | - // Count # of CS conversions and matrices | ||
92 | - csc_count = 0; | ||
93 | - for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++) | ||
94 | + sel_cspace = out_cspace; | ||
95 | + } | ||
96 | + else | ||
97 | + { | ||
98 | + int cs; | ||
99 | + for (cs = (CSpace_Any + 1); cs < CSpace_Count; cs++) | ||
100 | { | ||
101 | - // Ignore layers where the Color Space may be set in software (colorfill, palletized) | ||
102 | - if (pFilter->cspace == CSpace_Any) | ||
103 | + // Skip color spaces not in use | ||
104 | + cspace = (VPHAL_CSPACE)cs; | ||
105 | + if (!cspace_in_use[cspace]) | ||
106 | { | ||
107 | continue; | ||
108 | } | ||
109 | |||
110 | - // Check if CSC/PA is required | ||
111 | - if (KernelDll_TranslateCspace(pFilter->cspace) != cspace || | ||
112 | - pFilter->procamp != DL_PROCAMP_DISABLED) | ||
113 | + // xvYCC and BT are treated as same for CSC considerations (BT.x to xvYCC.x matrix is I) | ||
114 | + cspace = KernelDll_TranslateCspace(cspace); | ||
115 | + | ||
116 | + // Count # of CS conversions and matrices | ||
117 | + csc_count = 0; | ||
118 | + for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++) | ||
119 | { | ||
120 | - csc_count++; | ||
121 | + // Ignore layers where the Color Space may be set in software (colorfill, palletized) | ||
122 | + if (pFilter->cspace == CSpace_Any) | ||
123 | + { | ||
124 | + continue; | ||
125 | + } | ||
126 | + | ||
127 | + // Check if CSC/PA is required | ||
128 | + if (KernelDll_TranslateCspace(pFilter->cspace) != cspace || | ||
129 | + pFilter->procamp != DL_PROCAMP_DISABLED) | ||
130 | + { | ||
131 | + csc_count++; | ||
132 | + } | ||
133 | } | ||
134 | - } | ||
135 | |||
136 | - // Save best choice as requiring minimum number of CSC operations | ||
137 | - if ((sel_csc_count < 0) || // Initial value | ||
138 | - (csc_count < sel_csc_count) || // Minimum number of CSC operations | ||
139 | - (csc_count == sel_csc_count && cs == main_cspace)) // Use main cspace as default if same CSC count | ||
140 | - { | ||
141 | - sel_cspace = cspace; | ||
142 | - sel_csc_count = csc_count; | ||
143 | + // Save best choice as requiring minimum number of CSC operations | ||
144 | + if ((sel_csc_count < 0) || // Initial value | ||
145 | + (csc_count < sel_csc_count) || // Minimum number of CSC operations | ||
146 | + (csc_count == sel_csc_count && cs == main_cspace)) // Use main cspace as default if same CSC count | ||
147 | + { | ||
148 | + sel_cspace = cspace; | ||
149 | + sel_csc_count = csc_count; | ||
150 | + } | ||
151 | } | ||
152 | } | ||
153 | } | ||
154 | diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
155 | index 40d0b3fad..e60a6c69c 100644 | ||
156 | --- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
157 | +++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp | ||
158 | @@ -2115,9 +2115,8 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( | ||
159 | { | ||
160 | DDI_VP_FUNC_ENTER; | ||
161 | DDI_VP_CHK_NULL(vpHalRenderParams, "nullptr vpHalRenderParams.", VA_STATUS_ERROR_INVALID_PARAMETER); | ||
162 | - DDI_VP_CHK_NULL(vpHalRenderParams->pTarget[0],"nullptr pTarget[0].", VA_STATUS_ERROR_INVALID_PARAMETER); | ||
163 | |||
164 | - if ((outBackGroundcolor >> 24) != 0 || vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB) | ||
165 | + if ((outBackGroundcolor >> 24) != 0) | ||
166 | { | ||
167 | if (vpHalRenderParams->pColorFillParams == nullptr) | ||
168 | { | ||
169 | @@ -2126,18 +2125,11 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill( | ||
170 | |||
171 | DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr pColorFillParams.", VA_STATUS_ERROR_UNKNOWN); | ||
172 | |||
173 | - if (vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB && (outBackGroundcolor >> 24) == 0) | ||
174 | - { | ||
175 | - // set color space for sRGB output | ||
176 | - vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; | ||
177 | - } | ||
178 | - else | ||
179 | - { | ||
180 | - // set background colorfill option | ||
181 | - vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor; | ||
182 | - vpHalRenderParams->pColorFillParams->bYCbCr = false; | ||
183 | - vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; | ||
184 | - } | ||
185 | + // set background colorfill option | ||
186 | + vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor; | ||
187 | + vpHalRenderParams->pColorFillParams->bYCbCr = false; | ||
188 | + vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB; | ||
189 | + | ||
190 | } | ||
191 | else | ||
192 | { | ||
193 | -- | ||
194 | 2.40.1 | ||
195 | |||
diff --git a/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch b/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch new file mode 100644 index 00000000..2f4aec1e --- /dev/null +++ b/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From f8b4d982232d4c1330e1e5f5dcd7cd8ca94decba Mon Sep 17 00:00:00 2001 | ||
2 | From: WenshengZhang <wensheng.zhang@intel.com> | ||
3 | Date: Thu, 25 Jan 2024 16:35:10 +0800 | ||
4 | Subject: [PATCH 11/12] Disable 422H format output | ||
5 | |||
6 | Disable 422H format output. | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/intel/media-driver/commit/eab411768e61a46e096793291f5f992eecf76cd8] | ||
9 | Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../agnostic/common/vp/hal/feature_manager/policy.cpp | 6 ++++++ | ||
12 | 1 file changed, 6 insertions(+) | ||
13 | |||
14 | diff --git a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp | ||
15 | index 317cec25a..12f1124fa 100644 | ||
16 | --- a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp | ||
17 | +++ b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp | ||
18 | @@ -1140,6 +1140,12 @@ MOS_STATUS Policy::GetScalingExecutionCaps(SwFilter *feature, bool isHdrEnabled) | ||
19 | bool isAlphaSettingSupportedByVebox = | ||
20 | IsAlphaSettingSupportedByVebox(scalingParams->formatInput, scalingParams->formatOutput, scalingParams->pCompAlpha); | ||
21 | |||
22 | + if (scalingParams->formatOutput == Format_422H) | ||
23 | + { | ||
24 | + VP_PUBLIC_ASSERTMESSAGE("Scaling not support 422H format output."); | ||
25 | + return MOS_STATUS_UNIMPLEMENTED; | ||
26 | + } | ||
27 | + | ||
28 | // Clean usedForNextPass flag. | ||
29 | if (scalingEngine->usedForNextPass) | ||
30 | { | ||
31 | -- | ||
32 | 2.40.1 | ||
33 | |||
diff --git a/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch b/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch new file mode 100644 index 00000000..1be9139d --- /dev/null +++ b/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From b93904533d3ee66c7919fa8e23d26b852a37a917 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
3 | Date: Tue, 30 Jan 2024 13:27:52 +0800 | ||
4 | Subject: [PATCH 12/12] [Decode] Fix AVC decode SFC 4K hang issue | ||
5 | |||
6 | Updated VDSFC input width and height for AVC decode | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/intel-innersource/drivers.gpu.unified/pull/151401] | ||
9 | |||
10 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
11 | --- | ||
12 | .../hal/dec/avc/packet/decode_avc_downsampling_packet.cpp | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp | ||
16 | index e75fd8137..9cc236bd7 100644 | ||
17 | --- a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp | ||
18 | +++ b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp | ||
19 | @@ -59,6 +59,10 @@ MOS_STATUS AvcDownSamplingPkt::InitSfcParams(VDBOX_SFC_PARAMS &sfcParams) | ||
20 | |||
21 | AvcBasicFeature *avcBasicFeature = dynamic_cast<AvcBasicFeature*>(m_basicFeature); | ||
22 | DECODE_CHK_NULL(avcBasicFeature); | ||
23 | + | ||
24 | + sfcParams.input.width = avcBasicFeature->m_width; | ||
25 | + sfcParams.input.height = avcBasicFeature->m_height; | ||
26 | + | ||
27 | CODEC_PICTURE curPic = avcBasicFeature->m_avcPicParams->CurrPic; | ||
28 | |||
29 | if (avcBasicFeature->m_avcPicParams->seq_fields.mb_adaptive_frame_field_flag == true) | ||
30 | -- | ||
31 | 2.40.1 | ||
32 | |||
diff --git a/recipes-multimedia/libva/intel-media-driver_21.3.5.bb b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb index dc6cd8cb..6513d574 100644 --- a/recipes-multimedia/libva/intel-media-driver_21.3.5.bb +++ b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb | |||
@@ -19,11 +19,20 @@ REQUIRED_DISTRO_FEATURES = "opengl" | |||
19 | DEPENDS += "libva gmmlib" | 19 | DEPENDS += "libva gmmlib" |
20 | 20 | ||
21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ | 21 | SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \ |
22 | file://0001-MOS-user-setting-reentrant.patch \ | 22 | file://0001-Disable-vp9-padding-on-mtl.patch \ |
23 | file://0001-Media-Common-Fix-the-user-setting-memory-free.patch \ | 23 | file://0002-Force-ARGB-surface-to-tile4-for-ACM.patch \ |
24 | file://0004-Add-device-ID-for-ARL.patch \ | ||
25 | file://0005-Add-XR24-support-to-DMABuf.patch \ | ||
26 | file://0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch \ | ||
27 | file://0007-Skip-report-keys.patch \ | ||
28 | file://0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch \ | ||
29 | file://0009-Skip-cache-bucket-realloc-for-default-mode-0.patch \ | ||
30 | file://0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch \ | ||
31 | file://0011-Disable-422H-format-output.patch \ | ||
32 | file://0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch \ | ||
24 | " | 33 | " |
25 | 34 | ||
26 | SRCREV = "ec4dc5d653733c21f8bf390794674052b5abdb09" | 35 | SRCREV = "a9f272496fc0f3e823cc4a814666ea27b443d902" |
27 | S = "${WORKDIR}/git" | 36 | S = "${WORKDIR}/git" |
28 | 37 | ||
29 | COMPATIBLE_HOST:x86-x32 = "null" | 38 | COMPATIBLE_HOST:x86-x32 = "null" |
diff --git a/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch b/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch deleted file mode 100644 index f7de9d16..00000000 --- a/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | From f2e6d2ecfea635ab952649156e31ca893d4b1a47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Aug 2017 08:49:20 -0700 | ||
4 | Subject: [PATCH] Fix build with clang | ||
5 | |||
6 | Fix errors e.g. | ||
7 | error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare] | ||
8 | |||
9 | and | ||
10 | |||
11 | psnr.cpp:225:17: error: bool literal returned from 'main' [-Werror,-Wmain] | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Upstream-Status: Pending | ||
15 | |||
16 | --- | ||
17 | tests/decodehelp.cpp | 2 +- | ||
18 | tests/encodehelp.h | 2 +- | ||
19 | tests/vpp.cpp | 2 +- | ||
20 | tests/yamitranscode.cpp | 2 +- | ||
21 | testscripts/psnr.cpp | 4 ++-- | ||
22 | 5 files changed, 6 insertions(+), 6 deletions(-) | ||
23 | |||
24 | diff --git a/tests/decodehelp.cpp b/tests/decodehelp.cpp | ||
25 | index b27b977..62cca63 100644 | ||
26 | --- a/tests/decodehelp.cpp | ||
27 | +++ b/tests/decodehelp.cpp | ||
28 | @@ -81,7 +81,7 @@ bool processCmdLine(int argc, char** argv, DecodeParameter* parameters) | ||
29 | { NULL, no_argument, NULL, 0 } | ||
30 | }; | ||
31 | |||
32 | - char opt; | ||
33 | + int opt; | ||
34 | while ((opt = getopt_long_only(argc, argv, "h:m:n:i:f:o:w:?", long_opts,&option_index)) != -1){ | ||
35 | switch (opt) { | ||
36 | case 'h': | ||
37 | diff --git a/tests/encodehelp.h b/tests/encodehelp.h | ||
38 | index 63580a4..651ec08 100644 | ||
39 | --- a/tests/encodehelp.h | ||
40 | +++ b/tests/encodehelp.h | ||
41 | @@ -109,7 +109,7 @@ static VideoRateControl string_to_rc_mode(char *str) | ||
42 | |||
43 | static bool process_cmdline(int argc, char *argv[]) | ||
44 | { | ||
45 | - char opt; | ||
46 | + int opt; | ||
47 | const struct option long_opts[] = { | ||
48 | { "help", no_argument, NULL, 'h' }, | ||
49 | { "qp", required_argument, NULL, 0 }, | ||
50 | diff --git a/tests/vpp.cpp b/tests/vpp.cpp | ||
51 | index 5a60c0a..52da43b 100644 | ||
52 | --- a/tests/vpp.cpp | ||
53 | +++ b/tests/vpp.cpp | ||
54 | @@ -151,7 +151,7 @@ public: | ||
55 | private: | ||
56 | bool processCmdLine(int argc, char* argv[]) | ||
57 | { | ||
58 | - char opt; | ||
59 | + int opt; | ||
60 | const struct option long_opts[] = { | ||
61 | { "help", no_argument, NULL, 'h' }, | ||
62 | { "sharpening", required_argument, NULL, 's' }, | ||
63 | diff --git a/tests/yamitranscode.cpp b/tests/yamitranscode.cpp | ||
64 | index 6207209..00164ce 100755 | ||
65 | --- a/tests/yamitranscode.cpp | ||
66 | +++ b/tests/yamitranscode.cpp | ||
67 | @@ -100,7 +100,7 @@ static VideoRateControl string_to_rc_mode(char *str) | ||
68 | |||
69 | static bool processCmdLine(int argc, char *argv[], TranscodeParams& para) | ||
70 | { | ||
71 | - char opt; | ||
72 | + int opt; | ||
73 | const struct option long_opts[] = { | ||
74 | { "help", no_argument, NULL, 'h' }, | ||
75 | { "qp", required_argument, NULL, 0 }, | ||
76 | diff --git a/testscripts/psnr.cpp b/testscripts/psnr.cpp | ||
77 | index 5cc24c9..68bd668 100644 | ||
78 | --- a/testscripts/psnr.cpp | ||
79 | +++ b/testscripts/psnr.cpp | ||
80 | @@ -215,14 +215,14 @@ int main(int argc, char *argv[]) | ||
81 | const char* psnrresult = "average_psnr.txt"; | ||
82 | int width=0,height=0; | ||
83 | int standardpsnr = NORMAL_PSNR; | ||
84 | - char opt; | ||
85 | + int opt; | ||
86 | while ((opt = getopt(argc, argv, "h:W:H:i:o:s:?")) != -1) | ||
87 | { | ||
88 | switch (opt) { | ||
89 | case 'h': | ||
90 | case '?': | ||
91 | print_help(argv[0]); | ||
92 | - return false; | ||
93 | + return -1; | ||
94 | case 'i': | ||
95 | filename1 = optarg; | ||
96 | break; | ||
diff --git a/recipes-multimedia/libyami/libyami-utils_1.3.2.bb b/recipes-multimedia/libyami/libyami-utils_1.3.2.bb deleted file mode 100644 index 8956bd04..00000000 --- a/recipes-multimedia/libyami/libyami-utils_1.3.2.bb +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | SUMMARY = "Applications and Scripts for libyami." | ||
2 | DESCRIPTION = "Applications and Scripts for libyami." | ||
3 | |||
4 | HOMEPAGE = "https://github.com/intel/libyami-utils" | ||
5 | BUGTRACKER = "https://github.com/intel/libyami-utils/issues/new" | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" | ||
9 | |||
10 | SRC_URI = "git://github.com/intel/libyami-utils.git;branch=master;protocol=https \ | ||
11 | file://0001-Fix-build-with-clang.patch \ | ||
12 | " | ||
13 | SRCREV = "c3d25b64b05aeb0c4eecc140aef617cfeced6b8e" | ||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | DEPENDS = "libva libyami" | ||
17 | |||
18 | inherit autotools pkgconfig features_check | ||
19 | |||
20 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
21 | |||
22 | PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
23 | |||
24 | # --enable-x11 needs libva-x11 | ||
25 | # gles-tests fail to build without x11: see https://github.com/intel/libyami-utils/issues/91 | ||
26 | PACKAGECONFIG[x11] = "--enable-x11 --enable-egl,--disable-x11 --disable-egl, virtual/libx11" | ||
diff --git a/recipes-multimedia/libyami/libyami_1.3.2.bb b/recipes-multimedia/libyami/libyami_1.3.2.bb deleted file mode 100644 index ad84bb4f..00000000 --- a/recipes-multimedia/libyami/libyami_1.3.2.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Yami is media infrastructure base on libva" | ||
2 | DESCRIPTION = "Yet Another Media Infrastructure \ | ||
3 | light weight hardware codec library base on VA-API " | ||
4 | |||
5 | HOMEPAGE = "https://github.com/intel/libyami" | ||
6 | BUGTRACKER = "https://github.com/intel/libyami/issues/new" | ||
7 | |||
8 | LICENSE = "Apache-2.0" | ||
9 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
10 | |||
11 | SRC_URI = "git://github.com/intel/libyami.git;branch=apache;protocol=https \ | ||
12 | " | ||
13 | SRCREV = "08606d0a43e0ef15e5b61cc13563169370ce8715" | ||
14 | S = "${WORKDIR}/git" | ||
15 | |||
16 | CXXFLAGS:append = " -Wno-error" | ||
17 | |||
18 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}" | ||
19 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender" | ||
20 | |||
21 | DEPENDS = "libva" | ||
22 | inherit autotools pkgconfig features_check | ||
23 | |||
24 | REQUIRED_DISTRO_FEATURES = "opengl" | ||
diff --git a/recipes-multimedia/mediasdk/files/fix-gcc13.patch b/recipes-multimedia/mediasdk/files/fix-gcc13.patch new file mode 100644 index 00000000..fb973870 --- /dev/null +++ b/recipes-multimedia/mediasdk/files/fix-gcc13.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inactive-Upstream | ||
2 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | |||
4 | diff --git a/api/mfx_dispatch/linux/mfxparser.cpp b/api/mfx_dispatch/linux/mfxparser.cpp | ||
5 | index 9d3823ec3e..12e46d1881 100644 | ||
6 | --- a/api/mfx_dispatch/linux/mfxparser.cpp | ||
7 | +++ b/api/mfx_dispatch/linux/mfxparser.cpp | ||
8 | @@ -20,6 +20,7 @@ | ||
9 | |||
10 | #include <ctype.h> | ||
11 | #include <stdio.h> | ||
12 | +#include <stdint.h> | ||
13 | #include <stdlib.h> | ||
14 | #include <string.h> | ||
15 | |||
diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_21.3.5.bb b/recipes-multimedia/mediasdk/intel-mediasdk_23.2.2.bb index 27fd4ab2..f00a4404 100644 --- a/recipes-multimedia/mediasdk/intel-mediasdk_21.3.5.bb +++ b/recipes-multimedia/mediasdk/intel-mediasdk_23.2.2.bb | |||
@@ -17,7 +17,9 @@ COMPATIBLE_HOST:x86-x32 = "null" | |||
17 | inherit features_check | 17 | inherit features_check |
18 | REQUIRED_DISTRO_FEATURES = "opengl" | 18 | REQUIRED_DISTRO_FEATURES = "opengl" |
19 | 19 | ||
20 | DEPENDS += "libdrm libva intel-media-driver" | 20 | DEPENDS += "libva" |
21 | |||
22 | RDEPENDS:${PN} += "intel-media-driver" | ||
21 | 23 | ||
22 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d)} \ | 24 | PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d)} \ |
23 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)} \ | 25 | ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)} \ |
@@ -27,15 +29,16 @@ PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d) | |||
27 | 29 | ||
28 | PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF" | 30 | PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF" |
29 | PACKAGECONFIG[itt] = "-DENABLE_ITT=ON, -DENABLE_ITT=OFF, itt" | 31 | PACKAGECONFIG[itt] = "-DENABLE_ITT=ON, -DENABLE_ITT=OFF, itt" |
30 | PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, ocl-icd opencl-clhpp opencl-headers" | 32 | PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, virtual/opencl-icd opencl-clhpp opencl-headers" |
31 | PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF" | 33 | PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF" |
32 | PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native" | 34 | PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native" |
33 | 35 | ||
34 | SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ | 36 | SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \ |
35 | file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ | 37 | file://0001-FindITT.cmake-fix-detection-of-header-library.patch \ |
38 | file://fix-gcc13.patch \ | ||
36 | " | 39 | " |
37 | 40 | ||
38 | SRCREV = "2b2922e15f353bc542d64f8ef15a248d88bfd2ce" | 41 | SRCREV = "869b60a6c3d7b5e9f7c3b3b914986322dca4bbae" |
39 | S = "${WORKDIR}/git" | 42 | S = "${WORKDIR}/git" |
40 | 43 | ||
41 | UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P<pver>(\d+(\.\d+)+))$" | 44 | UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P<pver>(\d+(\.\d+)+))$" |
diff --git a/recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch b/recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch new file mode 100644 index 00000000..8d1f3380 --- /dev/null +++ b/recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From a425927469b36e7bc597bff4fdc24d42a1168d1a Mon Sep 17 00:00:00 2001 | ||
2 | From: gfxVPLsdm <gfxvplsdm@intel.com> | ||
3 | Date: Mon, 18 Dec 2023 09:58:35 +0800 | ||
4 | Subject: [PATCH] ARLH DID open source (#6286) | ||
5 | |||
6 | Co-authored-by: huangli <li.h.huang@intel.com> | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/66f1b4d60a367eb1b0774e0b4369f906e0e632ae] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | |||
11 | --- | ||
12 | _studio/shared/include/mfxstructures-int.h | 7 ++++++- | ||
13 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/_studio/shared/include/mfxstructures-int.h b/_studio/shared/include/mfxstructures-int.h | ||
16 | index 363d9a63..8f16b0a8 100644 | ||
17 | --- a/_studio/shared/include/mfxstructures-int.h | ||
18 | +++ b/_studio/shared/include/mfxstructures-int.h | ||
19 | @@ -1,4 +1,4 @@ | ||
20 | -// Copyright (c) 2007-2021 Intel Corporation | ||
21 | +// Copyright (c) 2007-2023 Intel Corporation | ||
22 | // | ||
23 | // Permission is hereby granted, free of charge, to any person obtaining a copy | ||
24 | // of this software and associated documentation files (the "Software"), to deal | ||
25 | @@ -569,6 +569,11 @@ typedef struct { | ||
26 | /* ARL S */ | ||
27 | { 0x7D67, MFX_HW_ARL, MFX_GT2 }, | ||
28 | |||
29 | + /* ARL H*/ | ||
30 | + { 0x7D51, MFX_HW_ARL, MFX_GT2 }, | ||
31 | + { 0x7DD1, MFX_HW_ARL, MFX_GT2 }, | ||
32 | + { 0x7D41, MFX_HW_ARL, MFX_GT2 }, | ||
33 | + | ||
34 | }; | ||
35 | |||
36 | /* | ||
37 | -- | ||
38 | 2.40.1 | ||
39 | |||
diff --git a/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch b/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch new file mode 100644 index 00000000..8e014c97 --- /dev/null +++ b/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From e118062518c95d8fb0080cc8276b123a90bd0eb9 Mon Sep 17 00:00:00 2001 | ||
2 | From: gfxVPLsdm <gfxvplsdm@intel.com> | ||
3 | Date: Wed, 21 Feb 2024 17:11:52 +0800 | ||
4 | Subject: [PATCH] Fix SetBuffersYV12() V & U plane offsets calculation (#6475) | ||
5 | |||
6 | Signed-off-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com> | ||
7 | Co-authored-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com> | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/ce704ddfe11724767ba86c9425a3917dc3100d4a] | ||
10 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
11 | --- | ||
12 | _studio/shared/src/libmfx_core_vaapi.cpp | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/_studio/shared/src/libmfx_core_vaapi.cpp b/_studio/shared/src/libmfx_core_vaapi.cpp | ||
16 | index 2cad86f8..fd5fc269 100644 | ||
17 | --- a/_studio/shared/src/libmfx_core_vaapi.cpp | ||
18 | +++ b/_studio/shared/src/libmfx_core_vaapi.cpp | ||
19 | @@ -462,8 +462,8 @@ public: | ||
20 | } | ||
21 | else | ||
22 | { | ||
23 | - eb.offsets[1] = eb.offsets[0] + uint32_t(eb.height * eb.pitches[1] / 2); | ||
24 | - eb.offsets[2] = eb.offsets[1] + uint32_t(eb.height * eb.pitches[2] / 2); | ||
25 | + eb.offsets[1] = eb.offsets[0] + uint32_t(eb.height * eb.pitches[0]); | ||
26 | + eb.offsets[2] = eb.offsets[1] + uint32_t(eb.height * eb.pitches[1] / 2); | ||
27 | } | ||
28 | eb.num_planes = 3; | ||
29 | eb.data_size = eb.offsets[2] + (eb.height * eb.pitches[2] / 2); | ||
30 | -- | ||
31 | 2.40.1 | ||
32 | |||
diff --git a/recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch b/recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch new file mode 100644 index 00000000..e3854407 --- /dev/null +++ b/recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch | |||
@@ -0,0 +1,96 @@ | |||
1 | From 40c0bc6d3dfe172dd25908df2c16de29c34fa4d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: gfxVPLsdm <gfxvplsdm@intel.com> | ||
3 | Date: Mon, 5 Feb 2024 17:14:07 +0800 | ||
4 | Subject: [PATCH] [JPEGe] Enable BGR4 JPEG Enc support (#6470) | ||
5 | |||
6 | Co-authored-by: vcheah <vincent.beng.keat.cheah@intel.com> | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/e73763d05f8fdc348c356b58dcb83075b5e868f8] | ||
9 | Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com> | ||
10 | --- | ||
11 | .../mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp | 6 ++++-- | ||
12 | .../encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp | 9 +++++---- | ||
13 | 2 files changed, 9 insertions(+), 6 deletions(-) | ||
14 | |||
15 | diff --git a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp | ||
16 | index 141564b1..332f6372 100644 | ||
17 | --- a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp | ||
18 | +++ b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp | ||
19 | @@ -212,7 +212,8 @@ mfxStatus MFXVideoENCODEMJPEG_HW::QueryImplsDescription( | ||
20 | ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_YV12; | ||
21 | ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_YUY2; | ||
22 | ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_RGB4; | ||
23 | - memCaps.NumColorFormats = 4; | ||
24 | + ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_BGR4; | ||
25 | + memCaps.NumColorFormats = 5; | ||
26 | |||
27 | ah.PushBack(profileCaps.MemDesc); | ||
28 | profileCaps.MemDesc[1] = profileCaps.MemDesc[0]; | ||
29 | @@ -392,7 +393,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::Query(VideoCORE * core, mfxVideoParam *in, mfx | ||
30 | if ((fourCC == 0 && chromaFormat == 0) || | ||
31 | (fourCC == MFX_FOURCC_NV12 && (chromaFormat == MFX_CHROMAFORMAT_YUV420 || chromaFormat == MFX_CHROMAFORMAT_YUV400)) || | ||
32 | (fourCC == MFX_FOURCC_YUY2 && chromaFormat == MFX_CHROMAFORMAT_YUV422H) || | ||
33 | - (fourCC == MFX_FOURCC_RGB4 && chromaFormat == MFX_CHROMAFORMAT_YUV444)) | ||
34 | + ((fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) && chromaFormat == MFX_CHROMAFORMAT_YUV444)) | ||
35 | { | ||
36 | out->mfx.FrameInfo.FourCC = in->mfx.FrameInfo.FourCC; | ||
37 | out->mfx.FrameInfo.ChromaFormat = in->mfx.FrameInfo.ChromaFormat; | ||
38 | @@ -698,6 +699,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::Init(mfxVideoParam *par) | ||
39 | doubleBytesPerPx = 4; | ||
40 | break; | ||
41 | case MFX_FOURCC_RGB4: | ||
42 | + case MFX_FOURCC_BGR4: | ||
43 | default: | ||
44 | doubleBytesPerPx = 8; | ||
45 | break; | ||
46 | diff --git a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp | ||
47 | index 3fc619d1..b1ab556e 100644 | ||
48 | --- a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp | ||
49 | +++ b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp | ||
50 | @@ -108,6 +108,7 @@ mfxStatus MfxHwMJpegEncode::CheckJpegParam(VideoCORE *core, mfxVideoParam & par, | ||
51 | BytesPerPx = 2; | ||
52 | break; | ||
53 | case MFX_FOURCC_RGB4: | ||
54 | + case MFX_FOURCC_BGR4: | ||
55 | default: | ||
56 | BytesPerPx = 4; | ||
57 | } | ||
58 | @@ -157,7 +158,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c | ||
59 | |||
60 | m_payload_base.length = 0; | ||
61 | m_payload_list.clear(); | ||
62 | - if (fourCC == MFX_FOURCC_RGB4 && chromaFormat == MFX_CHROMAFORMAT_YUV444) | ||
63 | + if ((fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) && chromaFormat == MFX_CHROMAFORMAT_YUV444) | ||
64 | { | ||
65 | m_app14_data.header = 0xEEFF;//APP14 | ||
66 | m_app14_data.lenH = 0; | ||
67 | @@ -287,7 +288,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c | ||
68 | m_pps.num_components = 3; | ||
69 | else if (fourCC == MFX_FOURCC_NV12 && chromaFormat == MFX_CHROMAFORMAT_YUV400) | ||
70 | m_pps.num_components = 1; | ||
71 | - else if (fourCC == MFX_FOURCC_RGB4 && chromaFormat == MFX_CHROMAFORMAT_YUV444) | ||
72 | + else if ((fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) && chromaFormat == MFX_CHROMAFORMAT_YUV444) | ||
73 | m_pps.num_components = 3; | ||
74 | else | ||
75 | MFX_RETURN(MFX_ERR_UNDEFINED_BEHAVIOR); | ||
76 | @@ -341,7 +342,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c | ||
77 | { | ||
78 | // No external tables - use Quality parameter | ||
79 | m_dqt_list.resize(0); | ||
80 | - if (fourCC == MFX_FOURCC_RGB4) | ||
81 | + if (fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) | ||
82 | { | ||
83 | m_pps.quantiser_table_selector[0] = 0; | ||
84 | m_pps.quantiser_table_selector[1] = 0; | ||
85 | @@ -393,7 +394,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c | ||
86 | { | ||
87 | m_dht_list.resize(0); | ||
88 | } | ||
89 | - else if (hwCaps->MaxNumHuffTable == 1 || fourCC == MFX_FOURCC_RGB4) | ||
90 | + else if (hwCaps->MaxNumHuffTable == 1 || (fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4)) | ||
91 | { | ||
92 | m_dht_list.resize(1); | ||
93 | |||
94 | -- | ||
95 | 2.40.1 | ||
96 | |||
diff --git a/recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch b/recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch new file mode 100644 index 00000000..762a4902 --- /dev/null +++ b/recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 630c32194f53c70f4f654fb3d198790df253ba1f Mon Sep 17 00:00:00 2001 | ||
2 | From: Markus Volk <f_l_k@t-online.de> | ||
3 | Date: Thu, 15 Jun 2023 13:43:32 +0200 | ||
4 | Subject: [PATCH] vpl.pc.in: dont pass pcfiledir to cflags | ||
5 | |||
6 | Signed-off-by: Markus Volk <f_l_k@t-online.de> | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe specific] | ||
9 | --- | ||
10 | libvpl/pkgconfig/vpl.pc.in | 4 ++-- | ||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/libvpl/pkgconfig/vpl.pc.in b/libvpl/pkgconfig/vpl.pc.in | ||
14 | index ab468a9..05c020e 100644 | ||
15 | --- a/libvpl/pkgconfig/vpl.pc.in | ||
16 | +++ b/libvpl/pkgconfig/vpl.pc.in | ||
17 | @@ -8,6 +8,6 @@ Description: oneAPI Video Processing Library | ||
18 | Version: @API_VERSION_MAJOR@.@API_VERSION_MINOR@ | ||
19 | URL: https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onevpl.html | ||
20 | |||
21 | -Libs: -L${libdir} -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@ | ||
22 | +Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@ | ||
23 | Libs.private: @VPL_PKGCONFIG_PRIVATE_LIBS@ | ||
24 | -Cflags: -I${includedir} -I${includedir}/vpl | ||
25 | +Cflags: -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/vpl | ||
26 | -- | ||
27 | 2.40.1 | ||
28 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch deleted file mode 100644 index 3c41c741..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | From f23ba1b768a4db58ed985a0f066b65d9a65dd61b Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Mon, 1 Nov 2021 13:28:06 +0000 | ||
4 | Subject: [PATCH 2/2] [AVCd] Add frame info check and update ChromaFormat in | ||
5 | FillOutputSurface for VDSFC CSC | ||
6 | |||
7 | Upstream-Status: Submitted | ||
8 | innersource PR #3871 | ||
9 | |||
10 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
11 | --- | ||
12 | .../decode/h264/src/mfx_h264_dec_decode.cpp | 48 +++++++++---------- | ||
13 | 1 file changed, 24 insertions(+), 24 deletions(-) | ||
14 | |||
15 | diff --git a/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp b/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp | ||
16 | index 84e57f7f18..8e51ad7852 100644 | ||
17 | --- a/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp | ||
18 | +++ b/_studio/mfx_lib/decode/h264/src/mfx_h264_dec_decode.cpp | ||
19 | @@ -1140,12 +1140,8 @@ mfxStatus VideoDECODEH264::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * | ||
20 | isVideoProcCscEnabled = true; | ||
21 | } | ||
22 | #endif | ||
23 | - sts = CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_AVC); | ||
24 | - //Decode CSC support more FourCC format, already checked in Init, skip the check return; | ||
25 | - if(!isVideoProcCscEnabled) | ||
26 | - { | ||
27 | - MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_UNSUPPORTED); | ||
28 | - } | ||
29 | + sts = isVideoProcCscEnabled ? CheckFrameInfoDecVideoProcCsc(&surface_work->Info, MFX_CODEC_AVC) : CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_AVC); | ||
30 | + MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_INVALID_VIDEO_PARAM) | ||
31 | |||
32 | sts = CheckFrameData(surface_work); | ||
33 | MFX_CHECK_STS(sts); | ||
34 | @@ -1420,11 +1416,6 @@ void VideoDECODEH264::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
35 | } | ||
36 | #endif | ||
37 | |||
38 | - surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
39 | - surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
40 | - surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
41 | - surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
42 | - | ||
43 | #ifndef MFX_DEC_VIDEO_POSTPROCESS_DISABLE | ||
44 | mfxExtDecVideoProcessing * videoProcessing = (mfxExtDecVideoProcessing *)GetExtendedBuffer(m_vFirstPar.ExtParam, m_vFirstPar.NumExtParam, MFX_EXTBUFF_DEC_VIDEO_PROCESSING); | ||
45 | if (videoProcessing) | ||
46 | @@ -1433,8 +1424,28 @@ void VideoDECODEH264::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
47 | surface_out->Info.CropW = videoProcessing->Out.CropW; | ||
48 | surface_out->Info.CropX = videoProcessing->Out.CropX; | ||
49 | surface_out->Info.CropY = videoProcessing->Out.CropY; | ||
50 | - } | ||
51 | + surface_out->Info.ChromaFormat = videoProcessing->Out.ChromaFormat; | ||
52 | + } else | ||
53 | #endif | ||
54 | + { | ||
55 | + surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
56 | + surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
57 | + surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
58 | + surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
59 | + | ||
60 | + switch(pFrame->m_chroma_format) | ||
61 | + { | ||
62 | + case 0: | ||
63 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
64 | + break; | ||
65 | + case 2: | ||
66 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
67 | + break; | ||
68 | + default: | ||
69 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
70 | + break; | ||
71 | + } | ||
72 | + } | ||
73 | |||
74 | bool isShouldUpdate = !(m_vFirstPar.mfx.FrameInfo.AspectRatioH || m_vFirstPar.mfx.FrameInfo.AspectRatioW); | ||
75 | |||
76 | @@ -1447,18 +1458,7 @@ void VideoDECODEH264::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
77 | surface_out->Info.FrameRateExtN = isShouldUpdate ? m_vPar.mfx.FrameInfo.FrameRateExtN : m_vFirstPar.mfx.FrameInfo.FrameRateExtN; | ||
78 | |||
79 | surface_out->Info.PicStruct = 0; | ||
80 | - switch(pFrame->m_chroma_format) | ||
81 | - { | ||
82 | - case 0: | ||
83 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
84 | - break; | ||
85 | - case 2: | ||
86 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
87 | - break; | ||
88 | - default: | ||
89 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
90 | - break; | ||
91 | - } | ||
92 | + | ||
93 | |||
94 | switch (pFrame->m_displayPictureStruct) | ||
95 | { | ||
96 | -- | ||
97 | 2.33.1 | ||
98 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch deleted file mode 100644 index 9d8577bc..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-Adding-missing-device-ID-4692-for-ADL-S.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 1579b536f1a82fb7c80f49fc7b76cda65b8bd18e Mon Sep 17 00:00:00 2001 | ||
2 | From: "Teng, Jin Chung" <jin.chung.teng@intel.com> | ||
3 | Date: Thu, 28 Oct 2021 13:49:58 +0800 | ||
4 | Subject: [PATCH] Adding missing device ID 4692 for ADL-S | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #3717 | ||
8 | |||
9 | [Internal] | ||
10 | Issue:- | ||
11 | Test:- | ||
12 | OSPR:N/A | ||
13 | |||
14 | Signed-off-by: Teng, Jin Chung <jin.chung.teng@intel.com> | ||
15 | --- | ||
16 | _studio/shared/include/mfxstructures-int.h | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/_studio/shared/include/mfxstructures-int.h b/_studio/shared/include/mfxstructures-int.h | ||
20 | index c71f126..fa1329d 100755 | ||
21 | --- a/_studio/shared/include/mfxstructures-int.h | ||
22 | +++ b/_studio/shared/include/mfxstructures-int.h | ||
23 | @@ -427,6 +427,7 @@ typedef struct { | ||
24 | { 0x4683, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
25 | { 0x4690, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
26 | { 0x4691, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
27 | + { 0x4692, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
28 | { 0x4693, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
29 | { 0x4698, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
30 | { 0x4699, MFX_HW_ADL_S, MFX_GT1 },//ADL-S | ||
31 | -- | ||
32 | 2.7.4 | ||
33 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch deleted file mode 100644 index 69ce1369..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch +++ /dev/null | |||
@@ -1,173 +0,0 @@ | |||
1 | From 99160958668fd4a170cd749492e37ebdb28dae69 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Thu, 23 Sep 2021 21:34:16 +0000 | ||
4 | Subject: [PATCH 1/2] [HEVCd] Add frame info check and update ChromaFormat in | ||
5 | FillOutputSurface for VDSFC CSC | ||
6 | |||
7 | Upstream-Status: Submitted | ||
8 | innersource PR #3871 | ||
9 | |||
10 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
11 | --- | ||
12 | .../decode/h265/src/mfx_h265_dec_decode.cpp | 64 +++++++++++-------- | ||
13 | .../mfx_lib/shared/include/mfx_common_int.h | 1 + | ||
14 | _studio/mfx_lib/shared/src/mfx_common_int.cpp | 33 ++++++++++ | ||
15 | 3 files changed, 71 insertions(+), 27 deletions(-) | ||
16 | |||
17 | diff --git a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
18 | index fe2bcf2c3f..362ad257d6 100644 | ||
19 | --- a/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
20 | +++ b/_studio/mfx_lib/decode/h265/src/mfx_h265_dec_decode.cpp | ||
21 | @@ -963,8 +963,16 @@ mfxStatus VideoDECODEH265::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 * | ||
22 | |||
23 | if (surface_work) | ||
24 | { | ||
25 | - sts = CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_HEVC); | ||
26 | - MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_INVALID_VIDEO_PARAM); | ||
27 | + bool isVideoProcCscEnabled = false; | ||
28 | +#ifndef MFX_DEC_VIDEO_POSTPROCESS_DISABLE | ||
29 | + mfxExtDecVideoProcessing* videoProcessing = (mfxExtDecVideoProcessing*)GetExtendedBuffer(m_vInitPar.ExtParam, m_vInitPar.NumExtParam, MFX_EXTBUFF_DEC_VIDEO_PROCESSING); | ||
30 | + if (videoProcessing && videoProcessing->Out.FourCC != m_vPar.mfx.FrameInfo.FourCC) | ||
31 | + { | ||
32 | + isVideoProcCscEnabled = true; | ||
33 | + } | ||
34 | +#endif | ||
35 | + sts = isVideoProcCscEnabled ? CheckFrameInfoDecVideoProcCsc(&surface_work->Info, MFX_CODEC_HEVC) : CheckFrameInfoCodecs(&surface_work->Info, MFX_CODEC_HEVC); | ||
36 | + MFX_CHECK(sts == MFX_ERR_NONE, MFX_ERR_INVALID_VIDEO_PARAM) | ||
37 | |||
38 | sts = CheckFrameData(surface_work); | ||
39 | MFX_CHECK_STS(sts); | ||
40 | @@ -1172,11 +1180,6 @@ void VideoDECODEH265::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
41 | |||
42 | surface_out->Info.FrameId.TemporalId = 0; | ||
43 | |||
44 | - surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
45 | - surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
46 | - surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
47 | - surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
48 | - | ||
49 | #ifndef MFX_DEC_VIDEO_POSTPROCESS_DISABLE | ||
50 | mfxExtDecVideoProcessing * videoProcessing = (mfxExtDecVideoProcessing *)GetExtendedBuffer(m_vFirstPar.ExtParam, m_vFirstPar.NumExtParam, MFX_EXTBUFF_DEC_VIDEO_PROCESSING); | ||
51 | if (videoProcessing) | ||
52 | @@ -1185,8 +1188,35 @@ void VideoDECODEH265::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
53 | surface_out->Info.CropW = videoProcessing->Out.CropW; | ||
54 | surface_out->Info.CropX = videoProcessing->Out.CropX; | ||
55 | surface_out->Info.CropY = videoProcessing->Out.CropY; | ||
56 | + surface_out->Info.ChromaFormat = videoProcessing->Out.ChromaFormat; | ||
57 | } | ||
58 | + else | ||
59 | #endif | ||
60 | + { | ||
61 | + surface_out->Info.CropH = (mfxU16)(pFrame->lumaSize().height - pFrame->m_crop_bottom - pFrame->m_crop_top); | ||
62 | + surface_out->Info.CropW = (mfxU16)(pFrame->lumaSize().width - pFrame->m_crop_right - pFrame->m_crop_left); | ||
63 | + surface_out->Info.CropX = (mfxU16)(pFrame->m_crop_left); | ||
64 | + surface_out->Info.CropY = (mfxU16)(pFrame->m_crop_top); | ||
65 | + | ||
66 | + switch(pFrame->m_chroma_format) | ||
67 | + { | ||
68 | + case 0: | ||
69 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
70 | + break; | ||
71 | + case 1: | ||
72 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
73 | + break; | ||
74 | + case 2: | ||
75 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
76 | + break; | ||
77 | + case 3: | ||
78 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
79 | + break; | ||
80 | + default: | ||
81 | + VM_ASSERT(!"Unknown chroma format"); | ||
82 | + surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
83 | + } | ||
84 | + } | ||
85 | |||
86 | bool isShouldUpdate = !(m_vFirstPar.mfx.FrameInfo.AspectRatioH || m_vFirstPar.mfx.FrameInfo.AspectRatioW); | ||
87 | |||
88 | @@ -1198,26 +1228,6 @@ void VideoDECODEH265::FillOutputSurface(mfxFrameSurface1 **surf_out, mfxFrameSur | ||
89 | surface_out->Info.FrameRateExtD = isShouldUpdate ? m_vPar.mfx.FrameInfo.FrameRateExtD : m_vFirstPar.mfx.FrameInfo.FrameRateExtD; | ||
90 | surface_out->Info.FrameRateExtN = isShouldUpdate ? m_vPar.mfx.FrameInfo.FrameRateExtN : m_vFirstPar.mfx.FrameInfo.FrameRateExtN; | ||
91 | |||
92 | - surface_out->Info.PicStruct = 0; | ||
93 | - switch(pFrame->m_chroma_format) | ||
94 | - { | ||
95 | - case 0: | ||
96 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV400; | ||
97 | - break; | ||
98 | - case 1: | ||
99 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
100 | - break; | ||
101 | - case 2: | ||
102 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
103 | - break; | ||
104 | - case 3: | ||
105 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
106 | - break; | ||
107 | - default: | ||
108 | - VM_ASSERT(!"Unknown chroma format"); | ||
109 | - surface_out->Info.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
110 | - } | ||
111 | - | ||
112 | surface_out->Info.PicStruct = | ||
113 | UMC2MFX_PicStruct(pFrame->m_DisplayPictureStruct_H265, !!m_vPar.mfx.ExtendedPicStruct); | ||
114 | |||
115 | diff --git a/_studio/mfx_lib/shared/include/mfx_common_int.h b/_studio/mfx_lib/shared/include/mfx_common_int.h | ||
116 | index 4f12ddb883..73f4667a18 100644 | ||
117 | --- a/_studio/mfx_lib/shared/include/mfx_common_int.h | ||
118 | +++ b/_studio/mfx_lib/shared/include/mfx_common_int.h | ||
119 | @@ -29,6 +29,7 @@ | ||
120 | |||
121 | mfxStatus CheckFrameInfoCommon(mfxFrameInfo *info, mfxU32 codecId); | ||
122 | mfxStatus CheckFrameInfoEncoders(mfxFrameInfo *info); | ||
123 | +mfxStatus CheckFrameInfoDecVideoProcCsc(mfxFrameInfo *info, mfxU32 codecId); | ||
124 | mfxStatus CheckFrameInfoCodecs(mfxFrameInfo *info, mfxU32 codecId = MFX_CODEC_AVC); | ||
125 | |||
126 | mfxStatus CheckVideoParamEncoders(mfxVideoParam *in, eMFXHWType type); | ||
127 | diff --git a/_studio/mfx_lib/shared/src/mfx_common_int.cpp b/_studio/mfx_lib/shared/src/mfx_common_int.cpp | ||
128 | index 1142457f00..4f2126d944 100644 | ||
129 | --- a/_studio/mfx_lib/shared/src/mfx_common_int.cpp | ||
130 | +++ b/_studio/mfx_lib/shared/src/mfx_common_int.cpp | ||
131 | @@ -163,6 +163,39 @@ mfxStatus CheckFrameInfoEncoders(mfxFrameInfo *info) | ||
132 | return MFX_ERR_NONE; | ||
133 | } | ||
134 | |||
135 | +mfxStatus CheckFrameInfoDecVideoProcCsc(mfxFrameInfo *info, mfxU32 codecId) | ||
136 | +{ | ||
137 | + mfxStatus sts = CheckFrameInfoCommon(info, codecId); | ||
138 | + MFX_CHECK_STS(sts); | ||
139 | + | ||
140 | + switch(info->FourCC) { | ||
141 | + case MFX_FOURCC_NV12: | ||
142 | + case MFX_FOURCC_P010: | ||
143 | + case MFX_FOURCC_P016: | ||
144 | + if (info->ChromaFormat == MFX_CHROMAFORMAT_YUV420) | ||
145 | + return MFX_ERR_NONE; | ||
146 | + MFX_RETURN(MFX_ERR_INVALID_VIDEO_PARAM); | ||
147 | + | ||
148 | + case MFX_FOURCC_YUY2: | ||
149 | + case MFX_FOURCC_Y210: | ||
150 | + case MFX_FOURCC_Y216: | ||
151 | + if (info->ChromaFormat == MFX_CHROMAFORMAT_YUV422) | ||
152 | + return MFX_ERR_NONE; | ||
153 | + MFX_RETURN(MFX_ERR_INVALID_VIDEO_PARAM); | ||
154 | + | ||
155 | + case MFX_FOURCC_AYUV: | ||
156 | + case MFX_FOURCC_Y410: | ||
157 | + case MFX_FOURCC_Y416: | ||
158 | + case MFX_FOURCC_RGB4: | ||
159 | + if (info->ChromaFormat == MFX_CHROMAFORMAT_YUV444) | ||
160 | + return MFX_ERR_NONE; | ||
161 | + MFX_RETURN(MFX_ERR_INVALID_VIDEO_PARAM); | ||
162 | + | ||
163 | + default: | ||
164 | + MFX_RETURN(MFX_ERR_UNSUPPORTED); | ||
165 | + } | ||
166 | +} | ||
167 | + | ||
168 | mfxStatus CheckFrameInfoCodecs(mfxFrameInfo *info, mfxU32 codecId) | ||
169 | { | ||
170 | mfxStatus sts = CheckFrameInfoCommon(info, codecId); | ||
171 | -- | ||
172 | 2.33.1 | ||
173 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch b/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch deleted file mode 100644 index 21482ed7..00000000 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu/0001-jpegd-Enable-JPEG-decode-error-report.patch +++ /dev/null | |||
@@ -1,502 +0,0 @@ | |||
1 | From fe25ec3db9a48308bd6d3e9fe800e67335f8a369 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Mon, 4 Oct 2021 13:56:08 +0800 | ||
4 | Subject: [PATCH] [jpegd] Enable JPEG decode error report | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #3318 | ||
8 | |||
9 | [Internal] | ||
10 | Issue: NA | ||
11 | Test: manual. Gst-MSDK with mfxExtDecodeErrorReport | ||
12 | OSPR: N/A | ||
13 | |||
14 | Signed-off-by: Cheah, Vincent Beng Keat vincent.beng.keat.cheah@intel.com> | ||
15 | --- | ||
16 | .../mjpeg/include/mfx_mjpeg_dec_decode.h | 2 ++ | ||
17 | .../decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | 19 ++++++++++- | ||
18 | .../umc/codec/jpeg_dec/include/jpegdec.h | 1 + | ||
19 | .../umc/codec/jpeg_dec/include/jpegdec_base.h | 19 +++++++++++ | ||
20 | .../jpeg_dec/include/umc_mjpeg_mfx_decode.h | 2 +- | ||
21 | .../include/umc_mjpeg_mfx_decode_base.h | 4 +-- | ||
22 | .../shared/umc/codec/jpeg_dec/src/jpegdec.cpp | 17 ++++++++-- | ||
23 | .../umc/codec/jpeg_dec/src/jpegdec_base.cpp | 29 +++++++++++++++- | ||
24 | .../jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | 6 ++-- | ||
25 | .../src/umc_mjpeg_mfx_decode_base.cpp | 6 ++-- | ||
26 | api/vpl/mfxstructures.h | 33 +++++++++++++++---- | ||
27 | 11 files changed, 121 insertions(+), 17 deletions(-) | ||
28 | |||
29 | diff --git a/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h b/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h | ||
30 | index c6641d3e71..a2ea6b5cec 100644 | ||
31 | --- a/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h | ||
32 | +++ b/_studio/mfx_lib/decode/mjpeg/include/mfx_mjpeg_dec_decode.h | ||
33 | @@ -37,6 +37,7 @@ | ||
34 | #endif | ||
35 | |||
36 | #include "mfx_task.h" | ||
37 | +#include "umc_media_data.h" | ||
38 | |||
39 | #include "mfx_vpp_jpeg.h" | ||
40 | |||
41 | @@ -46,6 +47,7 @@ namespace UMC | ||
42 | class JpegFrameConstructor; | ||
43 | class MediaDataEx; | ||
44 | class FrameData; | ||
45 | + class MediaData; | ||
46 | }; | ||
47 | |||
48 | class VideoDECODEMJPEGBase | ||
49 | diff --git a/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp b/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | ||
50 | index 3769fe8a72..0775fbb1be 100644 | ||
51 | --- a/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | ||
52 | +++ b/_studio/mfx_lib/decode/mjpeg/src/mfx_mjpeg_dec_decode.cpp | ||
53 | @@ -456,6 +456,14 @@ mfxStatus VideoDECODEMJPEG::DecodeHeader(VideoCORE *core, mfxBitstream *bs, mfxV | ||
54 | UMC::Status umcRes = decoder.Init(&umcVideoParams); | ||
55 | MFX_CHECK_INIT(umcRes == UMC::UMC_OK); | ||
56 | |||
57 | + mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
58 | + | ||
59 | + if (extbuf) | ||
60 | + { | ||
61 | + reinterpret_cast<mfxExtDecodeErrorReport *>(extbuf)->ErrorTypes = 0; | ||
62 | + in.SetExtBuffer(extbuf); | ||
63 | + } | ||
64 | + | ||
65 | umcRes = decoder.DecodeHeader(&in); | ||
66 | |||
67 | in.Save(bs); | ||
68 | @@ -770,6 +778,14 @@ mfxStatus VideoDECODEMJPEG::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 | ||
69 | MFXMediaDataAdapter src(bs); | ||
70 | UMC::MediaDataEx *pSrcData; | ||
71 | |||
72 | + mfxExtBuffer* extbuf = (bs) ? GetExtendedBuffer(bs->ExtParam, bs->NumExtParam, MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
73 | + | ||
74 | + if (extbuf) | ||
75 | + { | ||
76 | + reinterpret_cast<mfxExtDecodeErrorReport *>(extbuf)->ErrorTypes = 0; | ||
77 | + src.SetExtBuffer(extbuf); | ||
78 | + } | ||
79 | + | ||
80 | if (!m_isHeaderFound && bs) | ||
81 | { | ||
82 | umcRes = pMJPEGVideoDecoder->FindStartOfImage(&src); | ||
83 | @@ -785,7 +801,8 @@ mfxStatus VideoDECODEMJPEG::DecodeFrameCheck(mfxBitstream *bs, mfxFrameSurface1 | ||
84 | |||
85 | if (!m_isHeaderParsed && bs) | ||
86 | { | ||
87 | - umcRes = pMJPEGVideoDecoder->_GetFrameInfo((uint8_t*)src.GetDataPointer(), src.GetDataSize()); | ||
88 | + umcRes = pMJPEGVideoDecoder->_GetFrameInfo((uint8_t*)src.GetDataPointer(), src.GetDataSize(), &src); | ||
89 | + | ||
90 | if (umcRes != UMC::UMC_OK) | ||
91 | { | ||
92 | if(umcRes != UMC::UMC_ERR_NOT_ENOUGH_DATA) | ||
93 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h | ||
94 | index 1e70931284..561e1c2889 100644 | ||
95 | --- a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h | ||
96 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec.h | ||
97 | @@ -27,6 +27,7 @@ | ||
98 | #include "omp.h" | ||
99 | #endif | ||
100 | #include "jpegdec_base.h" | ||
101 | +#include "umc_media_data.h" | ||
102 | |||
103 | class CBaseStreamInput; | ||
104 | |||
105 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h | ||
106 | index 5e9c139c2c..42647f871c 100644 | ||
107 | --- a/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h | ||
108 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/jpegdec_base.h | ||
109 | @@ -29,6 +29,13 @@ | ||
110 | #include "colorcomp.h" | ||
111 | #include "membuffin.h" | ||
112 | #include "bitstreamin.h" | ||
113 | +#include "mfxstructures.h" | ||
114 | +#include "umc_media_data.h" | ||
115 | + | ||
116 | +namespace UMC | ||
117 | +{ | ||
118 | + class MediaData; | ||
119 | +}; | ||
120 | |||
121 | class CJPEGDecoderBase | ||
122 | { | ||
123 | @@ -146,6 +153,18 @@ public: | ||
124 | JERRCODE SkipMarker(void); | ||
125 | |||
126 | JERRCODE DetectSampling(void); | ||
127 | + | ||
128 | + void SetDecodeErrorTypes(void); | ||
129 | + | ||
130 | + void SetDecodeErrorReportParam(UMC::MediaData *in) | ||
131 | + { | ||
132 | + UMC::MediaData::AuxInfo* aux = (in) ? in->GetAuxInfo(MFX_EXTBUFF_DECODE_ERROR_REPORT) : NULL; | ||
133 | + m_pDecodeErrorReport = (aux) ? reinterpret_cast<mfxExtDecodeErrorReport*>(aux->ptr) : NULL; | ||
134 | + } | ||
135 | + | ||
136 | +protected: | ||
137 | + mfxExtDecodeErrorReport* m_pDecodeErrorReport; | ||
138 | + | ||
139 | }; | ||
140 | |||
141 | #endif // MFX_ENABLE_MJPEG_VIDEO_DECODE | ||
142 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h | ||
143 | index fbe535cd95..2edd4d57a8 100644 | ||
144 | --- a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h | ||
145 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode.h | ||
146 | @@ -94,7 +94,7 @@ public: | ||
147 | JCOLOR GetColorType(); | ||
148 | |||
149 | // All memory sizes should come in size_t type | ||
150 | - Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize); | ||
151 | + Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in); | ||
152 | |||
153 | // Allocate the destination frame | ||
154 | Status AllocateFrame() override; | ||
155 | diff --git a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h | ||
156 | index 9cee49e9c1..90ce5888ea 100644 | ||
157 | --- a/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h | ||
158 | +++ b/_studio/shared/umc/codec/jpeg_dec/include/umc_mjpeg_mfx_decode_base.h | ||
159 | @@ -63,7 +63,7 @@ public: | ||
160 | // Close decoding & free all allocated resources | ||
161 | virtual Status Close(void); | ||
162 | |||
163 | - virtual Status GetFrame(UMC::MediaDataEx *, UMC::FrameData** , const mfxU32 ) { return MFX_ERR_NONE; }; | ||
164 | + virtual Status GetFrame(UMC::MediaDataEx *, UMC::FrameData** , const mfxU32) { return MFX_ERR_NONE; }; | ||
165 | |||
166 | virtual void SetFrameAllocator(FrameAllocator * frameAllocator); | ||
167 | |||
168 | @@ -79,7 +79,7 @@ public: | ||
169 | Status FindStartOfImage(MediaData * in); | ||
170 | |||
171 | // All memory sizes should come in size_t type | ||
172 | - Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize); | ||
173 | + Status _GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in); | ||
174 | |||
175 | Status SetRotation(uint16_t rotation); | ||
176 | |||
177 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp | ||
178 | index 127133ae4c..54441dc534 100644 | ||
179 | --- a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp | ||
180 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec.cpp | ||
181 | @@ -1120,6 +1120,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
182 | jerr = ParseAPP0(); | ||
183 | if(JPEG_OK != jerr) | ||
184 | { | ||
185 | + SetDecodeErrorTypes(); | ||
186 | return jerr; | ||
187 | } | ||
188 | break; | ||
189 | @@ -1128,6 +1129,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
190 | jerr = ParseAPP1(); | ||
191 | if(JPEG_OK != jerr) | ||
192 | { | ||
193 | + SetDecodeErrorTypes(); | ||
194 | return jerr; | ||
195 | } | ||
196 | break; | ||
197 | @@ -1136,6 +1138,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
198 | jerr = ParseAPP14(); | ||
199 | if(JPEG_OK != jerr) | ||
200 | { | ||
201 | + SetDecodeErrorTypes(); | ||
202 | return jerr; | ||
203 | } | ||
204 | break; | ||
205 | @@ -1152,6 +1155,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
206 | jerr = ParseDQT(); | ||
207 | if(JPEG_OK != jerr) | ||
208 | { | ||
209 | + SetDecodeErrorTypes(); | ||
210 | return jerr; | ||
211 | } | ||
212 | break; | ||
213 | @@ -1160,6 +1164,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
214 | jerr = ParseSOF0(); | ||
215 | if(JPEG_OK != jerr) | ||
216 | { | ||
217 | + SetDecodeErrorTypes(); | ||
218 | return jerr; | ||
219 | } | ||
220 | break; | ||
221 | @@ -1206,6 +1211,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
222 | jerr = ParseDHT(); | ||
223 | if(JPEG_OK != jerr) | ||
224 | { | ||
225 | + SetDecodeErrorTypes(); | ||
226 | return jerr; | ||
227 | } | ||
228 | break; | ||
229 | @@ -1214,6 +1220,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
230 | jerr = ParseDRI(); | ||
231 | if(JPEG_OK != jerr) | ||
232 | { | ||
233 | + SetDecodeErrorTypes(); | ||
234 | return jerr; | ||
235 | } | ||
236 | break; | ||
237 | @@ -1222,6 +1229,7 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
238 | jerr = ParseSOS(op); | ||
239 | if(JPEG_OK != jerr) | ||
240 | { | ||
241 | + SetDecodeErrorTypes(); | ||
242 | return jerr; | ||
243 | } | ||
244 | |||
245 | @@ -1231,7 +1239,10 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
246 | { | ||
247 | jerr = m_BitStreamIn.Seek(-(m_sos_len + 2)); | ||
248 | if(JPEG_OK != jerr) | ||
249 | + { | ||
250 | + SetDecodeErrorTypes(); | ||
251 | return jerr; | ||
252 | + } | ||
253 | } | ||
254 | else | ||
255 | { | ||
256 | @@ -1246,7 +1257,10 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
257 | { | ||
258 | jerr = ParseData(); | ||
259 | if(JPEG_OK != jerr) | ||
260 | + { | ||
261 | + SetDecodeErrorTypes(); | ||
262 | return jerr; | ||
263 | + } | ||
264 | |||
265 | } | ||
266 | break; | ||
267 | @@ -1288,10 +1302,10 @@ JERRCODE CJPEGDecoder::ParseJPEGBitStream(JOPERATION op) | ||
268 | default: | ||
269 | TRC1("-> Unknown marker ",m_marker); | ||
270 | TRC0("..Skipping"); | ||
271 | + SetDecodeErrorTypes(); | ||
272 | jerr = SkipMarker(); | ||
273 | if(JPEG_OK != jerr) | ||
274 | return jerr; | ||
275 | - | ||
276 | break; | ||
277 | } | ||
278 | } | ||
279 | @@ -4575,7 +4589,6 @@ JERRCODE CJPEGDecoder::ReadHeader( | ||
280 | JERRCODE CJPEGDecoder::ReadData(void) | ||
281 | { | ||
282 | return ParseJPEGBitStream(JO_READ_DATA); | ||
283 | - | ||
284 | } // CJPEGDecoder::ReadData(void) | ||
285 | |||
286 | JERRCODE CJPEGDecoder::ReadData(uint32_t restartNum, uint32_t restartsToDecode) | ||
287 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp | ||
288 | index d6244e827b..4409b51cee 100644 | ||
289 | --- a/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp | ||
290 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/jpegdec_base.cpp | ||
291 | @@ -282,6 +282,23 @@ JERRCODE CJPEGDecoderBase::DetectSampling(void) | ||
292 | return JPEG_OK; | ||
293 | } // CJPEGDecoderBase::DetectSampling() | ||
294 | |||
295 | +void CJPEGDecoderBase::SetDecodeErrorTypes(void) | ||
296 | +{ | ||
297 | + if (!m_pDecodeErrorReport) | ||
298 | + return; | ||
299 | + | ||
300 | + switch (m_marker) | ||
301 | + { | ||
302 | + case JM_APP0: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_APP0_MARKER; break; | ||
303 | + case JM_APP14: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_APP14_MARKER; break; | ||
304 | + case JM_DQT: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_DQT_MARKER; break; | ||
305 | + case JM_SOF0: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_SOF0_MARKER; break; | ||
306 | + case JM_DHT: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_DHT_MARKER; break; | ||
307 | + case JM_DRI: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_DRI_MARKER; break; | ||
308 | + case JM_SOS: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_SOS_MARKER; break; | ||
309 | + default: m_pDecodeErrorReport->ErrorTypes |= MFX_ERROR_JPEG_UNKNOWN_MARKER; break; | ||
310 | + }; | ||
311 | +} | ||
312 | |||
313 | JERRCODE CJPEGDecoderBase::NextMarker(JMARKER* marker) | ||
314 | { | ||
315 | @@ -1265,6 +1282,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
316 | jerr = ParseAPP0(); | ||
317 | if(JPEG_OK != jerr) | ||
318 | { | ||
319 | + SetDecodeErrorTypes(); | ||
320 | return jerr; | ||
321 | } | ||
322 | break; | ||
323 | @@ -1273,6 +1291,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
324 | jerr = ParseAPP14(); | ||
325 | if(JPEG_OK != jerr) | ||
326 | { | ||
327 | + SetDecodeErrorTypes(); | ||
328 | return jerr; | ||
329 | } | ||
330 | break; | ||
331 | @@ -1281,6 +1300,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
332 | jerr = ParseDQT(); | ||
333 | if(JPEG_OK != jerr) | ||
334 | { | ||
335 | + SetDecodeErrorTypes(); | ||
336 | return jerr; | ||
337 | } | ||
338 | break; | ||
339 | @@ -1289,6 +1309,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
340 | jerr = ParseSOF0(); | ||
341 | if(JPEG_OK != jerr) | ||
342 | { | ||
343 | + SetDecodeErrorTypes(); | ||
344 | return jerr; | ||
345 | } | ||
346 | break; | ||
347 | @@ -1311,6 +1332,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
348 | jerr = ParseDHT(); | ||
349 | if(JPEG_OK != jerr) | ||
350 | { | ||
351 | + SetDecodeErrorTypes(); | ||
352 | return jerr; | ||
353 | } | ||
354 | break; | ||
355 | @@ -1319,6 +1341,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
356 | jerr = ParseDRI(); | ||
357 | if(JPEG_OK != jerr) | ||
358 | { | ||
359 | + SetDecodeErrorTypes(); | ||
360 | return jerr; | ||
361 | } | ||
362 | break; | ||
363 | @@ -1327,6 +1350,7 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
364 | jerr = ParseSOS(op); | ||
365 | if(JPEG_OK != jerr) | ||
366 | { | ||
367 | + SetDecodeErrorTypes(); | ||
368 | return jerr; | ||
369 | } | ||
370 | |||
371 | @@ -1336,7 +1360,10 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
372 | { | ||
373 | jerr = m_BitStreamIn.Seek(-(m_sos_len + 2)); | ||
374 | if(JPEG_OK != jerr) | ||
375 | + { | ||
376 | + SetDecodeErrorTypes(); | ||
377 | return jerr; | ||
378 | + } | ||
379 | } | ||
380 | else | ||
381 | { | ||
382 | @@ -1355,10 +1382,10 @@ JERRCODE CJPEGDecoderBase::ParseJPEGBitStream(JOPERATION op) | ||
383 | default: | ||
384 | TRC1("-> Unknown marker ",m_marker); | ||
385 | TRC0("..Skipping"); | ||
386 | + SetDecodeErrorTypes(); | ||
387 | jerr = SkipMarker(); | ||
388 | if(JPEG_OK != jerr) | ||
389 | return jerr; | ||
390 | - | ||
391 | break; | ||
392 | } | ||
393 | } | ||
394 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | ||
395 | index 01a513e883..0ffcfaf7ab 100644 | ||
396 | --- a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | ||
397 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode.cpp | ||
398 | @@ -378,7 +378,7 @@ Status MJPEGVideoDecoderMFX::DecodeHeader(MediaData* in) | ||
399 | } | ||
400 | } | ||
401 | |||
402 | - Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize()); | ||
403 | + Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize(), in); | ||
404 | |||
405 | if (sts == UMC_ERR_NOT_ENOUGH_DATA && | ||
406 | (!(in->GetFlags() & MediaData::FLAG_VIDEO_DATA_NOT_FULL_FRAME) || | ||
407 | @@ -937,7 +937,7 @@ Status MJPEGVideoDecoderMFX::PostProcessing(double pts) | ||
408 | return UMC_OK; | ||
409 | } | ||
410 | |||
411 | -Status MJPEGVideoDecoderMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize) | ||
412 | +Status MJPEGVideoDecoderMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in) | ||
413 | { | ||
414 | int32_t nchannels; | ||
415 | int32_t precision; | ||
416 | @@ -945,6 +945,8 @@ Status MJPEGVideoDecoderMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSi | ||
417 | JCOLOR color; | ||
418 | JERRCODE jerr; | ||
419 | |||
420 | + m_dec[0]->SetDecodeErrorReportParam(in); | ||
421 | + | ||
422 | if (!m_IsInit) | ||
423 | return UMC_ERR_NOT_INITIALIZED; | ||
424 | |||
425 | diff --git a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp | ||
426 | index 06fd1a681b..3150492ab2 100644 | ||
427 | --- a/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp | ||
428 | +++ b/_studio/shared/umc/codec/jpeg_dec/src/umc_mjpeg_mfx_decode_base.cpp | ||
429 | @@ -322,7 +322,7 @@ Status MJPEGVideoDecoderBaseMFX::DecodeHeader(MediaData* in) | ||
430 | } | ||
431 | } | ||
432 | |||
433 | - Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize()); | ||
434 | + Status sts = _GetFrameInfo((uint8_t*)in->GetDataPointer(), in->GetDataSize(), in); | ||
435 | |||
436 | if (sts == UMC_ERR_NOT_ENOUGH_DATA && | ||
437 | (!(in->GetFlags() & MediaData::FLAG_VIDEO_DATA_NOT_FULL_FRAME) || | ||
438 | @@ -345,7 +345,7 @@ Status MJPEGVideoDecoderBaseMFX::SetRotation(uint16_t rotation) | ||
439 | return UMC_OK; | ||
440 | } | ||
441 | |||
442 | -Status MJPEGVideoDecoderBaseMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize) | ||
443 | +Status MJPEGVideoDecoderBaseMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t nSize, MediaData *in) | ||
444 | { | ||
445 | int32_t nchannels; | ||
446 | int32_t precision; | ||
447 | @@ -353,6 +353,8 @@ Status MJPEGVideoDecoderBaseMFX::_GetFrameInfo(const uint8_t* pBitStream, size_t | ||
448 | JCOLOR color; | ||
449 | JERRCODE jerr; | ||
450 | |||
451 | + m_decBase->SetDecodeErrorReportParam(in); | ||
452 | + | ||
453 | if (!m_IsInit) | ||
454 | return UMC_ERR_NOT_INITIALIZED; | ||
455 | |||
456 | diff --git a/api/vpl/mfxstructures.h b/api/vpl/mfxstructures.h | ||
457 | index 879a431602..1bfdaf68c2 100644 | ||
458 | --- a/api/vpl/mfxstructures.h | ||
459 | +++ b/api/vpl/mfxstructures.h | ||
460 | @@ -3520,12 +3520,33 @@ MFX_PACK_END() | ||
461 | |||
462 | /*! The ErrorTypes enumerator uses bit-ORed values to itemize bitstream error types. */ | ||
463 | enum { | ||
464 | - MFX_ERROR_NO = 0, /*!< No error in bitstream. */ | ||
465 | - MFX_ERROR_PPS = (1 << 0), /*!< Invalid/corrupted PPS. */ | ||
466 | - MFX_ERROR_SPS = (1 << 1), /*!< Invalid/corrupted SPS. */ | ||
467 | - MFX_ERROR_SLICEHEADER = (1 << 2), /*!< Invalid/corrupted slice header. */ | ||
468 | - MFX_ERROR_SLICEDATA = (1 << 3), /*!< Invalid/corrupted slice data. */ | ||
469 | - MFX_ERROR_FRAME_GAP = (1 << 4), /*!< Missed frames. */ | ||
470 | + MFX_ERROR_NO = 0, /*!< No error in bitstream. */ | ||
471 | + MFX_ERROR_PPS = (1 << 0), /*!< Invalid/corrupted PPS. */ | ||
472 | + MFX_ERROR_SPS = (1 << 1), /*!< Invalid/corrupted SPS. */ | ||
473 | + MFX_ERROR_SLICEHEADER = (1 << 2), /*!< Invalid/corrupted slice header. */ | ||
474 | + MFX_ERROR_SLICEDATA = (1 << 3), /*!< Invalid/corrupted slice data. */ | ||
475 | + MFX_ERROR_FRAME_GAP = (1 << 4), /*!< Missed frames. */ | ||
476 | + MFX_ERROR_JPEG_APP0_MARKER = (1 << 5), /*!< Invalid/corrupted APP0 marker. */ | ||
477 | + MFX_ERROR_JPEG_APP1_MARKER = (1 << 6), /*!< Invalid/corrupted APP1 marker. */ | ||
478 | + MFX_ERROR_JPEG_APP2_MARKER = (1 << 7), /*!< Invalid/corrupted APP2 marker. */ | ||
479 | + MFX_ERROR_JPEG_APP3_MARKER = (1 << 8), /*!< Invalid/corrupted APP3 marker. */ | ||
480 | + MFX_ERROR_JPEG_APP4_MARKER = (1 << 9), /*!< Invalid/corrupted APP4 marker. */ | ||
481 | + MFX_ERROR_JPEG_APP5_MARKER = (1 << 10), /*!< Invalid/corrupted APP5 marker. */ | ||
482 | + MFX_ERROR_JPEG_APP6_MARKER = (1 << 11), /*!< Invalid/corrupted APP6 marker. */ | ||
483 | + MFX_ERROR_JPEG_APP7_MARKER = (1 << 12), /*!< Invalid/corrupted APP7 marker. */ | ||
484 | + MFX_ERROR_JPEG_APP8_MARKER = (1 << 13), /*!< Invalid/corrupted APP8 marker. */ | ||
485 | + MFX_ERROR_JPEG_APP9_MARKER = (1 << 14), /*!< Invalid/corrupted APP9 marker. */ | ||
486 | + MFX_ERROR_JPEG_APP10_MARKER = (1 << 15), /*!< Invalid/corrupted APP10 marker. */ | ||
487 | + MFX_ERROR_JPEG_APP11_MARKER = (1 << 16), /*!< Invalid/corrupted APP11 marker. */ | ||
488 | + MFX_ERROR_JPEG_APP12_MARKER = (1 << 17), /*!< Invalid/corrupted APP12 marker. */ | ||
489 | + MFX_ERROR_JPEG_APP13_MARKER = (1 << 18), /*!< Invalid/corrupted APP13 marker. */ | ||
490 | + MFX_ERROR_JPEG_APP14_MARKER = (1 << 19), /*!< Invalid/corrupted APP14 marker. */ | ||
491 | + MFX_ERROR_JPEG_DQT_MARKER = (1 << 20), /*!< Invalid/corrupted DQT marker. */ | ||
492 | + MFX_ERROR_JPEG_SOF0_MARKER = (1 << 21), /*!< Invalid/corrupted SOF0 marker. */ | ||
493 | + MFX_ERROR_JPEG_DHT_MARKER = (1 << 22), /*!< Invalid/corrupted DHT marker. */ | ||
494 | + MFX_ERROR_JPEG_DRI_MARKER = (1 << 23), /*!< Invalid/corrupted DRI marker. */ | ||
495 | + MFX_ERROR_JPEG_SOS_MARKER = (1 << 24), /*!< Invalid/corrupted SOS marker. */ | ||
496 | + MFX_ERROR_JPEG_UNKNOWN_MARKER = (1 << 25), /*!< Unknown Marker. */ | ||
497 | }; | ||
498 | |||
499 | MFX_PACK_BEGIN_USUAL_STRUCT() | ||
500 | -- | ||
501 | 2.33.0 | ||
502 | |||
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu_21.3.4.bb b/recipes-multimedia/onevpl/onevpl-intel-gpu_23.4.3.bb index 1fc4c4b2..0b849bf1 100644 --- a/recipes-multimedia/onevpl/onevpl-intel-gpu_21.3.4.bb +++ b/recipes-multimedia/onevpl/onevpl-intel-gpu_23.4.3.bb | |||
@@ -15,15 +15,19 @@ COMPATIBLE_HOST = '(x86_64).*-linux' | |||
15 | COMPATIBLE_HOST:x86-x32 = "null" | 15 | COMPATIBLE_HOST:x86-x32 = "null" |
16 | 16 | ||
17 | DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native" | 17 | DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native" |
18 | RDEPENDS:${PN} += "intel-media-driver" | ||
18 | 19 | ||
19 | SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;branch=main;lfs=0 \ | 20 | SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;nobranch=1;lfs=0 \ |
20 | file://0001-jpegd-Enable-JPEG-decode-error-report.patch \ | 21 | file://0001-ARLH-DID-open-source-6286.patch \ |
21 | file://0001-Adding-missing-device-ID-4692-for-ADL-S.patch \ | 22 | file://0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch \ |
22 | file://0001-HEVCd-Add-frame-info-check-and-update-ChromaFormat-i.patch \ | 23 | file://0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch \ |
23 | file://0001-AVCd-Add-frame-info-check-and-update-ChromaFormat-in.patch \ | 24 | " |
24 | " | ||
25 | 25 | ||
26 | SRCREV = "51608c724044802cc060b7969084126a3e90ca4a" | 26 | SRCREV = "852fa9f705ef44c004d014548601f3804a6de705" |
27 | S = "${WORKDIR}/git" | 27 | S = "${WORKDIR}/git" |
28 | 28 | ||
29 | FILES:${PN} += " \ | ||
30 | ${libdir}/libmfx-gen/enctools.so \ | ||
31 | " | ||
32 | |||
29 | inherit cmake | 33 | inherit cmake |
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Extends-errorTypes-to-support-JPEG-errors.patch b/recipes-multimedia/onevpl/onevpl/0001-Extends-errorTypes-to-support-JPEG-errors.patch deleted file mode 100644 index 063dd3fb..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-Extends-errorTypes-to-support-JPEG-errors.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | From acdab0d47785f61aa06c1f0955450bf1574f202c Mon Sep 17 00:00:00 2001 | ||
2 | From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com> | ||
3 | Date: Tue, 28 Sep 2021 03:06:40 +0000 | ||
4 | Subject: [PATCH] Extends errorTypes to support JPEG errors | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #251 | ||
8 | |||
9 | --- | ||
10 | api/vpl/mfxstructures.h | 33 +++++++++++++++++++++++++++------ | ||
11 | 1 file changed, 27 insertions(+), 6 deletions(-) | ||
12 | |||
13 | diff --git a/api/vpl/mfxstructures.h b/api/vpl/mfxstructures.h | ||
14 | index 9c8dd2b1..a9ccb4ae 100644 | ||
15 | --- a/api/vpl/mfxstructures.h | ||
16 | +++ b/api/vpl/mfxstructures.h | ||
17 | @@ -3546,12 +3546,33 @@ MFX_PACK_END() | ||
18 | |||
19 | /*! The ErrorTypes enumerator uses bit-ORed values to itemize bitstream error types. */ | ||
20 | enum { | ||
21 | - MFX_ERROR_NO = 0, /*!< No error in bitstream. */ | ||
22 | - MFX_ERROR_PPS = (1 << 0), /*!< Invalid/corrupted PPS. */ | ||
23 | - MFX_ERROR_SPS = (1 << 1), /*!< Invalid/corrupted SPS. */ | ||
24 | - MFX_ERROR_SLICEHEADER = (1 << 2), /*!< Invalid/corrupted slice header. */ | ||
25 | - MFX_ERROR_SLICEDATA = (1 << 3), /*!< Invalid/corrupted slice data. */ | ||
26 | - MFX_ERROR_FRAME_GAP = (1 << 4), /*!< Missed frames. */ | ||
27 | + MFX_ERROR_NO = 0, /*!< No error in bitstream. */ | ||
28 | + MFX_ERROR_PPS = (1 << 0), /*!< Invalid/corrupted PPS. */ | ||
29 | + MFX_ERROR_SPS = (1 << 1), /*!< Invalid/corrupted SPS. */ | ||
30 | + MFX_ERROR_SLICEHEADER = (1 << 2), /*!< Invalid/corrupted slice header. */ | ||
31 | + MFX_ERROR_SLICEDATA = (1 << 3), /*!< Invalid/corrupted slice data. */ | ||
32 | + MFX_ERROR_FRAME_GAP = (1 << 4), /*!< Missed frames. */ | ||
33 | + MFX_ERROR_JPEG_APP0_MARKER = (1 << 5), /*!< Invalid/corrupted APP0 marker. */ | ||
34 | + MFX_ERROR_JPEG_APP1_MARKER = (1 << 6), /*!< Invalid/corrupted APP1 marker. */ | ||
35 | + MFX_ERROR_JPEG_APP2_MARKER = (1 << 7), /*!< Invalid/corrupted APP2 marker. */ | ||
36 | + MFX_ERROR_JPEG_APP3_MARKER = (1 << 8), /*!< Invalid/corrupted APP3 marker. */ | ||
37 | + MFX_ERROR_JPEG_APP4_MARKER = (1 << 9), /*!< Invalid/corrupted APP4 marker. */ | ||
38 | + MFX_ERROR_JPEG_APP5_MARKER = (1 << 10), /*!< Invalid/corrupted APP5 marker. */ | ||
39 | + MFX_ERROR_JPEG_APP6_MARKER = (1 << 11), /*!< Invalid/corrupted APP6 marker. */ | ||
40 | + MFX_ERROR_JPEG_APP7_MARKER = (1 << 12), /*!< Invalid/corrupted APP7 marker. */ | ||
41 | + MFX_ERROR_JPEG_APP8_MARKER = (1 << 13), /*!< Invalid/corrupted APP8 marker. */ | ||
42 | + MFX_ERROR_JPEG_APP9_MARKER = (1 << 14), /*!< Invalid/corrupted APP9 marker. */ | ||
43 | + MFX_ERROR_JPEG_APP10_MARKER = (1 << 15), /*!< Invalid/corrupted APP10 marker. */ | ||
44 | + MFX_ERROR_JPEG_APP11_MARKER = (1 << 16), /*!< Invalid/corrupted APP11 marker. */ | ||
45 | + MFX_ERROR_JPEG_APP12_MARKER = (1 << 17), /*!< Invalid/corrupted APP12 marker. */ | ||
46 | + MFX_ERROR_JPEG_APP13_MARKER = (1 << 18), /*!< Invalid/corrupted APP13 marker. */ | ||
47 | + MFX_ERROR_JPEG_APP14_MARKER = (1 << 19), /*!< Invalid/corrupted APP14 marker. */ | ||
48 | + MFX_ERROR_JPEG_DQT_MARKER = (1 << 20), /*!< Invalid/corrupted DQT marker. */ | ||
49 | + MFX_ERROR_JPEG_SOF0_MARKER = (1 << 21), /*!< Invalid/corrupted SOF0 marker. */ | ||
50 | + MFX_ERROR_JPEG_DHT_MARKER = (1 << 22), /*!< Invalid/corrupted DHT marker. */ | ||
51 | + MFX_ERROR_JPEG_DRI_MARKER = (1 << 23), /*!< Invalid/corrupted DRI marker. */ | ||
52 | + MFX_ERROR_JPEG_SOS_MARKER = (1 << 24), /*!< Invalid/corrupted SOS marker. */ | ||
53 | + MFX_ERROR_JPEG_UNKNOWN_MARKER = (1 << 25), /*!< Unknown Marker. */ | ||
54 | }; | ||
55 | |||
56 | MFX_PACK_BEGIN_USUAL_STRUCT() | ||
57 | -- | ||
58 | 2.33.0 | ||
59 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch b/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch deleted file mode 100644 index 93e5ed0d..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-Fix-basename-build-issue-with-musl_libc.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From d16afe9f9302e4995f12d699019eba170bb6db21 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Fri, 8 Oct 2021 08:45:39 +0800 | ||
4 | Subject: [PATCH] Fix basename() build issue with musl_libc | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #264 | ||
8 | |||
9 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
10 | --- | ||
11 | tools/legacy/sample_common/src/vaapi_utils.cpp | 3 ++- | ||
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_common/src/vaapi_utils.cpp b/tools/legacy/sample_common/src/vaapi_utils.cpp | ||
15 | index b69dbe44..9382535a 100644 | ||
16 | --- a/tools/legacy/sample_common/src/vaapi_utils.cpp | ||
17 | +++ b/tools/legacy/sample_common/src/vaapi_utils.cpp | ||
18 | @@ -7,6 +7,7 @@ | ||
19 | #ifdef LIBVA_SUPPORT | ||
20 | |||
21 | #include "vaapi_utils.h" | ||
22 | + #include <libgen.h> | ||
23 | #include <dlfcn.h> | ||
24 | #include <stdexcept> | ||
25 | |||
26 | @@ -26,7 +27,7 @@ SimpleLoader::SimpleLoader(const char* name) { | ||
27 | dlerror(); | ||
28 | so_handle = dlopen(name, RTLD_GLOBAL | RTLD_NOW); | ||
29 | if (NULL == so_handle) { | ||
30 | - so_handle = dlopen(basename(name), RTLD_GLOBAL | RTLD_NOW); | ||
31 | + so_handle = dlopen(basename((char *)name), RTLD_GLOBAL | RTLD_NOW); | ||
32 | if (NULL == so_handle) { | ||
33 | std::cerr << dlerror() << std::endl; | ||
34 | throw std::runtime_error("Can't load library"); | ||
35 | -- | ||
36 | 2.33.0 | ||
37 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-sample_decode-Add-VDSFC-CSC-for-AVC-HEVC.patch b/recipes-multimedia/onevpl/onevpl/0001-sample_decode-Add-VDSFC-CSC-for-AVC-HEVC.patch deleted file mode 100644 index db8baa3e..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-sample_decode-Add-VDSFC-CSC-for-AVC-HEVC.patch +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | From f8d87fc857d5bfd69247c985ed82ba88e167ef30 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Yew, Chang Ching" <chang.ching.yew@intel.com> | ||
3 | Date: Fri, 9 Jul 2021 13:59:33 +0000 | ||
4 | Subject: [PATCH] sample_decode: Add VDSFC CSC for AVC/HEVC | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #289 | ||
8 | |||
9 | Signed-off-by: Yew, Chang Ching <chang.ching.yew@intel.com> | ||
10 | --- | ||
11 | .../sample_decode/src/pipeline_decode.cpp | 84 +++++++++++++++++-- | ||
12 | 1 file changed, 77 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_decode/src/pipeline_decode.cpp b/tools/legacy/sample_decode/src/pipeline_decode.cpp | ||
15 | index 4dc811c5..d817ff2a 100644 | ||
16 | --- a/tools/legacy/sample_decode/src/pipeline_decode.cpp | ||
17 | +++ b/tools/legacy/sample_decode/src/pipeline_decode.cpp | ||
18 | @@ -765,6 +765,14 @@ bool CDecodingPipeline::IsVppRequired(sInputParams* pParams) { | ||
19 | if (pParams->eDeinterlace) { | ||
20 | bVppIsUsed = true; | ||
21 | } | ||
22 | + | ||
23 | + if ((MODE_DECODER_POSTPROC_AUTO == pParams->nDecoderPostProcessing) || | ||
24 | + (MODE_DECODER_POSTPROC_FORCE == pParams->nDecoderPostProcessing)) { | ||
25 | + /* Decoder will make decision about internal post-processing usage slightly later */ | ||
26 | + if ((pParams->videoType == MFX_CODEC_AVC) || (pParams->videoType == MFX_CODEC_HEVC)) | ||
27 | + bVppIsUsed = false; | ||
28 | + } | ||
29 | + | ||
30 | return bVppIsUsed; | ||
31 | } | ||
32 | |||
33 | @@ -1014,6 +1022,8 @@ mfxStatus CDecodingPipeline::InitMfxParams(sInputParams* pParams) { | ||
34 | if (!m_bVppIsUsed) { | ||
35 | if ((m_mfxVideoParams.mfx.FrameInfo.CropW != pParams->Width && pParams->Width) || | ||
36 | (m_mfxVideoParams.mfx.FrameInfo.CropH != pParams->Height && pParams->Height) || | ||
37 | + (pParams->nDecoderPostProcessing && pParams->videoType == MFX_CODEC_AVC) || | ||
38 | + (pParams->nDecoderPostProcessing && pParams->videoType == MFX_CODEC_HEVC) || | ||
39 | (pParams->nDecoderPostProcessing && pParams->videoType == MFX_CODEC_JPEG && | ||
40 | pParams->fourcc == MFX_FOURCC_RGB4 && | ||
41 | // No need to use decoder's post processing for decoding of JPEG with RGB 4:4:4 | ||
42 | @@ -1027,7 +1037,10 @@ mfxStatus CDecodingPipeline::InitMfxParams(sInputParams* pParams) { | ||
43 | if (((MODE_DECODER_POSTPROC_AUTO == pParams->nDecoderPostProcessing) || | ||
44 | (MODE_DECODER_POSTPROC_FORCE == pParams->nDecoderPostProcessing)) && | ||
45 | (MFX_CODEC_AVC == m_mfxVideoParams.mfx.CodecId || | ||
46 | - MFX_CODEC_JPEG == m_mfxVideoParams.mfx.CodecId) && /* Only for AVC and JPEG */ | ||
47 | + MFX_CODEC_JPEG == m_mfxVideoParams.mfx.CodecId || | ||
48 | + MFX_CODEC_HEVC == m_mfxVideoParams.mfx.CodecId || | ||
49 | + MFX_CODEC_VP9 == m_mfxVideoParams.mfx.CodecId || | ||
50 | + MFX_CODEC_AV1 == m_mfxVideoParams.mfx.CodecId) && | ||
51 | (MFX_PICSTRUCT_PROGRESSIVE == | ||
52 | m_mfxVideoParams.mfx.FrameInfo.PicStruct)) /* ...And only for progressive!*/ | ||
53 | { /* it is possible to use decoder's post-processing */ | ||
54 | @@ -1050,12 +1063,69 @@ mfxStatus CDecodingPipeline::InitMfxParams(sInputParams* pParams) { | ||
55 | |||
56 | decPostProcessing->Out.FourCC = m_mfxVideoParams.mfx.FrameInfo.FourCC; | ||
57 | decPostProcessing->Out.ChromaFormat = m_mfxVideoParams.mfx.FrameInfo.ChromaFormat; | ||
58 | - decPostProcessing->Out.Width = MSDK_ALIGN16(pParams->Width); | ||
59 | - decPostProcessing->Out.Height = MSDK_ALIGN16(pParams->Height); | ||
60 | - decPostProcessing->Out.CropX = 0; | ||
61 | - decPostProcessing->Out.CropY = 0; | ||
62 | - decPostProcessing->Out.CropW = pParams->Width; | ||
63 | - decPostProcessing->Out.CropH = pParams->Height; | ||
64 | + | ||
65 | + if (pParams->videoType == MFX_CODEC_AVC || pParams->videoType == MFX_CODEC_HEVC) { | ||
66 | + switch (pParams->fourcc) { | ||
67 | + case MFX_FOURCC_RGB4: | ||
68 | + decPostProcessing->Out.FourCC = MFX_FOURCC_RGB4; | ||
69 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
70 | + break; | ||
71 | + | ||
72 | + case MFX_FOURCC_NV12: | ||
73 | + decPostProcessing->Out.FourCC = MFX_FOURCC_NV12; | ||
74 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
75 | + break; | ||
76 | + | ||
77 | + case MFX_FOURCC_P010: | ||
78 | + decPostProcessing->Out.FourCC = MFX_FOURCC_P010; | ||
79 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
80 | + break; | ||
81 | + | ||
82 | + case MFX_FOURCC_P016: | ||
83 | + decPostProcessing->Out.FourCC = MFX_FOURCC_P016; | ||
84 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV420; | ||
85 | + break; | ||
86 | + | ||
87 | + case MFX_FOURCC_YUY2: | ||
88 | + decPostProcessing->Out.FourCC = MFX_FOURCC_YUY2; | ||
89 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
90 | + break; | ||
91 | + | ||
92 | + case MFX_FOURCC_Y210: | ||
93 | + decPostProcessing->Out.FourCC = MFX_FOURCC_Y210; | ||
94 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
95 | + break; | ||
96 | + | ||
97 | + case MFX_FOURCC_Y216: | ||
98 | + decPostProcessing->Out.FourCC = MFX_FOURCC_Y216; | ||
99 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV422; | ||
100 | + break; | ||
101 | + | ||
102 | + case MFX_FOURCC_AYUV: | ||
103 | + decPostProcessing->Out.FourCC = MFX_FOURCC_AYUV; | ||
104 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
105 | + break; | ||
106 | + | ||
107 | + case MFX_FOURCC_Y410: | ||
108 | + decPostProcessing->Out.FourCC = MFX_FOURCC_Y410; | ||
109 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
110 | + break; | ||
111 | + | ||
112 | + case MFX_FOURCC_Y416: | ||
113 | + decPostProcessing->Out.FourCC = MFX_FOURCC_Y416; | ||
114 | + decPostProcessing->Out.ChromaFormat = MFX_CHROMAFORMAT_YUV444; | ||
115 | + break; | ||
116 | + | ||
117 | + default: | ||
118 | + break; | ||
119 | + } | ||
120 | + } | ||
121 | + decPostProcessing->Out.Width = MSDK_ALIGN16(pParams->Width); | ||
122 | + decPostProcessing->Out.Height = MSDK_ALIGN16(pParams->Height); | ||
123 | + decPostProcessing->Out.CropX = 0; | ||
124 | + decPostProcessing->Out.CropY = 0; | ||
125 | + decPostProcessing->Out.CropW = pParams->Width; | ||
126 | + decPostProcessing->Out.CropH = pParams->Height; | ||
127 | |||
128 | msdk_printf(MSDK_STRING("Decoder's post-processing is used for resizing\n")); | ||
129 | } | ||
130 | -- | ||
131 | 2.33.1 | ||
132 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch b/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch deleted file mode 100644 index 96110ef8..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From 2e2bcb1817f2dc91adf85f5255a4792a6213a74e Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Fri, 8 Oct 2021 14:19:40 +0000 | ||
4 | Subject: [PATCH 2/3] sample_misc: Addin basic wayland dmabuf support. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | |||
9 | --- | ||
10 | .../sample_misc/wayland/include/class_wayland.h | 16 ++++++++++++++++ | ||
11 | .../sample_misc/wayland/src/class_wayland.cpp | 8 ++++++++ | ||
12 | 2 files changed, 24 insertions(+) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_misc/wayland/include/class_wayland.h b/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
15 | index 564b9b8b..e5267ec2 100644 | ||
16 | --- a/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
17 | +++ b/tools/legacy/sample_misc/wayland/include/class_wayland.h | ||
18 | @@ -32,6 +32,9 @@ extern "C" { | ||
19 | #include "sample_defs.h" | ||
20 | #include "vpl/mfxstructures.h" | ||
21 | #include "wayland-drm-client-protocol.h" | ||
22 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
23 | + #include "linux-dmabuf-unstable-v1.h" | ||
24 | +#endif | ||
25 | |||
26 | typedef struct buffer wld_buffer; | ||
27 | |||
28 | @@ -93,6 +96,11 @@ public: | ||
29 | struct wl_drm* GetDrm() { | ||
30 | return m_drm; | ||
31 | } | ||
32 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
33 | + struct zwp_linux_dmabuf_v1* GetDMABuf() { | ||
34 | + return m_dmabuf; | ||
35 | + } | ||
36 | +#endif | ||
37 | struct wl_shm* GetShm() { | ||
38 | return m_shm; | ||
39 | }; | ||
40 | @@ -120,6 +128,11 @@ public: | ||
41 | void SetDrm(struct wl_drm* drm) { | ||
42 | m_drm = drm; | ||
43 | } | ||
44 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
45 | + void SetDMABuf(struct zwp_linux_dmabuf_v1* dmabuf) { | ||
46 | + m_dmabuf = dmabuf; | ||
47 | + } | ||
48 | +#endif | ||
49 | void DrmHandleDevice(const char* device); | ||
50 | void DrmHandleAuthenticated(); | ||
51 | void RegistryGlobal(struct wl_registry* registry, | ||
52 | @@ -147,6 +160,9 @@ private: | ||
53 | struct wl_compositor* m_compositor; | ||
54 | struct wl_shell* m_shell; | ||
55 | struct wl_drm* m_drm; | ||
56 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
57 | + struct zwp_linux_dmabuf_v1* m_dmabuf; | ||
58 | +#endif | ||
59 | struct wl_shm* m_shm; | ||
60 | struct wl_shm_pool* m_pool; | ||
61 | struct wl_surface* m_surface; | ||
62 | diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
63 | index 65147973..dc2fc718 100644 | ||
64 | --- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
65 | +++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
66 | @@ -50,6 +50,9 @@ Wayland::Wayland() | ||
67 | m_compositor(NULL), | ||
68 | m_shell(NULL), | ||
69 | m_drm(NULL), | ||
70 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
71 | + m_dmabuf(NULL), | ||
72 | +#endif | ||
73 | m_shm(NULL), | ||
74 | m_pool(NULL), | ||
75 | m_surface(NULL), | ||
76 | @@ -360,6 +363,11 @@ void Wayland::RegistryGlobal(struct wl_registry* registry, | ||
77 | m_drm = static_cast<wl_drm*>(wl_registry_bind(registry, name, &wl_drm_interface, 2)); | ||
78 | wl_drm_add_listener(m_drm, &drm_listener, this); | ||
79 | } | ||
80 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
81 | + else if(0 == strcmp(interface, "zwp_linux_dmabuf_v1")) | ||
82 | + m_dmabuf = static_cast<zwp_linux_dmabuf_v1*>( | ||
83 | + wl_registry_bind(registry, name, &zwp_linux_dmabuf_v1_interface, version)); | ||
84 | +#endif | ||
85 | } | ||
86 | |||
87 | void Wayland::DrmHandleDevice(const char* name) { | ||
88 | -- | ||
89 | 2.31.1 | ||
90 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-sample_misc-use-wayland-dmabuf-to-render-nv12.patch b/recipes-multimedia/onevpl/onevpl/0001-sample_misc-use-wayland-dmabuf-to-render-nv12.patch deleted file mode 100644 index d061e3ef..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-sample_misc-use-wayland-dmabuf-to-render-nv12.patch +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | From 0091d3fea76e64ffbd537b2ae47b8912c89c09d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Fri, 8 Oct 2021 14:38:45 +0000 | ||
4 | Subject: [PATCH 3/3] sample_misc: use wayland dmabuf to render nv12 | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | |||
9 | --- | ||
10 | .../sample_misc/wayland/src/class_wayland.cpp | 60 +++++++++++++++---- | ||
11 | 1 file changed, 47 insertions(+), 13 deletions(-) | ||
12 | |||
13 | diff --git a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
14 | index dc2fc718..d2e7e4e2 100644 | ||
15 | --- a/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
16 | +++ b/tools/legacy/sample_misc/wayland/src/class_wayland.cpp | ||
17 | @@ -26,6 +26,7 @@ or https://software.intel.com/en-us/media-client-solutions-support. | ||
18 | #include <iostream> | ||
19 | extern "C" { | ||
20 | #include <drm.h> | ||
21 | +#include <drm_fourcc.h> | ||
22 | #include <intel_bufmgr.h> | ||
23 | #include <xf86drm.h> | ||
24 | } | ||
25 | @@ -305,20 +306,53 @@ struct wl_buffer* Wayland::CreatePrimeBuffer(uint32_t name, | ||
26 | int32_t offsets[3], | ||
27 | int32_t pitches[3]) { | ||
28 | struct wl_buffer* buffer = NULL; | ||
29 | - if (NULL == m_drm) | ||
30 | - return NULL; | ||
31 | |||
32 | - buffer = wl_drm_create_prime_buffer(m_drm, | ||
33 | - name, | ||
34 | - width, | ||
35 | - height, | ||
36 | - format, | ||
37 | - offsets[0], | ||
38 | - pitches[0], | ||
39 | - offsets[1], | ||
40 | - pitches[1], | ||
41 | - offsets[2], | ||
42 | - pitches[2]); | ||
43 | +#if defined(WAYLAND_LINUX_DMABUF_SUPPORT) | ||
44 | + if (format == WL_DRM_FORMAT_NV12) { | ||
45 | + if(NULL == m_dmabuf) | ||
46 | + return NULL; | ||
47 | + | ||
48 | + struct zwp_linux_buffer_params_v1 *dmabuf_params = NULL; | ||
49 | + int i = 0; | ||
50 | + uint64_t modifier = I915_FORMAT_MOD_Y_TILED; | ||
51 | + | ||
52 | + dmabuf_params = zwp_linux_dmabuf_v1_create_params(m_dmabuf); | ||
53 | + for(i = 0; i < 2; i++) { | ||
54 | + zwp_linux_buffer_params_v1_add(dmabuf_params, | ||
55 | + name, | ||
56 | + i, | ||
57 | + offsets[i], | ||
58 | + pitches[i], | ||
59 | + modifier >> 32, | ||
60 | + modifier & 0xffffffff); | ||
61 | + } | ||
62 | + | ||
63 | + buffer = zwp_linux_buffer_params_v1_create_immed(dmabuf_params, | ||
64 | + width, | ||
65 | + height, | ||
66 | + format, | ||
67 | + 0); | ||
68 | + | ||
69 | + zwp_linux_buffer_params_v1_destroy(dmabuf_params); | ||
70 | + } else | ||
71 | +#endif | ||
72 | + { | ||
73 | + if(NULL == m_drm) | ||
74 | + return NULL; | ||
75 | + | ||
76 | + buffer = wl_drm_create_prime_buffer(m_drm, | ||
77 | + name, | ||
78 | + width, | ||
79 | + height, | ||
80 | + format, | ||
81 | + offsets[0], | ||
82 | + pitches[0], | ||
83 | + offsets[1], | ||
84 | + pitches[1], | ||
85 | + offsets[2], | ||
86 | + pitches[2]); | ||
87 | + } | ||
88 | + | ||
89 | return buffer; | ||
90 | } | ||
91 | |||
92 | -- | ||
93 | 2.31.1 | ||
94 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch b/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch deleted file mode 100644 index 6fab79e5..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | From 6ef9dd02e297ae20da422f2f3f4f298061efd6e9 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Fri, 15 Oct 2021 11:55:13 +0000 | ||
4 | Subject: [PATCH 1/3] samples: Addin wayland-scanner auto generate on cmake. | ||
5 | |||
6 | Upstream-Status: Submitted | ||
7 | innersource PR #269 | ||
8 | |||
9 | --- | ||
10 | tools/legacy/sample_common/CMakeLists.txt | 21 ++++++++++ | ||
11 | .../legacy/sample_misc/wayland/CMakeLists.txt | 39 +++++++++++++++++++ | ||
12 | 2 files changed, 60 insertions(+) | ||
13 | |||
14 | diff --git a/tools/legacy/sample_common/CMakeLists.txt b/tools/legacy/sample_common/CMakeLists.txt | ||
15 | index 0ff83aa4..0ed8b390 100644 | ||
16 | --- a/tools/legacy/sample_common/CMakeLists.txt | ||
17 | +++ b/tools/legacy/sample_common/CMakeLists.txt | ||
18 | @@ -92,6 +92,27 @@ if(UNIX) | ||
19 | target_include_directories( | ||
20 | ${TARGET} | ||
21 | PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../sample_misc/wayland/include) | ||
22 | + | ||
23 | + pkg_check_modules(PKG_WAYLAND_SCANNER "wayland-scanner>=1.15") | ||
24 | + pkg_check_modules(PKG_WAYLAND_PROTCOLS "wayland-protocols>=1.15") | ||
25 | + | ||
26 | + if(PKG_WAYLAND_SCANNER_FOUND AND PKG_WAYLAND_PROTCOLS_FOUND) | ||
27 | + pkg_get_variable(WAYLAND_PROTOCOLS_PATH wayland-protocols pkgdatadir) | ||
28 | + if(WAYLAND_PROTOCOLS_PATH) | ||
29 | + find_file( | ||
30 | + WAYLAND_LINUX_DMABUF_XML_PATH linux-dmabuf-unstable-v1.xml | ||
31 | + PATHS ${WAYLAND_PROTOCOLS_PATH}/unstable/linux-dmabuf | ||
32 | + NO_DEFAULT_PATH) | ||
33 | + endif() | ||
34 | + endif() | ||
35 | + | ||
36 | + if(WAYLAND_LINUX_DMABUF_XML_PATH) | ||
37 | + target_compile_definitions( | ||
38 | + ${TARGET} PUBLIC -DWAYLAND_LINUX_DMABUF_SUPPORT) | ||
39 | + target_include_directories( | ||
40 | + ${TARGET} | ||
41 | + PUBLIC ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
42 | + endif() | ||
43 | else() | ||
44 | message( | ||
45 | WARNING | ||
46 | diff --git a/tools/legacy/sample_misc/wayland/CMakeLists.txt b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
47 | index 1fe98da4..01e6029b 100644 | ||
48 | --- a/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
49 | +++ b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
50 | @@ -29,6 +29,45 @@ target_sources( | ||
51 | ${CMAKE_CURRENT_SOURCE_DIR}/src/listener_wayland.cpp | ||
52 | ${CMAKE_CURRENT_SOURCE_DIR}/src/wayland-drm-protocol.c) | ||
53 | |||
54 | +if(PKG_WAYLAND_SCANNER_FOUND AND PKG_WAYLAND_PROTCOLS_FOUND AND WAYLAND_LINUX_DMABUF_XML_PATH) | ||
55 | + pkg_get_variable(WAYLAND_SCANNER_BIN_PATH wayland-scanner bindir) | ||
56 | + pkg_get_variable(WAYLAND_SCANNER_BIN wayland-scanner wayland_scanner) | ||
57 | + | ||
58 | + if(WAYLAND_SCANNER_BIN_PATH AND WAYLAND_SCANNER_BIN) | ||
59 | + execute_process( | ||
60 | + COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
61 | + "client-header" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
62 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.h" | ||
63 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
64 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
65 | + if (WAYLAND_SCANNER_RESULT) | ||
66 | + message(ERROR "Failed to generate linux-dmabuf-unstable-v1.h") | ||
67 | + return() | ||
68 | + endif() | ||
69 | + | ||
70 | + execute_process( | ||
71 | + COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
72 | + "private-code" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
73 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c" | ||
74 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
75 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
76 | + if (WAYLAND_SCANNER_RESULT) | ||
77 | + message(ERROR "Failed to generate linux-dmabuf-unstable-v1.c") | ||
78 | + return() | ||
79 | + endif() | ||
80 | + | ||
81 | + include_directories( | ||
82 | + ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
83 | + add_definitions(-DWAYLAND_LINUX_DMABUF_SUPPORT) | ||
84 | + target_sources( | ||
85 | + ${TARGET} | ||
86 | + PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c) | ||
87 | + else() | ||
88 | + message(ERROR "Don't know how to execute wayland-scanner.") | ||
89 | + return() | ||
90 | + endif() | ||
91 | +endif() | ||
92 | + | ||
93 | target_link_libraries(${TARGET} sample_common wayland-client va drm drm_intel) | ||
94 | |||
95 | install(TARGETS ${TARGET} LIBRARY DESTINATION ${_TOOLS_LIB_PATH}) | ||
96 | -- | ||
97 | 2.31.1 | ||
98 | |||
diff --git a/recipes-multimedia/onevpl/onevpl/0001-samples-use-find_program-to-detect-wayland-scanner-i.patch b/recipes-multimedia/onevpl/onevpl/0001-samples-use-find_program-to-detect-wayland-scanner-i.patch deleted file mode 100644 index 6f1ad93e..00000000 --- a/recipes-multimedia/onevpl/onevpl/0001-samples-use-find_program-to-detect-wayland-scanner-i.patch +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | From c69500c88058358bdc6c0a036d90b000d63f2a41 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Ung, Teng En" <teng.en.ung@intel.com> | ||
3 | Date: Wed, 3 Nov 2021 14:23:15 +0000 | ||
4 | Subject: [PATCH 4/4] samples: use find_program to detect wayland-scanner in | ||
5 | cmake | ||
6 | |||
7 | Upstream-Status: Submitted | ||
8 | innersource PR #269 | ||
9 | |||
10 | --- | ||
11 | tools/legacy/sample_common/CMakeLists.txt | 4 +- | ||
12 | tools/legacy/sample_misc/wayland/CMakeLists.txt | 59 +++++++++++-------------- | ||
13 | 2 files changed, 28 insertions(+), 35 deletions(-) | ||
14 | |||
15 | diff --git a/tools/legacy/sample_common/CMakeLists.txt b/tools/legacy/sample_common/CMakeLists.txt | ||
16 | index 0ed8b39..658d44d 100644 | ||
17 | --- a/tools/legacy/sample_common/CMakeLists.txt | ||
18 | +++ b/tools/legacy/sample_common/CMakeLists.txt | ||
19 | @@ -93,10 +93,10 @@ if(UNIX) | ||
20 | ${TARGET} | ||
21 | PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../sample_misc/wayland/include) | ||
22 | |||
23 | - pkg_check_modules(PKG_WAYLAND_SCANNER "wayland-scanner>=1.15") | ||
24 | + find_program(WAYLAND_SCANNER_BIN "wayland-scanner") | ||
25 | pkg_check_modules(PKG_WAYLAND_PROTCOLS "wayland-protocols>=1.15") | ||
26 | |||
27 | - if(PKG_WAYLAND_SCANNER_FOUND AND PKG_WAYLAND_PROTCOLS_FOUND) | ||
28 | + if(WAYLAND_SCANNER_BIN AND PKG_WAYLAND_PROTCOLS_FOUND) | ||
29 | pkg_get_variable(WAYLAND_PROTOCOLS_PATH wayland-protocols pkgdatadir) | ||
30 | if(WAYLAND_PROTOCOLS_PATH) | ||
31 | find_file( | ||
32 | diff --git a/tools/legacy/sample_misc/wayland/CMakeLists.txt b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
33 | index 01e6029..7625bc5 100644 | ||
34 | --- a/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
35 | +++ b/tools/legacy/sample_misc/wayland/CMakeLists.txt | ||
36 | @@ -29,43 +29,36 @@ target_sources( | ||
37 | ${CMAKE_CURRENT_SOURCE_DIR}/src/listener_wayland.cpp | ||
38 | ${CMAKE_CURRENT_SOURCE_DIR}/src/wayland-drm-protocol.c) | ||
39 | |||
40 | -if(PKG_WAYLAND_SCANNER_FOUND AND PKG_WAYLAND_PROTCOLS_FOUND AND WAYLAND_LINUX_DMABUF_XML_PATH) | ||
41 | - pkg_get_variable(WAYLAND_SCANNER_BIN_PATH wayland-scanner bindir) | ||
42 | - pkg_get_variable(WAYLAND_SCANNER_BIN wayland-scanner wayland_scanner) | ||
43 | + if(WAYLAND_SCANNER_BIN AND PKG_WAYLAND_PROTCOLS_FOUND AND WAYLAND_LINUX_DMABUF_XML_PATH) | ||
44 | |||
45 | - if(WAYLAND_SCANNER_BIN_PATH AND WAYLAND_SCANNER_BIN) | ||
46 | - execute_process( | ||
47 | - COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
48 | - "client-header" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
49 | - "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.h" | ||
50 | - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
51 | - RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
52 | - if (WAYLAND_SCANNER_RESULT) | ||
53 | - message(ERROR "Failed to generate linux-dmabuf-unstable-v1.h") | ||
54 | - return() | ||
55 | - endif() | ||
56 | - | ||
57 | - execute_process( | ||
58 | - COMMAND "${WAYLAND_SCANNER_BIN_PATH}\/${WAYLAND_SCANNER_BIN}" | ||
59 | - "private-code" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
60 | - "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c" | ||
61 | - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
62 | - RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
63 | - if (WAYLAND_SCANNER_RESULT) | ||
64 | - message(ERROR "Failed to generate linux-dmabuf-unstable-v1.c") | ||
65 | - return() | ||
66 | - endif() | ||
67 | + execute_process( | ||
68 | + COMMAND "${WAYLAND_SCANNER_BIN}" | ||
69 | + "client-header" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
70 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.h" | ||
71 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
72 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
73 | + if (WAYLAND_SCANNER_RESULT) | ||
74 | + message(ERROR "Failed to generate linux-dmabuf-unstable-v1.h") | ||
75 | + return() | ||
76 | + endif() | ||
77 | |||
78 | - include_directories( | ||
79 | - ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
80 | - add_definitions(-DWAYLAND_LINUX_DMABUF_SUPPORT) | ||
81 | - target_sources( | ||
82 | - ${TARGET} | ||
83 | - PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c) | ||
84 | - else() | ||
85 | - message(ERROR "Don't know how to execute wayland-scanner.") | ||
86 | + execute_process( | ||
87 | + COMMAND "${WAYLAND_SCANNER_BIN}" | ||
88 | + "private-code" "${WAYLAND_LINUX_DMABUF_XML_PATH}" | ||
89 | + "tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c" | ||
90 | + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" | ||
91 | + RESULT_VARIABLE WAYLAND_SCANNER_RESULT) | ||
92 | + if (WAYLAND_SCANNER_RESULT) | ||
93 | + message(ERROR "Failed to generate linux-dmabuf-unstable-v1.c") | ||
94 | return() | ||
95 | endif() | ||
96 | + | ||
97 | + include_directories( | ||
98 | + ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland) | ||
99 | + add_definitions(-DWAYLAND_LINUX_DMABUF_SUPPORT) | ||
100 | + target_sources( | ||
101 | + ${TARGET} | ||
102 | + PRIVATE ${CMAKE_BINARY_DIR}/tools/legacy/sample_misc/wayland/linux-dmabuf-unstable-v1.c) | ||
103 | endif() | ||
104 | |||
105 | target_link_libraries(${TARGET} sample_common wayland-client va drm drm_intel) | ||
106 | -- | ||
107 | 2.7.4 | ||
108 | |||
diff --git a/recipes-multimedia/onevpl/onevpl_2021.6.0.bb b/recipes-multimedia/onevpl/onevpl_2023.4.0.bb index e586b54e..513c7f2c 100644 --- a/recipes-multimedia/onevpl/onevpl_2021.6.0.bb +++ b/recipes-multimedia/onevpl/onevpl_2023.4.0.bb | |||
@@ -6,18 +6,12 @@ that works across a wide range of accelerators." | |||
6 | HOMEPAGE = "https://github.com/oneapi-src/oneVPL" | 6 | HOMEPAGE = "https://github.com/oneapi-src/oneVPL" |
7 | LICENSE = "MIT" | 7 | LICENSE = "MIT" |
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \ | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \ |
9 | file://third-party-programs.txt;md5=67727fd253b1b4574cd9eea78a2b0620" | 9 | file://third-party-programs.txt;md5=0e35a23482445dd089b4eabe19103a06" |
10 | 10 | ||
11 | SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https;branch=master \ | 11 | SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https;branch=master \ |
12 | file://0001-Fix-basename-build-issue-with-musl_libc.patch \ | 12 | file://0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch \ |
13 | file://0001-Extends-errorTypes-to-support-JPEG-errors.patch \ | ||
14 | file://0001-samples-Addin-wayland-scanner-auto-generate-on-cmake.patch \ | ||
15 | file://0001-sample_misc-Addin-basic-wayland-dmabuf-support.patch \ | ||
16 | file://0001-sample_misc-use-wayland-dmabuf-to-render-nv12.patch \ | ||
17 | file://0001-samples-use-find_program-to-detect-wayland-scanner-i.patch \ | ||
18 | file://0001-sample_decode-Add-VDSFC-CSC-for-AVC-HEVC.patch \ | ||
19 | " | 13 | " |
20 | SRCREV = "cdf7444dc971544d148c51e0d93a2df1bb55dda7" | 14 | SRCREV = "2274efcd3672b43297ef774f332e1fed6781381c" |
21 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
22 | 16 | ||
23 | inherit cmake | 17 | inherit cmake |
@@ -33,14 +27,14 @@ do_install:append() { | |||
33 | 27 | ||
34 | COMPATIBLE_HOST = '(x86_64).*-linux' | 28 | COMPATIBLE_HOST = '(x86_64).*-linux' |
35 | 29 | ||
36 | PACKAGES += "${PN}-examples" | 30 | PACKAGES =+ "${PN}-examples" |
37 | 31 | ||
38 | FILES:${PN}-examples = "${datadir}/oneVPL/examples \ | 32 | FILES:${PN}-examples = "${datadir}/vpl \ |
39 | " | 33 | " |
40 | 34 | ||
41 | FILES_SOLIBSDEV = "" | 35 | FILES_SOLIBSDEV = "" |
42 | FILES:${PN}-dev += "${libdir}/libvpl.so" | 36 | FILES:${PN}-dev += "${libdir}/libvpl.so" |
43 | 37 | ||
44 | FILES:${PN} += "${datadir} \ | 38 | FILES:${PN} += " ${datadir}/oneVPL/samples \ |
45 | ${libdir}/oneVPL/libvpl_wayland.so \ | 39 | ${libdir}/vpl/libvpl_wayland.so \ |
46 | " | 40 | " |