summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/sws_utils.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-01 02:12:47 +0100
committerwm4 <wm4@nowhere>2012-11-01 02:12:47 +0100
commit84829a4ea1903e5db5782b72861fabc503a589cb (patch)
tree26b4acbaf6dd4b255278dcc67f28bd83357c3b86 /libmpcodecs/sws_utils.h
parente45dd051c304dec189d0d4d792a89c2988c3fa71 (diff)
parentf4069259cf7ffd24ac2a5b64e26a386185e94c7b (diff)
downloadmpv-84829a4ea1903e5db5782b72861fabc503a589cb.tar.bz2
mpv-84829a4ea1903e5db5782b72861fabc503a589cb.tar.xz
Merge branch 'osd_changes' into master
Conflicts: DOCS/man/en/options.rst
Diffstat (limited to 'libmpcodecs/sws_utils.h')
-rw-r--r--libmpcodecs/sws_utils.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/libmpcodecs/sws_utils.h b/libmpcodecs/sws_utils.h
new file mode 100644
index 0000000000..a0cc47d850
--- /dev/null
+++ b/libmpcodecs/sws_utils.h
@@ -0,0 +1,33 @@
+#ifndef MPLAYER_SWS_UTILS_H
+#define MPLAYER_SWS_UTILS_H
+
+#include <stdbool.h>
+#include <libswscale/swscale.h>
+
+struct mp_image;
+struct mp_csp_details;
+
+// libswscale currently requires 16 bytes alignment for row pointers and
+// strides. Otherwise, it will print warnings and use slow codepaths.
+// Guaranteed to be a power of 2 and > 1.
+#define SWS_MIN_BYTE_ALIGN 16
+
+void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam,
+ SwsFilter **dstFilterParam);
+struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat,
+ int dstW, int dstH,
+ int dstFormat);
+struct SwsContext *sws_getContextFromCmdLine_hq(int srcW, int srcH,
+ int srcFormat, int dstW,
+ int dstH,
+ int dstFormat);
+int mp_sws_set_colorspace(struct SwsContext *sws, struct mp_csp_details *csp);
+
+bool mp_sws_supported_format(int imgfmt);
+
+void mp_image_swscale(struct mp_image *dst, struct mp_image *src,
+ int my_sws_flags);
+
+#endif /* MP_SWS_UTILS_H */
+
+// vim: ts=4 sw=4 et tw=80