Commit 7671dd7c authored by Anton Khirnov's avatar Anton Khirnov

avconv: add support for VDPAU decoding

parent 07fd0a22
......@@ -48,6 +48,7 @@ version 10:
- setsar/setdar filters now support variables in ratio expressions
- dar variable in the scale filter now returns the actual DAR (i.e. a * sar)
- VP9 decoder
- support for decoding through VDPAU in avconv (the -hwaccel option)
version 9:
......
......@@ -62,7 +62,10 @@ PROGS-$(CONFIG_AVPROBE) += avprobe
PROGS-$(CONFIG_AVSERVER) += avserver
PROGS := $(PROGS-yes:%=%$(EXESUF))
OBJS-avconv = avconv_opt.o avconv_filter.o
OBJS-avconv-$(HAVE_VDPAU_X11) += avconv_vdpau.o
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
TOOLS = qt-faststart trasher
......@@ -126,7 +129,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)$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
......
......@@ -51,6 +51,7 @@
enum HWAccelID {
HWACCEL_NONE = 0,
HWACCEL_AUTO,
HWACCEL_VDPAU,
};
typedef struct HWAccel {
......@@ -402,4 +403,6 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost);
int avconv_parse_options(int argc, char **argv);
int vdpau_init(AVCodecContext *s);
#endif /* AVCONV_H */
......@@ -54,6 +54,9 @@
}
const HWAccel hwaccels[] = {
#if HAVE_VDPAU_X11
{ "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
#endif
{ 0 },
};
......
This diff is collapsed.
......@@ -1367,11 +1367,13 @@ HAVE_LIST="
threads
unistd_h
usleep
vdpau_x11
vfp_args
VirtualAlloc
windows_h
winsock2_h
xform_asm
xlib
xmm_clobbers
"
......@@ -3906,15 +3908,21 @@ if enabled libcdio; then
check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio
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 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
enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
# add some useful compiler flags if supported
......
......@@ -562,6 +562,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
......@@ -579,6 +582,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
......
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