summaryrefslogtreecommitdiffstats
path: root/video/sws_utils.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-10-20 19:36:40 +0200
committerwm4 <wm4@nowhere>2019-10-20 19:41:18 +0200
commit62bd8da490bab7af1fcb80a6f944d670c752c5ab (patch)
treef698313f3ad779e355d6c4e0f8e723cd22b8f22c /video/sws_utils.h
parenta495bfe373b696c13df85ade772d33611533de8a (diff)
downloadmpv-62bd8da490bab7af1fcb80a6f944d670c752c5ab.tar.bz2
mpv-62bd8da490bab7af1fcb80a6f944d670c752c5ab.tar.xz
sws_utils: provide function to check whether a format pair is supported
Normally, input and output are orthogonal. But zimg may gain image formats not supported by FFmpeg, which means the conversion will only work if zimg is used at all. This on the other hand, depends on whether the other format is also supported by zimg. (For example, a later commit adds RGB30 output to zimg. libswscale does not support this format. But if you have P010 as input, which the zimg wrapper does not support at all, the conversion won't work.) This makes such a function needed; so add it.
Diffstat (limited to 'video/sws_utils.h')
-rw-r--r--video/sws_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/sws_utils.h b/video/sws_utils.h
index 1d40ceab66..c305bda748 100644
--- a/video/sws_utils.h
+++ b/video/sws_utils.h
@@ -59,6 +59,9 @@ void mp_sws_set_from_cmdline(struct mp_sws_context *ctx, struct mpv_global *g);
int mp_sws_scale(struct mp_sws_context *ctx, struct mp_image *dst,
struct mp_image *src);
+bool mp_sws_supports_formats(struct mp_sws_context *ctx,
+ int imgfmt_out, int imgfmt_in);
+
struct mp_image *mp_img_swap_to_native(struct mp_image *img);
#endif /* MP_SWS_UTILS_H */