Notices


Reply
Thread Tools
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#21
2faber: No I don't have IT2005 anymore. Would not it be better to upgrade?

Also tried to run some benchmarks. Used discovery video without scaling for tests.

time ./mplayer -benchmark -nosound -vo null /home/user/MyDocs/.videos/Discovery.avi
Code:
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 208 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
VO: [null] 352x208 => 352x208 Planar YV12
V:  46.7 702/702 26%  0%  0.0% 0 0

BENCHMARKs: VC:  12.453s VO:   0.022s A:   0.000s Sys:   1.951s =   14.426s
BENCHMARK%: VC: 86.3241% VO:  0.1493% A:  0.0000% Sys: 13.5266% = 100.0000%

Exiting... (End of file)
real    0m 14.68s
user    0m 12.78s
sys     0m 0.74s
time ./mplayer -benchmark -nosound -vo sdl /home/user/MyDocs/.videos/Discovery.avi
Code:
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 208 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
VO: [sdl] 352x208 => 352x208 Planar YV12
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
V:  46.7 702/702 29% 27%  0.0% 0 0

BENCHMARKs: VC:  14.008s VO:  12.798s A:   0.000s Sys:   2.179s =   28.986s
BENCHMARK%: VC: 48.3280% VO: 44.1539% A:  0.0000% Sys:  7.5180% = 100.0000%

Exiting... (End of file)
real    0m 29.48s
user    0m 24.87s
sys     0m 0.91s
time ./mplayer -benchmark -nosound -vo x11 /home/user/MyDocs/.videos/Discovery.avi
Code:
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 352 x 208 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.69:1 - prescaling to correct movie aspect.
VO: [x11] 352x208 => 352x208 Planar YV12
No accelerated colorspace conversion found
SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
V:  46.7 702/702 38%  4%  0.0% 0 0

BENCHMARKs: VC:  17.848s VO:   1.887s A:   0.000s Sys:   2.207s =   21.943s
BENCHMARK%: VC: 81.3403% VO:  8.6001% A:  0.0000% Sys: 10.0596% = 100.0000%

Exiting... (End of file)
real    0m 22.38s
user    0m 18.25s
sys     0m 0.92s
So looks like decoding video stream itself takes only 14.68 seconds (while video fragment length is 46 seconds long). When decoding + displaying video unscaled, x11 driver is faster than sdl: 22.38 vs. 29.48 seconds. It is interesting that SDL claims to support YUV surfaces (probably simulated in software, otherwise we would probably get higher 'sys' time and lower 'user' time) while when using X11, this YUV->RGB conversion is performed by mplayer code, so mplayer built-in color conversion seems to be faster.

Everything changes when showing scaled video, SDL time grows up to 49.67 seconds, X11 becomes a real slideshow and is unusable.

My tests also show that -mcpu=arm926ej-s is a bit faster than -march=armv5te, but not a big deal.

Last edited by Serge; 2006-07-13 at 06:46.
 
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#22
Updated mplayer binary: http://ufo2000.xcomufo.com/files/mpl...4-armel.tar.gz

Changes:
* added screen blanking prevention hack
* added support for hardware pixel doubling in fullscreen mode with x11 driver ('-vo x11' option)

Now when playing 320x240 or 400x240 video, x11 driver with hardware pixel doubling is prefered and it works faster than sdl (see my previous post for more benchmarking details). The only problem with pixel doubling is lack of flexibility, it only can scale video exactly twice. So discovery video in fullscreen mode with x11 driver is a bit smaller than screen size and has black borders, but at least it can be played without a single frame dropped.

Note: if you tried a previous build, also delete old configuration file: 'rm /home/user/.mplayer/config', a new build has a new option in configuration file enabled by default (-noslices), see mplayer man for more details. It improves performance a bit and seems to be absolutely necessery for proper framedropping with hardware pixel doubling when playing very high bitrate/framerate video. Without this option enabled, some video frames freeze and we get slideshow.

A patch with all these tweaks for mplayer 1.0pre8 sources is included in a tarball. Enjoy
 
