summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2016-05-07 01:59:32 +1000
committerMichael Palimaka <kensington@gentoo.org>2016-05-07 02:01:01 +1000
commit2dbcf233bb85e3785ff8748d364c24ef42b84ffd (patch)
treea59343968a3c882acbce912f2ceeacdf65bf889f /media-plugins
parentnet-libs/nghttp2: mark 1.7.1 arm/arm64/m68k/s390/sh stable (diff)
downloadgentoo-2dbcf233bb85e3785ff8748d364c24ef42b84ffd.tar.gz
gentoo-2dbcf233bb85e3785ff8748d364c24ef42b84ffd.tar.bz2
gentoo-2dbcf233bb85e3785ff8748d364c24ef42b84ffd.zip
media-plugins/frei0r-plugins: update patch to restore opencv-2 compatibility
Patch by PhobosK <phobosk@fastmail.fm>. Gentoo-bug: 568608 Package-Manager: portage-2.2.28
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/frei0r-plugins/files/frei0r-plugins-1.4-opencv3.patch48
1 files changed, 31 insertions, 17 deletions
diff --git a/media-plugins/frei0r-plugins/files/frei0r-plugins-1.4-opencv3.patch b/media-plugins/frei0r-plugins/files/frei0r-plugins-1.4-opencv3.patch
index 6188c98edb83..d6d96b047296 100644
--- a/media-plugins/frei0r-plugins/files/frei0r-plugins-1.4-opencv3.patch
+++ b/media-plugins/frei0r-plugins/files/frei0r-plugins-1.4-opencv3.patch
@@ -1,50 +1,64 @@
---- ./frei0r-plugins-1.4/src/filter/facedetect/facedetect.c.opencv3 2013-02-24 14:43:22.000000000 +0100
-+++ ./frei0r-plugins-1.4/src/filter/facedetect/facedetect.c 2015-07-08 12:44:30.987056878 +0200
-@@ -211,8 +211,8 @@ CvSeq* detect_and_draw( IplImage* img, C
+diff -ur a/frei0r-plugins-1.4/src/filter/facedetect/facedetect.c b/frei0r-plugins-1.4/src/filter/facedetect/facedetect.c
+--- a/frei0r-plugins-1.4/src/filter/facedetect/facedetect.c 2013-02-24 15:43:22.000000000 +0200
++++ b/frei0r-plugins-1.4/src/filter/facedetect/facedetect.c 2015-12-19 12:27:05.984180725 +0200
+@@ -211,8 +211,13 @@
double scale = 1.3;
IplImage* gray = cvCreateImage( cvSize(img->width,img->height), 8, 1 );
-- IplImage* small_img = cvCreateImage( cvSize( cvRound (img->width/scale),
-- cvRound (img->height/scale)),
++#if (CV_VERSION_EPOCH != 2)
+ IplImage* small_img = cvCreateImage( cvSize( cvRound ((double)img->width/scale),
+ cvRound ((double)img->height/scale)),
++#else
+ IplImage* small_img = cvCreateImage( cvSize( cvRound (img->width/scale),
+ cvRound (img->height/scale)),
++#endif
8, 1 );
int i;
---- ./frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp.opencv3 2013-02-24 14:43:22.000000000 +0100
-+++ ./frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp 2015-07-08 12:48:32.754615885 +0200
-@@ -259,11 +259,11 @@ private:
+diff -ur a/frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp b/frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp
+--- a/frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp 2013-02-24 15:43:22.000000000 +0200
++++ b/frei0r-plugins-1.4/src/filter/facedetect/facedetect.cpp 2015-12-19 12:24:00.023349871 +0200
+@@ -259,11 +259,19 @@
{
double scale = this->scale == 0? 1.0 : this->scale;
CvScalar colors[5] = {
-- {{cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)}},
-- {{cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)}},
-- {{cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)}},
-- {{cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)}},
-- {{cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)}},
++#if (CV_VERSION_EPOCH != 2)
+ CvScalar(cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)),
+ CvScalar(cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)),
+ CvScalar(cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)),
+ CvScalar(cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)),
+ CvScalar(cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)),
++#else
+ {{cvRound(color[0].r * 255), cvRound(color[0].g * 255), cvRound(color[0].b * 255), cvRound(alpha * 255)}},
+ {{cvRound(color[1].r * 255), cvRound(color[1].g * 255), cvRound(color[1].b * 255), cvRound(alpha * 255)}},
+ {{cvRound(color[2].r * 255), cvRound(color[2].g * 255), cvRound(color[2].b * 255), cvRound(alpha * 255)}},
+ {{cvRound(color[3].r * 255), cvRound(color[3].g * 255), cvRound(color[3].b * 255), cvRound(alpha * 255)}},
+ {{cvRound(color[4].r * 255), cvRound(color[4].g * 255), cvRound(color[4].b * 255), cvRound(alpha * 255)}},
++#endif
};
for (int i = 0; i < (objects ? objects->total : 0); i++)
-@@ -287,14 +287,14 @@ private:
+@@ -287,14 +295,23 @@
}
case 1:
{
-- CvBox2D box = {{center.x, center.y}, {r->width / scale, (r->height / scale) * 1.2}, 90};
++#if (CV_VERSION_EPOCH != 2)
+ CvBox2D box = CvBox2D(CvPoint2D32f(center.x, center.y), CvSize2D32f(r->width / scale, (r->height / scale) * 1.2), 90);
++#else
+ CvBox2D box = {{center.x, center.y}, {r->width / scale, (r->height / scale) * 1.2}, 90};
++#endif
cvEllipseBox(image, box, colors[i % 5], thickness, linetype);
break;
}
case 2:
{
-- CvPoint pt1 = {r->x / scale, r->y / scale};
-- CvPoint pt2 = {(r->x + r->width) / scale, (r->y + r->height) / scale};
++#if (CV_VERSION_EPOCH != 2)
+ CvPoint pt1 = CvPoint(r->x / scale, r->y / scale);
+ CvPoint pt2 = CvPoint((r->x + r->width) / scale, (r->y + r->height) / scale);
++#else
+ CvPoint pt1 = {r->x / scale, r->y / scale};
+ CvPoint pt2 = {(r->x + r->width) / scale, (r->y + r->height) / scale};
++#endif
cvRectangle(image, pt1, pt2, colors[i % 5], thickness, linetype);
break;
}