Matej
unread,Aug 6, 2009, 9:29:36 AM8/6/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Beagle Board
Hi
I managed to compile latest V4L modules against the kernel version
2.6.28 and 2.6.29.
The guys at V4L made that quite easy.
Now, I am using a mplayer (compiled fwith OpenEmbedded), which uses
NEON optimization for
playing MPEG4 movies. This is the output from MPlayer, when I play a
sample file (only
output I think is important is included):
VIDEO: [DX50] 576x240 24bpp 25.000 fps 818.0 kbps (99.9 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
VO: [xv] 576x240 => 576x240 Planar YV12
I use top, to see how much CPU utilization I get when playing such
file and that is around 25% for mplayer
and around 3% for XOrg.
Now, when I try to play a TV stream with:
$ mplayer tv://
Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
tvp5150 2-005c: tvp5150am1 detected.
Selected device: Hauppauge WinTV USB 2
Tuner cap: STEREO LANG1 LANG2
Tuner rxs: MONO
Capabilites: video capture tuner audio read/write streaming
supported norms: 0 = NTSC; 1 = NTSC-M; 2 = NTSC-M-JP; 3 = NTSC-M-KR;
4 = NTSC-443; 5 = PAL; 6 = PAL-BG; 7 = PAL-H; ;
inputs: 0 = Television; 1 = S-Video;
Current input: 0
Current format: YUYV
v4l2: current audio mode is : STEREO
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Packed
YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Again, with top i get mplayer using around 75% CPU utilization and
XOrg takes another 20%!!!
I believe this is due to decoder RAW YUY2 not being optimized for
NEON. Am I right?
What could I do, to optimize this?
Any hints?
Oh, and I managed to get profiler running, and this is what I get when
I run it under gprof:
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
93.33 0.14 0.14 mirror
6.67 0.15 0.01 demux_open_film
0.00 0.15 0.00 6674 0.00 0.00 control
0.00 0.15 0.00 6652 0.00 0.00 GetTimer
0.00 0.15 0.00 5892 0.00 0.00 mp_msg
0.00 0.15 0.00 5703 0.00 0.00 teletext_control
0.00 0.15 0.00 3800 0.00 0.00 saddf
0.00 0.15 0.00 1901 0.00 0.00 control
So mirror is the function giving us the headaches!
Thanks for any info.
Regards,
Matej