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

Michael Niedermayer michaelni at gmx.at
Thu Apr 21 22:41:41 CEST 2011


On Thu, Apr 21, 2011 at 12:17:46PM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Thu, Apr 21, 2011 at 12:13 PM, Stefano Sabatini
> <stefano.sabatini-lala at poste.it> wrote:
> > On date Wednesday 2011-04-20 13:56:56 +0200, Sebastian Vater encoded:
> >> +        if (!st->codec->extradata) {
> >> +            st->codec->extradata_size = IFF_EXTRA_VIDEO_SIZE;
> >> +            st->codec->extradata      = av_malloc(IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
> >> +            if (!st->codec->extradata)
> >> +                return AVERROR(ENOMEM);
> >> +        }
> >> +        buf = st->codec->extradata;
> >> +        bytestream_put_be16(&buf, IFF_EXTRA_VIDEO_SIZE);
> >> +        bytestream_put_byte(&buf, iff->compression);
> >> +        bytestream_put_byte(&buf, iff->bpp);
> >> +        bytestream_put_byte(&buf, iff->ham);
> >> +        bytestream_put_byte(&buf, iff->flags);
> >> +        bytestream_put_be16(&buf, iff->transparency);
> >> +        bytestream_put_byte(&buf, iff->masking);
> >
> > I confess I have not much experience with this way of passing data
> > from the demuxer to the decoder, and I remember it was already
> > discussed, but isn't this ABI fragile, isn't this creating a lavc/lavf
> > coupling?
> 
> Yeah, this is what Kostya added the AVPacket.side_data for.

side data has been added to pass per packet data that isnt part the
normal codec bitstream. (if its smart to store it like that ill
ignore here)

But iam sure you can see that above is global data not per packet data.

the ABI isnt pretty, i agree with stefano but passing that in
side data doesnt change that.If you have a better suggestion iam
interrested, if not i see no reason to change the quoted code


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110421/ee953c9c/attachment.asc>


More information about the ffmpeg-devel mailing list