From 1cbf1ec46835300d1226068487b90476aff73ce8 Mon Sep 17 00:00:00 2001 From: siretart Date: Tue, 1 Jun 2010 21:07:02 +0000 Subject: avoid using swscale internals by copying in palette8torbg16 and its bgr variant git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31303 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_palette.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libmpcodecs/vf_palette.c') diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c index 918e32cacb..c7db300396 100644 --- a/libmpcodecs/vf_palette.c +++ b/libmpcodecs/vf_palette.c @@ -28,9 +28,9 @@ #include "img_format.h" #include "mp_image.h" #include "vf.h" +#include "mpbswap.h" #include "libswscale/swscale.h" -#include "libswscale/rgb2rgb.h" //===========================================================================// @@ -53,6 +53,23 @@ static const unsigned int rgb_list[]={ 0 }; +/** + * Palette is assumed to contain BGR16, see rgb32to16 to convert the palette. + */ +static void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) +{ + long i; + for (i=0; i