[FFmpeg-devel] [PATCH] Electronic Arts TGV decoder

Michael Niedermayer michaelni
Sun Jul 13 01:26:47 CEST 2008


On Sun, Jul 13, 2008 at 01:08:17AM +0200, Dominik 'Rathann' Mierzejewski wrote:
> On Sunday, 13 July 2008 at 00:12, Michael Niedermayer wrote:
> > On Sat, Jul 12, 2008 at 04:32:20PM +1000, pross at xvid.org wrote:
> > > On Thu, Jul 10, 2008 at 01:00:32AM +0200, Michael Niedermayer wrote:
> > > > On Wed, Jul 09, 2008 at 09:18:13PM +1000, pross at xvid.org wrote:
> > > > > Hi!
> > > > > 
> > > > > Second video codec in the EA series.
> > > > > 
> > > > > Samples: http://samples.mplayerhq.hu/game-formats/ea-tgv/
> > > > > Write-up: http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TGV
> > > > [...]
> > > 
> > > Revised patch enclosed.
> > [...]
> > > +static inline void memcpy_naive(uint8_t *dst, const uint8_t *src, size_t size)
> > > +{
> > > +    if (src+size<dst) {
> > > +        memcpy(dst, src, size);
> > > +    }else {
> > > +        /* when src and dst overlap, perform naive copy */
> > > +        int i;
> > > +        for(i=0; i<size; i++) dst[i] = src[i];
> > > +    }
> > > +}
> > 
> > This might be a duplicate of copy_backptr() from libavutil/lzo.c
> > factorizig the common code out into a function might be a good idea
> > so both can benefit from all the optimizations.
> 
> Um... shouldn't you just call memmove in the overlapping case?

the above code is not equivalent to memmove() and i would assume the
behavior of the c code is intended.

AB0123
  ABAB (C code)
  AB01 (memmove)


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080713/8cff1b92/attachment.pgp>



More information about the ffmpeg-devel mailing list