From 75d3bf4711f88a79af5fd3246a9503dbd6e01586 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 7 Dec 2013 19:32:03 +0100 Subject: 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. --- video/filter/vf.c | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) (limited to 'video/filter/vf.c') 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) -- cgit v1.2.3