Panda: lack of hw video decoding support

Bug #880840 reported by Avik Sil on 2011-10-24
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linaro Ubuntu
High
Ricardo Salveti
linaro-landing-team-ti
Fix Released
High
warmcat
ubuntu-omap4-extras-multimedia
Undecided
Unassigned
summary: - Panda: 1080p video not running smooth on totem player
+ Panda: lack of hw video decoding support
Rob Clark (rob-ti) wrote :

firmware and gst-ducati plugins are in OMAP PPA now..

Changed in linaro-ubuntu:
status: New → Confirmed
importance: Undecided → High
milestone: none → 11.12
Ricardo Salveti (rsalveti) wrote :

I tried enabling the hw decode support with our latest kernel (linux-image-3.1.0-1402-linaro-lt-omap - 3.1.0-1402.5~oneiric1, tilt-linux-linaro-3.1 from 11.11 release), but I'm still unable to fully use the hw acceleration support.

Rob and Andy, I'm not yet sure if the kernel has the needed support from userspace (like syslink version and such), but this package is basically the linux-release-2011-11-1 tag from http://git.linaro.org/gitweb?p=landing-teams/working/ti/kernel.git;a=shortlog;h=refs/heads/tilt-linux-linaro-3.1.

This is what I'm getting when running with playbin2: http://paste.ubuntu.com/744871/ You can find the video at http://samplemedia.linaro.org/MPEG4/

Will attach graphviz file with the elements used.

Ricardo Salveti (rsalveti) wrote :
Ricardo Salveti (rsalveti) wrote :

Andy, to enable the hw decode support at your image, just update it to the latest tilt kernel package available, enable the PPA https://launchpad.net/~tiomap-dev/+archive/release ($ sudo apt-add-repository ppa:tiomap-dev/release && apt-get update) and install the package ubuntu-omap4-extras-multimedia.

warmcat (andy-warmcat) wrote :

Last status I heard about this was that appropriate tiler + syslink are in tilt-3.1 (and so in tilt-linux-linaro-3.1) and they pass their validation tests OK. But in actual accelerated setup, there's a failure when syslink daemon starts. Seb was looking into it.

Sebastien JAN (sebjan) wrote :

I confirm that status. After investigations, it seems that some changes in 3.1 kernel required a change into the FW for the video decode use cases to be functional (and avoid issues at syslink daemon start). So you'll need a firmware update for the video decode to be functional on 3.1 kernel. We will release that FW update, tbc when.

Fathi Boudra (fboudra) on 2011-11-21
Changed in linaro-landing-team-ti:
status: New → Confirmed

On Mon, Nov 21, 2011 at 6:16 AM, Sebastien JAN <email address hidden> wrote:
> I confirm that status. After investigations, it seems that some changes
> in 3.1 kernel required a change into the FW for the video decode use
> cases to be functional (and avoid issues at syslink daemon start). So
> you'll need a firmware update for the video decode to be functional on
> 3.1 kernel. We will release that FW update, tbc when.

Please let me know when you're able to release the new firmware, so we
can push it directly at the Linaro Overlay PPA if it also breaks the
one at the TI PPA.

Thanks for confirming the issue.

Hello Ricardo,

We have checked internally and necessary firmware are already available
into release PPA:

gst-plugin-ducati 1.5.3.2-1 Olivier Naudan (2011-11-17)
tiomap4-syslink-mm-firmware 1.50.21.1+dce2+3 Olivier Naudan (2011-11-17)

Can you confirm that syslink is starting correctly on your side?
Then on 3.1 kernel we are having issues with pulse then the videos are not
playing well due to bad audio synchro.

Are you able to play video using pipeline:
$ gst-launch-0.10 playbin2 audio-sink=fakesink video-sink="pvrvideosink
sync=false" uri=file://<absolute path to your video>

Regards,

*Xavier Boudet*

On Mon, Nov 21, 2011 at 10:06 AM, Ricardo Salveti <email address hidden>wrote:

