From 07b6969ba428078dbd22581bad495d7b64b758e8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 22 Nov 2016 14:57:34 +0100 Subject: vf_vdpaurb: remove this filter Was deprecated, superseded by --hwdec=vdpau-copy. --- DOCS/interface-changes.rst | 2 + DOCS/man/vf.rst | 9 ---- video/filter/vf.c | 2 - video/filter/vf_vdpaurb.c | 110 --------------------------------------------- wscript_build.py | 1 - 5 files changed, 2 insertions(+), 122 deletions(-) delete mode 100644 video/filter/vf_vdpaurb.c diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index ec4c6b8da0..5021bded66 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -19,6 +19,8 @@ Interface changes :: + --- mpv 0.23.0 --- + - remove deprecated vf_vdpaurb (use "--hwdec=vdpau-copy" instead) --- mpv 0.22.0 --- - the "audio-device-list" property now sets empty device description to the device name as a fallback diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst index fd155bb91d..22423513a0 100644 --- a/DOCS/man/vf.rst +++ b/DOCS/man/vf.rst @@ -806,15 +806,6 @@ Available filters are: 1-9 Apply high quality VDPAU scaling (needs capable hardware). -``vdpaurb`` - This filter is deprecated. Use ``--hwdec=vdpau-copy`` instead. - - VDPAU video read back. Works with ``--vo=vdpau`` and ``--vo=opengl`` only. - This filter will read back frames decoded by VDPAU so that other filters, - which are not normally compatible with VDPAU, can be used like normal. - This filter must be specified before ``vdpaupp`` in the filter chain if - ``vdpaupp`` is used. - ``d3d11vpp`` Direct3D 11 video post processing. Currently requires D3D11 hardware decoding for use. diff --git a/video/filter/vf.c b/video/filter/vf.c index 93b886e69c..41fbe9b208 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -59,7 +59,6 @@ extern const vf_info_t vf_info_vaapi; extern const vf_info_t vf_info_vapoursynth; extern const vf_info_t vf_info_vapoursynth_lazy; extern const vf_info_t vf_info_vdpaupp; -extern const vf_info_t vf_info_vdpaurb; extern const vf_info_t vf_info_buffer; extern const vf_info_t vf_info_d3d11vpp; @@ -98,7 +97,6 @@ static const vf_info_t *const filter_list[] = { #endif #if HAVE_VDPAU &vf_info_vdpaupp, - &vf_info_vdpaurb, #endif #if HAVE_D3D_HWACCEL &vf_info_d3d11vpp, diff --git a/video/filter/vf_vdpaurb.c b/video/filter/vf_vdpaurb.c deleted file mode 100644 index 59067b54bf..0000000000 --- a/video/filter/vf_vdpaurb.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of mpv. - * - * mpv is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with mpv. If not, see . - */ - -#include - -#include "video/vdpau.h" -#include "video/vdpau_mixer.h" -#include "vf.h" - -// This filter will read back decoded frames that have been decoded by vdpau -// so they can be post-processed by regular filters. As vdpau is still doing -// the decoding, a vdpau compatible vo must always be used. -// -// NB: This filter assumes the video surface will have a 420 chroma type and -// can always be read back in NV12 format. This is a safe assumption at the -// time of writing, but may not always remain true. - -struct vf_priv_s { - struct mp_vdpau_ctx *ctx; -}; - -static int filter_ext(struct vf_instance *vf, struct mp_image *mpi) -{ - struct vf_priv_s *p = vf->priv; - - if (!mpi) { - return 0; - } - - // Pass-through anything that's not been decoded by VDPAU - if (mpi->imgfmt != IMGFMT_VDPAU) { - vf_add_output_frame(vf, mpi); - return 0; - } - - if (mp_vdpau_mixed_frame_get(mpi)) { - MP_ERR(vf, "Can't apply vdpaurb filter after vdpaupp filter.\n"); - mp_image_unrefp(&mpi); - return -1; - } - - struct mp_hwdec_ctx *hwctx = &p->ctx->hwctx; - - struct mp_image *out = hwctx->download_image(hwctx, mpi, vf->out_pool); - if (!out || out->imgfmt != IMGFMT_NV12) { - mp_image_unrefp(&mpi); - mp_image_unrefp(&out); - return -1; - } - - vf_add_output_frame(vf, out); - mp_image_unrefp(&mpi); - return 0; -} - -static int reconfig(struct vf_instance *vf, struct mp_image_params *in, - struct mp_image_params *out) -{ - *out = *in; - if (in->imgfmt == IMGFMT_VDPAU) { - out->imgfmt = IMGFMT_NV12; - out->hw_subfmt = 0; - } - return 0; -} - -static int query_format(struct vf_instance *vf, unsigned int fmt) -{ - return vf_next_query_format(vf, fmt == IMGFMT_VDPAU ? IMGFMT_NV12 : fmt); -} - -static int vf_open(vf_instance_t *vf) -{ - struct vf_priv_s *p = vf->priv; - - MP_WARN(vf, "This filter is deprecated and will be removed.\n"); - MP_WARN(vf, "Use --hwdec=vdpau-copy instead.\n"); - - vf->filter_ext = filter_ext; - vf->filter = NULL; - vf->reconfig = reconfig; - vf->query_format = query_format; - - p->ctx = hwdec_devices_load(vf->hwdec_devs, HWDEC_VDPAU); - if (!p->ctx) - return 0; - - return 1; -} - -const vf_info_t vf_info_vdpaurb = { - .description = "vdpau readback", - .name = "vdpaurb", - .open = vf_open, - .priv_size = sizeof(struct vf_priv_s), -}; diff --git a/wscript_build.py b/wscript_build.py index ac7e0b12db..924b45ecad 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -324,7 +324,6 @@ def build(ctx): ( "video/filter/vf_vapoursynth.c", "vapoursynth-core" ), ( "video/filter/vf_vavpp.c", "vaapi"), ( "video/filter/vf_vdpaupp.c", "vdpau" ), - ( "video/filter/vf_vdpaurb.c", "vdpau" ), ( "video/filter/vf_yadif.c" ), ( "video/out/aspect.c" ), ( "video/out/bitmap_packer.c" ), -- cgit v1.2.3