Signed-off-by: Lim Siew Hoon <[email protected]>
---
 ...fix-fwdRefs-array-out-of-bound-issue.patch | 36 +++++++++++++++++++
 .../libva/intel-media-driver_23.1.6.bb        |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 
recipes-multimedia/libva/files/0001-Encode-fix-fwdRefs-array-out-of-bound-issue.patch

diff --git 
a/recipes-multimedia/libva/files/0001-Encode-fix-fwdRefs-array-out-of-bound-issue.patch
 
b/recipes-multimedia/libva/files/0001-Encode-fix-fwdRefs-array-out-of-bound-issue.patch
new file mode 100644
index 00000000..afe9f17d
--- /dev/null
+++ 
b/recipes-multimedia/libva/files/0001-Encode-fix-fwdRefs-array-out-of-bound-issue.patch
@@ -0,0 +1,36 @@
+From e8bb025cd56c269adf3ffdc3dda404505974f676 Mon Sep 17 00:00:00 2001
+From: bai-isaac <[email protected]>
+Date: Mon, 12 Jun 2023 12:44:29 +0800
+Subject: [PATCH] [Encode] fix fwdRefs array out of bound issue
+
+fix fwdRefs array out of bound issue.
+
+Upstream-status: Backport
+Expect it to be removed once move to intel-media-23.2.4 or above
+https://github.com/intel/media-driver/commit/d795297127488b328f1cc260cf5da66debf95b99
+
+Signed-off-by: Ch'ng, Seng Guan <[email protected]>
+---
+ media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_impl.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_impl.h 
b/media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_impl.h
+index 3b79f4886..85a5a4127 100644
+--- a/media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_impl.h
++++ b/media_softlet/agnostic/common/hw/vdbox/mhw_vdbox_vdenc_impl.h
+@@ -649,10 +649,11 @@ protected:
+                 &resourceParams));
+         }
+ 
++        // SCC will use BwdRef0 as extra slot to store IBC if max fwd ref num 
is 3.
+         typename cmd_t::VDENC_Reference_Picture_CMD *fwdRefs[] =
+             {&cmd.FwdRef0, &cmd.FwdRef1, &cmd.FwdRef2, &cmd.BwdRef0};
+         uint32_t fwdRefsDwLoaction[] =
+-            {_MHW_CMD_DW_LOCATION(FwdRef0), _MHW_CMD_DW_LOCATION(FwdRef1), 
_MHW_CMD_DW_LOCATION(FwdRef2)};
++            {_MHW_CMD_DW_LOCATION(FwdRef0), _MHW_CMD_DW_LOCATION(FwdRef1), 
_MHW_CMD_DW_LOCATION(FwdRef2), _MHW_CMD_DW_LOCATION(BwdRef0)};
+ 
+         typename cmd_t::VDENC_Down_Scaled_Reference_Picture_CMD 
*fwdRefsDsStage1[] =
+             {&cmd.DsFwdRef0, &cmd.DsFwdRef1};
+-- 
+2.40.1
+
diff --git a/recipes-multimedia/libva/intel-media-driver_23.1.6.bb 
b/recipes-multimedia/libva/intel-media-driver_23.1.6.bb
index 88b06e77..1946fb1f 100644
--- a/recipes-multimedia/libva/intel-media-driver_23.1.6.bb
+++ b/recipes-multimedia/libva/intel-media-driver_23.1.6.bb
@@ -20,6 +20,7 @@ DEPENDS += "libva gmmlib"
 
 SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \
            file://fd67cc3fbd3a362297afc7cc8d75560df62708de.patch \
+           file://0001-Encode-fix-fwdRefs-array-out-of-bound-issue.patch \
           "
 
 SRCREV = "8589406d4e7f97c6de55862af775d67d5dd7cd28"
-- 
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8004): 
https://lists.yoctoproject.org/g/meta-intel/message/8004
Mute This Topic: https://lists.yoctoproject.org/mt/99543780/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to