Posts: 220 | Thanked: 19 times | Joined on Jun 2006
#23
iv downloaded a google video for psp i can play it with -nosound or at a reduce framrate. my question is can i set up a codecs.conf file to use the audio codecs that came with the nokia 770.any sugestions would be great
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#24
This is really good. Plays Futurama at 320x240,25fps,304kbits. Some action scenes (the beginning) are slower but generally it is quite watchable. i wonder how expensive is the 'SwScaler: using unscaled Planar YV12 -> BGR 16-bit special converter' part.

I also wonder if YV12->YUV422 or ->YUV420 conversion is much faster than ->BGR

If yes the some hack with using directly OMAPFB_UPDATE_WINDOW ioctl with YUV420 or 422 format could speed it up in fullscreen mode
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#25
hmm, looks like YV12 is in fact something like YUV420 (whatever that means exactly :) so the conversion is probably trivial
http://www.fourcc.org/fccyuv.htm#YV12
http://msdn.microsoft.com/library/de...YUVFormats.asp

also from the MS article it is clear that yuv->rgb conversion is not so trivial

Last edited by fanoush; 2006-07-14 at 14:55.
 
Posts: 503 | Thanked: 267 times | Joined on Jul 2006 @ Helsinki
#26
2smackpotato: don't know, Nokia 770 uses gstreamer multimedia framework, don't know if mplayer can use gstreamer plugins directly (but mplayer probably can be patched to make some use of them)

2fanoush: Thanks, that is interesting idea. Anyway, we are probably already at ARM core limits (though maybe some time critical parts of decoder can be optimized using armv5 edsp instructions, mplayer uses only armv4 in assembly optimized code fragments). Now in order to improve performance, it would be a good idea to move some work to DSP core (preferably moving color conversion/scaling work to it). We can either try finding a way of using existing DSP based audio codecs from mplayer, or try it the other way around - experiment with compiling ffmpeg based gstreamer plugin and replacing default mpeg4 DSP based decoder with it.

As we don't have a free toolchain for DSP programming, most of the nontrivial parts of code and complicated video codecs would have to be implemented using ARM core. But scaling/color conversion seems to be a relatively simple and well defined task that could be implemented using DSP and reused for any codec. I wonder if DSP can have access both to a memory fragment with a frame decoded by ARM core and to video memory buffer to do this work (from what I read, DSP is only 16-bit cpu, I wonder what addressing modes it supports). And this task could be run simultaneously with decoding the next frame.

Well, everything written above is just a pure speculation It is only a few days passed since I even had a look into mplayer internals. And I have absolutely no prior knowledge about multimedia compression algorithms or even color formats, so I'm sorry for possibly posting here some stupid things All that started from 'hey, it is quite easy to compile mplayer, here is the binary' and turned into fine tuning it into something useful in the end
 
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#27
That's why Nokia chose to go open-source with the 770
 
anidel's Avatar
Posts: 1,743 | Thanked: 1,231 times | Joined on Jul 2006 @ Twickenham, UK
#28
oh and thanks a lot for the time spent in this..
 
Posts: 220 | Thanked: 19 times | Joined on Jun 2006
#29
what director do we put additional codecs in. I want to a link to /lib/dsp/modules/aac.o in there. or am I barking up the wrong tree
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#30
Color conversion can be done directly by hwa742 chip. Would be nice to have more documentation about it though. I already wrote to email mentioned here
http://www.erd.epson.com/vdc/html/contents/S1D13742.htm but got no answer (no surprise :-).

Also I'm not sure but it looks like DSP doesn't send video to epson chip. It only draws it to shared framebuffer which is then send to the chip by kernel omapfb driver from videoplayer code. So if DSP doesn't decode mp4 video there is no reason to use it for other video steps since there is in fact nothing left to do.

DSP tools are free
http://www.gossamer-threads.com/list...pers/3938#3938

gstreamer is probably the right way to go (ffmpeg or other plugin using main cpu) but it doesn't mean patched mplayer is not useful. Currently it is not very clear how to display video with gstreamer on device (preferably also pixel doubled).
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:46.