--- libdv-1.0.0.old/configure +++ libdv-1.0.0/configure @@ -20082,7 +20082,7 @@ have_gtk="false" if $use_gtk; then - REQUIRES='glib >= 1.2.4 gtk+ >= 1.2.4' + REQUIRES='glib-2.0 >= 2.0.0 gtk+-2.0 >= 2.0.0' if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then --- libdv-1.0.0.old/configure.ac +++ libdv-1.0.0/configure.ac @@ -162,7 +162,7 @@ dnl Checks for libraries. have_gtk="false" if $use_gtk; then - REQUIRES='glib >= 1.2.4 gtk+ >= 1.2.4' + REQUIRES='glib-2.0 >= 2.0.0 gtk+-2.0 >= 2.0.0' PKG_CHECK_MODULES(GTK,$REQUIRES,have_gtk="true",have_gtk="false") AC_DEFINE(HAVE_GTK) fi --- libdv-1.0.0.old/encodedv/dvconnect.c +++ libdv-1.0.0/encodedv/dvconnect.c @@ -117,6 +117,13 @@ #define VIDEO1394_LISTEN_POLL_BUFFER \ _IOWR('#', 0x18, struct video1394_wait) +#ifdef __GNU__ +#define _IOT_video1394_mmap \ + _IOT(_IOTS(int), 1, _IOTS(unsigned int), 7, 0, 0) +#define _IOT_video1394_wait \ + _IOT(_IOTS(unsigned int), 2, _IOTS(struct timeval), 1, 0, 0) +#endif + static int cap_start_frame = 0; static int cap_num_frames = 0xfffffff; static int cap_verbose_mode; --- libdv-1.0.0.old/encodedv/encodedv.1 +++ libdv-1.0.0/encodedv/encodedv.1 @@ -90,7 +90,7 @@ .TP \fB\-q\fR, \fB\-\-static\-qno\fR=\fItable-no\fR Static qno tables for quantisation on 2 VLC passes. -For turbo (but somewhat lossy encoding) try -q [1,2] -p [2,3]. +For turbo (but somewhat lossy encoding) try \-q [1,2] \-p [2,3]. There are only two static qno tables registered right now: 1 : for sharp DV pictures --- libdv-1.0.0.old/encodedv/encodedv.c +++ libdv-1.0.0/encodedv/encodedv.c @@ -24,6 +24,10 @@ * The libdv homepage is http://libdv.sourceforge.net/. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include "libdv/dv_types.h" #include "libdv/dv.h" --- libdv-1.0.0.old/encodedv/insert_audio.c +++ libdv-1.0.0/encodedv/insert_audio.c @@ -23,6 +23,10 @@ * The libdv homepage is http://libdv.sourceforge.net/. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "libdv/dv_types.h" #include --- libdv-1.0.0.old/libdv/dv_types.h +++ libdv-1.0.0/libdv/dv_types.h @@ -26,10 +26,11 @@ #ifndef DV_TYPES_H #define DV_TYPES_H -#if HAVE_CONFIG_H -# include -#endif - +/* The Debian package is always compiled with popt support, but using it + * in an application is optional. Declare HAVE_LIBPOPT before including + * the libdv headers in order to access popt-specific entries in the + * libdv API. + */ #if HAVE_LIBPOPT #include #endif // HAVE_LIBPOPT @@ -38,11 +39,11 @@ #include #include #include -#if HAVE_ENDIAN_H +/* FIXME Some systems use machine/endian.h instead. We probably ought to + * AC_SUBST the correct value in here. (Or use a namespace-clean dvconfig.h.) + * This quick fix should do for glibc-based systems. + */ #include -#elif HAVE_MACHINE_ENDIAN_H -#include -#endif /* please tell me these are defined somewhere standard??? */ #ifndef FALSE @@ -61,16 +62,33 @@ #define CLAMP(a,x,b) (MIN(b,MAX(a,x))) #endif +/* FIXME These values indicate whether libdv was built with asm optimizations. + * It had better be AC_SUBSTed, but for the purpose of the Debian package, we + * can easily guess the correct value from standard compiler macros. + */ +#if !defined(ARCH_X86) && !defined(ARCH_X86_64) +# if defined (__x86_64) +# define ARCH_X86 0 +# define ARCH_X86_64 1 +# elif defined(i386) +# define ARCH_X86 1 +# define ARCH_X86_64 0 +# else +# define ARCH_X86 0 +# define ARCH_X86_64 0 +# endif +#endif + // For now assume ARCH_X86 means GCC with hints. #ifdef ARCH_X86 -#define HAVE_GCC 1 +#define LIBDV_HAVE_GCC 1 #endif #ifdef ARCH_X86_64 -#define HAVE_GCC 1 +#define LIBDV_HAVE_GCC 1 #endif -//#define HAVE_GCC 0 +//#define LIBDV_HAVE_GCC 0 -#if HAVE_GCC +#if LIBDV_HAVE_GCC #define ALIGN64 __attribute__ ((aligned (64))) #define ALIGN32 __attribute__ ((aligned (32))) #define ALIGN8 __attribute__ ((aligned (8))) --- libdv-1.0.0.old/libdv/encode.c +++ libdv-1.0.0/libdv/encode.c @@ -1712,15 +1712,15 @@ /* --------------------------------------------------------------------------- */ static void -yv12_to_ycb( uint8_t **in, int isPAL, short *img_y, short *img_cr, short *img_cb) +yv12_to_ycb( uint8_t **in, short *img_y, short *img_cr, short *img_cb) { - register int total = DV_WIDTH * (isPAL ? DV_PAL_HEIGHT : DV_NTSC_HEIGHT); + register int total = DV_WIDTH * DV_PAL_HEIGHT; register int i, j, k; for (i = 0; i < total; i++) img_y[i] = (((short) in[0][i]) - 128) << DCT_YUV_PRECISION; - for (i = 0; i < (isPAL ? DV_PAL_HEIGHT : DV_NTSC_HEIGHT)/2; ++i) { + for (i = 0; i < (DV_PAL_HEIGHT / 2); ++i) { for (j = 0; j < DV_WIDTH/2 ; j++) { k = i * DV_WIDTH/2 + j; @@ -1796,11 +1796,12 @@ dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); break; case e_dv_color_yuv: -#ifndef YUV_420_USE_YV12 - yuy2_to_ycb( in[0], dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); -#else - yv12_to_ycb( in, dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); +#ifdef YUV_420_USE_YV12 + if (dv_enc->isPAL) + yv12_to_ycb( in, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); + else #endif + yuy2_to_ycb( in[0], dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); break; default: fprintf(stderr, "Invalid value for color_space " --- libdv-1.0.0.old/playdv/Makefile.am +++ libdv-1.0.0/playdv/Makefile.am @@ -15,4 +15,4 @@ noinst_HEADERS= display.h oss.h playdv_SOURCES= playdv.c display.c display.h oss.c -playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) +playdv_LDADD= $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) -lXext -lX11 --- libdv-1.0.0.old/playdv/Makefile.in +++ libdv-1.0.0/playdv/Makefile.in @@ -213,7 +213,7 @@ AM_CFLAGS = $(SDL_CFLAGS) $(GTK_CFLAGS) noinst_HEADERS = display.h oss.h playdv_SOURCES = playdv.c display.c display.h oss.c -playdv_LDADD = $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) +playdv_LDADD = $(SDL_LIBS) $(GTK_LIBS) $(XV_LIB) ../libdv/libdv.la $(POPT_LIB) -lXext -lX11 all: all-am .SUFFIXES: --- libdv-1.0.0.old/playdv/playdv.1 +++ libdv-1.0.0/playdv/playdv.1 @@ -61,9 +61,9 @@ \fB\-\-audio\-file\fR=\fIfile\fR send raw decoded audio stream to \fIfile\fR, skipping audio ioctls. .TP -\fB\-\-audio\-mix\fR=\fI(-16 .. 16)\fR +\fB\-\-audio\-mix\fR=\fI(\-16 .. 16)\fR mixing level of 4 channel audio for 32KHz 12bit. 0 [default]. --16 selects second channel, 16 selects first channel. +\-16 selects second channel, 16 selects first channel. .PP Video Output Options .TP --- libdv-1.0.0.old/playdv/playdv.c +++ libdv-1.0.0/playdv/playdv.c @@ -146,7 +146,7 @@ result->option_table[DV_PLAYER_OPT_NO_MMAP] = (struct poptOption) { longName: "no-mmap", arg: &result->no_mmap, - descrip: "don't use mmap for reading. (usefull for pipes)" + descrip: "don't use mmap for reading. (useful for pipes)" }; /* no mmap */ result->option_table[DV_PLAYER_OPT_LOOP_COUNT] = (struct poptOption) {