View Single Post
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#18
Originally Posted by attila77 View Post
MBWOTO Given a fixed bitrate, it doesn't really matter how dynamic a scene is, the amount of data to be pushed around is usually the same (unless it's *totally* static, of course).
The amount of data may be fixed, but it does not mean that the amount of work to be done will be fixed as well when decoding video. Scenes with lots of motion or panning still take more cpu than mostly static scenes even with the same bitrate.

There are two ways around this:

a) Use 1 pass fixed bitrate. Yes, gets artifacts on intense action but hey, better blocky than choppy, right ?

b) Use a bitrate cap. If you use mencoder this is done with -lavcopts vrc_maxrate=700 not sure for other SW/codecs.
Yes, fixed bitrate single pass encoding helps to reduce cpu usage spikes and is preferable from the performance point of view.

Just one more thing, cartoon/animation is typically much easier for cpu to decode. For example, N810 just barely has enough power to be able to decode and playback 480p big buck bunny video in realtime (without sound). This of course needs some tweaks (crop filter to letterbox it from 854x480 to 800x480) in order to prevent cpu from wasting too much resources on software downscaling because the video itself is bigger than screen resolution. It should be possible to find some animation in 640x480 resolution which would play fine on the device And adding missing ARMv6 optimizations could help a lot for sure.

Here is the log of 480p video playback:
Code:
/media/mmc2 $ mplayer -nosound -benchmark -quiet -vf crop=800:480 -vo omapfb:tearsync=0 big_buck_bunny_480p_stereo.avi
MPlayer 1.0rc1-maemo.29.n8x0 (C) 2000-2006 MPlayer Team
CPU: ARM
Internet Tablet OS version:

[MENU] Can't open menu config file: /home/user/.mplayer/menu.conf
Menu inited: /etc/mplayer/menu.conf

Playing big_buck_bunny_480p_stereo.avi.

AVI file format detected.
AVI_NI: No audio stream found -> no sound.
VIDEO:  [MP42]  854x480  24bpp  24.000 fps  1840.6 kbps (224.7 kbyte/s)
Clip info:
 Software: MEncoder 2:1.0~rc2-0ubuntu13
[omapfb] Nokia N800/N810 hardware detected
[omapfb] tearsync is disabled
Opening video filter: [crop w=800 h=480]
Crop: 800 x 480, -1 ; -1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmp42] vfm: ffmpeg (FFmpeg M$ MPEG-4 v2)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 854 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [omapfb] 800x480 => 800x480 Planar YV12  [fs] [zoom]
[omapfb] ARM JIT scaler (quality=2): 800x480 YV12 => 800x480 YUV420


BENCHMARKs: VC: 466.264s VO: 120.273s A:   0.000s Sys:   4.053s =  590.590s
BENCHMARK%: VC: 78.9490% VO: 20.3648% A:  0.0000% Sys:  0.6862% = 100.0000%

Exiting... (End of file)
So decoding and showing all frames of this 596 seconds long video takes 591 seconds which is just a little bit faster than realtime. Of course playback speed is not uniform, but decoding ahead and buffering can help to solve this problem (like mplayer-xp fork or omapfbplay proof of concept demo program from beagleboard). And adding audio would be the last straw to break everything.

And of course getting such good looking results is practically impossible with any real non-animated 480p video

Last edited by Serge; 2009-03-15 at 04:17.
 

The Following User Says Thank You to Serge For This Useful Post: