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

pross at xvid.org pross
Wed Jul 30 11:50:26 CEST 2008


On Wed, Jul 30, 2008 at 06:45:11AM +0200, Reimar D?ffinger wrote:
> On Tue, Jul 29, 2008 at 10:28:24PM +1000, pross at xvid.org wrote:
> > On Sun, Jul 20, 2008 at 10:14:19PM +1000, pross at xvid.org wrote:
> > > On Sun, Jul 20, 2008 at 10:04:44AM +0200, Reimar D?ffinger wrote:
> > > > Hello,
> > > > On Sun, Jul 20, 2008 at 12:28:06PM +1000, pross at xvid.org wrote:
> > > > > On Sat, Jul 19, 2008 at 11:30:38AM +0200, Reimar D?ffinger wrote:
> > > > > > The diff should be smaller if you change the order of these two
> > > > > > functions.
> > > > > 
> > > > > Okay, but s/smaller/simpler/.
> > > > 
> > > > Why did you put the new function below lzo1x_decode? And no, I did mean
> > > > smaller, the diff should basically consist of an additional { and a new
> > > > function header + doxy and maybe a few more lines.
> > > > Anything above that IMO needs an explanation why that would be needed.
> > > > Oh well, I just did change it myself, see attached patch.
> > > 
> > > Thanks!
> > 
> > Reminar, were there any other comments, or should I just go ahead and
> > commit?
> 
> Ok by me, though I did not test my lzo patch myself, and it would be
> nice if you could do a quick benchmark with lzo.c compiled with -DTEST
> to make sure it does not slow things down (too much).
> Otherwise it might be better to make an additional function that is
> forced to be inlined and call that from both the exported and the
> internal one.

The patch works, but gives 7-10% slow-down in the lzo test. Inline version
enclosed.

10 tests were run using 8MB text input file on Core2 x86_64 box.
The results correspond to the 5th run.

(current SVN)
768598720 dezicycles in lzod, 1 runs, 0 skips
586217760 dezicycles in lzod, 2 runs, 0 skips
501067720 dezicycles in lzod, 4 runs, 0 skips
452287390 dezicycles in lzod, 8 runs, 0 skips
427767430 dezicycles in lzod, 16 runs, 0 skips
416107385 dezicycles in lzod, 32 runs, 0 skips
409784281 dezicycles in lzod, 64 runs, 0 skips
407162430 dezicycles in lzod, 128 runs, 0 skips
406658336 dezicycles in lzod, 256 runs, 0 skips

(extern av_memcpy_backptr)
822843600 dezicycles in lzod, 1 runs, 0 skips
637458040 dezicycles in lzod, 2 runs, 0 skips
545191200 dezicycles in lzod, 4 runs, 0 skips
498447550 dezicycles in lzod, 8 runs, 0 skips
474685450 dezicycles in lzod, 16 runs, 0 skips
463554987 dezicycles in lzod, 32 runs, 0 skips
458068946 dezicycles in lzod, 64 runs, 0 skips
455365947 dezicycles in lzod, 128 runs, 0 skips
453994725 dezicycles in lzod, 256 runs, 0 skips

(inline av_memcpy_backptr)
784646560 dezicycles in lzod, 1 runs, 0 skips
602780040 dezicycles in lzod, 2 runs, 0 skips
512882460 dezicycles in lzod, 4 runs, 0 skips
467227400 dezicycles in lzod, 8 runs, 0 skips
444024575 dezicycles in lzod, 16 runs, 0 skips
432370862 dezicycles in lzod, 32 runs, 0 skips
426881413 dezicycles in lzod, 64 runs, 0 skips
423871612 dezicycles in lzod, 128 runs, 0 skips
422296053 dezicycles in lzod, 256 runs, 0 skips

(liblzo-1.08-3)
921006320 dezicycles in lzod, 1 runs, 0 skips
742984960 dezicycles in lzod, 2 runs, 0 skips
660344440 dezicycles in lzod, 4 runs, 0 skips
612925410 dezicycles in lzod, 8 runs, 0 skips
588764760 dezicycles in lzod, 16 runs, 0 skips
576262547 dezicycles in lzod, 32 runs, 0 skips
570736683 dezicycles in lzod, 64 runs, 0 skips
567764193 dezicycles in lzod, 128 runs, 0 skips
566369245 dezicycles in lzod, 256 runs, 0 skips

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memcpy_back_inline.diff
Type: text/x-diff
Size: 4946 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080730/37998cc8/attachment.diff>
-------------- 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/20080730/37998cc8/attachment.pgp>



More information about the ffmpeg-devel mailing list