diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2012-10-24 19:00:49 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 21:55:43 +0200 |
commit | 64ac38c4d30e30783032a4b65f34f4fb50761c7b (patch) | |
tree | b2047cd62fe74b3702a2fd648e9af09aaaa42f55 /libmpcodecs/sws_utils.h | |
parent | 4e89851aa128a614f59ff4885af384a266cb24e6 (diff) | |
download | mpv-64ac38c4d30e30783032a4b65f34f4fb50761c7b.tar.bz2 mpv-64ac38c4d30e30783032a4b65f34f4fb50761c7b.tar.xz |
libmpcodecs: move vf_scale.c swscale helper functions to sws_utils.c
Extracted/rebased by wm4 from commits 93978f17b76d..13211ef5fc20.
Actual mp_image_swscale is added in a later commit.
Diffstat (limited to 'libmpcodecs/sws_utils.h')
-rw-r--r-- | libmpcodecs/sws_utils.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libmpcodecs/sws_utils.h b/libmpcodecs/sws_utils.h new file mode 100644 index 0000000000..a8dc970d08 --- /dev/null +++ b/libmpcodecs/sws_utils.h @@ -0,0 +1,27 @@ +#ifndef MPLAYER_SWS_UTILS_H +#define MPLAYER_SWS_UTILS_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); + +#endif /* MP_SWS_UTILS_H */ + +// vim: ts=4 sw=4 et tw=80 |