diff options
author | Daniel Pielmeier <billie@gentoo.org> | 2011-05-30 17:09:21 +0000 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2011-05-30 17:09:21 +0000 |
commit | 44c0445ced02ba7183b325a26b98fa0beecd8cab (patch) | |
tree | 96c4877e1fb48e76ff855739155a55a13544d11c /media-video/mjpegtools | |
parent | Install backend with correct permissions, bug #365875 (diff) | |
download | historical-44c0445ced02ba7183b325a26b98fa0beecd8cab.tar.gz historical-44c0445ced02ba7183b325a26b98fa0beecd8cab.tar.bz2 historical-44c0445ced02ba7183b325a26b98fa0beecd8cab.zip |
Check for linux-headers instead of the current kernel version. Thanks to Jory A. Pratt by mail. Remove old.
Package-Manager: portage-2.1.9.42/cvs/Linux i686
Diffstat (limited to 'media-video/mjpegtools')
9 files changed, 26 insertions, 765 deletions
diff --git a/media-video/mjpegtools/ChangeLog b/media-video/mjpegtools/ChangeLog index ba297b6b665e..fb73c016e200 100644 --- a/media-video/mjpegtools/ChangeLog +++ b/media-video/mjpegtools/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for media-video/mjpegtools # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/ChangeLog,v 1.154 2011/05/23 20:58:40 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/ChangeLog,v 1.155 2011/05/30 17:09:21 billie Exp $ + + 30 May 2011; Daniel Pielmeier <billie@gentoo.org> + -mjpegtools-2.0.0_rc1.ebuild, mjpegtools-2.0.0.ebuild, + -files/mjpegtools-2.0.0_rc1-X11.patch, + -files/mjpegtools-2.0.0_rc1-amd-k8.patch, + -files/mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch, + -files/mjpegtools-2.0.0_rc1-libpng-1.5.patch, + -files/mjpegtools-2.0.0_rc1-v4l-automagic.patch: + Check for linux-headers instead of the current kernel version. Thanks to Jory + A. Pratt by mail. Remove old. *mjpegtools-2.0.0 (23 May 2011) diff --git a/media-video/mjpegtools/Manifest b/media-video/mjpegtools/Manifest index 91e3a0004ca7..18ed56ff897e 100644 --- a/media-video/mjpegtools/Manifest +++ b/media-video/mjpegtools/Manifest @@ -1,15 +1,18 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX mjpegtools-1.9.0-glibc-2.10.patch 429 RMD160 ef7f706aeda7ebfa04dbd43b70a5e3e6faf24610 SHA1 3029f0e835e693b144298ed9f8143c9566be26f3 SHA256 0a76b418df4daa1603c827001ede6a1b3da4457b5d3aefeda0a656cd88ad446b AUX mjpegtools-1.9.0-jpeg-7.patch 774 RMD160 22c50dd28617159eaa89aefb4647e21d4d9972e7 SHA1 2bdb1b3b8591cede11d4a133a758e8ead35db4dd SHA256 2c9b90a283e8e6d95bd9573cd16310107c654d0d701a7dff7e47ee1a773da7cf -AUX mjpegtools-2.0.0_rc1-X11.patch 867 RMD160 453443cdcd2a2a1a657401a9719240e3ec5b948e SHA1 affdc0643d80ba7ba192e58e572b55e058d37aea SHA256 ec7ada2cbde2a2ef4ad401e8e8cf57b8bc547b0fd4d40f90a2cec4cb52e154a0 -AUX mjpegtools-2.0.0_rc1-amd-k8.patch 444 RMD160 d63d41180ef1f3920bcb8185e9f64e43dc225eb0 SHA1 d307fc06b092ed534c3a09fd6f1c12d7b022239d SHA256 b48bf19e8d94a3e82c571298c43384791aabc9e482129ae4f23e2755e1ff04e9 -AUX mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch 2774 RMD160 bbf1ccb2505090bbab07b5f815435c4957af8250 SHA1 1b0f2fe6a1b6f7147244fc951af9ad2a42083a82 SHA256 75ad8055a7769f9e9b643481a21a2dbb4517b0a16521aaa0a8084efc6fc4a1a9 -AUX mjpegtools-2.0.0_rc1-libpng-1.5.patch 17209 RMD160 3a373ae1134cfc609a4a981dfec2e84ebd1f12cb SHA1 c7b3ac68d4171b7331f9feeac31e351cf8a9121a SHA256 4173cf6701f542dd00ef362916a46f3bfa656478d246484eb6da63e158210801 -AUX mjpegtools-2.0.0_rc1-v4l-automagic.patch 1116 RMD160 545b449956840edb487399eca31e02627681b81d SHA1 ce5005328b4b14f083757fc0c837ddd58690eeed SHA256 cee64c74ff2ffd27325843fc8660b0c28e1d7d4d4cffba1112fd31450529aefe DIST mjpegtools-1.9.0.tar.gz 1718063 RMD160 79e0eb4bce468bb8f12da336e29abe8fab390a5f SHA1 1701233354c7ea86b5b7808c4dd5d03a71118e48 SHA256 a9322aaab1e0835fbaa00fc10e58e885833454fa0ad6f57c60c89a78f7ed1711 DIST mjpegtools-2.0.0.tar.gz 1749671 RMD160 454e23bedb2bd592912a546d0621b5c3662c3bb2 SHA1 f411e8573d446711dbe8455a6ae9257e1afe1e70 SHA256 bf3541593e71602f7b440c2e7d81b433f53d0511e74642f35bea9b3feded7a97 -DIST mjpegtools-2.0.0rc1.tar.gz 3110286 RMD160 42d14ec10cb14453d471ababea598eade5033d40 SHA1 5d6a82baa166f12e89ea6dd82e31d62dde6c95c9 SHA256 fe2d59fd56631f077859c6b38c5027e38fc641b40ada3ddf39d85b924887b1ff EBUILD mjpegtools-1.9.0-r1.ebuild 2078 RMD160 d288a60f43f79ea5298fd860bd4e0e988c48478f SHA1 07fbcca44b05d371e7619f40b59a2ea8705e31f6 SHA256 7d303fea4b4eb8c278e07c0e1662dd9860e4b9ef5836322d5bc8d76112b947f7 -EBUILD mjpegtools-2.0.0.ebuild 1906 RMD160 9ebeb557669843cf00aa22a8cab187270499ad6e SHA1 58d94161a7593acfb6a8793e50dd73ac396b4575 SHA256 c68d0c38b567d064217049e8eefe59c18607c9afc74716b050fe7fd45e656297 -EBUILD mjpegtools-2.0.0_rc1.ebuild 2150 RMD160 df81e253a69c232bdabed2eae16a3ee258003db9 SHA1 04767fe54b587791c03a995eb84de9e701119f94 SHA256 825d20a0a45e698e15638204e56858c77fd2f6b1d537a006acc22b136c642283 -MISC ChangeLog 27688 RMD160 766a8b3a788f1a0968a6da1ef06896a0b1463336 SHA1 256aad19570404f75b2b2678f165d86d3cdba7e4 SHA256 1c92b44565cb133d0b0cfea822fd0e730a8502f0f8abe5bf52bba60ee12632eb +EBUILD mjpegtools-2.0.0.ebuild 1923 RMD160 584095be8a0e4ccde0127f914f6ce80b6fbc8230 SHA1 a4abeee72b0099e28fd2f51264db248ea816bd5a SHA256 f757c0820fcd8235dc69ff06537bc89bb7aa97bb023534066c00968dea1caeba +MISC ChangeLog 28153 RMD160 d8c7e467d73882871828a4938f6de0a383c22e8f SHA1 a29236a62b1c192c9a5eb840211d6b51e9aa28d7 SHA256 294a7f8e41c47ccaade98e3cd8fd7a832531e841e17aebdb5a3dd31bb84cdb84 MISC metadata.xml 363 RMD160 10615c49fe0655333db0f939b2e38c6efd1f887d SHA1 496986a1272e3b16da7360f18327621bd2e532d5 SHA256 51be248768e67ad5fe862f97bfa1b3010ceb85d8ddc08c434ebacc21ee4156a0 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iEYEARECAAYFAk3jz2cACgkQlcuUeyFa0U0bMgCfR1yUWJpCigkDxiaBomYZPnM3 +wOMAoL3JQD6hGiPRgXlFYK9jFs7h/CL+ +=WL6L +-----END PGP SIGNATURE----- diff --git a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-X11.patch b/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-X11.patch deleted file mode 100644 index b8f87fd87635..000000000000 --- a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-X11.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- configure.ac 2011/04/30 16:00:36 1.67 -+++ configure.ac 2011/05/03 17:43:06 1.68 -@@ -277,7 +277,7 @@ - have_dga="true" - AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]), - have_dga="false", -- $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) -+ $X_LIBS $X_PRE_LIBS -lXext $X_EXTRA_LIBS) - fi - AM_CONDITIONAL(HAVE_LIBXXF86DGA, test x$have_dga = xtrue) - ---- lavtools/Makefile.am 2010/03/07 11:42:13 1.122 -+++ lavtools/Makefile.am 2011/05/03 17:50:28 1.123 -@@ -59,7 +59,10 @@ - liblavplay_la_LDFLAGS = $(LAV_ALL_LIB_OPTS) - liblavplay_la_LIBADD = liblavfile.la $(SDL_LIBS) liblavjpeg.la $(LIBDV_LIBS) $(LIBMJPEGUTILS) - if HAVE_V4L -- liblavplay_la_LIBADD += ${X_LIBS} -lX11 -+ liblavplay_la_LIBADD += ${X_LIBS} -+endif -+if HAVE_SDL -+ liblavplay_la_LIBADD += -lX11 - endif - liblavplay_la_DEPENDENCIES = liblavfile.la liblavjpeg.la - diff --git a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-amd-k8.patch b/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-amd-k8.patch deleted file mode 100644 index a1a0702ab39b..000000000000 --- a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-amd-k8.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- yuvdenoise/main.c 2010/10/16 05:28:30 1.72 -+++ yuvdenoise/main.c 2011/02/13 10:46:02 1.73 -@@ -810,8 +810,8 @@ - /* 4 to 5 times faster */ - void filter_plane_median_sse2(uint8_t *plane, int w, int h, int level) { - int i; -- /* int avg; should not be needed any more */ -- /* int cnt; should not be needed any more */ -+ int avg; /*should not be needed any more */ -+ int cnt; /* should not be needed any more */ - uint8_t * p; - uint8_t * d; - diff --git a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch b/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch deleted file mode 100644 index 0bf7d621b862..000000000000 --- a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-dga-gtk-sdl-automagic.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- configure.ac 2011/04/30 15:39:10 1.66 -+++ configure.ac 2011/04/30 16:00:36 1.67 -@@ -55,6 +55,15 @@ - AC_ARG_WITH(libpng, - AC_HELP_STRING([--without-libpng], [Do not use libpng.]), - [], [with_libpng=yes]) -+AC_ARG_WITH(dga, -+ AC_HELP_STRING([--without-dga], [Do not use dga.]), -+ [], [with_dga=yes]) -+AC_ARG_WITH(gtk, -+ AC_HELP_STRING([--without-gtk], [Do not use gtk.]), -+ [], [with_gtk=yes]) -+AC_ARG_WITH(libsdl, -+ AC_HELP_STRING([--without-libsdl], [Do not use libsdl.]), -+ [], [with_libsdl=yes]) - AC_GNU_SOURCE - - dnl Initialize libtool -@@ -260,29 +269,42 @@ - dnl ******************************************************************** - dnl Check for DGA (for v4l-conf) - dnl ******************************************************************** --AC_SUBST(V4LCONF_LIBS) --AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, -- V4LCONF_LIBS="$X_LIBS -lXxf86dga" -- AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]),, -- $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) -+have_dga=false -+if test x$with_dga != xno ; then -+ AC_SUBST(V4LCONF_LIBS) -+ AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, -+ V4LCONF_LIBS="$X_LIBS -lXxf86dga" -+ have_dga="true" -+ AC_DEFINE(HAVE_LIBXXF86DGA,1, [libxf86dga is present]), -+ have_dga="false", -+ $X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS) -+fi -+AM_CONDITIONAL(HAVE_LIBXXF86DGA, test x$have_dga = xtrue) - - dnl ******************************************************************** - dnl Check for Gtk+/glib (for glav). 2.4.0 or greater required (should - dnl not be a problem on recent distributions). - dnl (defines GTK_CFLAGS and GTK_LIBS) - dnl ******************************************************************** --PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], have_gtk="true", have_gtk="false") -+have_gtk=false -+if test x$with_gtk != xno ; then -+ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.4.0], -+ have_gtk="true", have_gtk="false") -+fi - AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xtrue) - - dnl ******************************************************************** - dnl Check for the SDL library (for software playback) - dnl (defines SDL_CFLAGS and SDL_LIBS) - dnl ******************************************************************** --AM_PATH_SDL(1.1.3, -- [have_sdl=true -- AC_DEFINE(HAVE_SDL, 1, [SDL library present]) ], -- [have_sdl=false]) --AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = xtrue) -+have_sdl=false -+if test x$with_libsdl != xno ; then -+ PKG_CHECK_MODULES(SDL, [sdl > 1.1.3], -+ [have_sdl=true -+ AC_DEFINE(HAVE_SDL, 1, [libsdl > 1.1.3 present])], -+ [have_sdl=false]) -+fi -+AM_CONDITIONAL(HAVE_SDL, test x$have_sdl = xtrue) - - dnl *** - dnl Check for SDL_gfx which is used by y4mhist to display a graphical diff --git a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-libpng-1.5.patch b/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-libpng-1.5.patch deleted file mode 100644 index b2902ecc5d14..000000000000 --- a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-libpng-1.5.patch +++ /dev/null @@ -1,530 +0,0 @@ ---- lavtools/png2yuv.c 2009/05/16 04:06:47 1.10 -+++ lavtools/png2yuv.c 2011/02/12 09:20:29 1.11 -@@ -33,6 +33,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <unistd.h> -+#include <limits.h> - - #include <string.h> - #include <errno.h> -@@ -49,12 +50,9 @@ - - #include "subsample.h" - #include "colorspace.h" --//#include "mplexconsts.hh" - - #define DEFAULT_CHROMA_MODE Y4M_CHROMA_420JPEG - --#define MAXPIXELS (2800*1152) /**< Maximum size of final image */ -- - typedef struct _parameters - { - char *pngformatstr; -@@ -70,14 +68,10 @@ - int ss_mode; /**< subsampling mode (based on ssm_id from subsample.h) */ - - int new_width; /// new MPEG2 width, in case the original one is uneven -+ int new_height; /// new MPEG2 width, in case the original one is uneven - } parameters_t; - - --struct _parameters *sh_param; --png_structp png_ptr; --png_infop info_ptr, end_info; --uint8_t *raw0, *raw1, *raw2; /* buffer for RGB first, and then Y/Cb/Cr planes of decoded PNG */ -- - /* - * The User Interface parts - */ -@@ -152,8 +146,6 @@ - param->interleave = -1; - param->verbose = 1; - param->ss_mode = DEFAULT_CHROMA_MODE; -- //param->mza_filename = NULL; -- //param->make_z_alpha = 0; - - /* parse options */ - for (;;) { -@@ -240,93 +232,43 @@ - } - } - --void png_separation(png_structp png_ptr, png_row_infop row_info, png_bytep data) --{ -- int row_nr = png_ptr->row_number; // internal variable ? -- int i, width = row_info->width; -- int new_width = sh_param->new_width; -- -- /* contents of row_info: -- * png_uint_32 width width of row -- * png_uint_32 rowbytes number of bytes in row -- * png_byte color_type color type of pixels -- * png_byte bit_depth bit depth of samples -- * png_byte channels number of channels (1-4) -- * png_byte pixel_depth bits per pixel (depth*channels) -- */ -- -- //mjpeg_debug("PNG YUV transformation callback; color_type is %d row_number %d\n", -- // row_info->color_type, row_nr); -- -- if(row_info->color_type == PNG_COLOR_TYPE_GRAY) // only Z available -- { -- //mjpeg_debug("Grayscale to YUV, row %d", row_nr); -- for (i = 0; i < width; i++) -- { -- raw0[i + row_nr * new_width] = data[i]; -- raw1[i + row_nr * new_width] = data[i]; -- raw2[i + row_nr * new_width] = data[i]; -- } -- return; -- } -- -- if(row_info->color_type == PNG_COLOR_TYPE_RGB) // Z and Alpha available -- { -- //mjpeg_info("RGB to YUV, row %d", row_nr); -- for (i = 0; i < width; i++) -- { -- raw0[i + row_nr * new_width] = data[i*3]; -- raw1[i + row_nr * new_width] = data[i*3 + 1]; -- raw2[i + row_nr * new_width] = data[i*3 + 2]; -- } -- return; -- } -- -- mjpeg_error_exit1("mpegz: UNKNOWN COLOR FORMAT %d in PNG transformation !\n", row_info->color_type); --} -- - - /* - * The file handling parts - */ - /** - Reads one PNG file. --@param process Process the image data (0 for initial parameter determination) -+@param process Process the image data (NULL for initial parameter determination) - @returns -1 on failure, 1 on sucess -+@on success returns RGB data in the second, yuv, parameter - */ --int decode_png(const char *pngname, int process, parameters_t *param) -+int decode_png(const char *pngname, uint8_t *yuv[], parameters_t *param) - { -- int num_pass = 1; -- int bit_depth, color_type; -+ png_structp png_ptr; -+ png_infop info_ptr; - FILE *pngfile; -- //png_byte hdptr[8]; -- -- /* Now open this PNG file, and examine its header to retrieve the -- YUV4MPEG info that shall be written */ -- pngfile = fopen(pngname, "rb"); -- if (!pngfile) -- { -- perror("PNG file open failed:"); -- return -1; -- } - -- //fread(hdptr, 1, 8, pngfile); -+ /* libpng needs two structs - a png_struct and a png_info, there is no -+ * need to make the third, another png_info, because that is only used -+ * to store data (such as textual information) that can come after the -+ * PNG image. This code only cares about the image. -+ */ -+ info_ptr = NULL; -+ pngfile = NULL; -+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); -+ if (!png_ptr) -+ mjpeg_error_exit1("%s: Could not allocate PNG read struct !", pngname); - --#if 0 -- bool is_png = !png_sig_cmp(hdptr, 0, 8); -- if (!is_png) -+ /* This needs to be done immediately after creation of the png_struct -+ * because storage allocation failures will longjmp back to here: -+ */ -+ if (setjmp(png_jmpbuf(png_ptr))) - { -- mjpeg_error("%s is _no_ PNG file !\n"); -+ png_destroy_read_struct(&png_ptr, &info_ptr, 0); -+ if (pngfile) (void)fclose(pngfile); -+ mjpeg_error("%s: Corrupted PNG file !", pngname); - return -1; - } --#endif -- -- png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); -- if (!png_ptr) -- mjpeg_error_exit1("%s: Could not allocate PNG read struct !", pngname); -- -- png_init_io(png_ptr, pngfile); -- //png_set_sig_bytes(png_ptr, 8); - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) -@@ -336,79 +278,104 @@ - mjpeg_error_exit1("%s: Could not allocate PNG info struct !", pngname); - } - -- end_info = png_create_info_struct(png_ptr); -- if (!end_info) -+/* Now open this PNG file, and examine its header to retrieve the -+ * YUV4MPEG info that shall be written */ -+ pngfile = fopen(pngname, "rb"); -+ if (!pngfile) - { -- png_destroy_read_struct(&png_ptr, &info_ptr, -- (png_infopp)NULL); -- mjpeg_error_exit1("%s: Could not allocate PNG end info struct !", pngname); -+ perror(pngname); -+ png_error(png_ptr, "PNG file open failed"); - } -- -- if (setjmp(png_jmpbuf(png_ptr))) -+ -+ png_init_io(png_ptr, pngfile); -+ -+ if (yuv) - { -- png_destroy_read_struct(&png_ptr, &info_ptr, -- &end_info); -- mjpeg_error("%s: Corrupted PNG file !", pngname); -- return -1; -+ png_uint_32 nr, input_height, input_width, output_height, output_width; -+ uint8_t *r, *g, *b; -+ png_bytepp rows; -+ -+ /* The code uses png_read_png to obtain a complete buffered copy of the -+ * PNG file reduced (or expanded) to 8 bit RGB. This is a little wasteful -+ * in the case of a non-interlaced image - the code could work row by -+ * row without buffering the whole image - but the interlaced case is -+ * almost impossible to handle this way so it is better to be simple and -+ * correct. -+ */ -+# if PNG_LIBPNG_VER >= 10500 && PNG_LIBPNG_VER < 10502 -+ /* There is a bug in 1.5 before 1.5.2 which causes png_read_png to -+ * whine most terribly on interlaced images, this stops it: -+ */ -+ (void)png_set_interlace_handling(png_ptr); -+# endif -+ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 | -+ PNG_TRANSFORM_STRIP_ALPHA | PNG_TRANSFORM_EXPAND | -+ PNG_TRANSFORM_GRAY_TO_RGB /* requires libpng 1.4 or later */, 0); -+ -+ /* And return the separated data to the parameters. */ -+ rows = png_get_rows(png_ptr, info_ptr); -+ -+ /* Since the PNG files for the frames are separate the actual PNG file -+ * that was read could be unrelated - a random width and height. Because -+ * the output may be interleaved the output height may be twice the input -+ * PNG height. Because the MPEG code requires an even width the output -+ * width may be one more than the original frame width. -+ * -+ * For the interleaving the PNG data is smashed into the lower half of -+ * the yuv rows. For the other cases the input data is cropped or -+ * top-lefted as appropriate. -+ */ -+ output_height = param->new_height; -+ -+ input_height = png_get_image_height(png_ptr, info_ptr); -+ if (input_height > output_height) -+ input_height = output_height; -+ -+ output_width = param->new_width; -+ -+ input_width = png_get_image_width(png_ptr, info_ptr); -+ if (input_width > output_width) -+ input_width = output_width; -+ -+ /* Breaking up the RGB data is not hard to do, the separated channels are -+ * simply packed into the three raw yuv arrays with new_width values per -+ * row. -+ */ -+ r = yuv[0]; -+ g = yuv[1]; -+ b = yuv[2]; -+ for (nr=0; nr<input_height; ++nr) -+ { -+ png_uint_32 nc; -+ png_bytep row = *rows++; -+ -+ for (nc=0; nc<input_width; ++nc) -+ { -+ *r++ = *row++; -+ *g++ = *row++; -+ *b++ = *row++; -+ } -+ -+ /* Pad the output: */ -+ for (; nc<output_width; ++nc) -+ *r++ = *g++ = *b++ = 0; -+ } - } - -- if (process) -- png_set_read_user_transform_fn(png_ptr, png_separation); -- png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_STRIP_ALPHA, NULL); -- -- if (png_get_IHDR(png_ptr, info_ptr, ¶m->width, ¶m->height, &bit_depth, -- // &color_type, &interlace_type, &compression_type, &filter_type)) -- &color_type, NULL, NULL, NULL)) -- num_pass = png_set_interlace_handling(png_ptr); -- else -- mjpeg_error_exit1("PNG header reading failed !!\n"); --#if 0 -- mjpeg_info("Reading info struct...\n"); -- png_read_info(png_ptr, info_ptr); -- mjpeg_info("Done...\n"); -- -- if (png_get_IHDR(png_ptr, info_ptr, ¶m->width, ¶m->height, &bit_depth, -- // &color_type, &interlace_type, &compression_type, &filter_type)) -- &color_type, NULL, NULL, NULL)) -- num_pass = png_set_interlace_handling(png_ptr); - else -- mjpeg_error_exit1("PNG header reading failed !!\n"); -- -- if (process) - { -- printf("%d passes needed\n\n", num_pass); -- -- if (bit_depth != 8 && bit_depth != 16) -- { -- mjpeg_error_exit1("Invalid bit_depth %d, only 8 and 16 bit allowed !!\n", bit_depth); -- } -- -- png_set_strip_16(png_ptr); // always has to strip the 16bit input, MPEG can't handle it -- png_set_strip_alpha(png_ptr); // Alpha can't be processed until Z/Alpha is integrated -- -- printf("\nAllocating row buffer..."); -- png_set_read_user_transform_fn(png_ptr, png_separation); -- png_bytep row_buf = (png_bytep)png_malloc(png_ptr, -- png_get_rowbytes(png_ptr, info_ptr)); -- -- for (int n=0; n < num_pass; n++) -- for (int y=0; y < sh_param->height; y++) -- { -- printf("Writing row data for pass %d\n", n); -- png_read_rows(png_ptr, (png_bytepp)&row_buf, NULL, 1); -- } -- -- png_free(png_ptr, row_buf); -- } -- png_read_end(png_ptr, info_ptr); --#endif -- if (setjmp(png_ptr->jmpbuf)) { -- png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); -- return 2; -+ /* Just return the image width and height in *param */ -+ png_read_info(png_ptr, info_ptr); -+ -+ param->width = png_get_image_width(png_ptr, info_ptr); -+ param->height = png_get_image_height(png_ptr, info_ptr); -+ - } - -+/* Successful exit: */ -+ png_destroy_read_struct(&png_ptr, &info_ptr, 0); -+ - fclose(pngfile); -- png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); - return 1; - } - -@@ -419,13 +386,17 @@ - */ - static int init_parse_files(parameters_t *param) - { -- char pngname[255]; -+ char pngname[PATH_MAX+1]; /* See POSIX 1003.1 section 2.9.5 */ - - snprintf(pngname, sizeof(pngname), - param->pngformatstr, param->begin); - mjpeg_debug("Analyzing %s to get the right pic params", pngname); - -- if (decode_png(pngname, 0, param) == -1) -+ /* The first frame (the param->begin frame) determines the height and -+ * width of the output. Passing NULL instead of yuv (see below) causes -+ * decode_png to fill in param with the image dimensions. -+ */ -+ if (decode_png(pngname, NULL, param) == -1) - mjpeg_error_exit1("Reading of %s failed.\n", pngname); - - mjpeg_info("Image dimensions are %ux%u", -@@ -455,6 +426,7 @@ - - if (!(param->interleave) && (param->interlace != Y4M_ILACE_NONE)) - { -+ /* So the height in 'param' might be twice the PNG input height:*/ - param->height *= 2; - mjpeg_info("Non-interleaved fields (image height doubled)"); - } -@@ -466,33 +438,29 @@ - static int generate_YUV4MPEG(parameters_t *param) - { - uint32_t frame; -- //size_t pngsize; -- char pngname[FILENAME_MAX]; -- uint8_t *yuv[3]; /* buffer for Y/U/V planes of decoded PNG */ -+ uint8_t *yuv[3]; /* Buffers, initially for R,G,B then Y,Cb,Cr */ - y4m_stream_info_t streaminfo; - y4m_frame_info_t frameinfo; - -- if ((param->width % 2) == 0) -- param->new_width = param->width; -- else -- { -- param->new_width = ((param->width >> 1) + 1) << 1; -- printf("Setting new, even image width %d", param->new_width); -- } -+ /* Make the output even, so the output may be one larger than the -+ * original PNG image width. -+ */ -+ param->new_width = param->width + (param->width & 1); -+ param->new_height = param->height + (param->height & 1); - - mjpeg_info("Now generating YUV4MPEG stream."); - y4m_init_stream_info(&streaminfo); - y4m_init_frame_info(&frameinfo); - - y4m_si_set_width(&streaminfo, param->new_width); -- y4m_si_set_height(&streaminfo, param->height); -+ y4m_si_set_height(&streaminfo, param->new_height); - y4m_si_set_interlace(&streaminfo, param->interlace); - y4m_si_set_framerate(&streaminfo, param->framerate); - y4m_si_set_chroma(&streaminfo, param->ss_mode); - -- yuv[0] = (uint8_t *)malloc(param->new_width * param->height * sizeof(yuv[0][0])); -- yuv[1] = (uint8_t *)malloc(param->new_width * param->height * sizeof(yuv[1][0])); -- yuv[2] = (uint8_t *)malloc(param->new_width * param->height * sizeof(yuv[2][0])); -+ yuv[0] = (uint8_t *)malloc(param->new_width * param->new_height * sizeof(yuv[0][0])); -+ yuv[1] = (uint8_t *)malloc(param->new_width * param->new_height * sizeof(yuv[1][0])); -+ yuv[2] = (uint8_t *)malloc(param->new_width * param->new_height * sizeof(yuv[2][0])); - - y4m_write_stream_header(STDOUT_FILENO, &streaminfo); - -@@ -500,15 +468,13 @@ - (frame < param->numframes + param->begin) || (param->numframes == -1); - frame++) - { -- // if (frame < 25) -- // else -- //snprintf(pngname, sizeof(pngname), param->pngformatstr, frame - 25); -+ char pngname[PATH_MAX+1]; - snprintf(pngname, sizeof(pngname), param->pngformatstr, frame); - -- raw0 = yuv[0]; -- raw1 = yuv[1]; -- raw2 = yuv[2]; -- if (decode_png(pngname, 1, param) == -1) -+ /* decode_png reads the PNG into the yuv buffers as r,g,b [0..255] -+ * values. -+ */ -+ if (decode_png(pngname, yuv, param) == -1) - { - mjpeg_info("Read from '%s' failed: %s", pngname, strerror(errno)); - if (param->numframes == -1) -@@ -523,79 +489,18 @@ - } - else - { --#if 0 -- mjpeg_debug("Preparing frame"); -- -- /* Now open this PNG file, and examine its header to retrieve the -- YUV4MPEG info that shall be written */ -- -- if ((param->interlace == Y4M_ILACE_NONE) || (param->interleave == 1)) -- { -- mjpeg_info("Processing non-interlaced/interleaved %s.", -- pngname, pngsize); -- -- decode_png(imagedata, 0, 420, yuv[0], yuv[1], yuv[2], -- param->width, param->height, param->new_width); -- --#if 0 -- if (param->make_z_alpha) -- { -- mjpeg_info("Writing Z/Alpha data.\n"); -- za_write(real_z_imagemap, param->width, param->height,z_alpha_fp,frame); -- } --#endif -- } -- else -- { -- mjpeg_error_exit1("Can't handle interlaced PNG information (yet) since there is no standard for it.\n" -- "Use interleaved mode (-L option) to create interlaced material."); -- -- switch (param->interlace) -- { -- case Y4M_ILACE_TOP_FIRST: -- mjpeg_info("Processing interlaced, top-first %s", pngname); --#if 0 -- decode_jpeg_raw(jpegdata, jpegsize, -- Y4M_ILACE_TOP_FIRST, -- 420, param->width, param->height, -- yuv[0], yuv[1], yuv[2]); --#endif -- break; -- case Y4M_ILACE_BOTTOM_FIRST: -- mjpeg_info("Processing interlaced, bottom-first %s", pngname); --#if 0 -- decode_jpeg_raw(jpegdata, jpegsize, -- Y4M_ILACE_BOTTOM_FIRST, -- 420, param->width, param->height, -- yuv[0], yuv[1], yuv[2]); --#endif -- break; -- default: -- mjpeg_error_exit1("FATAL logic error?!?"); -- break; -- } -- } --#endif - mjpeg_debug("Converting frame to YUV format."); - /* Transform colorspace, then subsample (in place) */ -- convert_RGB_to_YCbCr(yuv, param->height * param->new_width); -- chroma_subsample(param->ss_mode, yuv, param->new_width, param->height); -+ convert_RGB_to_YCbCr(yuv, param->new_height * param->new_width); -+ chroma_subsample(param->ss_mode, yuv, param->new_width, param->new_height); - - mjpeg_debug("Frame decoded, now writing to output stream."); - } -- -+ - mjpeg_debug("Frame decoded, now writing to output stream."); - y4m_write_frame(STDOUT_FILENO, &streaminfo, &frameinfo, yuv); - } - --#if 0 -- if (param->make_z_alpha) -- { -- za_write_end(z_alpha_fp); -- fclose(z_alpha_fp); -- } --#endif -- - y4m_fini_stream_info(&streaminfo); - y4m_fini_frame_info(&frameinfo); - free(yuv[0]); -@@ -614,7 +519,6 @@ - int main(int argc, char ** argv) - { - parameters_t param; -- sh_param = ¶m; - - y4m_accept_extensions(1); - -@@ -632,13 +536,3 @@ - - return 0; - } -- -- -- -- -- -- -- -- -- -- diff --git a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-v4l-automagic.patch b/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-v4l-automagic.patch deleted file mode 100644 index 1dd8a2f5a598..000000000000 --- a/media-video/mjpegtools/files/mjpegtools-2.0.0_rc1-v4l-automagic.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- configure.ac 2011-04-30 17:59:31.703059001 +0200 -+++ configure.ac 2011-04-30 18:01:37.189725667 +0200 -@@ -151,15 +151,20 @@ - dnl video4linux/hardware dependent tools. Else, undefine HAVE_V4L - - have_video4linux=false -+AC_ARG_WITH([v4l], AC_HELP_STRING([--without-v4l], [Disable v4l1 API])) -+AS_IF([test "x$with_v4l" != "xno"], [ - case $host in - *-*-linux*) - AC_CHECK_HEADER(linux/videodev.h, - [have_video4linux=true - AC_DEFINE(HAVE_V4L, 1, -- [Building for Linux - using the video4linux API])], -- [AC_MSG_ERROR([videodev.h not found - please install the linux kernel headers])]) -- ;; --esac -+ [Building for Linux - using the video4linux API])], []) -+ ;; -+esac]) -+ -+AS_IF([test "x$have_video4linux" != "xtrue" && test "x$with_v4l" != "xno"], -+ [have_video4linux=false -+ AC_MSG_WARN([videodev.h not found - please install the linux kernel headers programms needing v4l disabled])]) - AM_CONDITIONAL(HAVE_V4L, test x$have_video4linux = xtrue) - - dnl ********************************************************************* diff --git a/media-video/mjpegtools/mjpegtools-2.0.0.ebuild b/media-video/mjpegtools/mjpegtools-2.0.0.ebuild index ce6ce93c657c..7112d356a323 100644 --- a/media-video/mjpegtools/mjpegtools-2.0.0.ebuild +++ b/media-video/mjpegtools/mjpegtools-2.0.0.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-2.0.0.ebuild,v 1.1 2011/05/23 20:58:40 billie Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-2.0.0.ebuild,v 1.2 2011/05/30 17:09:21 billie Exp $ EAPI=4 -inherit flag-o-matic linux-info toolchain-funcs +inherit flag-o-matic toolchain-funcs MY_P=${P/_/} @@ -39,7 +39,7 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${P/_rc*}" pkg_pretend() { - if kernel_is ge 2 6 38 && use v4l; then + if has_version ">=sys-kernel/linux-headers-2.6.38" && use v4l; then ewarn "Current versions of mjpegtools only support V4L1 which is not available" ewarn "for kernels versions 2.6.38 and above. V4L1 will be disabled." fi diff --git a/media-video/mjpegtools/mjpegtools-2.0.0_rc1.ebuild b/media-video/mjpegtools/mjpegtools-2.0.0_rc1.ebuild deleted file mode 100644 index 599d70837ef5..000000000000 --- a/media-video/mjpegtools/mjpegtools-2.0.0_rc1.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-2.0.0_rc1.ebuild,v 1.1 2011/05/12 18:31:45 billie Exp $ - -EAPI=4 - -inherit autotools eutils flag-o-matic linux-info toolchain-funcs - -MY_P=${P/_/} - -DESCRIPTION="Tools for MJPEG video" -HOMEPAGE="http://mjpeg.sourceforge.net/" -SRC_URI="mirror://sourceforge/mjpeg/${MY_P}.tar.gz" - -LICENSE="GPL-2" -SLOT="1" -KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="dga dv gtk mmx png quicktime sdl static-libs v4l X" -REQUIRED_USE="!X? ( !gtk !sdl ) - X? ( sdl )" - -RDEPEND="virtual/jpeg - quicktime? ( media-libs/libquicktime ) - dv? ( >=media-libs/libdv-0.99 ) - png? ( media-libs/libpng ) - dga? ( x11-libs/libXxf86dga ) - X? ( x11-libs/libX11 - x11-libs/libXt - gtk? ( x11-libs/gtk+:2 ) - sdl? ( >=media-libs/libsdl-1.2.7-r3 ) - )" - -DEPEND="${RDEPEND} - mmx? ( dev-lang/nasm ) - >=sys-apps/sed-4 - sys-apps/gawk - dev-util/pkgconfig" - -S="${WORKDIR}/${P/_rc*}" - -pkg_pretend() { - if kernel_is ge 2 6 38 && use v4l; then - ewarn "Current versions of mjpegtools only support V4L1 which is not available" - ewarn "for kernels versions 2.6.38 and above. V4L1 will be disabled." - fi -} - -# Avoid execution of linux-info_pkg_setup() -pkg_setup() { : ; } - -src_prepare() { - sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure.ac - epatch "${FILESDIR}"/${P}-libpng-1.5.patch \ - "${FILESDIR}"/${P}-amd-k8.patch \ - "${FILESDIR}"/${P}-v4l-automagic.patch \ - "${FILESDIR}"/${P}-dga-gtk-sdl-automagic.patch \ - "${FILESDIR}"/${P}-X11.patch - eautoreconf -} - -src_configure() { - [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2 - - econf \ - --enable-compile-warnings \ - $(use_enable mmx simd-accel) \ - $(use_enable static-libs static) \ - --enable-largefile \ - $(use_with quicktime libquicktime) \ - $(use_with dv libdv) \ - $(use_with png libpng) \ - $(use_with dga) \ - $(use_with gtk) \ - $(use_with sdl libsdl) \ - $(use_with v4l) \ - $(use_with X x) -} - -src_install() { - default - - dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt - - find "${D}" -name '*.la' -exec rm -rf '{}' '+' || die "la removal failed" -} |