> On Mon, Nov 21, 2011 at 6:16 AM, Sebastien JAN <email address hidden> wrote:
> > I confirm that status. After investigations, it seems that some changes
> > in 3.1 kernel required a change into the FW for the video decode use
> > cases to be functional (and avoid issues at syslink daemon start). So
> > you'll need a firmware update for the video decode to be functional on
> > 3.1 kernel. We will release that FW update, tbc when.
>
> Please let me know when you're able to release the new firmware, so we
> can push it directly at the Linaro Overlay PPA if it also breaks the
> one at the TI PPA.
>
> Thanks for confirming the issue.
>
> --
> You received this bug notification because you are a member of TI OMAP
> Developers, which is subscribed to ubuntu-omap4-extras-multimedia.
> https://bugs.launchpad.net/bugs/880840
>
> Title:
> Panda: lack of hw video decoding support
>
> Status in Linaro Texas Instruments Landing Team:
> Confirmed
> Status in Linaro Ubuntu Evaluation Builds:
> Confirmed
> Status in OMAP4 Ubuntu Multimedia addons:
> New
>
> Bug description:
> Hwpack: http://snapshots.linaro.org/oneiric/lt-panda-x11-base-
> oneiric/20111023/0/images/hwpack/hwpack_linaro-lt-
> panda-x11-base_20111023-0_armel_supported.tar.gz
>
> Image: http://snapshots.linaro.org/oneiric/linaro-o-ubuntu-
> desktop/20111023/0/images/tar/linaro-o-ubuntu-desktop-
> tar-20111023-0.tar.gz
>
> Media file:
>
> http://samplemedia.linaro.org/MPEG4/big_buck_bunny_1080p_MPEG4_MP3_25fps_7600K.AVI
>
> The video is not running smooth and CPU utilization in closed to 100%
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/linaro-landing-team-ti/+bug/880840/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~tiomap-dev
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~tiomap-dev
> More help : https://help.launchpad.net/ListHelp
>

Ricardo Salveti (rsalveti) wrote :

Hi Xavier,

I can confirm that it works a lot better (not perfect, but usable alerady) when using 'audio-sink=fakesink video-sink="pvrvideosink sync=false' (both cpus at 30% with a 1080p video).

And how can I properly check if syslink was started correctly at my board?

I'm testing with a 4430 btw.

Changed in linaro-ubuntu:
assignee: nobody → Ricardo Salveti (rsalveti)
Nicolas Dechesne (ndec) wrote :

ricardo,

you should not need to disable a/v sync (e.g sync=false). even with audio-sink=fakesink you can get a/v sync, in which case it uses an OS timer for sync.

things you can do to check h/w accelerated video:

 - watch -d cat /proc/interupts --> you should see mailbox ITs when doing video playback
 - check syslink_daemon is running with ps
 - look at the GST pipeline:
    export GST_DEBUG_DUMP_DOT_DIR=/tmp
    <run any MM command, such as playbin2 or totem>
    <look for the .dot file in /tmp, it's a graphical representation of the pipeline computed dynamically, using dot format>
    dot -T png -O /tmp/<your file>.dot --> open the PNG, you should see that 1) the decoder element used is 'gstducati', 2) the displaysink is pvrvideosink

warmcat (andy-warmcat) on 2011-11-23
Changed in linaro-landing-team-ti:
status: Confirmed → Invalid
Ricardo Salveti (rsalveti) wrote :

With just 'audio-sink=fakesink' the video still doesn't work properly (WARNING: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstAutoVideoSink:videosink/GstPVRVideoSink:videosink-actual-sink-pvrvideo: A lot of buffers are being dropped).

The video check:
 - /proc/interupts is showing the mailbox ITs
 - syslink_daemon is running
 - pipeline is also fine, as described at comment #3

Ricardo Salveti (rsalveti) wrote :

Tested latest tilt-linux-linaro-3.1 again, but I'm still unable to play the vide unless I use video-sink="pvrvideosink sync=false".

Without it I get a lot of:
WARNING: from element /GstPlayBin2:playbin20/GstPlaySink:playsink0/GstBin:vbin/GstAutoVideoSink:videosink/GstPVRVideoSink:videosink-actual-sink-pvrvideo: A lot of buffers are being dropped.

More debugging tomorrow, will try both tilt-3.1 and sebjan's tree.

