DSP video
From AlwaysInnovating
This page gives information about DSP for 2010-12.a or later. There are some history pages in the wiki for this feature if you are interested.
OMAP3530 processor includes a DSP co-processor which can decode MPEG2/4 video. This frees the main CPU while playing a video. There are two architectures: DSP Bridge and DSP link.
On this page, we will use two files "Protect Environment.avi" (mpeg4+mp3 in avi container) and "Protect Environment.mp4" (mpeg4+aac in mp4 container).
As a reminder, if you want to play a video with the main processor, use the following. As ai user:
sudo /etc/init.d/dspbridge-init start sudo /etc/init.d/dsplink-init stop
gnome-mplayer /home/ai/Videos/Protect\ Environment.avi totem /home/ai/Videos/Protect\ Environment.avi gst-launch playbin2 uri=file:///home/ai/Videos/Protect\ Environment.avi gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.avi ! decodebin2 ! autoaudiosink gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.avi ! decodebin2 ! omapfbsink gst-launch filesrc location=Videos/Protect\ Environment.avi ! avidemux name=demux demux.video_00 ! queue ! ffdec_mpeg4 ! omapfbsink demux.audio_00 ! queue ! ffdec_mp3 ! alsasink
gnome-mplayer /home/ai/Videos/Protect\ Environment.mp4 totem /home/ai/Videos/Protect\ Environment.mp4 gst-launch playbin2 uri=file:///home/ai/Videos/Protect\ Environment.mp4 gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.mp4 ! decodebin2 ! autoaudiosink gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.mp4 ! decodebin2 ! omapfbsink gst-launch filesrc location=Videos/Protect\ Environment.mp4 ! qtdemux name=demux demux.video_00 ! queue ! ffdec_mpeg4 ! omapfbsink demux.audio_00 ! queue ! faad ! alsasink
DSP Bridge
For DSP bridge, you need to launch the dspbridge-init service:
sudo /etc/init.d/dspbridge-init start
You can test the DSP with the following command:
/usr/bin/dsp-test
To play a video with the co-processor, use the following command line:
totem /home/ai/Videos/Protect\ Environment.avi gst-launch playbin2 uri=file:///home/ai/Videos/Protect\ Environment.avi gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.avi ! decodebin2 ! omapfbsink gst-launch filesrc location=Videos/Protect\ Environment.avi ! avidemux name=demux demux.video_00 ! queue ! dspvdec ! omapfbsink demux.audio_00 ! queue ! ffdec_mp3 ! alsasink
totem /home/ai/Videos/Protect\ Environment.mp4 gst-launch playbin2 uri=file:///home/ai/Videos/Protect\ Environment.mp4 gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.mp4 ! decodebin2 ! omapfbsink gst-launch filesrc location=Videos/Protect\ Environment.mp4 ! qtdemux name=demux demux.video_00 ! queue ! dspvdec ! omapfbsink demux.audio_00 ! queue ! faad ! alsasink
DSP Link
For DSP link, you need first to create a 29M hole in your memory in order to have the DSP Link working. This means that you need to add "mem=99M@0x80000000 mem=384M@0x88000000" in the kernel command line. Moreover, you need to have omapfb.vrfb=0. I will post later how to do this with the new u-boot as of 2010-12.a (actually, it will be much easier than before).
Then, you need to start the dsplink service:
sudo /etc/init.d/dsplink-init start
To play a video with the co-processor, try the following:
sudo totem /home/ai/Videos/Protect\ Environment.avi sudo gstplayer /home/ai/Videos/Protect\ Environment.avi sudo gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.avi ! avidemux name=demux demux.video_00 ! queue ! TIViddec2 ! omapdmaifbsink demux.audio_00 ! queue ! TIAuddec1 ! alsasink
sudo totem /home/ai/Videos/Protect\ Environment.mp4 sudo gstplayer /home/ai/Videos/Protect\ Environment.mp4 sudo gst-launch filesrc location=/home/ai/Videos/Protect\ Environment.mp4 ! qtdemux name=demux demux.video_00 ! queue ! TIViddec2 ! omapdmaifbsink demux.audio_00 ! queue ! TIAuddec1 ! alsasink
