apply patches

This commit is contained in:
openKylinBot 2022-05-14 00:43:59 +08:00
commit e4eb8b589e
12 changed files with 61 additions and 27 deletions

2
configure vendored
View File

@ -20082,7 +20082,7 @@ fi
have_gtk="false" have_gtk="false"
if $use_gtk; then 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 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then

View File

@ -162,7 +162,7 @@ AM_CONDITIONAL(HOST_X86_64, test x$arch_x86_64 = xtrue)
dnl Checks for libraries. dnl Checks for libraries.
have_gtk="false" have_gtk="false"
if $use_gtk; then 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") PKG_CHECK_MODULES(GTK,$REQUIRES,have_gtk="true",have_gtk="false")
AC_DEFINE(HAVE_GTK) AC_DEFINE(HAVE_GTK)
fi fi

View File

@ -117,6 +117,13 @@ struct video1394_wait
#define VIDEO1394_LISTEN_POLL_BUFFER \ #define VIDEO1394_LISTEN_POLL_BUFFER \
_IOWR('#', 0x18, struct video1394_wait) _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_start_frame = 0;
static int cap_num_frames = 0xfffffff; static int cap_num_frames = 0xfffffff;
static int cap_verbose_mode; static int cap_verbose_mode;

View File

@ -90,7 +90,7 @@ Choose output-filter: [>raw<]
.TP .TP
\fB\-q\fR, \fB\-\-static\-qno\fR=\fItable-no\fR \fB\-q\fR, \fB\-\-static\-qno\fR=\fItable-no\fR
Static qno tables for quantisation on 2 VLC passes. 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: There are only two static qno tables registered right now:
1 : for sharp DV pictures 1 : for sharp DV pictures

View File

@ -24,6 +24,10 @@
* The libdv homepage is http://libdv.sourceforge.net/. * The libdv homepage is http://libdv.sourceforge.net/.
*/ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h> #include <string.h>
#include "libdv/dv_types.h" #include "libdv/dv_types.h"
#include "libdv/dv.h" #include "libdv/dv.h"

View File

@ -23,6 +23,10 @@
* The libdv homepage is http://libdv.sourceforge.net/. * The libdv homepage is http://libdv.sourceforge.net/.
*/ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "libdv/dv_types.h" #include "libdv/dv_types.h"
#include <stdio.h> #include <stdio.h>

View File

@ -26,10 +26,11 @@
#ifndef DV_TYPES_H #ifndef DV_TYPES_H
#define DV_TYPES_H #define DV_TYPES_H
#if HAVE_CONFIG_H /* The Debian package is always compiled with popt support, but using it
# include <config.h> * in an application is optional. Declare HAVE_LIBPOPT before including
#endif * the libdv headers in order to access popt-specific entries in the
* libdv API.
*/
#if HAVE_LIBPOPT #if HAVE_LIBPOPT
#include <popt.h> #include <popt.h>
#endif // HAVE_LIBPOPT #endif // HAVE_LIBPOPT
@ -38,11 +39,11 @@
#include <inttypes.h> #include <inttypes.h>
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#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 <endian.h> #include <endian.h>
#elif HAVE_MACHINE_ENDIAN_H
#include <machine/endian.h>
#endif
/* please tell me these are defined somewhere standard??? */ /* please tell me these are defined somewhere standard??? */
#ifndef FALSE #ifndef FALSE
@ -61,16 +62,33 @@
#define CLAMP(a,x,b) (MIN(b,MAX(a,x))) #define CLAMP(a,x,b) (MIN(b,MAX(a,x)))
#endif #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. // For now assume ARCH_X86 means GCC with hints.
#ifdef ARCH_X86 #ifdef ARCH_X86
#define HAVE_GCC 1 #define LIBDV_HAVE_GCC 1
#endif #endif
#ifdef ARCH_X86_64 #ifdef ARCH_X86_64
#define HAVE_GCC 1 #define LIBDV_HAVE_GCC 1
#endif #endif
//#define HAVE_GCC 0 //#define LIBDV_HAVE_GCC 0
#if HAVE_GCC #if LIBDV_HAVE_GCC
#define ALIGN64 __attribute__ ((aligned (64))) #define ALIGN64 __attribute__ ((aligned (64)))
#define ALIGN32 __attribute__ ((aligned (32))) #define ALIGN32 __attribute__ ((aligned (32)))
#define ALIGN8 __attribute__ ((aligned (8))) #define ALIGN8 __attribute__ ((aligned (8)))

View File

@ -1712,15 +1712,15 @@ yuy2_to_ycb( uint8_t *data, int isPAL, short *img_y, short *img_cr, short *img_c
/* --------------------------------------------------------------------------- /* ---------------------------------------------------------------------------
*/ */
static void 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; 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 < 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++) { for (j = 0; j < DV_WIDTH/2 ; j++) {
k = i * DV_WIDTH/2 + j; k = i * DV_WIDTH/2 + j;
@ -1796,11 +1796,12 @@ int dv_encode_full_frame(dv_encoder_t *dv_enc, uint8_t **in,
dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb);
break; break;
case e_dv_color_yuv: case e_dv_color_yuv:
#ifndef YUV_420_USE_YV12 #ifdef YUV_420_USE_YV12
yuy2_to_ycb( in[0], dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); if (dv_enc->isPAL)
#else yv12_to_ycb( in, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb);
yv12_to_ycb( in, dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb); else
#endif #endif
yuy2_to_ycb( in[0], dv_enc->isPAL, dv_enc->img_y, dv_enc->img_cr, dv_enc->img_cb);
break; break;
default: default:
fprintf(stderr, "Invalid value for color_space " fprintf(stderr, "Invalid value for color_space "

View File

@ -15,4 +15,4 @@ bin_PROGRAMS= playdv
noinst_HEADERS= display.h oss.h noinst_HEADERS= display.h oss.h
playdv_SOURCES= playdv.c display.c display.h oss.c 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

View File

@ -213,7 +213,7 @@ CLEANFILES =
AM_CFLAGS = $(SDL_CFLAGS) $(GTK_CFLAGS) AM_CFLAGS = $(SDL_CFLAGS) $(GTK_CFLAGS)
noinst_HEADERS = display.h oss.h noinst_HEADERS = display.h oss.h
playdv_SOURCES = playdv.c display.c display.h oss.c 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 all: all-am
.SUFFIXES: .SUFFIXES:

View File

@ -61,9 +61,9 @@ target audio device; e.g. /dev/dsp, which is also the default.
\fB\-\-audio\-file\fR=\fIfile\fR \fB\-\-audio\-file\fR=\fIfile\fR
send raw decoded audio stream to \fIfile\fR, skipping audio ioctls. send raw decoded audio stream to \fIfile\fR, skipping audio ioctls.
.TP .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]. 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 .PP
Video Output Options Video Output Options
.TP .TP

View File

@ -146,7 +146,7 @@ dv_player_new(void)
result->option_table[DV_PLAYER_OPT_NO_MMAP] = (struct poptOption) { result->option_table[DV_PLAYER_OPT_NO_MMAP] = (struct poptOption) {
longName: "no-mmap", longName: "no-mmap",
arg: &result->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 */ }; /* no mmap */
result->option_table[DV_PLAYER_OPT_LOOP_COUNT] = (struct poptOption) { result->option_table[DV_PLAYER_OPT_LOOP_COUNT] = (struct poptOption) {