Xavier or Sebastien, were you able to validate the hw decode support with the 3.1 kernel?

Nicolas Dechesne (ndec) wrote :

@ricardo: yes, we have looked into this earlier this week and there is a regression somewhere around syslink. if we enable the gst-ducati traces, we can see that the time to process each frame is ~50ms, hence we are dropping many frames. with 3.0 kernel this does not happen, the processing time is ~25ms. it's just the decoding time, nothing to do with rendering. i tried to measure the processing time on the ducati side using the 32K, and it sounds like this side is fine (~20ms), which would imply that the problem is in syslink...

sebjan is in vacation this week, and with xmas coming around, i am not sure we will be able to tackle this this month.

@warmcat: is that something you can look into? very first thing to do might be to measure the RPC call in a simple syslink samples and see what we get for 3.0 vs 3.1, if we can observe the problem there, it might be simpler to debug. otherwise we will need to debug with MM packages, but it is quite straigtforward.

GST-ducati will end up calling VIDDEC3_process() function which is in dce.c in libdce, and this function will use the RCM exec (RPC) API to send the command and args to the ducati M3 where the actual VIDDEC3_process is executed and uses the IVAHD.

Ricardo Salveti (rsalveti) wrote :

Unfortunately unable to make 11.12, moving it to 12.01.

Changed in linaro-ubuntu:
milestone: 11.12 → 12.01
warmcat (andy-warmcat) wrote :

Sebastien has traced this to grotty hwspinlock runtime_pm code eating 2.8ms spinning each time. He should have a solution early in new year.

warmcat (andy-warmcat) wrote :

tilt-linux-linaro-3.1 now has Seb's workaround which should solve this isse

Changed in linaro-landing-team-ti:
status: Invalid → Fix Committed
assignee: nobody → warmcat (andy-warmcat)

On Mon, Jan 2, 2012 at 8:36 AM, warmcat <email address hidden> wrote:
> tilt-linux-linaro-3.1 now has Seb's workaround which should solve this
> isse

Great, will try it out.

Thanks for the heads up.

Ricardo Salveti (rsalveti) wrote :

I can confirm that with current tilt-linux-linaro-3.1 I'm able to use the accelerated video decoding just fine, even with sound.

Sometimes I'm getting a few frame drops, but guess that's normal for now.

Changed in linaro-ubuntu:
status: Confirmed → In Progress

@ricardo: can you detail which packages you installed to get video decoder
running, and how you test? just to confirm that you have everything lined
up correctly. Also what do you mean by 'frame drop' , is that a visual
interpretation or a measurement?

On Wed, Jan 4, 2012 at 5:42 AM, Ricardo Salveti <email address hidden>wrote:

> I can confirm that with current tilt-linux-linaro-3.1 I'm able to use
> the accelerated video decoding just fine, even with sound.
>
> Sometimes I'm getting a few frame drops, but guess that's normal for
> now.
>
> ** Changed in: linaro-ubuntu
> Status: Confirmed => In Progress
>
> --
> You received this bug notification because you are a member of TI OMAP
> Developers, which is subscribed to ubuntu-omap4-extras-multimedia.
> https://bugs.launchpad.net/bugs/880840
>
> Title:
> Panda: lack of hw video decoding support
>
> Status in Linaro Texas Instruments Landing Team:
> Fix Committed
> Status in Linaro Ubuntu Evaluation Builds:
> In Progress
> Status in OMAP4 Ubuntu Multimedia addons:
> New
>
> Bug description:
> Hwpack: http://snapshots.linaro.org/oneiric/lt-panda-x11-base-
> oneiric/20111023/0/images/hwpack/hwpack_linaro-lt-
> panda-x11-base_20111023-0_armel_supported.tar.gz
>
> Image: http://snapshots.linaro.org/oneiric/linaro-o-ubuntu-
> desktop/20111023/0/images/tar/linaro-o-ubuntu-desktop-
> tar-20111023-0.tar.gz
>
> Media file:
>
> http://samplemedia.linaro.org/MPEG4/big_buck_bunny_1080p_MPEG4_MP3_25fps_7600K.AVI
>
> The video is not running smooth and CPU utilization in closed to 100%
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/linaro-landing-team-ti/+bug/880840/+subscriptions
>
> _______________________________________________
> Mailing list: https://launchpad.net/~tiomap-dev
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~tiomap-dev
> More help : https://help.launchpad.net/ListHelp
>

