[MPlayer-dev-eng] Removal of backing store

Stephane Marchesin marchesin at icps.u-strasbg.fr
Fri Aug 22 02:01:20 CEST 2008


Hi,

I'm writing about an issue I encountered with mplayer and the use of
the backing store. Basically, backing store reduces performance on
some recent drivers (notably the open source ones using EXA). There
are two major reasons for this:
- when using a hardware overlay, backing store uses video memory to
store only blue (colorkey) pixels. This will obviously not show up
under an mplayer benchmark, but puts more pressure on vram usage
- most importantly, backing store prevents from using a real hardware
overlay (as opposed to blitter/texture adapters) because this forces
window redirection. You then have to fallback to using the blitter
port, which is a lot slower than a native hardware overlay.
Also FWIW, neither vlc nor xine (with its xine-ui frontend) enable
backing store, as seen in the following files/places:
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/gui/skins2/x11/x11_window.cpp;h=03ec09fe978a3e048ff1e32f52be9b9ce9cd738a;hb=HEAD
http://xine.cvs.sourceforge.net/xine/xine-ui/src/xitk/videowin.c?revision=1.237&view=markup
(look for XCreateWindow calls in both)

Now, here are some benchmarks obtained when running mplayer -nosound
-benchmark -frames 2000 ~/big_buck_bunny_480p_h264.mov. "with
backingstore" is using the standard mplayer, "without backingstore" is
with the attached patch applied; each benchmark is run 3 times.

On GeForce 5200/powerpc/nouveau driver:

with backingstore:
V:  83.3 2001/2001 46% 18%  0.0% 0 0

BENCHMARKs: VC:  39.005s VO:  15.673s A:   0.000s Sys:  26.715s =   81.393s
BENCHMARK%: VC: 47.9220% VO: 19.2562% A:  0.0000% Sys: 32.8218% = 100.0000%

V:  83.3 2001/2001 46% 19%  0.0% 0 0

BENCHMARKs: VC:  38.688s VO:  16.048s A:   0.000s Sys:  26.526s =   81.262s
BENCHMARK%: VC: 47.6090% VO: 19.7481% A:  0.0000% Sys: 32.6430% = 100.0000%


V:  83.3 2001/2001 48% 19%  0.0% 0 0

BENCHMARKs: VC:  40.114s VO:  16.043s A:   0.000s Sys:  27.641s =   83.798s
BENCHMARK%: VC: 47.8699% VO: 19.1452% A:  0.0000% Sys: 32.9849% = 100.0000%


without backingstore:
V:  83.3 2001/2001 47% 16%  0.0% 0 0

BENCHMARKs: VC:  39.242s VO:  13.882s A:   0.000s Sys:   7.504s =   60.628s
BENCHMARK%: VC: 64.7259% VO: 22.8974% A:  0.0000% Sys: 12.3767% = 100.0000%

V:  83.3 2001/2001 45% 15%  0.0% 0 0

BENCHMARKs: VC:  38.082s VO:  13.193s A:   0.000s Sys:   8.368s =   59.643s
BENCHMARK%: VC: 63.8492% VO: 22.1206% A:  0.0000% Sys: 14.0302% = 100.0000%

V:  83.3 2001/2001 45% 16%  0.0% 0 0

BENCHMARKs: VC:  37.904s VO:  13.373s A:   0.000s Sys:   8.431s =   59.707s
BENCHMARK%: VC: 63.4826% VO: 22.3972% A:  0.0000% Sys: 14.1202% = 100.0000%


On GeForce 8400/Athlon X2/nvidia driver:

with backingstore:
V:  83.3 2001/2001 12%  7%  0.0% 0 0

BENCHMARKs: VC:  10.125s VO:   6.074s A:   0.000s Sys:  16.142s =   32.342s
BENCHMARK%: VC: 31.3062% VO: 18.7817% A:  0.0000% Sys: 49.9120% = 100.0000%


V:  83.3 2001/2001 12%  9%  0.0% 0 0

BENCHMARKs: VC:  10.347s VO:   7.998s A:   0.000s Sys:  14.590s =   32.935s
BENCHMARK%: VC: 31.4152% VO: 24.2852% A:  0.0000% Sys: 44.2996% = 100.0000%


V:  83.3 2001/2001 11% 10%  0.0% 0 0

BENCHMARKs: VC:   9.979s VO:   8.629s A:   0.000s Sys:  14.178s =   32.787s
BENCHMARK%: VC: 30.4373% VO: 26.3195% A:  0.0000% Sys: 43.2432% = 100.0000%


without backingstore:

V:  83.3 2001/2001 12%  9%  0.0% 0 0

BENCHMARKs: VC:  10.331s VO:   7.606s A:   0.000s Sys:  14.574s =   32.511s
BENCHMARK%: VC: 31.7757% VO: 23.3963% A:  0.0000% Sys: 44.8281% = 100.0000%


V:  83.3 2001/2001 11%  8%  0.0% 0 0

BENCHMARKs: VC:   9.982s VO:   7.390s A:   0.000s Sys:  15.062s =   32.434s
BENCHMARK%: VC: 30.7779% VO: 22.7840% A:  0.0000% Sys: 46.4381% = 100.0000%


V:  83.3 2001/2001 12%  7%  0.0% 0 0

BENCHMARKs: VC:  10.027s VO:   6.134s A:   0.000s Sys:  16.711s =   32.872s
BENCHMARK%: VC: 30.5026% VO: 18.6605% A:  0.0000% Sys: 50.8369% = 100.0000%


So the bottom line is: backing store will slow down rendering with
some driver/hardware combinations, and make no difference in some
other combinations. This is why I'm proposing that it's removed. The
corresponding patch is attached.

Stephane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: disable_bs.diff
Type: application/octet-stream
Size: 651 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080822/e6fe44f1/attachment.obj>


More information about the MPlayer-dev-eng mailing list