summaryrefslogtreecommitdiffstats
path: root/video/filter/vf.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-07 19:32:03 +0100
committerwm4 <wm4@nowhere>2013-12-07 19:32:03 +0100
commit75d3bf4711f88a79af5fd3246a9503dbd6e01586 (patch)
treec1515f59f2d8fe1e4bab88a891fae97e8a8b3262 /video/filter/vf.c
parent6025abffda964b07d04ff2806527d85d956e28ba (diff)
downloadmpv-75d3bf4711f88a79af5fd3246a9503dbd6e01586.tar.bz2
mpv-75d3bf4711f88a79af5fd3246a9503dbd6e01586.tar.xz
video/filter: remove vf_match_csp()
This function improves automatic filter insertion, but this really should be done by the generic filter code. Remove vf_match_csp() and all code using it as preparation for that. This commit temporarily makes handling of filter insertion worse for now, but it will be fixed with the following commits.
Diffstat (limited to 'video/filter/vf.c')
-rw-r--r--video/filter/vf.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c
index 5b226003b4..03044906f9 100644
--- a/video/filter/vf.c
+++ b/video/filter/vf.c
@@ -282,60 +282,6 @@ vf_instance_t *vf_open_filter(struct MPOpts *opts, vf_instance_t *next,
return vf_open(opts, next, name, args);
}
-//============================================================================
-
-unsigned int vf_match_csp(vf_instance_t **vfp, const unsigned int *list,
- unsigned int preferred)
-{
- vf_instance_t *vf = *vfp;
- struct MPOpts *opts = vf->opts;
- const unsigned int *p;
- unsigned int best = 0;
- int ret;
- if ((p = list))
- while (*p) {
- ret = vf->query_format(vf, *p);
- mp_msg(MSGT_VFILTER, MSGL_V, "[%s] query(%s) -> %x\n",
- vf->info->name, vo_format_name(*p), ret);
- if (ret & VFCAP_CSP_SUPPORTED_BY_HW) {
- best = *p;
- break;
- }
- if (ret & VFCAP_CSP_SUPPORTED && !best)
- best = *p;
- ++p;
- }
- if (best)
- return best; // bingo, they have common csp!
- // ok, then try with scale:
- if (vf->info == &vf_info_scale)
- return 0; // avoid infinite recursion!
- vf = vf_open_filter(opts, vf, "scale", NULL);
- if (!vf)
- return 0; // failed to init "scale"
- // try the preferred csp first:
- if (preferred && vf->query_format(vf, preferred))
- best = preferred;
- else
- // try the list again, now with "scaler" :
- if ((p = list))
- while (*p) {
- ret = vf->query_format(vf, *p);
- mp_msg(MSGT_VFILTER, MSGL_V, "[%s] query(%s) -> %x\n",
- vf->info->name, vo_format_name(*p), ret);
- if (ret & VFCAP_CSP_SUPPORTED_BY_HW) {
- best = *p;
- break;
- }
- if (ret & VFCAP_CSP_SUPPORTED && !best)
- best = *p;
- ++p;
- }
- if (best)
- *vfp = vf; // else uninit vf !FIXME!
- return best;
-}
-
// Used by filters to add a filtered frame to the output queue.
// Ownership of img is transferred from caller to the filter chain.
void vf_add_output_frame(struct vf_instance *vf, struct mp_image *img)