diff options
author | Olivier Cochard <olivier@FreeBSD.org> | 2016-06-20 08:06:46 +0000 |
---|---|---|
committer | Olivier Cochard <olivier@FreeBSD.org> | 2016-06-20 08:06:46 +0000 |
commit | 71cf1564f9a8c4bb0e1901be3804057d97d5cb06 (patch) | |
tree | 0e0cafe794b515666f343a1115575604a5602d7d /multimedia/zoneminder/files/patch-src_zm__image.cpp | |
parent | Provide a new MASTER_SITES (diff) |
Fix multimedia/zoneminder build on 9.3-i386 and head-amd64
PR: 210261
Submitted by: bsd@abinet.ru
Approved by: jadawin
Differential Revision: https://reviews.freebsd.org/D6854
Notes
Notes:
svn path=/head/; revision=417142
Diffstat (limited to 'multimedia/zoneminder/files/patch-src_zm__image.cpp')
-rw-r--r-- | multimedia/zoneminder/files/patch-src_zm__image.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/multimedia/zoneminder/files/patch-src_zm__image.cpp b/multimedia/zoneminder/files/patch-src_zm__image.cpp new file mode 100644 index 000000000000..2118dfc9e355 --- /dev/null +++ b/multimedia/zoneminder/files/patch-src_zm__image.cpp @@ -0,0 +1,18 @@ +--- src/zm_image.cpp.orig 2016-06-01 00:41:17 UTC ++++ src/zm_image.cpp +@@ -1619,12 +1619,9 @@ Image *Image::Highlight( unsigned int n_ + for ( unsigned int j = 0; j < n_images; j++ ) + { + uint8_t *psrc = images[j]->buffer+c; +- +-#ifndef SOLARIS +- if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) +-#else +- if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) ) +-#endif ++ unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc); ++ ++ if (diff >= RGB_VAL(threshold,c)) + { + count++; + } |