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

Sebastian Vater cdgs.basty
Thu May 6 22:50:50 CEST 2010


Ronald S. Bultje a ?crit :
> Hi,
>
> On Thu, May 6, 2010 at 2:53 PM, Sebastian Vater
> <cdgs.basty at googlemail.com> wrote:
>   
>> Mike Scheutzow a ?crit :
>>     
>>> The FFmpeg demuxer might be used without the FFmpeg decoder, or the
>>> FFmpeg decoder might be used without the FFmpeg demuxer. You don't
>>> want to cause a segfault if a user chooses to use the libraries this way.
>>>       
>> Well, then it's probably the best way to duplicate the
>> ff_cmap_read_palette function, so it's also available in the demuxer
>> directly, what do you think?
>>     
>
> Sharing the code is OK. But the decoder shouldn't add stuff to the
> function that the demuxer doesn't need, create a new function instead.
>   

So, here's a new patch, which removes the call of ff_cmap_read_palette
from libavformat/iff.c completely and also removed prototype declaration
it from libavcodec/iff.h and made it static with the ff_ prefix removed
in libavcodec/iff.c

There's no CODEC_ID_RAWVIDEO anymore and decoding the chunky PBM file is
done within decode_frame_ilbm now.

I should notice, however, I investigated the ASH.LBM file (which is a
PBM, but byterun1 compressed).

Looking at the demuxer shows me that it normally uses the ILBM code line
except that decode_frame_byterun1 handles this special case which showed
me that it's the same as decodeplane8 stuff just without calling
decodeplane8 at all (so I assume that it's just chunky pixel data).

I implemented the same behaviour in decode_frame_ilbm by just memcpy'ing
each line into the output buffer.

Please review that carefully!

-- 

Best regards,
                   :-) Basty/CDGS (-

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



More information about the ffmpeg-devel mailing list