[MPlayer-cygwin] Benchmark supported overlay formats and use fastest one

Andrey Sapozhnikov sapa at icb.chel.su
Thu Apr 22 15:06:12 CEST 2004


Hi!

I have found by chance, that mplayer requires nearly twice
less CPU power with -dr -vf yuy2 parameters on my
Celeron 800 + ATI Rage IIC AGP card (vo directx).  Investigating
log I find out that mplayer choose BGR32 by default, although
it is not optimal from best perfomance point of view.

  =================== without -dr -vf yuy2 =================
<vo_directx><INFO>checking primary surface
<vo_directx><FORMAT PRIMARY>8 BGR16 supported
<vo_directx><INFO>testing supported overlay pixelformats
<vo_directx><FORMAT OVERLAY>0 YV12  not supported
<vo_directx><FORMAT OVERLAY>1 I420  not supported
<vo_directx><FORMAT OVERLAY>2 IYUV  not supported
<vo_directx><FORMAT OVERLAY>3 YVU9  not supported
<vo_directx><FORMAT OVERLAY>4 YUY2  supported
<vo_directx><FORMAT OVERLAY>5 RGB15 supported
<vo_directx><FORMAT OVERLAY>6 BGR15 supported
<vo_directx><FORMAT OVERLAY>7 RGB16 supported
<vo_directx><FORMAT OVERLAY>8 BGR16 supported
<vo_directx><FORMAT OVERLAY>9 RGB24 not supported
<vo_directx><FORMAT OVERLAY>10 BGR24 not supported
<vo_directx><FORMAT OVERLAY>11 RGB32 supported
<vo_directx><FORMAT OVERLAY>12 BGR32 supported
<vo_directx><INFO>Your card supports 7 of 13 overlayformats
<vo_directx><INFO>hardware supports overlay
.....
SwScaler: using unscaled Planar YV12 -> BGR 32-bit special converter
.....
VO: [directx] 512x384 => 512x384 BGR 32-bit
VO: Description: Directx DDraw YUV/RGB/BGR renderer
.....
*** [vo] Allocating mp_image_t, 512x384x32bpp BGR packed, 786432 bytes
*** [scale] Allocating (slices) mp_image_t, 512x384x12bpp YUV planar, 294912 bytes

=================== with -dr -vf yuy2 =================
  <vo_directx><INFO>hardware supports overlay
.....
VO: [directx] 512x384 => 512x384 Packed YUY2
VO: Description: Directx DDraw YUV/RGB/BGR renderer
.....
<vo_directx><INFO>overlay with format YUY2  created
*** [yuy2] Allocating mp_image_t, 512x384x12bpp YUV planar, 294912 bytes
*** [vo] Direct Rendering mp_image_t, 512x384x16bpp YUV packed, 393216 bytes
=======================================================

The similar result I got on another machine (P4 1.7GHz Nvidia GeForce2 MX400).
it choose YV12 format by default, but yuy2 is nearly twice faster.

Is it possible to benchmark most suitable overlay formats
automatically and choose fastest one during player startup?
I wanna use mplayer as standalone player on CD with
presentation video (autorunning after CD is inserted) and
can not tune player manually because of know nothing about
hardware it will be run.

-- 
Andrey




More information about the MPlayer-cygwin mailing list