[FFmpeg-devel] [PATCH] IFF: Add grayscale support to decoder

Sebastian Vater cdgs.basty
Mon May 10 17:32:15 CEST 2010


Namaste!

Here's a patch which adds grayscale support to IFF decoder.

According to IFF standard, a grayscale palette should be created, when
no CMAP chunk has been found.

Therefore I added creating a grayscale table according to the IFF standard.
You can easily test this patch, when you replace (in lavf/iff.c):
#define ID_CMAP       MKTAG('C','M','A','P')

to sth. like:
#define ID_CMAP       MKTAG('C','M','A','p')

So the IFF demuxer doesn't find the CMAP chunk anymore...

Please note that this patch requires:
[PATCH] IFF: Handle palette underflows correctly in decoder

The reason is that I have to check if count == 0 which the FFMIN does in
the handle palette underflow (actually a color map with length of zero
is threatened as palette underflow by a decoder w/o this patch).

-- 

Best regards,
                   :-) Basty/CDGS (-:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-decoder-grayscale-support.patch
Type: text/x-patch
Size: 2128 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100510/3a0231a2/attachment.bin>



More information about the ffmpeg-devel mailing list