From c3788543f55199fc729a49f1402a9e13aaefbd85 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 26 Dec 2012 21:13:58 +0100 Subject: vf_expand: support more image formats This did random things with some image formats, including 10 bit formats. Fixes the mp_image_clear() function too. This still has some caveats: - doesn't clear alpha to opaque (too hard with packed RGB, and is rarely needed) - sets luma to 0 for mpeg-range YUV, instead of the lowest possible value (e.g. 16 for 8 bit) --- video/mp_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/mp_image.h') diff --git a/video/mp_image.h b/video/mp_image.h index f5f246021a..dd2c451a0b 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -92,7 +92,6 @@ typedef struct mp_image { } mp_image_t; struct mp_image *mp_image_alloc(unsigned int fmt, int w, int h); -void mp_image_clear(struct mp_image *mpi, int x0, int y0, int w, int h); void mp_image_copy(struct mp_image *dmpi, struct mp_image *mpi); void mp_image_copy_attributes(struct mp_image *dmpi, struct mp_image *mpi); struct mp_image *mp_image_new_copy(struct mp_image *img); @@ -102,6 +101,7 @@ void mp_image_make_writeable(struct mp_image *img); void mp_image_setrefp(struct mp_image **p_img, struct mp_image *new_value); void mp_image_unrefp(struct mp_image **p_img); +void mp_image_clear(struct mp_image *mpi, int x0, int y0, int x1, int y1); void mp_image_crop(struct mp_image *img, int x0, int y0, int x1, int y1); void mp_image_crop_rc(struct mp_image *img, struct mp_rect rc); -- cgit v1.2.3