[MPlayer-dev-eng] [PATCH] Dynamic list of EOSD sources

Nicolas George nicolas.george at normalesup.org
Tue Sep 14 14:58:23 CEST 2010


L'octidi 28 fructidor, an CCXVIII, Reimar Döffinger a écrit :
> > For vf_ass, on the other hand, I see a significant loss of speed. If I turn
> > eosd_image_{first,next} (the list-walking functions) into static inline in
> > the header, the performances are once again indiscernible from the original.
> I don't this makes sense. Can you give use numbers and try to figure out what
> exactly is going on?

I did some further tests. First of all, I can no longer reproduce the fact
that inlining the list functions gives the original performance back; I may
have made a stupid mistake there.

It looks like a problem of cache heat:

- The extra time is spent in my_draw_bitmap, which has not changed at all
  (exactly same machine code if I disable inlining).

- The difference completely disappear on another machine (Thurion 64 instead
  of Core 2 Duo).

What I find rather strange is that the absolute value of the difference is
very robust with regard to things I may add in the middle of the code.


Here are the details of my test:

The command line is:

time ./mplayer -vo xv -ass -sub big.ass -really-quiet \
  -demuxer rawvideo -rawvideo w=640:h=400:format=y8:fps=50 /dev/zero -endpos 1.1

big.ass has 13×43 glyphs, occupying most of the image, changing each 1/50s,
for 1s.

On the Core 2 Duo 2.13 GHz

The original trunk code gives systematically between 0.60 and 0.61 seconds
of user time.

The modified code gives systematically between 0.81 and 0.83 seconds of user
time.

The additional time is spent in the double loop of my_draw_bitmap (from
0.776±0.001 Gcycles to 1.205±0.002 Gcycles -> +0.2s).

On the Thurion 64 2 GHz, both versions take 0.79±0.02s of user time.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100914/83e64c9a/attachment.pgp>


More information about the MPlayer-dev-eng mailing list