Commit c6eee312 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '35177ba7'

* commit '35177ba7':
  avconv: add support for DXVA2 decoding

Conflicts:
	Makefile
	configure
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 9c6eef6f 35177ba7
...@@ -20,6 +20,7 @@ version <next>: ...@@ -20,6 +20,7 @@ version <next>:
- Direct Stream Digital (DSD) decoder - Direct Stream Digital (DSD) decoder
- Magic Lantern Video (MLV) demuxer - Magic Lantern Video (MLV) demuxer
- On2 AVC (Audio for Video) decoder - On2 AVC (Audio for Video) decoder
- support for decoding through DXVA2 in ffmpeg
version 2.2: version 2.2:
......
...@@ -30,6 +30,8 @@ $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_o ...@@ -30,6 +30,8 @@ $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_o
OBJS-ffmpeg += ffmpeg_opt.o ffmpeg_filter.o OBJS-ffmpeg += ffmpeg_opt.o ffmpeg_filter.o
OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o
OBJS-ffmpeg-$(CONFIG_DXVA2) += ffmpeg_dxva2.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 uncoded_frame TOOLS = qt-faststart trasher uncoded_frame
......
...@@ -4800,6 +4800,10 @@ enabled vdpau && enabled xlib && ...@@ -4800,6 +4800,10 @@ enabled vdpau && enabled xlib &&
prepend ffmpeg_libs $($ldflags_filter "-lvdpau") && prepend ffmpeg_libs $($ldflags_filter "-lvdpau") &&
enable vdpau_x11 enable vdpau_x11
enabled dxva2 &&
check_header dxva2api.h -D_WIN32_WINNT=0x0600 &&
prepend ffmpeg_libs $($ldflags_filter "-lole32")
# 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
......
...@@ -645,6 +645,9 @@ Automatically select the hardware acceleration method. ...@@ -645,6 +645,9 @@ Automatically select the hardware acceleration method.
@item vdpau @item vdpau
Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration. Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration.
@item dxva2
Use DXVA2 (DirectX Video Acceleration) 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
...@@ -667,6 +670,10 @@ method chosen. ...@@ -667,6 +670,10 @@ method chosen.
@item vdpau @item vdpau
For VDPAU, this option specifies the X11 display/screen to use. If this option 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 is not specified, the value of the @var{DISPLAY} environment variable is used
@item dxva2
For DXVA2, this option should contain the number of the display adapter to use.
If this option is not specified, the default adapter is used.
@end table @end table
@end table @end table
......
...@@ -60,6 +60,7 @@ enum HWAccelID { ...@@ -60,6 +60,7 @@ enum HWAccelID {
HWACCEL_NONE = 0, HWACCEL_NONE = 0,
HWACCEL_AUTO, HWACCEL_AUTO,
HWACCEL_VDPAU, HWACCEL_VDPAU,
HWACCEL_DXVA2,
}; };
typedef struct HWAccel { typedef struct HWAccel {
...@@ -512,5 +513,6 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost); ...@@ -512,5 +513,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); int vdpau_init(AVCodecContext *s);
int dxva2_init(AVCodecContext *s);
#endif /* FFMPEG_H */ #endif /* FFMPEG_H */
This diff is collapsed.
...@@ -66,6 +66,9 @@ ...@@ -66,6 +66,9 @@
const HWAccel hwaccels[] = { const HWAccel hwaccels[] = {
#if HAVE_VDPAU_X11 #if HAVE_VDPAU_X11
{ "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU }, { "vdpau", vdpau_init, HWACCEL_VDPAU, AV_PIX_FMT_VDPAU },
#endif
#if CONFIG_DXVA2
{ "dxva2", dxva2_init, HWACCEL_DXVA2, AV_PIX_FMT_DXVA2_VLD },
#endif #endif
{ 0 }, { 0 },
}; };
......
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