[FFmpeg-devel] [PATCH] HAM6/HAM8 support for IFF demuxer/decoder

Sebastian Vater cdgs.basty
Sun May 9 16:52:24 CEST 2010


Sebastian Vater a ?crit :
> Hope new attached patch is fine now ;)
>   
Well, I just did a very extensive test of my latest HAM patch and thanks
to this, I found some smaller errors.

I was testing old libavfilter/iff.c with new libavcodec/iff.c and vice
versa.

Thanks to this, I've found a bug with colormap handling, which caused
all images to be grayscale if libavcodec/iff.c is new and
libavfilter/iff.c is old.

Further, I miscalculated number of palette entries in CMAP (should be
extrasize / 3).

Also I moved other stuff from iff.h into libavfilter/iff.c (CAMG chunk
stuff) and also to libavcodec/iff.c (GRAY2RGB macro).

BTW, if someone wants to test the new grayscale stuff, just replace in
libavformat/iff.c:
#define ID_CMAP       MKTAG('C','M','A','P')

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

This will make the demuxer think there's no CMAP chunk (since there's no
CMAp in any IFF file) and thus force the decoder utilizing the grayscale
palette.

If you test this with A4000T_HAM6.IFF and A4000T_HAM8.IFF you will be
surprised how much it still looks like the original image ;-)

So, have fun with this latest patch...

-- 

Best regards,
                   :-) Basty/CDGS (-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-ham-support.patch
Type: text/x-patch
Size: 20194 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100509/9c9d7d4d/attachment.bin>



More information about the ffmpeg-devel mailing list