summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch
blob: 8e014c9772a3b5f49488493ec98325ded4744a6e (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
From e118062518c95d8fb0080cc8276b123a90bd0eb9 Mon Sep 17 00:00:00 2001
From: gfxVPLsdm <gfxvplsdm@intel.com>
Date: Wed, 21 Feb 2024 17:11:52 +0800
Subject: [PATCH] Fix SetBuffersYV12() V & U plane offsets calculation (#6475)

Signed-off-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com>
Co-authored-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com>

Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/ce704ddfe11724767ba86c9425a3917dc3100d4a]
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
---
 _studio/shared/src/libmfx_core_vaapi.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/_studio/shared/src/libmfx_core_vaapi.cpp b/_studio/shared/src/libmfx_core_vaapi.cpp
index 2cad86f8..fd5fc269 100644
--- a/_studio/shared/src/libmfx_core_vaapi.cpp
+++ b/_studio/shared/src/libmfx_core_vaapi.cpp
@@ -462,8 +462,8 @@ public:
         }
         else
         {
-            eb.offsets[1] = eb.offsets[0] + uint32_t(eb.height * eb.pitches[1] / 2);
-            eb.offsets[2] = eb.offsets[1] + uint32_t(eb.height * eb.pitches[2] / 2);
+            eb.offsets[1] = eb.offsets[0] + uint32_t(eb.height * eb.pitches[0]);
+            eb.offsets[2] = eb.offsets[1] + uint32_t(eb.height * eb.pitches[1] / 2);
         }
         eb.num_planes = 3;
         eb.data_size = eb.offsets[2] + (eb.height * eb.pitches[2] / 2);
-- 
2.40.1