[FFmpeg-devel] [PATCH] Electronic Arts TGV decoder
pross at xvid.org
pross
Mon Jul 14 13:21:38 CEST 2008
On Sun, Jul 13, 2008 at 12:12:32AM +0200, 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.
> [...]
>
>
> > + size2 = (src[0] & 0x3F) + 4;
> > + src += 3;
> > + }
> > + } else { // 0
> > + offset = -( ((src[0] & 0x60) << 3) + src[1] ) - 1;
> > + size2 = ((src[0] & 0x1C) >> 2) + 3;
> > + src += 2;
> > + }
> > +
> > +
> > + /* fetch strip from src */
> > + if (src+size1>src_end)
> > + break;
> > +
>
> > + size -= size1;
> > + while(size1>0) {
> > + int run = FFMIN(size1, width-x);
> > + memcpy(dst + y*stride + x, src, run);
> > + src+=run;
> > + size1-=run;
> > + x+=run;
> > + if (x>=width) {
> > + x=0; y++;
> > + if (y>=height) return 0;
> > + }
> > + }
>
> Is this more efficient than simply allocating width*height AVFrames?
> It would require CODEC_CAP_DR1 to be removed though ...
Certainly worth testing. How do I "cleanly" allocate an AVFrame with
linesize tied to width? (grepping lavc for -v DR1 examples was not
productive...)
Cheers,
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- 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/20080714/244aae08/attachment.pgp>
More information about the ffmpeg-devel
mailing list