Add the correct and upstreamed fix for support_YV12_too, pull request 13351

which is merged
This commit is contained in:
Sérgio M. Basto 2018-12-03 17:10:52 +00:00
parent e0285a0007
commit 07f89def73
3 changed files with 43 additions and 30 deletions

View File

@ -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];

View File

@ -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];

View File

@ -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