Commit 3e641b48 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7671dd7c'

* commit '7671dd7c':
  avconv: add support for VDPAU decoding

Conflicts:
	Changelog
	Makefile
	configure
	ffmpeg.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 62e10c37 7671dd7c
......@@ -8,6 +8,7 @@ version <next>
- setsar/setdar filters now support variables in ratio expressions
- elbg filter
- string validation in ffprobe
- support for decoding through VDPAU in ffmpeg (the -hwaccel option)
version 2.1:
......
......@@ -18,7 +18,9 @@ PROGS-$(CONFIG_FFSERVER) += ffserver
PROGS := $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
OBJS-ffmpeg = ffmpeg_opt.o ffmpeg_filter.o
OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o
TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
TOOLS = qt-faststart trasher
......@@ -90,7 +92,7 @@ endef
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
define DOPROG
OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS)
OBJS-$(1) += $(1).o cmdutils.o $(EXEOBJS) $(OBJS-$(1)-yes)
$(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
......
......@@ -1559,11 +1559,13 @@ HAVE_LIST="
threads
unistd_h
usleep
vdpau_x11
vfp_args
VirtualAlloc
windows_h
winsock2_h
xform_asm
xlib
xmm_clobbers
"
......@@ -4426,10 +4428,12 @@ if enabled libcdio; then
die "ERROR: libcdio-paranoia not found"
fi
check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib
enabled x11grab &&
require X11 X11/Xlib.h XOpenDisplay -lX11 &&
require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes
require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes &&
{ enabled xlib || die "ERROR: Xlib not found"; }
enabled vaapi &&
check_lib va/va.h vaInitialize -lva ||
......@@ -4439,6 +4443,10 @@ enabled vdpau &&
check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||
disable vdpau
enabled vdpau && enabled xlib &&
check_lib2 "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau &&
enable vdpau_x11
# Funny iconv installations are not unusual, so check it after all flags have been set
disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv
......
......@@ -631,6 +631,9 @@ Do not use any hardware acceleration (the default).
@item auto
Automatically select the hardware acceleration method.
@item vdpau
Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration.
@end table
This option has no effect if the selected hwaccel is not available or not
......@@ -648,6 +651,12 @@ Select a device to use for hardware acceleration.
This option only makes sense when the @option{-hwaccel} option is also
specified. Its exact meaning depends on the specific hardware acceleration
method chosen.
@table @option
@item vdpau
For VDPAU, this option specifies the X11 display/screen to use. If this option
is not specified, the value of the @var{DISPLAY} environment variable is used
@end table
@end table
@section Audio Options
......
......@@ -59,6 +59,7 @@
enum HWAccelID {
HWACCEL_NONE = 0,
HWACCEL_AUTO,
HWACCEL_VDPAU,
};
typedef struct HWAccel {
......@@ -485,4 +486,6 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost);
int ffmpeg_parse_options(int argc, char **argv);
int vdpau_init(AVCodecContext *s);
#endif /* FFMPEG_H */
......@@ -64,6 +64,9 @@
}
const HWAccel hwaccels[] = {
#if HAVE_VDPAU_X11
{ "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
#endif
{ 0 },
};
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment