About SDL 1.3 and YUV textures (different methods)

Just made a few benchmark with YUV surfaces on SDL 1.2/1.3, to see
benefit/regressions in a quite old configuration with an overlay something
smaller than a full hd video:

Machine:
Dual P4 3ghz, 2gb ram, GF8400, Ubuntu 10.10, NVIDIA driver 260.19.06
SDL : hg summary -> parent: 5242:78ce7bfd0faf tip (friday checkout)

Stream (Knights_Quest_576p.wmv, easily and freely available on the net,
NVIDIA 3d stereoscopic demo):
Stream #0.1(eng): Video: vc1, yuv420p, 1440x576, 4000 kb/s

Raw decoding speed (no video blitting, ALL VERSIONS):
Benchmark finished: 2405 frames in 25.663000 seconds -> 93.714687fps

SDL 1.2 HW YUV overlay:
Benchmark finished: 2405 frames in 42.378000 seconds -> 56.751144fps

SDL 1.3 (1.2 api emulation):
Benchmark finished: 2405 frames in 55.445000 seconds -> 43.376319fps

SDL 1.3 opengl (STREAMING + Lock/Unlock):
Benchmark finished: 2405 frames in 56.949000 seconds -> 42.230768fps

SDL 1.3 software (STREAMING + Lock/Unlock):
Benchmark finished: 2405 frames in 110.664000 seconds -> 21.893175fps

So my advice is that there is no benefit in changing the API of a video
player to SDL 1.3, just stick with SDL 1.2 code and use it with emulation
layer.–
Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0105761240 Fax: +39-0105760224
s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)

Hi,

as long as you can live with the restrictions of a hardware overlay, this will be one of the fastest things you can do. However, a hardware overlay is separate from all other rendering: You can’t render anything above it, GPU effects are impossible, and there is generally only one overlay available.

Some data we gathered in real-world benchmarks (different software, but same general conditions):

  • SSE2-based yuv->rgb conversion took more than 50% of the total decoding time.
  • On discrete graphics cards (NVidia GT 220), shader-based conversion basically cut the conversion time to zero.
  • With an onboard GPU (Intel GMA 4500MHD), SSE2 was faster than the GPU.

So in most cases, a shader should help a lot.

Cheers,

UliOn Feb 14, 2011, at 3:57 PM, Gabriele Greco wrote:

Just made a few benchmark with YUV surfaces on SDL 1.2/1.3, to see benefit/regressions in a quite old configuration with an overlay something smaller than a full hd video:

Machine:
Dual P4 3ghz, 2gb ram, GF8400, Ubuntu 10.10, NVIDIA driver 260.19.06
SDL : hg summary -> parent: 5242:78ce7bfd0faf tip (friday checkout)

Stream (Knights_Quest_576p.wmv, easily and freely available on the net, NVIDIA 3d stereoscopic demo):
Stream #0.1(eng): Video: vc1, yuv420p, 1440x576, 4000 kb/s

Raw decoding speed (no video blitting, ALL VERSIONS):
Benchmark finished: 2405 frames in 25.663000 seconds -> 93.714687fps

SDL 1.2 HW YUV overlay:
Benchmark finished: 2405 frames in 42.378000 seconds -> 56.751144fps

SDL 1.3 (1.2 api emulation):
Benchmark finished: 2405 frames in 55.445000 seconds -> 43.376319fps

SDL 1.3 opengl (STREAMING + Lock/Unlock):
Benchmark finished: 2405 frames in 56.949000 seconds -> 42.230768fps

SDL 1.3 software (STREAMING + Lock/Unlock):
Benchmark finished: 2405 frames in 110.664000 seconds -> 21.893175fps

So my advice is that there is no benefit in changing the API of a video player to SDL 1.3, just stick with SDL 1.2 code and use it with emulation layer.


Ing. Gabriele Greco, DARTS Engineering
Tel: +39-0105761240 Fax: +39-0105760224
s-mail: Via G.T. Invrea 14 - 16129 GENOVA (ITALY)


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Any technology distinguishable from magic is insufficiently advanced.

Ulrich von Zadow | +49-172-7872715
Jabber: @Ulrich_von_Zadow
Skype: uzadow