[MPlayer-dev-eng] [PATCH] palette

Joey Parrish joey at nicewarrior.org
Tue Nov 18 20:37:19 CET 2003


Hello,

This patch is for vf_palette.  The problem is that vf_palette
uses conversion routines that assume that the palette itself
is the same depth as the output colorspace.  So if it outputs
to 16 bit space, then it thinks the pal is 16-bits.  I don't
know where this would be true, but all my palette'd 8-bit avi's
and gif's and fli's all have 24-bit palette.  Since I'm not
about to rewrite the rgb2rgb code, I instead comment out support
for BGR/RGB 15/16 in vf_palette.  Now they will output correct
images to 24 or 32 bit colorspace, and if the vo needs 15 or 16,
vf_scale will do it's job and convert correctly.

Comments?  Is this patch okay?

--Joey

-- 
"Living in the complex world of the future is somewhat
like having bees live in your head.  But, there they are."
-------------- next part --------------
comment out 15 and 16 bit output for vf_palette
 because the conversion routines assume that your palettes
 are also 15/16 bits,
  which they AREN'T.
this is cheaper to code than to fix the conversion routines

diff -ur main.cvs/libmpcodecs/vf_palette.c main.raw/libmpcodecs/vf_palette.c
--- main.cvs/libmpcodecs/vf_palette.c	2003-03-15 12:01:02.000000000 -0600
+++ main.raw/libmpcodecs/vf_palette.c	2003-11-16 21:28:24.077980800 -0600
@@ -17,15 +17,15 @@
 static unsigned int bgr_list[]={
     IMGFMT_BGR32,
     IMGFMT_BGR24,
-    IMGFMT_BGR16,
-    IMGFMT_BGR15,
+//    IMGFMT_BGR16,
+//    IMGFMT_BGR15,
     0
 };
 static unsigned int rgb_list[]={
     IMGFMT_RGB32,
     IMGFMT_RGB24,
-    IMGFMT_RGB16,
-    IMGFMT_RGB15,
+//    IMGFMT_RGB16,
+//    IMGFMT_RGB15,
     0
 };
 


More information about the MPlayer-dev-eng mailing list