summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst1
-rwxr-xr-xTOOLS/old-configure5
-rw-r--r--options/options.c1
-rw-r--r--video/decode/vd_lavc.c4
-rw-r--r--video/decode/vda.c118
-rw-r--r--video/fmt-conversion.c3
-rw-r--r--video/hwdec.h1
-rw-r--r--video/img_format.c1
-rw-r--r--video/img_format.h6
-rw-r--r--video/out/opengl/hwdec.c3
-rw-r--r--video/out/opengl/hwdec.h2
-rw-r--r--video/out/opengl/hwdec_vda.c7
-rw-r--r--wscript26
-rw-r--r--wscript_build.py3
14 files changed, 4 insertions, 177 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 69a2147b37..cbbb9188fd 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -569,7 +569,6 @@ Video
:vdpau: requires ``--vo=vdpau`` or ``--vo=opengl`` (Linux only)
:vaapi: requires ``--vo=opengl`` or ``--vo=vaapi`` (Linux with Intel GPUs only)
:vaapi-copy: copies video back into system RAM (Linux with Intel GPUs only)
- :vda: requires ``--vo=opengl`` (OS X only)
:videotoolbox: requires ``--vo=opengl`` (newer OS X only)
:dxva2-copy: copies video back to system RAM (Windows only)
:rpi: requires ``--vo=rpi`` (Raspberry Pi only - default if available)
diff --git a/TOOLS/old-configure b/TOOLS/old-configure
index a7b49da9be..f8f432824e 100755
--- a/TOOLS/old-configure
+++ b/TOOLS/old-configure
@@ -938,10 +938,6 @@ cat > $TMPC << EOF
for platforms not supported by this configure script */
#define HAVE_BSD_FSTATFS 0
#define HAVE_LINUX_FSTATFS 1
-#define HAVE_VDA_AV_VDA_ALLOC_CONTEXT 0
-#define HAVE_VDA_HWACCEL 0
-#define HAVE_VDA_LIBAVCODEC_REFCOUNTING 0
-#define HAVE_VDA_GL 0
#define HAVE_GL_COCOA 0
#define HAVE_COCOA 0
#define HAVE_COCOA_APPLICATION 0
@@ -970,7 +966,6 @@ cat > $TMPC << EOF
#define HAVE_DRM 0
#define HAVE_VIDEOTOOLBOX_HWACCEL 0
#define HAVE_VIDEOTOOLBOX_GL 0
-#define HAVE_VIDEOTOOLBOX_VDA_GL 0
#define HAVE_SSE4_INTRINSICS 1
#define HAVE_C11_TLS 1
diff --git a/options/options.c b/options/options.c
index 45f4217a2e..5d16019f29 100644
--- a/options/options.c
+++ b/options/options.c
@@ -84,7 +84,6 @@ const struct m_opt_choice_alternatives mp_hwdec_names[] = {
{"no", HWDEC_NONE},
{"auto", HWDEC_AUTO},
{"vdpau", HWDEC_VDPAU},
- {"vda", HWDEC_VDA},
{"videotoolbox",HWDEC_VIDEOTOOLBOX},
{"vaapi", HWDEC_VAAPI},
{"vaapi-copy", HWDEC_VAAPI_COPY},
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index 6df662e23c..c4d4344f47 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -116,7 +116,6 @@ const struct m_sub_options vd_lavc_conf = {
};
const struct vd_lavc_hwdec mp_vd_lavc_vdpau;
-const struct vd_lavc_hwdec mp_vd_lavc_vda;
const struct vd_lavc_hwdec mp_vd_lavc_videotoolbox;
const struct vd_lavc_hwdec mp_vd_lavc_vaapi;
const struct vd_lavc_hwdec mp_vd_lavc_vaapi_copy;
@@ -133,9 +132,6 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = {
#if HAVE_VIDEOTOOLBOX_HWACCEL
&mp_vd_lavc_videotoolbox,
#endif
-#if HAVE_VDA_HWACCEL
- &mp_vd_lavc_vda,
-#endif
#if HAVE_VAAPI_HWACCEL
&mp_vd_lavc_vaapi,
&mp_vd_lavc_vaapi_copy,
diff --git a/video/decode/vda.c b/video/decode/vda.c
deleted file mode 100644
index 538d21b753..0000000000
--- a/video/decode/vda.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * This file is part of mpv.
- *
- * Copyright (c) 2013 Stefano Pigozzi <stefano.pigozzi@gmail.com>
- *
- * mpv is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * mpv is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with mpv. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <libavcodec/version.h>
-#include <libavcodec/vda.h>
-
-#include "common/av_common.h"
-#include "common/msg.h"
-#include "video/mp_image.h"
-#include "video/decode/lavc.h"
-#include "config.h"
-
-static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
- const char *decoder)
-{
- hwdec_request_api(info, "videotoolbox");
- if (!info || !info->hwctx)
- return HWDEC_ERR_NO_CTX;
- if (mp_codec_to_av_codec_id(decoder) != AV_CODEC_ID_H264)
- return HWDEC_ERR_NO_CODEC;
- return 0;
-}
-
-static int init(struct lavc_ctx *ctx)
-{
- return 0;
-}
-
-struct vda_error {
- int code;
- char *reason;
-};
-
-static const struct vda_error vda_errors[] = {
- { AVERROR(ENOSYS),
- "Hardware doesn't support accelerated decoding for this stream" },
- { AVERROR(EINVAL),
- "Invalid configuration provided to VDADecoderCreate" },
- { AVERROR_INVALIDDATA,
- "Generic error returned by the decoder layer. The cause can range from"
- " VDADecoder finding errors in the bitstream to another application"
- " using VDA at the moment. Only one application can use VDA at a"
- " givent time." },
- { 0, NULL },
-};
-
-static void print_vda_error(struct mp_log *log, int lev, char *message,
- int error_code)
-{
- for (int n = 0; vda_errors[n].code < 0; n++)
- if (vda_errors[n].code == error_code) {
- mp_msg(log, lev, "%s: %s (%d)\n",
- message, vda_errors[n].reason, error_code);
- return;
- }
-
- mp_msg(log, lev, "%s: %d\n", message, error_code);
-}
-
-static int init_decoder(struct lavc_ctx *ctx, int w, int h)
-{
- av_vda_default_free(ctx->avctx);
-#if HAVE_VDA_DEFAULT_INIT2
- AVVDAContext *vdactx = av_vda_alloc_context();
- vdactx->cv_pix_fmt_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
- int err = av_vda_default_init2(ctx->avctx, vdactx);
-#else
- int err = av_vda_default_init(ctx->avctx);
-#endif
-
- if (err < 0) {
- print_vda_error(ctx->log, MSGL_ERR, "failed to init VDA decoder", err);
- return -1;
- }
- return 0;
-}
-
-static void uninit(struct lavc_ctx *ctx)
-{
- if (ctx->avctx)
- av_vda_default_free(ctx->avctx);
-}
-
-static struct mp_image *process_image(struct lavc_ctx *ctx, struct mp_image *img)
-{
- // Same representation. IMGFMT_VDA is only needed to select the libavcodec
- // hwaccel driver.
- if (img->imgfmt == IMGFMT_VDA)
- mp_image_setfmt(img, IMGFMT_VIDEOTOOLBOX);
-
- return img;
-}
-
-const struct vd_lavc_hwdec mp_vd_lavc_vda = {
- .type = HWDEC_VDA,
- .image_format = IMGFMT_VDA,
- .probe = probe,
- .init = init,
- .uninit = uninit,
- .init_decoder = init_decoder,
- .process_image = process_image,
-};
diff --git a/video/fmt-conversion.c b/video/fmt-conversion.c
index 797d243002..6482f5429f 100644
--- a/video/fmt-conversion.c
+++ b/video/fmt-conversion.c
@@ -118,9 +118,6 @@ static const struct {
#endif
{IMGFMT_VDPAU, AV_PIX_FMT_VDPAU},
-#if HAVE_VDA_HWACCEL
- {IMGFMT_VDA, AV_PIX_FMT_VDA},
-#endif
#if HAVE_VIDEOTOOLBOX_HWACCEL
{IMGFMT_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX},
#endif
diff --git a/video/hwdec.h b/video/hwdec.h
index d950a86ef2..f2a72aef99 100644
--- a/video/hwdec.h
+++ b/video/hwdec.h
@@ -10,7 +10,6 @@ enum hwdec_type {
HWDEC_AUTO = -1,
HWDEC_NONE = 0,
HWDEC_VDPAU = 1,
- HWDEC_VDA = 2,
HWDEC_VIDEOTOOLBOX = 3,
HWDEC_VAAPI = 4,
HWDEC_VAAPI_COPY = 5,
diff --git a/video/img_format.c b/video/img_format.c
index bb6f106e1a..7ed4c722e8 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -37,7 +37,6 @@ static const struct mp_imgfmt_entry mp_imgfmt_list[] = {
// not in ffmpeg
{"vdpau_output", IMGFMT_VDPAU_OUTPUT},
// FFmpeg names have an annoying "_vld" suffix
- {"vda", IMGFMT_VDA},
{"videotoolbox", IMGFMT_VIDEOTOOLBOX},
{"vaapi", IMGFMT_VAAPI},
// names below this are not preferred over the FFmpeg names
diff --git a/video/img_format.h b/video/img_format.h
index f88592e7f9..fefe0b82e4 100644
--- a/video/img_format.h
+++ b/video/img_format.h
@@ -205,11 +205,7 @@ enum mp_imgfmt {
IMGFMT_VAAPI,
IMGFMT_DXVA2, // IDirect3DSurface9 (NV12)
IMGFMT_MMAL, // MMAL_BUFFER_HEADER_T
- // These use the same underlying format, but FFmpeg requires us to keep
- // them separate. The VDA decoder will change the format to
- // IMGFMT_VIDEOTOOLBOX, though.
- IMGFMT_VIDEOTOOLBOX,
- IMGFMT_VDA,
+ IMGFMT_VIDEOTOOLBOX, // CVPixelBufferRef
// Generic pass-through of AV_PIX_FMT_*. Used for formats which don't have
// a corresponding IMGFMT_ value.
diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c
index 7665d0c056..6eefbc4744 100644
--- a/video/out/opengl/hwdec.c
+++ b/video/out/opengl/hwdec.c
@@ -31,7 +31,6 @@
extern const struct gl_hwdec_driver gl_hwdec_vaegl;
extern const struct gl_hwdec_driver gl_hwdec_vaglx;
-extern const struct gl_hwdec_driver gl_hwdec_vda;
extern const struct gl_hwdec_driver gl_hwdec_videotoolbox;
extern const struct gl_hwdec_driver gl_hwdec_vdpau;
extern const struct gl_hwdec_driver gl_hwdec_dxva2;
@@ -46,7 +45,7 @@ static const struct gl_hwdec_driver *const mpgl_hwdec_drivers[] = {
#if HAVE_VDPAU_GL_X11
&gl_hwdec_vdpau,
#endif
-#if HAVE_VIDEOTOOLBOX_VDA_GL
+#if HAVE_VIDEOTOOLBOX_GL
&gl_hwdec_videotoolbox,
#endif
#if HAVE_DXVA2_HWACCEL
diff --git a/video/out/opengl/hwdec.h b/video/out/opengl/hwdec.h
index c48ec8b164..7d6f300db7 100644
--- a/video/out/opengl/hwdec.h
+++ b/video/out/opengl/hwdec.h
@@ -21,7 +21,7 @@ struct gl_hwdec {
// IMGFMT_RGB0 indicates that the video texture is RGB.
int converted_imgfmt;
// Normally this is GL_TEXTURE_2D, but the hwdec driver can set it to
- // GL_TEXTURE_RECTANGLE. This is needed because VDA is shit.
+ // GL_TEXTURE_RECTANGLE. This is needed because VideoToolbox is shit.
GLenum gl_texture_target;
};
diff --git a/video/out/opengl/hwdec_vda.c b/video/out/opengl/hwdec_vda.c
index e921df2f80..19d93e74d6 100644
--- a/video/out/opengl/hwdec_vda.c
+++ b/video/out/opengl/hwdec_vda.c
@@ -17,8 +17,6 @@
* with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
-// Note: handles both VDA and VideoToolbox
-
#include <assert.h>
#include <IOSurface/IOSurface.h>
@@ -160,12 +158,7 @@ static int create_common(struct gl_hwdec *hw, struct vda_format *format)
static int create(struct gl_hwdec *hw)
{
- // For videotoolbox, we always request NV12.
-#if HAVE_VDA_DEFAULT_INIT2
struct vda_format *f = vda_get_gl_format_from_imgfmt(IMGFMT_NV12);
-#else
- struct vda_format *f = vda_get_gl_format_from_imgfmt(IMGFMT_UYVY);
-#endif
if (create_common(hw, f))
return -1;
diff --git a/wscript b/wscript
index c6b1857766..f9f21c2be3 100644
--- a/wscript
+++ b/wscript
@@ -728,27 +728,6 @@ hwaccel_features = [
'desc': 'libavcodec VAAPI hwaccel',
'deps': [ 'vaapi' ],
'func': check_headers('libavcodec/vaapi.h', use='libav'),
- } , {
- 'name': '--vda-hwaccel',
- 'desc': 'libavcodec VDA hwaccel',
- 'func': compose_checks(
- check_headers('VideoDecodeAcceleration/VDADecoder.h'),
- check_statement('libavcodec/vda.h',
- 'av_vda_alloc_context()',
- framework='IOSurface',
- use='libav')),
- } , {
- 'name': 'vda-default-init2',
- 'desc': 'libavcodec VDA hwaccel (configurable AVVDAContext)',
- 'deps': [ 'vda-hwaccel' ],
- 'func': check_statement('libavcodec/vda.h',
- 'av_vda_default_init2(NULL, NULL)',
- use='libav'),
- }, {
- 'name': '--vda-gl',
- 'desc': 'VDA with OpenGL',
- 'deps': [ 'gl-cocoa', 'vda-hwaccel' ],
- 'func': check_true
}, {
'name': '--videotoolbox-hwaccel',
'desc': 'libavcodec videotoolbox hwaccel',
@@ -764,11 +743,6 @@ hwaccel_features = [
'deps': [ 'gl-cocoa', 'videotoolbox-hwaccel' ],
'func': check_true
} , {
- 'name': 'videotoolbox-vda-gl',
- 'desc': 'Videotoolbox or VDA with OpenGL',
- 'deps_any': [ 'videotoolbox-gl', 'vda-gl' ],
- 'func': check_true
- }, {
'name': '--vdpau-hwaccel',
'desc': 'libavcodec VDPAU hwaccel',
'deps': [ 'vdpau' ],
diff --git a/wscript_build.py b/wscript_build.py
index 987ad2cec4..f0316489c9 100644
--- a/wscript_build.py
+++ b/wscript_build.py
@@ -281,7 +281,6 @@ def build(ctx):
( "video/decode/rpi.c", "rpi" ),
( "video/decode/vaapi.c", "vaapi-hwaccel" ),
( "video/decode/vd_lavc.c" ),
- ( "video/decode/vda.c", "vda-hwaccel" ),
( "video/decode/videotoolbox.c", "videotoolbox-hwaccel" ),
( "video/decode/vdpau.c", "vdpau-hwaccel" ),
( "video/filter/vf.c" ),
@@ -322,7 +321,7 @@ def build(ctx):
( "video/out/opengl/hwdec_dxva2.c", "gl-win32" ),
( "video/out/opengl/hwdec_vaegl.c", "vaapi-egl" ),
( "video/out/opengl/hwdec_vaglx.c", "vaapi-glx" ),
- ( "video/out/opengl/hwdec_vda.c", "videotoolbox-vda-gl" ),
+ ( "video/out/opengl/hwdec_vda.c", "videotoolbox-gl" ),
( "video/out/opengl/hwdec_vdpau.c", "vdpau-gl-x11" ),
( "video/out/opengl/lcms.c", "gl" ),
( "video/out/opengl/osd.c", "gl" ),