commit 03ca19b7463a19c3565935f3a3b550e8df0a702c
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Mar 10 12:21:56 2020 +0100
Fix build with OpenCV
Switch-to-opencv2-COLOR_RGB2GRAY.patch | 49 ++++++++++++++++++++++++++++++++++
lives.spec | 9 +++++--
2 files changed, 56 insertions(+), 2 deletions(-)
---
diff --git a/Switch-to-opencv2-COLOR_RGB2GRAY.patch
b/Switch-to-opencv2-COLOR_RGB2GRAY.patch
new file mode 100644
index 0000000..ee5ea14
--- /dev/null
+++ b/Switch-to-opencv2-COLOR_RGB2GRAY.patch
@@ -0,0 +1,49 @@
+From bb7e9d2fe3f16db93b8ab005f6a4f0f19269800e Mon Sep 17 00:00:00 2001
+From: Nicolas Chauvet <kwizart(a)gmail.com>
+Date: Tue, 10 Mar 2020 11:11:21 +0100
+Subject: [PATCH] Switch to opencv2+ COLOR_RGB2GRAY and related
+
+Signed-off-by: Nicolas Chauvet <kwizart(a)gmail.com>
+---
+ lives-plugins/weed-plugins/farneback_analyser.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lives-plugins/weed-plugins/farneback_analyser.cpp
b/lives-plugins/weed-plugins/farneback_analyser.cpp
+index c67c1417..5b8cd384 100644
+--- a/lives-plugins/weed-plugins/farneback_analyser.cpp
++++ b/lives-plugins/weed-plugins/farneback_analyser.cpp
+@@ -157,26 +157,26 @@ static weed_error_t farneback_process(weed_plant_t *inst,
weed_timecode_t tc) {
+ switch (palette) {
+ case WEED_PALETTE_RGB24:
+ srcMat = Mat(height, width, CV_8UC3, src, irow);
+- cvtColor(srcMat, *cvgrey, CV_RGB2GRAY); // may segfault here, not sure what causes
it. Bug in opencv 2.4 ?
++ cvtColor(srcMat, *cvgrey, COLOR_RGB2GRAY); // may segfault here, not sure what
causes it. Bug in opencv 2.4 ?
+ break;
+ case WEED_PALETTE_BGR24:
+ srcMat = Mat(height, width, CV_8UC3, src, irow);
+- cvtColor(srcMat, *cvgrey, CV_BGR2GRAY);
++ cvtColor(srcMat, *cvgrey, COLOR_BGR2GRAY);
+ break;
+ case WEED_PALETTE_RGBA32:
+ srcMat = Mat(height, width, CV_8UC4, src, irow);
+- cvtColor(srcMat, *cvgrey, CV_RGB2GRAY);
++ cvtColor(srcMat, *cvgrey, COLOR_RGB2GRAY);
+ break;
+ case WEED_PALETTE_BGRA32:
+ srcMat = Mat(height, width, CV_8UC4, src, irow);
+- cvtColor(srcMat, *cvgrey, CV_BGR2GRAY);
++ cvtColor(srcMat, *cvgrey, COLOR_BGR2GRAY);
+ break;
+ case WEED_PALETTE_ARGB32: {
+ int from_to[] = {0, 3, 1, 0, 2, 1, 3, 2}; // convert argb to rgba
+ srcMat = Mat(height, width, CV_8UC4, src, irow);
+ mixMat = Mat(height, width, CV_8UC4);
+ mixChannels(&srcMat, 1, &mixMat, 1, from_to, 4);
+- cvtColor(mixMat, *cvgrey, CV_RGB2GRAY);
++ cvtColor(mixMat, *cvgrey, COLOR_RGB2GRAY);
+ }
+ break;
+ case WEED_PALETTE_YUVA4444P:
+--
+2.24.1
+
diff --git a/lives.spec b/lives.spec
index 8f743a6..693c4e3 100644
--- a/lives.spec
+++ b/lives.spec
@@ -27,11 +27,13 @@
Name: lives
Version: 3.0.2
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Video editor and VJ tool
License: GPLv3+ and LGPLv3+
URL:
http://lives-video.com
Source0:
http://lives-video.com/releases/LiVES-%{version}.tar.gz
+#
https://github.com/salsaman/LiVES/pull/7
+Patch0: Switch-to-opencv2-COLOR_RGB2GRAY.patch
# Appdata file
Source1: LiVES.appdata.xml
@@ -113,7 +115,7 @@ designed to be simple to use, yet powerful.
It is small in size, yet it has many advanced features.
%prep
-%autosetup -n LiVES-%{version}
+%autosetup -p1 -n LiVES-%{version}
# Remove spurious executable permissions
find . -type f -name "*.h" -exec chmod 0644 '{}' \;
@@ -210,6 +212,9 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/*.appdata.xml
%{_metainfodir}/LiVES.appdata.xml
%changelog
+* Tue Mar 10 2020 Nicolas Chauvet <kwizart(a)gmail.com> - 3.0.2-4
+- Fix build for OpenCV
+
* Sat Feb 22 2020 RPM Fusion Release Engineering <leigh123linux(a)googlemail.com> -
3.0.2-3
- Rebuild for ffmpeg-4.3 git