1 |
gentoofan23 08/06/23 00:27:08 |
2 |
|
3 |
Added: opencv-1.0.0-automagicdependencies.patch |
4 |
opencv-1.0.0-havepngexrdefs.patch |
5 |
opencv-1.0.0-fixpythonmultilib.patch |
6 |
opencv-1.0.0-enableuseflags.patch |
7 |
opencv-1.0.0-addoptionalsamples.patch |
8 |
opencv-1.0.0-cvcapffmpegundefinedsymbols.patch |
9 |
Log: |
10 |
Import changes from science overlay, fixes tons of automagic bugs as well as multilib bugs. Keyworded ~amd64 |
11 |
(Portage version: 2.1.4.4) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch |
15 |
|
16 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-automagicdependencies.patch?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: opencv-1.0.0-automagicdependencies.patch |
20 |
=================================================================== |
21 |
--- opencv-1.0.0-orig/configure.in 2006-11-03 10:54:33.000000000 -0500 |
22 |
+++ opencv-1.0.0/configure.in 2008-06-12 14:25:31.000000000 -0400 |
23 |
@@ -20,7 +20,6 @@ |
24 |
AC_INIT([opencv],[opencv_version],[opencvlibrary-devel@×××××××××××××××××.net]) |
25 |
AC_CONFIG_SRCDIR([opencv.pc.in]) |
26 |
AC_CONFIG_AUX_DIR([autotools]) |
27 |
-AC_CONFIG_MACRO_DIR([autotools/aclocal]) |
28 |
|
29 |
# put CVS revision of this configure.in into the resulting configure script |
30 |
AC_REVISION($Revision: 1.1 $) |
31 |
@@ -81,15 +80,22 @@ |
32 |
AC_ARG_ENABLE([debug], |
33 |
[AS_HELP_STRING([--enable-debug],[build debug version without optimization])], |
34 |
[debug=$enableval], |
35 |
- [debug=no]) |
36 |
+ [debug="no"]) |
37 |
+AM_CONDITIONAL([ENABLE_DEBUG], [test x"$enable_debug" = x"yes"]) |
38 |
|
39 |
# does the user want to build demo applications? |
40 |
AC_ARG_ENABLE([apps], |
41 |
[AS_HELP_STRING([--enable-apps],[build demo applications])], |
42 |
[enable_apps=$enableval], |
43 |
- [enable_apps="yes"]) |
44 |
+ [enable_apps="no"]) |
45 |
AM_CONDITIONAL([BUILD_APPS], [test x"$enable_apps" = x"yes"]) |
46 |
|
47 |
+AC_ARG_ENABLE([samples], |
48 |
+ [AS_HELP_STRING([--enable-samples],[install sample source code])], |
49 |
+ [enable_samples=$enableval], |
50 |
+ [enable_samples="no"]) |
51 |
+AM_CONDITIONAL([INSTALL_SAMPLES], [test x"$enable_samples" = x"yes"]) |
52 |
+ |
53 |
|
54 |
# the following checks reflect the dependencies of OpenCV on other |
55 |
# libraries that do the actual work for video I/O or windowing |
56 |
@@ -101,55 +107,64 @@ |
57 |
AC_ARG_WITH([swig], |
58 |
[AS_HELP_STRING([--with-swig],[use swig wrapper generator])], |
59 |
[with_swig=$withval], |
60 |
- [with_swig=no]) |
61 |
+ [with_swig="no"]) |
62 |
+AM_CONDITIONAL([WITH_SWIG], [test x"$with_swig" = x"yes"]) |
63 |
|
64 |
# does the user want to compile python modules as well? |
65 |
AC_ARG_WITH([python], |
66 |
[AS_HELP_STRING([--with-python],[use python for wrapping])], |
67 |
[with_python=$withval], |
68 |
- [with_python=yes]) |
69 |
+ [with_python="no"]) |
70 |
+AM_CONDITIONAL([WITH_PYTHON], [test x"$with_python" = x"yes"]) |
71 |
|
72 |
# does the user want OpenCV to use xine video libraries? |
73 |
AC_ARG_WITH([xine], |
74 |
[AS_HELP_STRING([--with-xine],[use xine libraries (see LICENSE)])], |
75 |
[with_xine=$withval], |
76 |
- [with_xine=no]) |
77 |
+ [with_xine="no"]) |
78 |
+AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) |
79 |
|
80 |
# does the user want OpenCV to use ffmpeg video libraries? |
81 |
AC_ARG_WITH([ffmpeg], |
82 |
[AS_HELP_STRING([--with-ffmpeg],[use ffmpeg libraries (see LICENSE)])], |
83 |
[with_ffmpeg=$withval], |
84 |
- [with_ffmpeg=auto]) |
85 |
+ [with_ffmpeg="no"]) |
86 |
+AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) |
87 |
|
88 |
# does the user want OpenCV to use libraw1394/libdc1394 for video input? |
89 |
AC_ARG_WITH([1394libs], |
90 |
[AS_HELP_STRING([--with-1394libs],[use libraw1394/libdc1394])], |
91 |
[with_1394libs=$withval], |
92 |
- [with_1394libs=auto]) |
93 |
+ [with_1394libs="no"]) |
94 |
+AM_CONDITIONAL([WITH_1394LIBS], [test x"$with_1394libs" = x"yes"]) |
95 |
|
96 |
# does the user want OpenCV to use the video4linux kernel module? |
97 |
AC_ARG_WITH([v4l], |
98 |
[AS_HELP_STRING([--with-v4l],[use video4linux])], |
99 |
[with_v4l=$withval], |
100 |
- [with_v4l=auto]) |
101 |
+ [with_v4l="no"]) |
102 |
+AM_CONDITIONAL([WITH_V4L], [test x"$with_v4l" = x"yes"]) |
103 |
|
104 |
# does the user want OpenCV to use QuickTime video libraries? |
105 |
AC_ARG_WITH([quicktime], |
106 |
[AS_HELP_STRING([--with-quicktime],[use QuickTime libraries])], |
107 |
[with_quicktime=$withval], |
108 |
- [with_quicktime=yes]) |
109 |
+ [with_quicktime="no"]) |
110 |
+AM_CONDITIONAL([WITH_QUICKTIME], [test x"$with_quicktime" = x"yes"]) |
111 |
|
112 |
# does the user want OpenCV to use the Carbon GUI of Mac OS X? |
113 |
AC_ARG_WITH([carbon], |
114 |
[AS_HELP_STRING([--with-carbon],[use Carbon windows])], |
115 |
[with_carbon=$withval], |
116 |
- [with_carbon=yes]) |
117 |
+ [with_carbon="no"]) |
118 |
+AM_CONDITIONAL([WITH_CARBON], [test x"$with_carbon" = x"yes"]) |
119 |
|
120 |
# does the user want OpenCV to use GTK+ 2.0 for the GUI? |
121 |
AC_ARG_WITH([gtk], |
122 |
[AS_HELP_STRING([--with-gtk],[use gtk+ 2.0 windows])], |
123 |
[with_gtk=$withval], |
124 |
- [with_gtk=auto]) |
125 |
+ [with_gtk="no"]) |
126 |
+AM_CONDITIONAL([WITH_GTK], [test x"$with_gtk" = x"yes"]) |
127 |
|
128 |
|
129 |
###################################################################### |
130 |
@@ -340,7 +355,7 @@ |
131 |
|
132 |
# if QuickTime is present, it will override everything else, |
133 |
# (unless '--without-quicktime' was given) |
134 |
-if test x"$with_quicktime" = "xyes"; then |
135 |
+if test x"$with_quicktime" = x"yes"; then |
136 |
|
137 |
# check other ./configure flags |
138 |
if test x"$with_ffmpeg" = "xyes"; then |
139 |
@@ -423,129 +438,62 @@ |
140 |
AC_SUBST(XINE_LIBS) |
141 |
AM_CONDITIONAL([BUILD_XINE], [test x"$have_xine" = "xyes"]) |
142 |
|
143 |
-# unfortunately, xine does not feature video writing, |
144 |
-# so we have to resort to FFMPEG here |
145 |
-if test x"$with_ffmpeg" = "xno"; then |
146 |
- have_ffmpeg=no |
147 |
- # FFMPEGLIBS="" |
148 |
-else |
149 |
- |
150 |
- # check if ./configure arguments are valid |
151 |
- if test x"$with_ffmpeg" = "xauto"; then |
152 |
- with_ffmpeg=yes |
153 |
- fi |
154 |
- if test x"$with_ffmpeg" = "xyes"; then |
155 |
- AC_CHECK_HEADER(ffmpeg/avcodec.h, |
156 |
- AC_CHECK_LIB(avcodec, avcodec_decode_video, |
157 |
- [ |
158 |
- AC_CHECK_LIB(avformat, av_open_input_file, |
159 |
- [ |
160 |
- have_ffmpeg=yes |
161 |
- AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library]) |
162 |
- FFMPEGLIBS="-lavcodec -lavformat" |
163 |
- ], |
164 |
- [ have_ffmpeg=no ], |
165 |
- [-lavcodec]) |
166 |
- ], |
167 |
- [ have_ffmpeg=no ]), |
168 |
- [ have_ffmpeg=no ]) |
169 |
- else |
170 |
- # if we get here then --with-ffmpeg was not called with 'yes','no' or 'auto' |
171 |
- AC_MSG_WARN([unexpected arguments for option --with-ffmpeg, continuing assuming 'no']) |
172 |
- have_ffmpeg=no |
173 |
- fi |
174 |
+if test x"$with_ffmpeg" = x"yes"; then |
175 |
+ AC_CHECK_HEADER(ffmpeg/avcodec.h,, [AC_MSG_ERROR([FFmpeg requested but header file ffmpeg/avcodec.h not found])]) |
176 |
+ AC_CHECK_HEADER(ffmpeg/swscale.h,, [AC_MSG_ERROR([FFmpeg requested but header file ffmpeg/swscale.h not found])]) |
177 |
+ AC_CHECK_LIB(avcodec, avcodec_decode_video,, [AC_MSG_ERROR([FFmpeg requested but ffmpeg libraries not found])]) |
178 |
+ AC_CHECK_LIB(avformat, av_open_input_file,, [AC_MSG_ERROR([FFmpeg requested but ffmpeg libraries not found])]) |
179 |
+ AC_CHECK_LIB(swscale, sws_getContext,, [AC_MSG_ERROR([FFmpeg requested but ffmpeg libraries not found])]) |
180 |
+ AC_DEFINE(HAVE_FFMPEG,,[FFMpeg video library]) |
181 |
+ FFMPEGLIBS="-lavcodec -lavformat -lswscale" |
182 |
+ have_ffmpeg=yes |
183 |
fi |
184 |
AC_SUBST(FFMPEGLIBS) |
185 |
AM_CONDITIONAL([BUILD_FFMPEG], [test x"$have_ffmpeg" = "xyes"]) |
186 |
|
187 |
# IEEE1394 / FireWire video video i/o with libdc1394, libraw1394 |
188 |
# (can be managed by QuickTime as well) |
189 |
-if test x"$with_1394libs" = "xno"; then |
190 |
+if test x"$with_1394libs" = x"no"; then |
191 |
have_raw1394=no |
192 |
have_dc1394=no |
193 |
# IEEE1394LIBS="" |
194 |
-else |
195 |
+fi |
196 |
+if test x"$with_1394libs" = x"yes"; then |
197 |
|
198 |
- # check if ./configure arguments are valid |
199 |
- if test x"$with_1394libs" = "xauto"; then |
200 |
- with_1394libs=yes |
201 |
- fi |
202 |
- if test x"$with_1394libs" = "xyes"; then |
203 |
- |
204 |
- SAVELIBS="$LIBS" |
205 |
- have_raw1394=no |
206 |
- have_dc1394=no |
207 |
- |
208 |
- AC_CHECK_HEADER(libraw1394/raw1394.h, |
209 |
- AC_CHECK_LIB(raw1394, raw1394_new_handle, |
210 |
- [ |
211 |
- have_raw1394=yes |
212 |
- LIBS="-lm -lraw1394 $LIBS" |
213 |
- ])) |
214 |
- |
215 |
- if test x"$have_raw1394" = "xyes"; then |
216 |
- AC_CHECK_HEADER(libdc1394/dc1394_control.h, |
217 |
- AC_CHECK_LIB(dc1394_control, dc1394_camera_on, |
218 |
- [ |
219 |
- have_dc1394=yes |
220 |
- AC_DEFINE(HAVE_DC1394,,[IEEE1394 capturing support]) |
221 |
- AC_EGREP_HEADER(do_extra_buffering, libdc1394/dc1394_control.h, |
222 |
- [AC_DEFINE(HAVE_DC1394_095,,[libdc1394 0.9.4 or 0.9.5])]) |
223 |
- IEEE1394LIBS="-lm -lraw1394 -ldc1394_control" |
224 |
- ])) |
225 |
- fi |
226 |
- |
227 |
- LIBS="$SAVELIBS" |
228 |
- else |
229 |
- # if we get here then --with-1394libs was not called with 'yes','no' or 'auto' |
230 |
- AC_MSG_WARN([unexpected arguments for option --with-1394libs, continuing assuming 'no']) |
231 |
- have_dc1394=no |
232 |
- fi |
233 |
+ AC_CHECK_HEADER(libraw1394/raw1394.h,, [AC_MSG_ERROR([1394 requested but header file libraw1394/raw1394.h not found])]) |
234 |
+ AC_CHECK_LIB(raw1394, raw1394_new_handle,, [AC_MSG_ERROR([1394 requested but 1394 libraries not found])]) |
235 |
+ AC_CHECK_HEADER(libdc1394/dc1394_control.h,, [AC_MSG_ERROR([1394 requested but header file libdc1394/dc1394_control.h not found])]) |
236 |
+ AC_CHECK_LIB(dc1394_control, dc1394_camera_on,, [AC_MSG_ERROR([1394 requested but 1394 raw libraries not found])]) |
237 |
+ AC_DEFINE(HAVE_DC1394,, [IEEE1394 capturing support]) |
238 |
+ have_raw1394=yes |
239 |
+ have_dc1394=yes |
240 |
+ LIBS="-lm -lraw1394 $LIBS" |
241 |
+ IEEE1394LIBS="-lm -lraw1394 -ldc1394_control" |
242 |
+ SAVELIBS="$LIBS" |
243 |
+ LIBS="$SAVELIBS" |
244 |
fi |
245 |
AC_SUBST(IEEE1394LIBS) |
246 |
-AM_CONDITIONAL([BUILD_DC1394], [test x"$have_dc1394" = "xyes"]) |
247 |
+AM_CONDITIONAL([BUILD_DC1394], [test x"$have_dc1394" = x"yes"]) |
248 |
|
249 |
# Video for Linux (V4L) |
250 |
# we support version 1 and 2 currently |
251 |
-if test x"$with_v4l" = "xno"; then |
252 |
- have_v4l=no |
253 |
- have_v4l2=no |
254 |
- have_v4l1or2=no |
255 |
-else |
256 |
- # check if ./configure arguments are valid |
257 |
- if test x"$with_v4l" = "xauto"; then |
258 |
- with_v4l=yes |
259 |
- fi |
260 |
- if test x"$with_v4l" = "xyes"; then |
261 |
- AC_CHECK_HEADER([linux/videodev.h], |
262 |
- [ |
263 |
- AC_DEFINE(HAVE_CAMV4L,,[V4L capturing support]) |
264 |
- have_v4l=yes |
265 |
- have_v4l1or2=yes |
266 |
- ], |
267 |
- [ |
268 |
- have_v4l=no |
269 |
- have_v4l1or2=no |
270 |
- ]) |
271 |
- AC_CHECK_HEADER([linux/videodev2.h], |
272 |
- [ |
273 |
- AC_DEFINE(HAVE_CAMV4L2,,[V4L2 capturing support]) |
274 |
- have_v4l2=yes |
275 |
- have_v4l1or2=yes |
276 |
- ], |
277 |
- [ have_v4l2=no ], |
278 |
- [[ |
279 |
- #include <asm/types.h> |
280 |
- #include <sys/time.h> |
281 |
- ]]) |
282 |
- else |
283 |
- # if we get here then --with-v4l was not called with 'yes','no' or 'auto' |
284 |
- AC_MSG_WARN([unexpected arguments for option --with-v4l, continuing assuming 'no']) |
285 |
- have_v4l=no |
286 |
- have_v4l2=no |
287 |
- have_v4l1or2=no |
288 |
- fi |
289 |
+have_v4l=no |
290 |
+have_v4l2=no |
291 |
+have_v4l1or2=no |
292 |
+if test x"$with_v4l" = x"yes"; then |
293 |
+ AC_CHECK_HEADER(linux/videodev.h,, [AC_MSG_ERROR([Video4linux requested but header file linux/videodev.h not found])]) |
294 |
+ AC_DEFINE(HAVE_CAMV4L,,[V4L capturing support]) |
295 |
+ have_v4l=yes |
296 |
+fi |
297 |
+ |
298 |
+if test x"$with_v4l2" = x"yes"; then |
299 |
+ AC_CHECK_HEADER(linux/videodev2.h,, [AC_MSG_ERROR([Video4linux2 requested but header file linux/videodev.h not found])]) |
300 |
+ AC_DEFINE(HAVE_CAMV4L2,, [V4L2 capturing support]) |
301 |
+ have_v4l2=yes |
302 |
+fi |
303 |
|
304 |
+if test x"$with_v4l" = x"yes" && test x"$with_v4l2" = x"yes"; then |
305 |
+ have_v4l1or2=yes |
306 |
fi |
307 |
AM_CONDITIONAL([BUILD_V4L], [test x"$have_v4l1or2" = "xyes"]) |
308 |
|
309 |
@@ -558,78 +506,86 @@ |
310 |
|
311 |
AC_SUBST(IMAGELIBS) |
312 |
|
313 |
-have_jpeg=no |
314 |
-AC_CHECK_HEADER(jpeglib.h, |
315 |
- AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, |
316 |
- [ |
317 |
- have_jpeg=yes |
318 |
- AC_DEFINE(HAVE_JPEG,,[IJG JPEG codec]) |
319 |
- IMAGELIBS="$IMAGELIBS -ljpeg" |
320 |
- ])) |
321 |
- |
322 |
-have_zlib=no |
323 |
-AC_CHECK_HEADER(zlib.h, |
324 |
- AC_CHECK_LIB(z, gzopen, |
325 |
- [ |
326 |
- have_zlib=yes |
327 |
- AC_DEFINE(HAVE_ZLIB,,[LZ77 compression/decompression library (used for PNG)]) |
328 |
- IMAGELIBS="$IMAGELIBS -lz -lm" |
329 |
- LIBS="$LIBS -lz -lm" |
330 |
- ])) |
331 |
- |
332 |
-have_png=no |
333 |
-AC_CHECK_HEADER(png.h, |
334 |
- [ |
335 |
- AC_DEFINE(HAVE_PNG_H,,[png.h needs to be included]) |
336 |
- have_png=yes |
337 |
- ]) |
338 |
-AC_CHECK_HEADER([libpng/png.h], |
339 |
- [ |
340 |
- AC_DEFINE(HAVE_LIBPNG_PNG_H,,[libpng/png.h needs to be included]) |
341 |
- have_png=yes |
342 |
- ]) |
343 |
-if test x"$have_png" = "xyes"; then |
344 |
- AC_CHECK_LIB(png12, png_read_image, |
345 |
- [ |
346 |
- have_png=yes |
347 |
- AC_DEFINE(HAVE_PNG,,[PNG codec]) |
348 |
- IMAGELIBS="-lpng12 $IMAGELIBS" |
349 |
- LIBS="-lpng12 $LIBS" |
350 |
- AC_CHECK_FUNCS(png_get_valid png_set_tRNS_to_alpha) |
351 |
- ], |
352 |
- [ have_png=no ]) |
353 |
-fi |
354 |
- |
355 |
-have_tiff=no |
356 |
-AC_CHECK_HEADER(tiff.h, |
357 |
- AC_CHECK_LIB(tiff, TIFFReadRGBAStrip, |
358 |
- [ |
359 |
- have_tiff=yes |
360 |
- AC_DEFINE(HAVE_TIFF,,[TIFF codec]) |
361 |
- IMAGELIBS="$IMAGELIBS -ltiff" |
362 |
- LIBS="$LIBS -ltiff" |
363 |
- ])) |
364 |
- |
365 |
-have_jasper=no |
366 |
-AC_CHECK_HEADER(jasper/jasper.h, |
367 |
- AC_CHECK_LIB(jasper, jas_image_readcmpt, |
368 |
- [ |
369 |
- have_jasper=yes |
370 |
- AC_DEFINE(HAVE_JASPER,,[JPEG-2000 codec]) |
371 |
- IMAGELIBS="$IMAGELIBS -ljasper" |
372 |
- LIBS="$LIBS -ljasper" |
373 |
- ])) |
374 |
- |
375 |
-have_ilmimf=no |
376 |
-AC_CHECK_HEADER(ImfCRgbaFile.h, |
377 |
- AC_CHECK_LIB(IlmImf, ImfInputReadPixels, |
378 |
- [ |
379 |
- have_ilmimf=yes |
380 |
- AC_DEFINE(HAVE_ILMIMF,,[OpenEXR codec]) |
381 |
- IMAGELIBS="$IMAGELIBS -lIlmImf -lIex -lHalf" |
382 |
- LIBS="$LIBS -lIlmImf -lIex -lHalf" |
383 |
- ],, |
384 |
- [ -lIex -lHalf ])) |
385 |
+AC_ARG_ENABLE(jpeg, |
386 |
+ [AS_HELP_STRING([--enable-jpeg], [Enable JPEG Image I/O])], |
387 |
+ [enable_jpeg=$enableval], |
388 |
+ [enable_jpeg=no]) |
389 |
+ |
390 |
+if test x"$enable_jpeg" = x"yes"; then |
391 |
+ AC_CHECK_HEADER(jpeglib.h,, [AC_MSG_ERROR([Jpeg library requested but header jpeglib.h not found])]) |
392 |
+ AC_CHECK_LIB(jpeg, jpeg_destroy_compress,, [AC_MSG_ERROR([Jpeg library requested but libraries not found])]) |
393 |
+ IMAGELIBS="$IMAGELIBS -ljpeg" |
394 |
+ AC_DEFINE(HAVE_JPEG,,[IJG JPEG codec]) |
395 |
+fi |
396 |
+ |
397 |
+AC_ARG_ENABLE(zlib, |
398 |
+ [AS_HELP_STRING([--enable-zlib], [Enable Zlib compression])], |
399 |
+ [enable_zlib=$enableval], |
400 |
+ [enable_zlib=no]) |
401 |
+ |
402 |
+if test x"$enable_zlib" = x"yes"; then |
403 |
+ AC_CHECK_HEADER(zlib.h,, [AC_MSG_ERROR([Zlib library requested but header zlib.h not found])]) |
404 |
+ AC_CHECK_LIB(z,gzopen,, [AC_MSG_ERROR([Zlib library requested but libraries not found])]) |
405 |
+ AC_DEFINE(HAVE_ZLIB,,[lZ77 compression/decompression library (used for PNG)]) |
406 |
+ IMAGELIBS="$IMAGELIBS -lz -lm" |
407 |
+ LIBS="$LIBS -lz -lm" |
408 |
+fi |
409 |
+ |
410 |
+AC_ARG_ENABLE(png, |
411 |
+ [AS_HELP_STRING([--enable-png], [Enable PNG Image I/O])], |
412 |
+ [enable_png=$enableval], |
413 |
+ [enable_png=no]) |
414 |
+ |
415 |
+if test x"$enable_png" = x"yes"; then |
416 |
+ AC_CHECK_HEADER(png.h,, [AC_MSG_ERROR([PNG requested but headers not found])]) |
417 |
+ AC_CHECK_LIB(png12, png_read_image,, [AC_MSG_ERROR([PNG requested but libraries not found])]) |
418 |
+ AC_DEFINE(HAVE_PNG,, [PNG codec]) |
419 |
+ AC_DEFINE(HAVE_PNG_H,, [PNG header]) |
420 |
+ IMAGELIBS="`libpng-config --ldflags` $IMAGELIBS" |
421 |
+ LIBS="`libpng-config --ldflags` $IMAGELIBS" |
422 |
+ AC_CHECK_FUNCS(png_get_valid png_set_tRNS_to_alpha) |
423 |
+fi |
424 |
+AM_CONDITIONAL([HAVE_PNG], [test x"$enable_png" = x"yes"]) |
425 |
+ |
426 |
+AC_ARG_ENABLE(tiff, |
427 |
+ [AS_HELP_STRING([--enable-tiff], [Enable TIFF Image I/O])], |
428 |
+ [enable_tiff=$enableval], |
429 |
+ [enable_tiff=no]) |
430 |
+ |
431 |
+if test x"$enable_tiff" = x"yes"; then |
432 |
+ AC_CHECK_HEADER(tiff.h,, [AC_MSG_ERROR([Tiff requested but header file not found])]) |
433 |
+ AC_CHECK_LIB(tiff, TIFFReadRGBAStrip,, [AC_MSG_ERROR([Tiff requested but libraries not found])]) |
434 |
+ AC_DEFINE(HAVE_TIFF,,[TIFF codec]) |
435 |
+ IMAGELIBS="$IMAGELIBS -ltiff" |
436 |
+ LIBS="$LIBS -ltiff" |
437 |
+fi |
438 |
+ |
439 |
+AC_ARG_ENABLE(jasper, |
440 |
+ [AS_HELP_STRING([--enable-jasper], [Enable Jasper])], |
441 |
+ [enable_jasper=$enableval], |
442 |
+ [enable_jasper=no]) |
443 |
+ |
444 |
+if test x"$enable_jasper" = x"yes"; then |
445 |
+ AC_CHECK_HEADER(jasper/jasper.h,, [AC_MSG_ERROR([Jasper requested but header filejasper/jasper.h not found])]) |
446 |
+ AC_CHECK_LIB(jasper, jas_image_readcmpt,, [AC_MSG_ERROR([Jasper requested but libraries not found])]) |
447 |
+ AC_DEFINE(HAVE_JASPER,, [JPEG-2000 codec]) |
448 |
+ IMAGELIBS="$IMAGELIBS -ljasper" |
449 |
+ LIBS="$LIBS -ljasper" |
450 |
+fi |
451 |
+ |
452 |
+ |
453 |
+AC_ARG_ENABLE(openexr, |
454 |
+ [AS_HELP_STRING([--enable-openexr], [Enable Openexr support])], |
455 |
+ [enable_openexr=$enableval], |
456 |
+ [enable_openexr=no]) |
457 |
+ |
458 |
+if test x"$enable_openexr" = x"yes"; then |
459 |
+ AC_CHECK_HEADER(OpenEXR/ImfCRgbaFile.h,, [AC_MSG_ERROR([Openexr requested but header file ImfCrgbaFile.h not found])]) |
460 |
+ AC_CHECK_LIB(IlmImf, ImfInputReadPixels,, [AC_MSG_ERROR([Openexr requested but libraries not found])]) |
461 |
+ AC_DEFINE(HAVE_ILMIMF,, [OpenExr codec]) |
462 |
+ IMAGELIBS="$IMAGELIBS -lIlmImf -lIex -lHalf" |
463 |
+ LIBS="$LIBS -lIlmImf -lIex -lHalf" |
464 |
+fi |
465 |
|
466 |
# Restore original LIBS settings... |
467 |
LIBS="$SAVELIBS" |
468 |
@@ -690,7 +646,7 @@ |
469 |
AM_CONDITIONAL([BUILD_PYTHON_WRAPPERS], [test x"$have_python" = "xyes"]) |
470 |
|
471 |
# check for swig itself |
472 |
-SWIG="" |
473 |
+SWIG="no" |
474 |
if test x"$with_swig" = "xyes"; then |
475 |
AC_MSG_NOTICE([Checking for SWIG]) |
476 |
|
477 |
@@ -807,12 +763,12 @@ |
478 |
Use gthread: ${have_gthread} |
479 |
|
480 |
Image I/O --------------------- |
481 |
- Use libjpeg: ${have_jpeg} |
482 |
- Use zlib: ${have_zlib} |
483 |
- Use libpng: ${have_png} |
484 |
- Use libtiff: ${have_tiff} |
485 |
- Use libjasper: ${have_jasper} |
486 |
- Use libIlmImf: ${have_ilmimf} |
487 |
+ Use libjpeg: ${enable_jpeg} |
488 |
+ Use zlib: ${enable_zlib} |
489 |
+ Use libpng: ${enable_png} |
490 |
+ Use libtiff: ${enable_tiff} |
491 |
+ Use libjasper: ${enable_jasper} |
492 |
+ Use libIlmImf: ${enable_openexr} |
493 |
|
494 |
Video I/O --------------------- |
495 |
Use QuickTime / Mac OS X: ${have_quicktime} |
496 |
@@ -828,6 +784,7 @@ |
497 |
|
498 |
Additional build settings ============================================ |
499 |
Build demo apps ${enable_apps} |
500 |
+ Install source snippets ${enable_samples} |
501 |
|
502 |
Now run make ... |
503 |
]) |
504 |
|
505 |
|
506 |
|
507 |
1.1 media-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch |
508 |
|
509 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch?rev=1.1&view=markup |
510 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-havepngexrdefs.patch?rev=1.1&content-type=text/plain |
511 |
|
512 |
Index: opencv-1.0.0-havepngexrdefs.patch |
513 |
=================================================================== |
514 |
diff -aur opencv-1.0.0-orig/otherlibs/highgui/Makefile.am opencv-1.0.0/otherlibs/highgui/Makefile.am |
515 |
--- opencv-1.0.0-orig/otherlibs/highgui/Makefile.am 2006-10-31 10:49:51.000000000 -0500 |
516 |
+++ opencv-1.0.0/otherlibs/highgui/Makefile.am 2008-06-07 10:15:18.000000000 -0400 |
517 |
@@ -4,8 +4,8 @@ |
518 |
cvcap_v4l.cpp cvcap_xine.cpp \ |
519 |
window_carbon.cpp window_gtk.cpp window_w32.cpp |
520 |
|
521 |
-INCLUDES = -I. -I$(top_srcdir)/cxcore/include \ |
522 |
- -I$(top_srcdir)/cv/include @GTHREAD_CFLAGS@ @GTK_CFLAGS@ \ |
523 |
+INCLUDES = -I. -I$(top_srcdir)/cxcore/include -I$(top_srcdir) \ |
524 |
+ -I$(top_srcdir)/cv/include -I/usr/include/OpenEXR @GTHREAD_CFLAGS@ @GTK_CFLAGS@ \ |
525 |
@QUICKTIME_CFLAGS@ @CARBON_CFLAGS@ |
526 |
|
527 |
noinst_HEADERS = \ |
528 |
diff -aur opencv-1.0.0-orig/otherlibs/highgui/grfmt_exr.cpp opencv-1.0.0/otherlibs/highgui/grfmt_exr.cpp |
529 |
--- opencv-1.0.0-orig/otherlibs/highgui/grfmt_exr.cpp 2006-10-17 07:58:55.000000000 -0400 |
530 |
+++ opencv-1.0.0/otherlibs/highgui/grfmt_exr.cpp 2008-06-07 10:12:42.000000000 -0400 |
531 |
@@ -40,6 +40,7 @@ |
532 |
//M*/ |
533 |
|
534 |
#include "_highgui.h" |
535 |
+#include "cvconfig.h" |
536 |
|
537 |
#ifdef HAVE_ILMIMF |
538 |
|
539 |
diff -aur opencv-1.0.0-orig/otherlibs/highgui/grfmt_png.cpp opencv-1.0.0/otherlibs/highgui/grfmt_png.cpp |
540 |
--- opencv-1.0.0-orig/otherlibs/highgui/grfmt_png.cpp 2006-10-11 12:51:43.000000000 -0400 |
541 |
+++ opencv-1.0.0/otherlibs/highgui/grfmt_png.cpp 2008-06-07 09:56:54.000000000 -0400 |
542 |
@@ -40,6 +40,7 @@ |
543 |
//M*/ |
544 |
|
545 |
#include "_highgui.h" |
546 |
+#include "cvconfig.h" |
547 |
|
548 |
#ifdef HAVE_PNG |
549 |
|
550 |
@@ -50,10 +51,10 @@ |
551 |
and png2bmp sample from libpng distribution (Copyright (C) 1999-2001 MIYASAKA Masaru) |
552 |
\****************************************************************************************/ |
553 |
|
554 |
-#if defined WIN32 || defined HAVE_PNG_H |
555 |
+#ifdef HAVE_PNG_H |
556 |
#include <png.h> |
557 |
#else |
558 |
-#include <libpng/png.h> |
559 |
+#include <libpng12/png.h> |
560 |
#endif |
561 |
#include "grfmt_png.h" |
562 |
|
563 |
|
564 |
|
565 |
|
566 |
1.1 media-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch |
567 |
|
568 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch?rev=1.1&view=markup |
569 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-fixpythonmultilib.patch?rev=1.1&content-type=text/plain |
570 |
|
571 |
Index: opencv-1.0.0-fixpythonmultilib.patch |
572 |
=================================================================== |
573 |
--- opencv-1.0.0-orig/interfaces/swig/python/Makefile.am 2006-08-10 09:29:20.000000000 -0400 |
574 |
+++ opencv-1.0.0/interfaces/swig/python/Makefile.am 2008-06-07 07:43:34.000000000 -0400 |
575 |
@@ -92,9 +92,9 @@ |
576 |
|
577 |
if BUILD_PYTHON_WRAPPERS |
578 |
|
579 |
-pkgpython_LTLIBRARIES = _cv.la _highgui.la |
580 |
+pkgpyexec_LTLIBRARIES = _cv.la _highgui.la |
581 |
|
582 |
-pkgpython_PYTHON = \ |
583 |
+pkgpyexec_PYTHON = \ |
584 |
__init__.py \ |
585 |
cv.py \ |
586 |
adaptors.py \ |
587 |
|
588 |
|
589 |
|
590 |
1.1 media-libs/opencv/files/opencv-1.0.0-enableuseflags.patch |
591 |
|
592 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-enableuseflags.patch?rev=1.1&view=markup |
593 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-enableuseflags.patch?rev=1.1&content-type=text/plain |
594 |
|
595 |
Index: opencv-1.0.0-enableuseflags.patch |
596 |
=================================================================== |
597 |
--- ../configure.in 2006-11-26 19:03:36.000000000 +0100 |
598 |
+++ configure.in 2006-11-26 19:13:23.000000000 +0100 |
599 |
@@ -81,13 +81,14 @@ |
600 |
AC_ARG_ENABLE([debug], |
601 |
[AS_HELP_STRING([--enable-debug],[build debug version without optimization])], |
602 |
[debug=$enableval], |
603 |
- [debug=no]) |
604 |
+ [debug="no"]) |
605 |
+AM_CONDITIONAL([ENABLE_DEBUG], [test x"$enable_debug" = x"yes"]) |
606 |
|
607 |
# does the user want to build demo applications? |
608 |
AC_ARG_ENABLE([apps], |
609 |
[AS_HELP_STRING([--enable-apps],[build demo applications])], |
610 |
[enable_apps=$enableval], |
611 |
- [enable_apps="yes"]) |
612 |
+ [enable_apps="no"]) |
613 |
AM_CONDITIONAL([BUILD_APPS], [test x"$enable_apps" = x"yes"]) |
614 |
|
615 |
|
616 |
@@ -101,55 +102,64 @@ |
617 |
AC_ARG_WITH([swig], |
618 |
[AS_HELP_STRING([--with-swig],[use swig wrapper generator])], |
619 |
[with_swig=$withval], |
620 |
- [with_swig=no]) |
621 |
+ [with_swig="no"]) |
622 |
+AM_CONDITIONAL([WITH_SWIG], [test x"$with_swig" = x"yes"]) |
623 |
|
624 |
# does the user want to compile python modules as well? |
625 |
AC_ARG_WITH([python], |
626 |
[AS_HELP_STRING([--with-python],[use python for wrapping])], |
627 |
[with_python=$withval], |
628 |
- [with_python=yes]) |
629 |
+ [with_python="no"]) |
630 |
+AM_CONDITIONAL([WITH_PYTHON], [test x"$with_python" = x"yes"]) |
631 |
|
632 |
# does the user want OpenCV to use xine video libraries? |
633 |
AC_ARG_WITH([xine], |
634 |
[AS_HELP_STRING([--with-xine],[use xine libraries (see LICENSE)])], |
635 |
[with_xine=$withval], |
636 |
- [with_xine=no]) |
637 |
+ [with_xine=i"no"]) |
638 |
+AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) |
639 |
|
640 |
# does the user want OpenCV to use ffmpeg video libraries? |
641 |
AC_ARG_WITH([ffmpeg], |
642 |
[AS_HELP_STRING([--with-ffmpeg],[use ffmpeg libraries (see LICENSE)])], |
643 |
[with_ffmpeg=$withval], |
644 |
[with_ffmpeg=auto]) |
645 |
+AM_CONDITIONAL([WITH_XINE], [test x"$with_xine" = x"yes"]) |
646 |
|
647 |
# does the user want OpenCV to use libraw1394/libdc1394 for video input? |
648 |
AC_ARG_WITH([1394libs], |
649 |
[AS_HELP_STRING([--with-1394libs],[use libraw1394/libdc1394])], |
650 |
[with_1394libs=$withval], |
651 |
- [with_1394libs=auto]) |
652 |
+ [with_1394libs="no"]) |
653 |
+AM_CONDITIONAL([WITH_1394LIBS], [test x"$with_1394libs" = x"yes"]) |
654 |
|
655 |
# does the user want OpenCV to use the video4linux kernel module? |
656 |
AC_ARG_WITH([v4l], |
657 |
[AS_HELP_STRING([--with-v4l],[use video4linux])], |
658 |
[with_v4l=$withval], |
659 |
- [with_v4l=auto]) |
660 |
+ [with_v4l="no"]) |
661 |
+AM_CONDITIONAL([WITH_V4L], [test x"$with_v4l" = x"yes"]) |
662 |
|
663 |
# does the user want OpenCV to use QuickTime video libraries? |
664 |
AC_ARG_WITH([quicktime], |
665 |
[AS_HELP_STRING([--with-quicktime],[use QuickTime libraries])], |
666 |
[with_quicktime=$withval], |
667 |
- [with_quicktime=yes]) |
668 |
+ [with_quicktime="no"]) |
669 |
+AM_CONDITIONAL([WITH_QUICKTIME], [test x"$with_quicktime" = x"yes"]) |
670 |
|
671 |
# does the user want OpenCV to use the Carbon GUI of Mac OS X? |
672 |
AC_ARG_WITH([carbon], |
673 |
[AS_HELP_STRING([--with-carbon],[use Carbon windows])], |
674 |
[with_carbon=$withval], |
675 |
- [with_carbon=yes]) |
676 |
+ [with_carbon="no"]) |
677 |
+AM_CONDITIONAL([WITH_CARBON], [test x"$with_carbon" = x"yes"]) |
678 |
|
679 |
# does the user want OpenCV to use GTK+ 2.0 for the GUI? |
680 |
AC_ARG_WITH([gtk], |
681 |
[AS_HELP_STRING([--with-gtk],[use gtk+ 2.0 windows])], |
682 |
[with_gtk=$withval], |
683 |
- [with_gtk=auto]) |
684 |
+ [with_gtk="no"]) |
685 |
+AM_CONDITIONAL([WITH_GTK], [test x"$with_gtk" = x"yes"]) |
686 |
|
687 |
|
688 |
###################################################################### |
689 |
@@ -187,7 +197,7 @@ |
690 |
AC_MSG_RESULT([yes]) |
691 |
if test x"$ac_cv_c_compiler_gnu" = "xyes"; then |
692 |
CPPFLAGS="-DDEBUG -D_DEBUG $CPPFLAGS" |
693 |
- CXXFLAGS="-ggdb -O0 $CXXFLAGS" |
694 |
+ CXXFLAGS="-ggdb -O0 -g $CXXFLAGS" |
695 |
fi |
696 |
else |
697 |
AC_MSG_RESULT([no]) |
698 |
@@ -202,7 +212,7 @@ |
699 |
i686-*-*) |
700 |
if test x"$ac_cv_c_compiler_gnu" = "xyes"; then |
701 |
# default to i686/pentiumpro -- people can override this |
702 |
- CXXFLAGS="-g -march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" |
703 |
+ CXXFLAGS="-march=i686 -ffast-math -fomit-frame-pointer $CXXFLAGS" |
704 |
fi |
705 |
;; |
706 |
powerpc-*-*) |
707 |
@@ -340,7 +350,7 @@ |
708 |
|
709 |
# if QuickTime is present, it will override everything else, |
710 |
# (unless '--without-quicktime' was given) |
711 |
-if test x"$with_quicktime" = "xyes"; then |
712 |
+if test x"$with_quicktime" = x"yes"; then |
713 |
|
714 |
# check other ./configure flags |
715 |
if test x"$with_ffmpeg" = "xyes"; then |
716 |
@@ -690,7 +700,7 @@ |
717 |
AM_CONDITIONAL([BUILD_PYTHON_WRAPPERS], [test x"$have_python" = "xyes"]) |
718 |
|
719 |
# check for swig itself |
720 |
-SWIG="" |
721 |
+SWIG="no" |
722 |
if test x"$with_swig" = "xyes"; then |
723 |
AC_MSG_NOTICE([Checking for SWIG]) |
724 |
|
725 |
@@ -821,6 +831,7 @@ |
726 |
Use dc1394 & raw1394: ${have_dc1394} |
727 |
Use v4l: ${have_v4l} |
728 |
Use v4l2: ${have_v4l2} |
729 |
+ Use gtk: ${have_gtk} |
730 |
|
731 |
Wrappers for other languages ========================================= |
732 |
SWIG ${SWIG} |
733 |
|
734 |
|
735 |
|
736 |
|
737 |
1.1 media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch |
738 |
|
739 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch?rev=1.1&view=markup |
740 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-addoptionalsamples.patch?rev=1.1&content-type=text/plain |
741 |
|
742 |
Index: opencv-1.0.0-addoptionalsamples.patch |
743 |
=================================================================== |
744 |
diff -aur opencv-1.0.0-orig/samples/c/Makefile.am opencv-1.0.0/samples/c/Makefile.am |
745 |
--- opencv-1.0.0-orig/samples/c/Makefile.am 2006-10-18 10:27:23.000000000 -0400 |
746 |
+++ opencv-1.0.0/samples/c/Makefile.am 2008-06-09 11:58:36.000000000 -0400 |
747 |
@@ -1,3 +1,5 @@ |
748 |
+if INSTALL_SAMPLES |
749 |
+ |
750 |
csamplesdir=$(pkgdatadir)/samples/c |
751 |
|
752 |
dist_csamples_DATA = airplane.jpg baboon.jpg lena.jpg fruits.jpg stuff.jpg \ |
753 |
@@ -10,4 +12,5 @@ |
754 |
inpaint.cpp laplace.c letter_recog.cpp lkdemo.c minarea.c morphology.c motempl.c \ |
755 |
mushroom.cpp pyramid_segmentation.c squares.c watershed.cpp |
756 |
|
757 |
+endif |
758 |
|
759 |
diff -aur opencv-1.0.0-orig/samples/python/Makefile.am opencv-1.0.0/samples/python/Makefile.am |
760 |
--- opencv-1.0.0-orig/samples/python/Makefile.am 2006-10-04 04:02:12.000000000 -0400 |
761 |
+++ opencv-1.0.0/samples/python/Makefile.am 2008-06-09 12:00:25.000000000 -0400 |
762 |
@@ -1,3 +1,5 @@ |
763 |
+if INSTALL_SAMPLES |
764 |
+if WITH_PYTHON |
765 |
csamplesdir=$(pkgdatadir)/samples/python |
766 |
|
767 |
dist_csamples_SCRIPTS = \ |
768 |
@@ -29,3 +31,6 @@ |
769 |
pyramid_segmentation.py \ |
770 |
squares.py \ |
771 |
watershed.py |
772 |
+ |
773 |
+endif |
774 |
+endif |
775 |
|
776 |
|
777 |
|
778 |
1.1 media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch |
779 |
|
780 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch?rev=1.1&view=markup |
781 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/opencv/files/opencv-1.0.0-cvcapffmpegundefinedsymbols.patch?rev=1.1&content-type=text/plain |
782 |
|
783 |
Index: opencv-1.0.0-cvcapffmpegundefinedsymbols.patch |
784 |
=================================================================== |
785 |
--- otherlibs/highgui/cvcap_ffmpeg.cpp 2006-07-24 18:27:39.000000000 -0400 |
786 |
+++ otherlibs/highgui/cvcap_ffmpeg.cpp 2008-06-12 12:25:42.000000000 -0400 |
787 |
@@ -41,9 +41,14 @@ |
788 |
|
789 |
#include "_highgui.h" |
790 |
|
791 |
+#define __STDC_CONSTANT_MACROS |
792 |
|
793 |
extern "C" { |
794 |
#include <ffmpeg/avformat.h> |
795 |
+#include <ffmpeg/avcodec.h> |
796 |
+#include <ffmpeg/swscale.h> |
797 |
+#include <sys/types.h> /* size_t */ |
798 |
+#include <sys/errno.h> |
799 |
} |
800 |
|
801 |
#ifdef NDEBUG |
802 |
@@ -52,6 +57,8 @@ |
803 |
#define CV_WARN(message) fprintf(stderr, "warning: %s (%s:%d)\n", message, __FILE__, __LINE__) |
804 |
#endif |
805 |
|
806 |
+static struct SwsContext *img_convert_ctx; |
807 |
+ |
808 |
typedef struct CvCaptureAVI_FFMPEG |
809 |
{ |
810 |
CvCaptureVTable * vtable; |
811 |
@@ -214,19 +221,21 @@ |
812 |
{ |
813 |
if( !capture || !capture->video_st || !capture->picture->data[0] ) |
814 |
return 0; |
815 |
-#if LIBAVFORMAT_BUILD > 4628 |
816 |
- img_convert( (AVPicture*)&capture->rgb_picture, PIX_FMT_BGR24, |
817 |
- (AVPicture*)capture->picture, |
818 |
- capture->video_st->codec->pix_fmt, |
819 |
- capture->video_st->codec->width, |
820 |
- capture->video_st->codec->height ); |
821 |
-#else |
822 |
- img_convert( (AVPicture*)&capture->rgb_picture, PIX_FMT_BGR24, |
823 |
- (AVPicture*)capture->picture, |
824 |
- capture->video_st->codec.pix_fmt, |
825 |
- capture->video_st->codec.width, |
826 |
- capture->video_st->codec.height ); |
827 |
-#endif |
828 |
+ |
829 |
+ img_convert_ctx = sws_getContext(capture->video_st->codec->width, |
830 |
+ capture->video_st->codec->height, |
831 |
+ capture->video_st->codec->pix_fmt, |
832 |
+ capture->video_st->codec->width, |
833 |
+ capture->video_st->codec->height, |
834 |
+ PIX_FMT_BGR24, |
835 |
+ SWS_BICUBIC, |
836 |
+ NULL, NULL, NULL); |
837 |
+ |
838 |
+ sws_scale(img_convert_ctx, capture->picture->data, |
839 |
+ capture->picture->linesize, 0, |
840 |
+ capture->video_st->codec->height, |
841 |
+ capture->rgb_picture.data, capture->rgb_picture.linesize); |
842 |
+ |
843 |
return &capture->frame; |
844 |
} |
845 |
|
846 |
@@ -713,9 +722,20 @@ |
847 |
PIX_FMT_BGR24, image->width, image->height); |
848 |
|
849 |
// convert to the color format needed by the codec |
850 |
- if( img_convert((AVPicture *)mywriter->picture, c->pix_fmt, |
851 |
- (AVPicture *)mywriter->rgb_picture, PIX_FMT_BGR24, |
852 |
- image->width, image->height) < 0){ |
853 |
+ img_convert_ctx = sws_getContext(image->width, |
854 |
+ image->height, |
855 |
+ PIX_FMT_BGR24, |
856 |
+ c->width, |
857 |
+ c->height, |
858 |
+ c->pix_fmt, |
859 |
+ SWS_BICUBIC, |
860 |
+ NULL, NULL, NULL); |
861 |
+ |
862 |
+ if ( sws_scale(img_convert_ctx, mywriter->rgb_picture->data, |
863 |
+ mywriter->rgb_picture->linesize, 0, |
864 |
+ image->height, |
865 |
+ mywriter->picture->data, mywriter->picture->linesize) < 0 ) |
866 |
+ { |
867 |
CV_ERROR(CV_StsUnsupportedFormat, "FFMPEG::img_convert pixel format conversion from BGR24 not handled"); |
868 |
} |
869 |
} |
870 |
|
871 |
|
872 |
|
873 |
-- |
874 |
gentoo-commits@l.g.o mailing list |