summaryrefslogtreecommitdiffstats
path: root/video/mp_image.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-07-18 13:17:56 +0200
committerwm4 <wm4@nowhere>2013-07-18 13:31:01 +0200
commitd8659c9aa0ab74a3dabb321f34e93dd7f3890b03 (patch)
tree5116f8710d67cd9409dc54dee2e3cf5ef5e99bc6 /video/mp_image.h
parent48789b354648b9892ec63dc91b91f7a3d5b588e4 (diff)
downloadmpv-d8659c9aa0ab74a3dabb321f34e93dd7f3890b03.tar.bz2
mpv-d8659c9aa0ab74a3dabb321f34e93dd7f3890b03.tar.xz
sws_utils: refactor swscale wrapper code
This splits the monolithic mp_image_swscale() function into a bunch of functions and a context struct. This means it's possible to set arbitrary parameters (e.g. even obscure ones without getting in the way), and you don't have to create the context on every call. This code is preparation for removing duplicated libswscale API usage from other parts of the code.
Diffstat (limited to 'video/mp_image.h')
-rw-r--r--video/mp_image.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/video/mp_image.h b/video/mp_image.h
index 69e3ae52b0..7324423967 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -131,15 +131,18 @@ struct mp_image *mp_image_new_external_ref(struct mp_image *img, void *arg,
bool (*is_unique)(void *arg),
void (*free)(void *arg));
-enum mp_csp mp_image_csp(struct mp_image *img);
-enum mp_csp_levels mp_image_levels(struct mp_image *img);
-
struct mp_csp_details;
void mp_image_set_colorspace_details(struct mp_image *image,
struct mp_csp_details *csp);
void mp_image_params_guess_csp(struct mp_image_params *params);
+bool mp_image_params_equals(const struct mp_image_params *p1,
+ const struct mp_image_params *p2);
+
+void mp_image_params_from_image(struct mp_image_params *params,
+ const struct mp_image *image);
+
struct AVFrame;
void mp_image_copy_fields_from_av_frame(struct mp_image *dst,
struct AVFrame *src);