[FFmpeg-devel] [PATCH] DeluxePaint Animation playback system (r2)

Peter Ross pross
Tue Sep 1 14:21:03 CEST 2009


On Fri, Aug 28, 2009 at 04:31:51PM +0200, Reimar D?ffinger wrote:
> On Sat, Aug 29, 2009 at 12:16:25AM +1000, Peter Ross wrote:
> > On Wed, Aug 26, 2009 at 02:15:06PM +0200, Reimar D?ffinger wrote:
> > > On Wed, Aug 26, 2009 at 08:45:33PM +1000, Peter Ross wrote:
> > 

Updated patch enclosed w/ various fixes (thanks guys) and DR1 support.

This is a combined demux & decoder patch. I will split it "later".

> > > > +#define LPF_TAG  MKTAG('L','P','F',' ')
> > > > +#define ANIM_TAG MKTAG('A','N','I','M')
> > > > +
> > > > +static int probe(AVProbeData *p)
> > > > +{
> > > > +    /* verify tags and video dimensions */
> > > > +    if (AV_RL32(&p->buf[0]) == LPF_TAG &&
> > > > +        AV_RL32(&p->buf[16]) == ANIM_TAG &&
> > > 
> > > AV_RN32(p->buf     ) == AV_RN32("LPF ") &&
> > > AV_RN32(p->buf + 16) == AV_RN32("ANIM") &&
> > > 
> > > Seems nicer to me.
> > 
> > Also seems bloatier! Unless the compiler has telepathic qualities, it's
> > going to shove the "LPF " string in the data segment.
> 
> Then by your definition gcc has such telepathic qualities.
> Also I can't see how having that string in the data segment is much of
> an issue.
> Though memcmp(p->buf, "LPF ", 4) actually is probably better still,
> speed and 5 bytes data bloat really don't matter here.

No other format in master is using this approach... i reckon it should
be done in a seperate patch, across many formats, such that the total
bloat can be calculated.

> > Besides, this only
> > looks nice when working with little endian tags...
> 
> Huh? You can also use RL or RB as necessary, it looks the same.

Ok.

> 
> > > That will probably mean your code can't work with AVFMT_GENERIC_INDEX.
> > > I really think that seeking should be working.
> > 
> > There is only one guaranteed keyframe: the first frame!
> 
> For normal playback I've always considered seeking to non-keyframes,
> too, a good idea. The only real issue I have with it is that just too
> many decoders had the habit of crashing often with that.

But it looks ugly!

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anm-r2.diff
Type: text/x-diff
Size: 17413 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090901/e4fc0167/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090901/e4fc0167/attachment.pgp>



More information about the ffmpeg-devel mailing list