From 2b991422f8fd6865bd5d0069a3f91827a4e6016e Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Tue, 1 Jun 2010 19:35:16 +0000 Subject: deprecate palette8topacked32 in favor of public API functions sws_convertPalette8ToPacked32 and -24 additionallym deprecate palette8torgb16 and its bgr variant without replacement. These functions are not meant to be used by applications. Discussed at: http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/109340 Originally committed as revision 31301 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale --- libswscale/swscale.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'libswscale/swscale.h') diff --git a/libswscale/swscale.h b/libswscale/swscale.h index f6e0ccfd48..5a9f97c5fe 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" #define LIBSWSCALE_VERSION_MAJOR 0 -#define LIBSWSCALE_VERSION_MINOR 10 +#define LIBSWSCALE_VERSION_MINOR 11 #define LIBSWSCALE_VERSION_MICRO 0 #define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \ @@ -303,4 +303,29 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, const double *param); +/** + * Converts an 8bit paletted frame into a frame with a color depth of 32-bits. + * + * The output frame will have the same packed format as the palette. + * + * @param src source frame buffer + * @param dst destination frame buffer + * @param num_pixels number of pixels to convert + * @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src + */ +void sws_convertPalette8ToPacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); + +/** + * Converts an 8bit paletted frame into a frame with a color depth of 24 bits. + * + * With the palette format "ABCD", the destination frame ends up with the format "ABC". + * + * @param src source frame buffer + * @param dst destination frame buffer + * @param num_pixels number of pixels to convert + * @param palette array with [256] entries, which must match color arrangement (RGB or BGR) of src + */ +void sws_convertPalette8ToPacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette); + + #endif /* SWSCALE_SWSCALE_H */ -- cgit v1.2.3