diff options
author | wm4 <wm4@nowhere> | 2013-07-28 01:49:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-28 19:25:07 +0200 |
commit | 5accc5e7c1dc020d1a0232da454104a4c056c2be (patch) | |
tree | 6abbf327d65ef046b159246778741250002eedff /configure | |
parent | 1a7f062503ee26e2fdd5ad4a0fdd934bb9688037 (diff) | |
download | mpv-5accc5e7c1dc020d1a0232da454104a4c056c2be.tar.bz2 mpv-5accc5e7c1dc020d1a0232da454104a4c056c2be.tar.xz |
vdpau: split off decoder parts, use "new" libavcodec vdpau hwaccel API
Move the decoder parts from vo_vdpau.c to a new file vdpau_old.c. This
file is named so because because it's written against the "old"
libavcodec vdpau pseudo-decoder (e.g. "h264_vdpau").
Add support for the "new" libavcodec vdpau support. This was recently
added and replaces the "old" vdpau parts. (In fact, Libav is about to
deprecate and remove the "old" API without deprecation grace period,
so we have to support it now. Moreover, there will probably be no Libav
release which supports both, so the transition is even less smooth than
we could hope, and we have to support both the old and new API.)
Whether the old or new API is used is checked by a configure test: if
the new API is found, it is used, otherwise the old API is assumed.
Some details might be handled differently. Especially display preemption
is a bit problematic with the "new" libavcodec vdpau support: it wants
to keep a pointer to a specific vdpau API function (which can be driver
specific, because preemption might switch drivers). Also, surface IDs
are now directly stored in AVFrames (and mp_images), so they can't be
forced to VDP_INVALID_HANDLE on preemption. (This changes even with
older libavcodec versions, because mp_image always uses the newer
representation to make vo_vdpau.c simpler.)
Decoder initialization in the new code tries to deal with codec
profiles, while the old code always uses the highest profile per codec.
Surface allocation changes. Since the decoder won't call config() in
vo_vdpau.c on video size change anymore, we allow allocating surfaces
of arbitrary size instead of locking it to what the VO was configured.
The non-hwdec code also has slightly different allocation behavior now.
Enabling the old vdpau special decoders via e.g. --vd=lavc:h264_vdpau
doesn't work anymore (a warning suggesting the --hwdec option is
printed instead).
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -2635,6 +2635,23 @@ else def_avresample_has_set_channel_mapping='#define HAVE_AVRESAMPLE_SET_CHANNEL_MAPPING 0' fi +_vdpau_dec=no +_vdpau_dec_old=no +if test "$_vdpau" = yes ; then + +echocheck "libavcodec new vdpau API" +_avcodec_new_vdpau_api=no +statement_check libavutil/pixfmt.h 'int x = AV_PIX_FMT_VDPAU' && _avcodec_new_vdpau_api=yes +if test "$_avcodec_new_vdpau_api" = yes ; then + def_avcodec_new_vdpau_api='#define HAVE_AV_CODEC_NEW_VDPAU_API 1' + _vdpau_dec=yes +else + def_avcodec_new_vdpau_api='#define HAVE_AV_CODEC_NEW_VDPAU_API 0' + _vdpau_dec_old=yes +fi +echores "$_avcodec_new_vdpau_api" + +fi echocheck "libavcodec AV_CODEC_PROP_TEXT_SUB API" _avcodec_has_text_flag_api=no @@ -3077,6 +3094,8 @@ TV = $_tv TV_V4L2 = $_tv_v4l2 VCD = $_vcd VDPAU = $_vdpau +VDPAU_DEC = $_vdpau_dec +VDPAU_DEC_OLD = $_vdpau_dec_old WIN32 = $_win32 X11 = $_x11 WAYLAND = $_wayland @@ -3179,6 +3198,7 @@ $def_zlib $def_avutil_has_refcounting $def_avutil_has_qp_api +$def_avcodec_new_vdpau_api $def_avcodec_has_text_flag_api $def_avcodec_has_chroma_pos_api $def_libpostproc |