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> ...@@ -8,6 +8,7 @@ version <next>
- setsar/setdar filters now support variables in ratio expressions - setsar/setdar filters now support variables in ratio expressions
- elbg filter - elbg filter
- string validation in ffprobe - string validation in ffprobe
- support for decoding through VDPAU in ffmpeg (the -hwaccel option)
version 2.1: version 2.1:
......
...@@ -18,7 +18,9 @@ PROGS-$(CONFIG_FFSERVER) += ffserver ...@@ -18,7 +18,9 @@ PROGS-$(CONFIG_FFSERVER) += ffserver
PROGS := $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF)) PROGS := $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF)) INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
OBJS-ffmpeg = ffmpeg_opt.o ffmpeg_filter.o 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 TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
TOOLS = qt-faststart trasher TOOLS = qt-faststart trasher
...@@ -90,7 +92,7 @@ endef ...@@ -90,7 +92,7 @@ endef
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D)))) $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
define DOPROG 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)) $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
$$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1)) $$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
$(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1)) $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
......
...@@ -1559,11 +1559,13 @@ HAVE_LIST=" ...@@ -1559,11 +1559,13 @@ HAVE_LIST="
threads threads
unistd_h unistd_h
usleep usleep
vdpau_x11
vfp_args vfp_args
VirtualAlloc VirtualAlloc
windows_h windows_h
winsock2_h winsock2_h
xform_asm xform_asm
xlib
xmm_clobbers xmm_clobbers
" "
...@@ -4426,10 +4428,12 @@ if enabled libcdio; then ...@@ -4426,10 +4428,12 @@ if enabled libcdio; then
die "ERROR: libcdio-paranoia not found" die "ERROR: libcdio-paranoia not found"
fi fi
check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib
enabled x11grab && enabled x11grab &&
require X11 X11/Xlib.h XOpenDisplay -lX11 &&
require Xext X11/extensions/XShm.h XShmCreateImage -lXext && 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 && enabled vaapi &&
check_lib va/va.h vaInitialize -lva || check_lib va/va.h vaInitialize -lva ||
...@@ -4439,6 +4443,10 @@ enabled vdpau && ...@@ -4439,6 +4443,10 @@ enabled vdpau &&
check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" || check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||
disable vdpau 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 # 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 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). ...@@ -631,6 +631,9 @@ Do not use any hardware acceleration (the default).
@item auto @item auto
Automatically select the hardware acceleration method. Automatically select the hardware acceleration method.
@item vdpau
Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration.
@end table @end table
This option has no effect if the selected hwaccel is not available or not 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. ...@@ -648,6 +651,12 @@ Select a device to use for hardware acceleration.
This option only makes sense when the @option{-hwaccel} option is also This option only makes sense when the @option{-hwaccel} option is also
specified. Its exact meaning depends on the specific hardware acceleration specified. Its exact meaning depends on the specific hardware acceleration
method chosen. 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 @end table
@section Audio Options @section Audio Options
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
enum HWAccelID { enum HWAccelID {
HWACCEL_NONE = 0, HWACCEL_NONE = 0,
HWACCEL_AUTO, HWACCEL_AUTO,
HWACCEL_VDPAU,
}; };
typedef struct HWAccel { typedef struct HWAccel {
...@@ -485,4 +486,6 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost); ...@@ -485,4 +486,6 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost);
int ffmpeg_parse_options(int argc, char **argv); int ffmpeg_parse_options(int argc, char **argv);
int vdpau_init(AVCodecContext *s);
#endif /* FFMPEG_H */ #endif /* FFMPEG_H */
...@@ -64,6 +64,9 @@ ...@@ -64,6 +64,9 @@
} }
const HWAccel hwaccels[] = { const HWAccel hwaccels[] = {
#if HAVE_VDPAU_X11
{ "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
#endif
{ 0 }, { 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