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 +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 - 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 - 3.4.4-1 - Update to 3.4.4