Performance Tuning H264 [Was: Re: [MPlayer-users] howto play apples quicktime movie trailers (720p)]

Markus Schulz msc at tastatur-junkie.de
Tue Jan 10 19:48:09 CET 2006


Am Dienstag, 10. Januar 2006 08:20 schrieb RC:
> On Mon, 9 Jan 2006 21:16:38 +0100
>
> Markus Schulz <msc at tastatur-junkie.de> wrote:
> > this is significantly slower then -vo xv in my case (FX5900U with
> > 1.0-8178 CS Driver). -vf format=bgr24 requires a color conversion
> > from yuv to rgb which will be done with software scaler. This
> > results in approximately half of the speed.
>
> Strange.  The conversion to BGR16 uses 0% CPU time on my system :-) 
> I watch MPEG-2/4 videos with these options, and MPlayer use under 1%
> CPU time total.  I haven't looked into the details of why this works
> so well yet, but even RGB isn't as fast as BRG for some reason.

prints mplayer this line?
SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter

all -vf format which are working (most of them mplayer claims about they 
are incompatible with this codec) prints this and are slow. Only yv12 
is fast and don't print this line.

> I suggest you try all the different formats listed by
> format=fmts=help, and check the performance of each.  And make sure
> your config file or anything else isn't adding other filters...
>
> > runs perfect. similar speed to -vo xv. only brightness is to high
> > and not changeable.
>
> Also very strange,  Brightness, contrast, and saturation are all
> adjustable using yuv=1, on my system.

with -vf format=bgr16
**************************************
<...>
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
Opening video filter: [format fmt=bgr16]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 1280 x 544 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter
VO: [gl] 1280x544 => 1280x544 BGR 16-bit
V:  99.1 2377/2377 2528% 8751%  0.0% 0 0 0% 100.00x

BENCHMARKs: VC:  25.052s VO:  86.731s A:   0.000s Sys:   0.262s =  
112.045s
BENCHMARK%: VC: 22.3592% VO: 77.4072% A:  0.0000% Sys:  0.2336% = 
100.0000%
Exiting... (End of file)
real    1m52.251s
user    0m56.540s
sys     0m1.304s
**************************************

without it:
**************************************
<...>
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 1280 x 544 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [gl] 1280x544 => 1280x544 Planar YV12
V:  99.1 2377/2377 2479% 3211%  0.0% 0 0 0% 100.00x

BENCHMARKs: VC:  24.574s VO:  31.830s A:   0.000s Sys:   0.275s =   
56.680s
BENCHMARK%: VC: 43.3564% VO: 56.1576% A:  0.0000% Sys:  0.4861% = 
100.0000%
Exiting... (End of file)
real    0m57.742s
user    0m33.722s
sys     0m0.844s
**************************************

without color conversion runs nearly at double framerate (1.52m <-> 
0.57m). But in booth cases the cpu reaches only a load between 60-80% 
(2.2GHZ fixed frequency). And this is really curious to me, the 
software scaler should use as much cpu he cant get or not?


What Hardware do you use? My Card is a AGP8x FX59000 Ultra with 256MB 
Memory on an Asus A8V333 Deluxe Mainboard with a A64-3500+ Venice AMD 
core. 



-- 
Markus Schulz

Programming today is a race between software engineers striving to build 
bigger and better idiot-proof programs, and the Universe trying to 
produce bigger and better idiots. So far, the Universe is winning. - 
Rich Cook




More information about the MPlayer-users mailing list