[FFmpeg-devel] [PATCH] Huffyuv: Align the image data in adaptive Huffman tables mode
Michael Kaufmann
hallo
Sun Aug 8 21:59:47 CEST 2010
This patch is for the "adaptive Huffman tables" mode of Huffyuv. In this
mode, three per-frame huffman tables are saved, and then the actual
image data. This patch aligns the image data by enlarging one of the
three Huffman tables by up to 3 bytes.
If the the image data is not aligned, then the bitstream is not saved in
little endian (like the bitstream of the original Huffyuv codec), but in
a strange mixture. Decoding the frame is much easier for other decoders
if the image data is aligned, and it is also possible with better
performance.
A detailed explanation of the alignment problems can be found in the 3rd
comment of this blog entry:
http://www.virtualdub.org/blog/pivot/entry.php?id=203
This patch enlarges the Huffman tables in a backwards-compatible way to
align the image data. Video files generated with this patch can be read
with older ffmeg versions without any problems. They can also be read by
the built-in Huffyuv decoder of VirtualDub.
I hope you find this patch useful.
Regards,
Michael
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Huffyuv.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100808/d6f8e15c/attachment.asc>
More information about the ffmpeg-devel
mailing list