diff options
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf.c | 2 | ||||
-rw-r--r-- | video/filter/vf.h | 2 | ||||
-rw-r--r-- | video/filter/vf_lavfi.c | 2 | ||||
-rw-r--r-- | video/filter/vf_scale.c | 20 | ||||
-rw-r--r-- | video/filter/vf_vapoursynth.c | 2 |
5 files changed, 6 insertions, 22 deletions
diff --git a/video/filter/vf.c b/video/filter/vf.c index 0dd9b1f0b1..c1682c9652 100644 --- a/video/filter/vf.c +++ b/video/filter/vf.c @@ -580,7 +580,7 @@ static void update_formats(struct vf_chain *c, struct vf_instance *vf, // error messages in some cases, so we can configure all filter // until it fails, which will be visible in vf_print_filter_chain(). for (int n = IMGFMT_START; n < IMGFMT_END; n++) - vf->last_outfmts[n - IMGFMT_START] = VFCAP_CSP_SUPPORTED; + vf->last_outfmts[n - IMGFMT_START] = 1; query_formats(fmts, vf); } } diff --git a/video/filter/vf.h b/video/filter/vf.h index 37ad4ca29c..07f38d680b 100644 --- a/video/filter/vf.h +++ b/video/filter/vf.h @@ -24,8 +24,6 @@ #include "video/mp_image.h" #include "common/common.h" -#include "video/vfcap.h" - struct MPOpts; struct mpv_global; struct vf_instance; diff --git a/video/filter/vf_lavfi.c b/video/filter/vf_lavfi.c index da455f1c09..a356229a30 100644 --- a/video/filter/vf_lavfi.c +++ b/video/filter/vf_lavfi.c @@ -268,7 +268,7 @@ static int query_format(struct vf_instance *vf, unsigned int fmt) // allow us to do anything more sophisticated. // This breaks with filters which accept input pixel formats not // supported by libswscale. - return mp_sws_supported_format(fmt) ? VFCAP_CSP_SUPPORTED : 0; + return !!mp_sws_supported_format(fmt); } static AVFrame *mp_to_av(struct vf_instance *vf, struct mp_image *img) diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c index d9506f31bc..8b513d6dcc 100644 --- a/video/filter/vf_scale.c +++ b/video/filter/vf_scale.c @@ -220,25 +220,11 @@ static int control(struct vf_instance *vf, int request, void *data) return CONTROL_UNKNOWN; } -//===========================================================================// - static int query_format(struct vf_instance *vf, unsigned int fmt) { - if (!IMGFMT_IS_HWACCEL(fmt) && imgfmt2pixfmt(fmt) != AV_PIX_FMT_NONE) { - if (sws_isSupportedInput(imgfmt2pixfmt(fmt)) < 1) - return 0; - int best = find_best_out(vf, fmt); - int flags; - if (!best) - return 0; // no matching out-fmt - flags = vf_next_query_format(vf, best); - if (!(flags & (VFCAP_CSP_SUPPORTED | VFCAP_CSP_SUPPORTED_BY_HW))) - return 0; - if (fmt != best) - flags &= ~VFCAP_CSP_SUPPORTED_BY_HW; - return flags; - } - return 0; // nomatching in-fmt + if (IMGFMT_IS_HWACCEL(fmt) || sws_isSupportedInput(imgfmt2pixfmt(fmt)) < 1) + return 0; + return !!find_best_out(vf, fmt); } static void uninit(struct vf_instance *vf) diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c index ea5e86d599..61959473a5 100644 --- a/video/filter/vf_vapoursynth.c +++ b/video/filter/vf_vapoursynth.c @@ -654,7 +654,7 @@ static int config(struct vf_instance *vf, int width, int height, static int query_format(struct vf_instance *vf, unsigned int fmt) { - return mp_to_vs(fmt) != pfNone ? VFCAP_CSP_SUPPORTED : 0; + return mp_to_vs(fmt) != pfNone; } static int control(vf_instance_t *vf, int request, void *data) |