blob: 3d02fef30e4275df9e4792aa3b70912a306c6216 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
From c2a7a53a71b252593fb31cba24cddf7a5f466ba1 Mon Sep 17 00:00:00 2001
From: Vincent Cheah Beng Keat <vincent.beng.keat.cheah@intel.com>
Date: Wed, 18 Oct 2023 10:49:13 +0800
Subject: [PATCH 5/7] XRGB force to do swizzle for AVC/HEVC
This is to fix msdkh264enc/msdkh265enc incorrect encoded output when having BGRx input.
Upstream-Status: Backport [https://github.com/intel/media-driver/commit/433068b0db298f9592880f25601449366b4aa8d3]
Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
---
.../linux/common/codec/ddi/enc/ddi_encode_avc_specific.h | 1 +
.../linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h
index 057af4420..e4a1cbe58 100644
--- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h
+++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_avc_specific.h
@@ -557,6 +557,7 @@ private:
inline bool NeedDisplayFormatSwizzle(DDI_MEDIA_SURFACE *rawSurface)
{
if (Media_Format_A8R8G8B8 == rawSurface->format ||
+ Media_Format_X8R8G8B8 == rawSurface->format ||
Media_Format_B10G10R10A2 == rawSurface->format)
{
return true;
diff --git a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h
index 65483b43d..56e688e4a 100644
--- a/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h
+++ b/media_softlet/linux/common/codec/ddi/enc/ddi_encode_hevc_specific.h
@@ -293,14 +293,16 @@ private:
bool ret = false;
if (Media_Format_A8R8G8B8 == rawSurface->format ||
- Media_Format_B10G10R10A2 == rawSurface->format)
+ Media_Format_X8R8G8B8 == rawSurface->format ||
+ Media_Format_B10G10R10A2 == rawSurface->format)
{
ret = true;
}
if (ret &&
(Media_Format_A8R8G8B8 == reconSurface->format ||
- Media_Format_B10G10R10A2 == reconSurface->format))
+ Media_Format_X8R8G8B8 == reconSurface->format ||
+ Media_Format_B10G10R10A2 == reconSurface->format))
{
ret = false;
}
--
2.40.1
|