mirror of https://gitee.com/openkylin/libdv.git
apply patches
This commit is contained in:
commit
e4eb8b589e
|
@ -20082,7 +20082,7 @@ fi
|
|||
|
||||
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
|
||||
|
|
|
@ -162,7 +162,7 @@ AM_CONDITIONAL(HOST_X86_64, test x$arch_x86_64 = xtrue)
|
|||
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
|
||||
|
|
|
@ -117,6 +117,13 @@ struct video1394_wait
|
|||
#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;
|
||||
|
|
|
@ -90,7 +90,7 @@ Choose output-filter: [>raw<]
|
|||
.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
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
* The libdv homepage is http://libdv.sourceforge.net/.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "libdv/dv_types.h"
|
||||
#include "libdv/dv.h"
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
* The libdv homepage is http://libdv.sourceforge.net/.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libdv/dv_types.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -26,10 +26,11 @@
|
|||
#ifndef DV_TYPES_H
|
||||
#define DV_TYPES_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#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 <popt.h>
|
||||
#endif // HAVE_LIBPOPT
|
||||
|
@ -38,11 +39,11 @@
|
|||
#include <inttypes.h>
|
||||
#include <stdio.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>
|
||||
#elif HAVE_MACHINE_ENDIAN_H
|
||||
#include <machine/endian.h>
|
||||
#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)))
|
||||
|
|
|
@ -1712,15 +1712,15 @@ yuy2_to_ycb( uint8_t *data, int isPAL, short *img_y, short *img_cr, short *img_c
|
|||
/* ---------------------------------------------------------------------------
|
||||
*/
|
||||
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 @@ 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);
|
||||
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 "
|
||||
|
|
|
@ -15,4 +15,4 @@ bin_PROGRAMS= playdv
|
|||
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
|
||||
|
|
|
@ -213,7 +213,7 @@ CLEANFILES =
|
|||
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:
|
||||
|
|
|
@ -61,9 +61,9 @@ target audio device; e.g. /dev/dsp, which is also the default.
|
|||
\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
|
||||
|
|
|
@ -146,7 +146,7 @@ dv_player_new(void)
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue