public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/opencv] opencv5: Add the correct and upstreamed fix for support_YV12_too, pull request 13351
@ 2026-08-28 13:31 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-08-28 13:31 UTC (permalink / raw)
  To: git-commits

          A new commit has been pushed.

          Repo   : rpms/opencv
          Branch : opencv5
          Commit : 07f89def7317eed8ebc522e5b2185f10b1a93249
          Author : Sérgio M. Basto <sergio@serjux.com>
          Date   : 2018-12-03T17:10:52+00:00
          Stats  : +43/-30 in 3 file(s)
          URL    : https://src.fedoraproject.org/rpms/opencv/c/07f89def7317eed8ebc522e5b2185f10b1a93249?branch=opencv5

          Log:
          Add the correct and upstreamed fix for support_YV12_too, pull request 13351
which is merged

---
diff --git a/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch b/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch
new file mode 100644
index 0000000..13b28b9
--- /dev/null
+++ b/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch
@@ -0,0 +1,35 @@
+From c26c43c69c654344d2e2fb7b2d21121ca89224e6 Mon Sep 17 00:00:00 2001
+From: Maksim Shabunin <maksim.shabunin@gmail.com>
+Date: Mon, 3 Dec 2018 17:16:09 +0300
+Subject: [PATCH] Fixed compilation with VA-interop on 32-bit platforms
+
+---
+ modules/core/src/va_intel.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/modules/core/src/va_intel.cpp b/modules/core/src/va_intel.cpp
+index ac74f0c5337..c571b90b5fe 100644
+--- a/modules/core/src/va_intel.cpp
++++ b/modules/core/src/va_intel.cpp
+@@ -340,8 +340,8 @@ static void copy_convert_yv12_to_bgr(const VAImage& image, const unsigned char*
+             1.5959997177f
+         };
+ 
+-    CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format");
+-    CV_CheckEQ(image.num_planes, 3, "");
++    CV_CheckEQ((size_t)image.format.fourcc, (size_t)VA_FOURCC_YV12, "Unexpected image format");
++    CV_CheckEQ((size_t)image.num_planes, (size_t)3, "");
+ 
+     const size_t srcOffsetY = image.offsets[0];
+     const size_t srcOffsetV = image.offsets[1];
+@@ -417,8 +417,8 @@ static void copy_convert_bgr_to_yv12(const VAImage& image, const Mat& bgr, unsig
+             -0.2909994125f, 0.438999176f, -0.3679990768f, -0.0709991455f
+         };
+ 
+-    CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format");
+-    CV_CheckEQ(image.num_planes, 3, "");
++    CV_CheckEQ((size_t)image.format.fourcc, (size_t)VA_FOURCC_YV12, "Unexpected image format");
++    CV_CheckEQ((size_t)image.num_planes, (size_t)3, "");
+ 
+     const size_t dstOffsetY = image.offsets[0];
+     const size_t dstOffsetV = image.offsets[1];

diff --git a/fix_support_YV12_too.patch b/fix_support_YV12_too.patch
deleted file mode 100644
index 48e8e1c..0000000
--- a/fix_support_YV12_too.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- ./modules/core/src/va_intel.cpp.orig	2018-12-02 02:08:43.105140530 +0000
-+++ ./modules/core/src/va_intel.cpp	2018-12-02 02:44:51.917011656 +0000
-@@ -340,8 +340,8 @@ static void copy_convert_yv12_to_bgr(con
-             1.5959997177f
-         };
- 
--    CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format");
--    CV_CheckEQ(image.num_planes, 3, "");
-+    //CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format");
-+    //CV_CheckEQ(image.num_planes, 3, "");
- 
-     const size_t srcOffsetY = image.offsets[0];
-     const size_t srcOffsetV = image.offsets[1];
-@@ -417,8 +417,8 @@ static void copy_convert_bgr_to_yv12(con
-             -0.2909994125f, 0.438999176f, -0.3679990768f, -0.0709991455f
-         };
- 
--    CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format");
--    CV_CheckEQ(image.num_planes, 3, "");
-+    //CV_CheckEQ(image.format.fourcc, VA_FOURCC_YV12, "Unexpected image format");
-+    //CV_CheckEQ(image.num_planes, 3, "");
- 
-     const size_t dstOffsetY = image.offsets[0];
-     const size_t dstOffsetV = image.offsets[1];

diff --git a/opencv.spec b/opencv.spec
index 7838f15..f9567c4 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -52,7 +52,7 @@
 
 Name:           opencv
 Version:        3.4.4
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Collection of algorithms for computer vision
 # This is normal three clause BSD.
 License:        BSD
@@ -67,7 +67,7 @@ Source1:        %{name}_contrib-clean-%{version}.tar.gz
 # fix/simplify cmake config install location (upstreamable)
 # https://bugzilla.redhat.com/1031312
 Patch1:         opencv-3.4.1-cmake_paths.patch
-Patch10:        fix_support_YV12_too.patch
+Patch10:        https://github.com/opencv/opencv/pull/13351/commits/c26c43c69c654344d2e2fb7b2d21121ca89224e6.patch
 Patch11:        https://github.com/opencv/opencv_contrib/pull/1905/commits/c4419e4e65a8d9e0b5a15e9a5242453f261bee46.patch
 Patch12:        https://github.com/opencv/opencv/pull/13254/commits/ad35b79e3f98b4ce30481e0299cca550ed77aef0.patch
 
@@ -234,20 +234,18 @@ to provide decent performance and stability.
 
 %prep
 %setup -q -a1
-# we don't use pre-built contribs
+# we don't use pre-built contribs except quirc
 mv 3rdparty/quirc/ .
 rm -r 3rdparty/
 mkdir 3rdparty/
 mv quirc/ 3rdparty/
 
 %patch1 -p1 -b .cmake_paths
-%ifarch %{ix86} %{arm}
 %patch10 -p1 -b .fix_support_YV12_too
+%ifarch %{ix86} %{arm}
 %endif
 
 pushd %{name}_contrib-%{version}
-# missing dependecies for dnn_modern module in Fedora (tiny-dnn)
-#rm -r modules/dnn_modern/
 %patch11 -p1 -b .cvv_repair_build
 popd
 %patch12 -p1 -b .fix_install_of_python_bindings
@@ -421,6 +419,10 @@ popd
 %{_libdir}/libopencv_xphoto.so.%{abiver}*
 
 %changelog
+* Mon Dec 03 2018 Sérgio Basto <sergio@serjux.com> - 3.4.4-2
+- Add the correct and upstreamed fix for support_YV12_too, pull request 13351
+  which is merged
+
 * Sat Dec 01 2018 Sérgio Basto <sergio@serjux.com> - 3.4.4-1
 - Update to 3.4.4
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-28 13:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 13:31 [rpms/opencv] opencv5: Add the correct and upstreamed fix for support_YV12_too, pull request 13351 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox