[FFmpeg-devel] [PATCH]Make CDXL palette opaque

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Feb 17 21:24:28 CET 2012


Hi!

Afaict, there is no transparency information in CDXL files.

Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index a53a001..8c9bea9 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -56,7 +56,7 @@ static void import_palette(CDXLVideoContext *c, uint32_t *new_palette)
         unsigned r   = ((rgb >> 8) & 0xF) * 0x11;
         unsigned g   = ((rgb >> 4) & 0xF) * 0x11;
         unsigned b   =  (rgb       & 0xF) * 0x11;
-        AV_WN32(&new_palette[i], (r << 16) | (g << 8) | b);
+        AV_WN32(&new_palette[i], (0xFFU << 24) | (r << 16) | (g << 8) | b);
     }
 }
 


More information about the ffmpeg-devel mailing list