Jump to Navigation

Hardware Accelerated HTML5 Video Solution for MeeGo Browser

Session Summary: 
The presentation gives an overview on how to leverage dedicated hardware engine to accelerate video playback for HTML5 in MeeGo browser and successfully play High Definition video smoothly with low power consumption. Here we will take H.264 as an example, but methodology can be adopted by other compression technology optimization. Firstly, some general concepts will be interpreted, and give answers to: what's HTML5 video, and why we need HTML5 video tag. Secondly, we will dig into chromium software stack to show how chromium leverages FFMPEG capability to support HTML5 video playback. And then, we will review the hardware acceleration solution for video decoding, and rendering. Proposals will be created and depicted on how to accelerate High Definition streams playback, and reach real-time playing. Finally, we will discuss about the tradeoffs and challenges.
Session Abstract: 

HTML5 video is an HTML element intending to become the new standard way to show video online. H.264 is one of the widely used formats for HTML5 videos, and here it will be accelerated by hardware engine. MeeGo browser is developed based on chromium project, an open-source browser powered by WebKit, and adopts FFMPEG to play HTML5 video. Multi-process architecture is used to protect overall application from bug and crash. Browser process manages tabs, run UI, and plugin processes. The tab-specific processes are called "render process" which use WebKit to interpret and layout HTML. And also, render process will handle streams decoding and rendering to share memory which is used to transfer uncompressed data between browser process and render process.

For Tablet-Moorestown platform, video decoding and rendering overloads are offloaded from CPU to a dedicated hardware engine (MSVDX+SGX). LIBVA APIs, is an interface, which encapsulate lower level video driver, and provides HD decoding and rendering capability to high level media framework. Here FFMPEG framework is coded to bridge LIBVA and browser media engine. In order to save CPU time and avoid memory access, we create a full-screen sub window in render process while playing H.264 streams, and the surface buffers, decoded out from LIBVA codec, can be directly put to this sub window to avoid overheads of process communication and data sharing between render process and browser process. Of course, a new UI is designed to control the full-screen video playing. What’s more, backend browser process will be blocked to save more power while full screen playing.

For TV-CEx100 platforms, we make two proposals. One is Multi-plane solution, which maximizes the media playback performance for TV. On CEx100 platform, graphics and video can be rendered to separate hardware planes and blended via hardware. We propose to enable a new multimedia framework making full use of the hardware capability for decoding and rendering to replace the default software FFMPEG pipeline. In this framework, browser and video are displayed in separated hardware planes, and video underneath is shown by enabling X transparent on video-area co-location in above browser plane. The other solution untilizes an advanced feature: video as texture. Decoded video from hardware engine is treated as textures and we use an OpenGL shader to convert it to ARGB format that can be copied back to browser window. Color conversion is offloaded to GPU.

Multi-process architecture of browser keeps application from hang and crash, but it also causes more overheads on data process. Data in share memory between render process and browser process is ARGB format, which is not a supported output format from tablet/tv hardware pipeline. There is always a tradeoff between direct rendering and following native behavior of HTML5 video playback, which may involve color conversion, resize, and memory copy.