summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf.c24
-rw-r--r--video/filter/vf_crop.c133
-rw-r--r--video/filter/vf_dsize.c118
-rw-r--r--video/filter/vf_expand.c178
-rw-r--r--video/filter/vf_flip.c60
-rw-r--r--video/filter/vf_gradfun.c108
-rw-r--r--video/filter/vf_mirror.c38
-rw-r--r--video/filter/vf_noformat.c72
-rw-r--r--video/filter/vf_pullup.c83
-rw-r--r--video/filter/vf_rotate.c106
-rw-r--r--video/filter/vf_scale.c258
-rw-r--r--video/filter/vf_stereo3d.c225
-rw-r--r--video/filter/vf_yadif.c97
13 files changed, 0 insertions, 1500 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index 6e2cb251e0..0edd2a7dcf 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -39,20 +39,8 @@
#include "video/mp_image_pool.h"
#include "vf.h"
-extern const vf_info_t vf_info_crop;
-extern const vf_info_t vf_info_expand;
-extern const vf_info_t vf_info_scale;
extern const vf_info_t vf_info_format;
-extern const vf_info_t vf_info_noformat;
-extern const vf_info_t vf_info_flip;
-extern const vf_info_t vf_info_rotate;
-extern const vf_info_t vf_info_mirror;
-extern const vf_info_t vf_info_gradfun;
-extern const vf_info_t vf_info_dsize;
-extern const vf_info_t vf_info_pullup;
extern const vf_info_t vf_info_sub;
-extern const vf_info_t vf_info_yadif;
-extern const vf_info_t vf_info_stereo3d;
extern const vf_info_t vf_info_convert;
extern const vf_info_t vf_info_lavfi;
extern const vf_info_t vf_info_lavfi_bridge;
@@ -66,19 +54,7 @@ extern const vf_info_t vf_info_d3d11vpp;
// list of available filters:
static const vf_info_t *const filter_list[] = {
#if HAVE_GPL
- &vf_info_crop,
- &vf_info_expand,
- &vf_info_scale,
&vf_info_format,
- &vf_info_noformat,
- &vf_info_flip,
- &vf_info_mirror,
- &vf_info_rotate,
- &vf_info_gradfun,
- &vf_info_pullup,
- &vf_info_yadif,
- &vf_info_stereo3d,
- &vf_info_dsize,
&vf_info_sub,
#endif
diff --git a/video/filter/vf_crop.c b/video/filter/vf_crop.c
deleted file mode 100644
index 495abf65c7..0000000000
--- a/video/filter/vf_crop.c
+++ /dev/null
@@ -1,133 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "config.h"
-#include "common/msg.h"
-#include "options/options.h"
-
-#include "video/img_format.h"
-#include "video/mp_image.h"
-#include "vf.h"
-
-#include "options/m_option.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-static const struct vf_priv_s {
- int crop_w,crop_h;
- int crop_x,crop_y;
-} vf_priv_dflt = {
- -1,-1,
- -1,-1
-};
-
-//===========================================================================//
-
-static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
- struct mp_image_params *out)
-{
- int width = in->w, height = in->h;
-
- // calculate the missing parameters:
- if(vf->priv->crop_w<=0 || vf->priv->crop_w>width) vf->priv->crop_w=width;
- if(vf->priv->crop_h<=0 || vf->priv->crop_h>height) vf->priv->crop_h=height;
- if(vf->priv->crop_x<0) vf->priv->crop_x=(width-vf->priv->crop_w)/2;
- if(vf->priv->crop_y<0) vf->priv->crop_y=(height-vf->priv->crop_h)/2;
- // rounding:
-
- int orig_x = vf->priv->crop_x;
- int orig_y = vf->priv->crop_y;
-
- struct mp_imgfmt_desc fmt = mp_imgfmt_get_desc(in->imgfmt);
-
- if (fmt.flags & MP_IMGFLAG_HWACCEL) {
- vf->priv->crop_x = 0;
- vf->priv->crop_y = 0;
- } else {
- vf->priv->crop_x = MP_ALIGN_DOWN(vf->priv->crop_x, fmt.align_x);
- vf->priv->crop_y = MP_ALIGN_DOWN(vf->priv->crop_y, fmt.align_y);
- }
-
- if (vf->priv->crop_x != orig_x || vf->priv->crop_y != orig_y) {
- MP_WARN(vf, "Adjusting crop origin to %d/%d for pixel format alignment.\n",
- vf->priv->crop_x, vf->priv->crop_y);
- }
-
- // check:
- if(vf->priv->crop_w+vf->priv->crop_x>width ||
- vf->priv->crop_h+vf->priv->crop_y>height){
- MP_WARN(vf, "Bad position/width/height - cropped area outside of the original!\n");
- return -1;
- }
-
- *out = *in;
- out->w = vf->priv->crop_w;
- out->h = vf->priv->crop_h;
- return 0;
-}
-
-static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
-{
- if (mpi->fmt.flags & MP_IMGFLAG_HWACCEL) {
- mp_image_set_size(mpi, vf->fmt_out.w, vf->fmt_out.h);
- } else {
- mp_image_crop(mpi, vf->priv->crop_x, vf->priv->crop_y,
- vf->priv->crop_x + vf->priv->crop_w,
- vf->priv->crop_y + vf->priv->crop_h);
- }
- return mpi;
-}
-
-static int query_format(struct vf_instance *vf, unsigned int fmt)
-{
- return vf_next_query_format(vf, fmt);
-}
-
-static int vf_open(vf_instance_t *vf){
- MP_WARN(vf, "This filter is deprecated. Use lavfi crop instead.\n");
- vf->reconfig=reconfig;
- vf->filter=filter;
- vf->query_format=query_format;
- return 1;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-static const m_option_t vf_opts_fields[] = {
- OPT_INT("w", crop_w, M_OPT_MIN, .min = 0),
- OPT_INT("h", crop_h, M_OPT_MIN, .min = 0),
- OPT_INT("x", crop_x, M_OPT_MIN, .min = -1),
- OPT_INT("y", crop_y, M_OPT_MIN, .min = -1),
- {0}
-};
-
-const vf_info_t vf_info_crop = {
- .description = "cropping",
- .name = "crop",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &vf_priv_dflt,
- .options = vf_opts_fields,
-};
-
-//===========================================================================//
diff --git a/video/filter/vf_dsize.c b/video/filter/vf_dsize.c
deleted file mode 100644
index 12fa7242f3..0000000000
--- a/video/filter/vf_dsize.c
+++ /dev/null
@@ -1,118 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-#include <limits.h>
-
-#include "config.h"
-#include "common/msg.h"
-#include "options/m_option.h"
-
-#include "video/img_format.h"
-#include "video/mp_image.h"
-#include "vf.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-struct vf_priv_s {
- int w, h;
- int method; // aspect method, 0 -> downscale, 1-> upscale. +2 -> original aspect.
- int round;
- float aspect;
-};
-
-static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
- struct mp_image_params *out)
-{
- int width = in->w, height = in->h;
- int d_width, d_height;
- mp_image_params_get_dsize(in, &d_width, &d_height);
- int w = vf->priv->w;
- int h = vf->priv->h;
- if (vf->priv->aspect < 0.001) { // did the user input aspect or w,h params
- if (w == 0) w = d_width;
- if (h == 0) h = d_height;
- if (w == -1) w = width;
- if (h == -1) h = height;
- if (w == -2) w = h * (double)d_width / d_height;
- if (w == -3) w = h * (double)width / height;
- if (h == -2) h = w * (double)d_height / d_width;
- if (h == -3) h = w * (double)height / width;
- if (vf->priv->method > -1) {
- double aspect = (vf->priv->method & 2) ? ((double)height / width) : ((double)d_height / d_width);
- if ((h > w * aspect) ^ (vf->priv->method & 1)) {
- h = w * aspect;
- } else {
- w = h / aspect;
- }
- }
- if (vf->priv->round > 1) { // round up
- w += (vf->priv->round - 1 - (w - 1) % vf->priv->round);
- h += (vf->priv->round - 1 - (h - 1) % vf->priv->round);
- }
- d_width = w;
- d_height = h;
- } else {
- if (vf->priv->aspect * height > width) {
- d_width = height * vf->priv->aspect + .5;
- d_height = height;
- } else {
- d_height = width / vf->priv->aspect + .5;
- d_width = width;
- }
- }
- *out = *in;
- mp_image_params_set_dsize(out, d_width, d_height);
- return 0;
-}
-
-static int vf_open(vf_instance_t *vf)
-{
- MP_WARN(vf, "This filter is deprecated. No replacement.\n");
-
- vf->reconfig = reconfig;
- return 1;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-const vf_info_t vf_info_dsize = {
- .description = "reset displaysize/aspect",
- .name = "dsize",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &(const struct vf_priv_s){
- .aspect = 0.0,
- .w = -1,
- .h = -1,
- .method = -1,
- .round = 1,
- },
- .options = (const struct m_option[]){
- OPT_INTRANGE("w", w, 0, -3, INT_MAX),
- OPT_INTRANGE("h", h, 0, -3, INT_MAX),
- OPT_INTRANGE("method", method, 0, -1, 3),
- OPT_INTRANGE("round", round, 0, 0, 9999),
- OPT_FLOAT("aspect", aspect, CONF_RANGE, .min = 0, .max = 10),
- {0}
- },
-};
diff --git a/video/filter/vf_expand.c b/video/filter/vf_expand.c
deleted file mode 100644
index 398d90ecba..0000000000
--- a/video/filter/vf_expand.c
+++ /dev/null
@@ -1,178 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdbool.h>
-
-#include <libavutil/common.h>
-
-#include "config.h"
-#include "common/msg.h"
-#include "options/options.h"
-
-#include "video/img_format.h"
-#include "video/mp_image.h"
-#include "vf.h"
-
-#include "options/m_option.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-static struct vf_priv_s {
- // These four values are a backup of the values parsed from the command line.
- // This is necessary so that we do not get a mess upon filter reinit due to
- // e.g. aspect changes and with only aspect specified on the command line,
- // where we would otherwise use the values calculated for a different aspect
- // instead of recalculating them again.
- int cfg_exp_w, cfg_exp_h;
- int cfg_exp_x, cfg_exp_y;
- int exp_w,exp_h;
- int exp_x,exp_y;
- double aspect;
- int round;
-} const vf_priv_dflt = {
- -1,-1,
- -1,-1,
- -1,-1,
- -1,-1,
- 0.,
- 1,
-};
-
-//===========================================================================//
-
-static int reconfig(struct vf_instance *vf, struct mp_image_params *in,
- struct mp_image_params *out)
-{
- int width = in->w, height = in->h;
-
- vf->priv->exp_x = vf->priv->cfg_exp_x;
- vf->priv->exp_y = vf->priv->cfg_exp_y;
- vf->priv->exp_w = vf->priv->cfg_exp_w;
- vf->priv->exp_h = vf->priv->cfg_exp_h;
- if ( vf->priv->exp_w == -1 ) vf->priv->exp_w=width;
- else if (vf->priv->exp_w < -1 ) vf->priv->exp_w=width - vf->priv->exp_w;
- else if ( vf->priv->exp_w<width ) vf->priv->exp_w=width;
- if ( vf->priv->exp_h == -1 ) vf->priv->exp_h=height;
- else if ( vf->priv->exp_h < -1 ) vf->priv->exp_h=height - vf->priv->exp_h;
- else if( vf->priv->exp_h<height ) vf->priv->exp_h=height;
- if (vf->priv->aspect) {
- float adjusted_aspect = vf->priv->aspect;
- adjusted_aspect *= (double)in->p_w/in->p_h;
- if (vf->priv->exp_h < vf->priv->exp_w / adjusted_aspect) {
- vf->priv->exp_h = vf->priv->exp_w / adjusted_aspect + 0.5;
- } else {
- vf->priv->exp_w = vf->priv->exp_h * adjusted_aspect + 0.5;
- }
- }
- if (vf->priv->round > 1) { // round up.
- vf->priv->exp_w = (1 + (vf->priv->exp_w - 1) / vf->priv->round) * vf->priv->round;
- vf->priv->exp_h = (1 + (vf->priv->exp_h - 1) / vf->priv->round) * vf->priv->round;
- }
-
- if(vf->priv->exp_x<0 || vf->priv->exp_x+width>vf->priv->exp_w) vf->priv->exp_x=(vf->priv->exp_w-width)/2;
- if(vf->priv->exp_y<0 || vf->priv->exp_y+height>vf->priv->exp_h) vf->priv->exp_y=(vf->priv->exp_h-height)/2;
-
- struct mp_imgfmt_desc fmt = mp_imgfmt_get_desc(in->imgfmt);
-
- vf->priv->exp_x = MP_ALIGN_DOWN(vf->priv->exp_x, fmt.align_x);
- vf->priv->exp_y = MP_ALIGN_DOWN(vf->priv->exp_y, fmt.align_y);
-
- *out = *in;
- out->w = vf->priv->exp_w;
- out->h = vf->priv->exp_h;
-
- return 0;
-}
-
-static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
-{
- int e_x = vf->priv->exp_x, e_y = vf->priv->exp_y;
- int e_w = vf->priv->exp_w, e_h = vf->priv->exp_h;
-
- if (e_x == 0 && e_y == 0 && e_w == mpi->w && e_h == mpi->h)
- return mpi;
-
- struct mp_image *dmpi = vf_alloc_out_image(vf);
- if (!dmpi) {
- talloc_free(mpi);
- return NULL;
- }
- mp_image_copy_attributes(dmpi, mpi);
-
- struct mp_image cropped = *dmpi;
- mp_image_crop(&cropped, e_x, e_y, e_x + mpi->w, e_y + mpi->h);
- mp_image_copy(&cropped, mpi);
-
- int e_x2 = e_x + MP_ALIGN_DOWN(mpi->w, mpi->fmt.align_x);
- int e_y2 = e_y + MP_ALIGN_DOWN(mpi->h, mpi->fmt.align_y);
-
- // top border (over the full width)
- mp_image_clear(dmpi, 0, 0, e_w, e_y);
- // bottom border (over the full width)
- mp_image_clear(dmpi, 0, e_y2, e_w, e_h);
- // left
- mp_image_clear(dmpi, 0, e_y, e_x, e_y2);
- // right
- mp_image_clear(dmpi, e_x2, e_y, e_w, e_y2);
-
- talloc_free(mpi);
- return dmpi;
-}
-
-static int query_format(struct vf_instance *vf, unsigned int fmt)
-{
- if (!IMGFMT_IS_HWACCEL(fmt))
- return vf_next_query_format(vf, fmt);
- return 0;
-}
-
-static int vf_open(vf_instance_t *vf){
- MP_WARN(vf, "This filter is deprecated. Use lavfi pad instead.\n");
-
- vf->reconfig=reconfig;
- vf->query_format=query_format;
- vf->filter=filter;
- return 1;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-static const m_option_t vf_opts_fields[] = {
- OPT_INT("w", cfg_exp_w, 0),
- OPT_INT("h", cfg_exp_h, 0),
- OPT_INT("x", cfg_exp_x, M_OPT_MIN, .min = -1),
- OPT_INT("y", cfg_exp_y, M_OPT_MIN, .min = -1),
- OPT_DOUBLE("aspect", aspect, M_OPT_MIN, .min = 0),
- OPT_INT("round", round, M_OPT_MIN, .min = 1),
- {0}
-};
-
-const vf_info_t vf_info_expand = {
- .description = "expanding",
- .name = "expand",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &vf_priv_dflt,
- .options = vf_opts_fields,
-};
-
-//===========================================================================//
diff --git a/video/filter/vf_flip.c b/video/filter/vf_flip.c
deleted file mode 100644
index 776f127fa1..0000000000
--- a/video/filter/vf_flip.c
+++ /dev/null
@@ -1,60 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "config.h"
-#include "common/msg.h"
-
-#include "video/mp_image.h"
-#include "vf.h"
-
-#include "video/out/vo.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
-{
- mp_image_vflip(mpi);
- return mpi;
-}
-
-static int query_format(struct vf_instance *vf, unsigned int fmt)
-{
- if (!IMGFMT_IS_HWACCEL(fmt))
- return vf_next_query_format(vf, fmt);
- return 0;
-}
-
-static int vf_open(vf_instance_t *vf){
- MP_WARN(vf, "This filter is deprecated. Use lavfi vflip instead.\n");
-
- vf->filter=filter;
- vf->query_format = query_format;
- return 1;
-}
-
-const vf_info_t vf_info_flip = {
- .description = "flip image upside-down",
- .name = "flip",
- .open = vf_open,
-};
diff --git a/video/filter/vf_gradfun.c b/video/filter/vf_gradfun.c
deleted file mode 100644
index 33bc883c61..0000000000
--- a/video/filter/vf_gradfun.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (C) 2009 Loren Merritt <lorenm@u.washignton.edu>
- *
- * This file is part of mpv.
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <math.h>
-
-#include "vf.h"
-
-#include "common/common.h"
-#include "options/m_option.h"
-
-#include "vf_lavfi.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-struct vf_priv_s {
- float cfg_thresh;
- int cfg_radius;
- float cfg_size;
- int radius;
-
- struct vf_lw_opts *lw_opts;
-} const vf_priv_dflt = {
- .cfg_thresh = 1.5,
- .cfg_radius = -1,
- .cfg_size = -1,
-};
-
-static int lavfi_reconfig(struct vf_instance *vf,
- struct mp_image_params *in,
- struct mp_image_params *out)
-{
- struct vf_priv_s *p = vf_lw_old_priv(vf);
- int w = in->w;
- int h = in->h;
- p->radius = p->cfg_radius;
- if (p->cfg_size > -1)
- p->radius = (p->cfg_size / 100.0f) * sqrtf(w * w + h * h);
- p->radius = MPCLAMP((p->radius+1)&~1, 4, 32);
- vf_lw_update_graph(vf, "gradfun", "%f:%d", p->cfg_thresh, p->radius);
- return 0;
-}
-
-static int vf_open(vf_instance_t *vf)
-{
- MP_WARN(vf, "%s", VF_LW_REPLACE);
-
- bool have_radius = vf->priv->cfg_radius > -1;
- bool have_size = vf->priv->cfg_size > -1;
-
- if (have_radius && have_size) {
- MP_ERR(vf, "scale: gradfun: only one of "
- "radius/size parameters allowed at the same time!\n");
- return 0;
- }
-
- if (!have_radius && !have_size)
- vf->priv->cfg_size = 1.0;
-
- if (vf_lw_set_graph(vf, vf->priv->lw_opts, "gradfun", "%f:4",
- vf->priv->cfg_thresh) >= 0)
- {
- vf_lw_set_reconfig_cb(vf, lavfi_reconfig);
- return 1;
- }
-
- MP_FATAL(vf, "This version of libavfilter has no 'gradfun' filter.\n");
- return 0;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-static const m_option_t vf_opts_fields[] = {
- OPT_FLOATRANGE("strength", cfg_thresh, 0, 0.51, 255),
- OPT_INTRANGE("radius", cfg_radius, 0, 4, 32),
- OPT_FLOATRANGE("size", cfg_size, 0, 0.1, 5.0),
- OPT_SUBSTRUCT("", lw_opts, vf_lw_conf, 0),
- {0}
-};
-
-const vf_info_t vf_info_gradfun = {
- .description = "gradient deband",
- .name = "gradfun",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &vf_priv_dflt,
- .options = vf_opts_fields,
-};
diff --git a/video/filter/vf_mirror.c b/video/filter/vf_mirror.c
deleted file mode 100644
index 91cc9a5503..0000000000
--- a/video/filter/vf_mirror.c
+++ /dev/null
@@ -1,38 +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 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 <stddef.h>
-
-#include "vf.h"
-#include "vf_lavfi.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-static int vf_open(vf_instance_t *vf)
-{
- MP_WARN(vf, "This filter is deprecated. Use lavfi hflip instead.\n");
- return vf_lw_set_graph(vf, NULL, NULL, "hflip") >= 0;
-}
-
-const vf_info_t vf_info_mirror = {
- .description = "horizontal mirror",
- .name = "mirror",
- .open = vf_open,
-};
diff --git a/video/filter/vf_noformat.c b/video/filter/vf_noformat.c
deleted file mode 100644
index b6a71d9417..0000000000
--- a/video/filter/vf_noformat.c
+++ /dev/null
@@ -1,72 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <inttypes.h>
-
-#include "config.h"
-#include "common/msg.h"
-
-#include "video/img_format.h"
-#include "video/mp_image.h"
-#include "vf.h"
-
-#include "options/m_option.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-static struct vf_priv_s {
- int fmt;
-} const vf_priv_dflt = {
- IMGFMT_420P
-};
-
-//===========================================================================//
-
-static int query_format(struct vf_instance *vf, unsigned int fmt){
- if(fmt!=vf->priv->fmt)
- return vf_next_query_format(vf,fmt);
- return 0;
-}
-
-static int vf_open(vf_instance_t *vf){
- MP_WARN(vf, "This filter is deprecated and will be removed (no replacement)\n");
- vf->query_format=query_format;
- return 1;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-static const m_option_t vf_opts_fields[] = {
- OPT_IMAGEFORMAT("fmt", fmt, 0),
- {0}
-};
-
-const vf_info_t vf_info_noformat = {
- .description = "disallow one output format",
- .name = "noformat",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &vf_priv_dflt,
- .options = vf_opts_fields,
-};
-
-//===========================================================================//
diff --git a/video/filter/vf_pullup.c b/video/filter/vf_pullup.c
deleted file mode 100644
index 83d5f177b3..0000000000
--- a/video/filter/vf_pullup.c
+++ /dev/null
@@ -1,83 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "common/msg.h"
-#include "options/m_option.h"
-
-#include "vf.h"
-
-#include "vf_lavfi.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-struct vf_priv_s {
- struct pullup_context *ctx;
- int init;
- int fakecount;
- double lastpts;
- int junk_left, junk_right, junk_top, junk_bottom;
- int strict_breaks, metric_plane;
- struct vf_lw_opts *lw_opts;
-};
-
-static int vf_open(vf_instance_t *vf)
-{
- MP_WARN(vf, "%s", VF_LW_REPLACE);
-
- struct vf_priv_s *p = vf->priv;
- const char *pname[3] = {"y", "u", "v"};
- if (vf_lw_set_graph(vf, p->lw_opts, "pullup", "%d:%d:%d:%d:%d:%s",
- p->junk_left, p->junk_right, p->junk_top, p->junk_bottom,
- p->strict_breaks, pname[p->metric_plane]) >= 0)
- {
- return 1;
- }
-
- MP_FATAL(vf, "This version of libavfilter has no 'pullup' filter.\n");
- return 0;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-const vf_info_t vf_info_pullup = {
- .description = "pullup (from field sequence to frames)",
- .name = "pullup",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .priv_defaults = &(const struct vf_priv_s){
- .junk_left = 1,
- .junk_right = 1,
- .junk_top = 4,
- .junk_bottom = 4,
- },
- .options = (const struct m_option[]){
- OPT_INT("jl", junk_left, 0),
- OPT_INT("jr", junk_right, 0),
- OPT_INT("jt", junk_top, 0),
- OPT_INT("jb", junk_bottom, 0),
- OPT_INT("sb", strict_breaks, 0),
- OPT_CHOICE("mp", metric_plane, 0, ({"y", 0}, {"u", 1}, {"v", 2})),
- OPT_SUBSTRUCT("", lw_opts, vf_lw_conf, 0),
- {0}
- },
-};
diff --git a/video/filter/vf_rotate.c b/video/filter/vf_rotate.c
deleted file mode 100644
index 443a0dac42..0000000000
--- a/video/filter/vf_rotate.c
+++ /dev/null
@@ -1,106 +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 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include <inttypes.h>
-
-#include "common/msg.h"
-#include "options/m_option.h"
-
-#include "vf.h"
-#include "vf_lavfi.h"
-
-#include "config.h"
-#if !HAVE_GPL
-#error GPL only
-#endif
-
-struct vf_priv_s {
- int angle;
- int warn;
- struct vf_lw_opts *lw_opts;
-};
-
-static const char *const rot[] = {
- "null",
- "transpose=clock",
- "vflip,hflip",
- "transpose=cclock",
- "null", // actually set in lavfi_recreate()
-};
-
-static int lavfi_reconfig(struct vf_instance *vf,
- struct mp_image_params *in,
- struct mp_image_params *out)
-{
- struct vf_priv_s *p = vf_lw_old_priv(vf);
- if (p->angle == 4) { // "auto"
- int r = in->rotate;
- if (r < 0 || r >= 360) {
- MP_ERR(vf, "Can't apply rotation of %d degrees.\n", r);
- return -1;
- }
- if (r % 90) {
- double a = r / 180.0 * M_PI;
- vf_lw_update_graph(vf, NULL, "rotate=%f:ow=rotw(%f):oh=roth(%f)",
- a, a, a);
- } else {
- vf_lw_update_graph(vf, NULL, "%s", rot[(r / 90) % 360]);
- }
- out->rotate = 0;
- }
- return 0;
-}
-
-static int vf_open(vf_instance_t *vf)
-{
- struct vf_priv_s *p = vf->priv;
-
- if (p->warn)
- MP_WARN(vf, "%s", VF_LW_REPLACE);
-
- if (vf_lw_set_graph(vf, p->lw_opts, NULL, "%s", rot[p->angle]) >= 0) {
- vf_lw_set_reconfig_cb(vf, lavfi_reconfig);
- return 1;
- }
-
- return 0;
-}
-
-#define OPT_BASE_STRUCT struct vf_priv_s
-const vf_info_t vf_info_rotate = {
- .description = "rotate",
- .name = "rotate",
- .open = vf_open,
- .priv_size = sizeof(struct vf_priv_s),
- .options = (const struct m_option[]){
- OPT_CHOICE("angle", angle, 0,
- ({"0", 0},
- {"90", 1},
- {"180", 2},
- {"270", 3},
- {"auto", 4})),
- OPT_FLAG("warn", warn, 0, OPTDEF_INT(1)),
- OPT_SUBSTRUCT("", lw_opts, vf_lw_conf, 0),
- {0}
- },
-};
-
-//===========================================================================//
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c
deleted file mode 100644
index 28508e4466..0000000000
--- a/video/filter/vf_scale.c
+++ /dev/null
@@ -1,258 +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 General Public License as published by