[MPlayer-dev-eng] mpeg 1/2 vs. direct rendering
    Arpi 
    arpi at thot.banki.hu
       
    Wed Apr  3 04:13:47 CEST 2002
    
    
  
Hi,
here is short bench of the well known matrix.vob with -vo mga and -vo xv:
mga+nodr+frame:
BENCHMARKs: VC:  22.560s VO:  14.228s A:   0.000s Sys:   4.731s =   41.519s
mga+nodr+slice:
BENCHMARKs: VC:  29.981s VO:   5.843s A:   0.000s Sys:   4.759s =   40.583s
xv+nodr+frame:
BENCHMARKs: VC:  22.594s VO:  19.866s A:   0.000s Sys:   2.018s =   44.478s
xv+nodr+slice:
BENCHMARKs: VC:  22.370s VO:  18.758s A:   0.000s Sys:   2.026s =   43.154s
xv+dr:
BENCHMARKs: VC:  22.557s VO:  18.815s A:   0.000s Sys:   2.121s =   43.493s
Note:
frame means whole frame memcpy after decoding
slice means copy B frames by slices (calling draw_slice() per 16 line bands)
dr means decoding of B frames directly to vo buffer (get_image())
note2: I/P frames are always whole frame copy - because their order is
nonlinear - i'll add full IPB support to -vo xv later
conclusion:
DR is not a good thing for mpeg... copy by slice is faster.
even method-2 DR is bad, as it cannot do partial updating of the buffer (B
vs I/P frames)
btw we should check copy-by-slice method for libavcodec codecs too.
it has such function (at least in the headers) but not supported by most
codecs yet.
anyway the copy-by-slice trick of libmpeg2 is really big trick: after it
copied out that slice, it _reuse_ that small 16 pixel height buffer for the
next frame -> achieving much better cache usage
we should do such thingie for divx5 with B frames, it's the same
as mpeg 1/2 in viewpoint of rendering.
and, at the end, the most interesting result:
dr vs. nodr with -vo mga  (DR B frames directly into video ram):
mga+nodr+frame:
BENCHMARKs: VC:   8.733s VO:   6.193s A:   0.000s Sys:   1.479s =   16.405s
mga+nodr+slice:
BENCHMARKs: VC:  12.250s VO:   2.092s A:   0.000s Sys:   1.380s =   15.721s
mga+dr:
BENCHMARKs: VC:  64.683s VO:   2.097s A:   0.000s Sys:   1.408s =   68.188s
yes... DR is 4 times slower! nice, eh?
it seems AGP is not a random access memory... it is only fast when acecssed
lineary.
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
    
    
More information about the MPlayer-dev-eng
mailing list