Ricardo Salveti (rsalveti) wrote :

On Wed, Jan 4, 2012 at 7:13 AM, Nicolas Dechesne
<email address hidden> wrote:
> @ricardo: can you detail which packages you installed to get video decoder
> running, and how you test? just to confirm that you have everything lined
> up correctly. Also what do you mean by 'frame drop' , is that a visual
> interpretation or a measurement?

I installed the latest lt-omap kernel available at the staging PPA and
the ubuntu-omap4-extras-multimedia, from the TI release PPA (I'm about
to copy the packages to the linaro overlay).

Tested checking with gstreamer, looking at the pipeline, and also at
the amount of cpu consumed by the decode. Was able to play 720p videos
just fine.

The frame drops I got happened when testing with gst-launch, similar
as we had before this newer kernel, but just with a few frames (and
you can also note it at the screen). If you want I can try to make the
video I used available somewhere, so you can also try to reproduce at
your own system.

Nicolas Dechesne (ndec) wrote :

On Wed, Jan 4, 2012 at 3:33 PM, Ricardo Salveti <email address hidden>wrote:

> I installed the latest lt-omap kernel available at the staging PPA and
> the ubuntu-omap4-extras-multimedia, from the TI release PPA (I'm about
> to copy the packages to the linaro overlay).
>
> Tested checking with gstreamer, looking at the pipeline, and also at
> the amount of cpu consumed by the decode. Was able to play 720p videos
> just fine.
>

ok. that looks fine.

>
> The frame drops I got happened when testing with gst-launch, similar
> as we had before this newer kernel, but just with a few frames (and
> you can also note it at the screen). If you want I can try to make the
> video I used available somewhere, so you can also try to reproduce at
> your own system.
>

when using unity2D it uses metacity with compositing enabled and that has
an impact on the GPU load. since we rely on GPU for video rendering
(pvrvideosink) that has an impact on the rendering. disabling compositing
really help here (using gnome fallback for example).

we have some updates (not published yet) with some bug fixes in
pvrvideosink (fixing some jerkyness) and improving the quality of the
rendering.

Anmar Oueja (anmar) on 2012-01-04
Changed in linaro-landing-team-ti:
importance: Undecided → High
warmcat (andy-warmcat) wrote :

Anmar, I don't think there's anything left for us to do on this one. If there's a better fix on hwspinlock pm latency we'll use it but it won't differ from Seb's current fix in terms of performance.

Changed in linaro-landing-team-ti:
status: Fix Committed → Fix Released
Anmar Oueja (anmar) wrote :

Agreed. I marked it for 2012.01 just so I know it will make it into that release.

Changed in linaro-ubuntu:
status: In Progress → Confirmed
status: Confirmed → Fix Committed
Ricardo Salveti (rsalveti) wrote :

On Wed, Jan 4, 2012 at 1:22 PM, Nicolas Dechesne
<email address hidden> wrote:
> when using unity2D it uses metacity with compositing enabled and that has
> an impact on the GPU load. since we rely on GPU for video rendering
> (pvrvideosink) that has an impact on the rendering. disabling compositing
> really help here (using gnome fallback for example).

With XBMC we also enabled a separated session at LightDM so people are
able to have the best performance available (without any other wm or
compositor around).

> we have some updates (not published yet) with some bug fixes in
> pvrvideosink (fixing some jerkyness) and improving the quality of the
> rendering.

I updated both gst-ducati and gst-plugins-base from gitorious to make
XBMC to work properly, but other than that I just used the packages
available at the TI PPA. What other updates are you planning to push
soon?

Let us know as soon you have something, so we can also integrate at our LEB.

Thanks!

Changed in linaro-ubuntu:
status: Fix Committed → Fix Released
Xavier Boudet (x-boudet) on 2012-02-03
Changed in ubuntu-omap4-extras-multimedia:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers