24 February 2010
Intermediate
Hardware-accelerated H.264 decoding is supported on some video cards and drivers running on Windows XP, Windows Vista, and Windows 7. Linux and Mac OS X hardware-accelerated decoding is not supported in this version. See the Flash Player 10.1 public beta release notes (PDF, 105 KB) for supported hardware and links to download supported drivers.
With the release of the Adobe Flash Player 10.1 public prerelease, designers and developers can provide rich media experiences on the web that are accessible to more screens than ever before. The key features include support for new hardware acceleration that improves graphics performance and reduces power consumption on desktop computers and a range of mobile devices supported under the Open Screen Project.
In this article we describe these new hardware acceleration capabilities, which fall into two categories: H.264 video hardware decoding on supported desktop and mobile devices and hardware (GPU) graphics rendering on supported mobile devices. We also provide tips and best practices to produce content that takes advantage of the hardware acceleration in Flash Player 10.1.
With Flash Player 10.1 beta, increasing numbers of handset users can view SWF content on their smartphones and other mobile devices. Since many devices can leverage the new hardware acceleration features, be sure to follow the guidelines provided here to ensure the best performance for your Flash-based content everywhere.
At the time of this writing, approximately 75% of online video is viewed with Flash Player. With the release of Flash Player 10.1, Adobe has added support for hardware-accelerated H.264 decoding to further the experience of watching video online.
H.264 provides excellent video quality but requires a great deal of processing power to decode it. H.264 video is decoded in Flash Player 10.1 by a GPU or media accelerator whenever capable hardware is available, which greatly improves playback performance and battery life. This is particularly useful for resource-constrained mobile devices, such as netbooks and smartphones.
As a content producer using supported H.264 encoded video, you don't need to do anything to benefit from hardware decoding in Flash Player. The performance improvement is transparent to both producers and viewers. Flash Player uses the available hardware to decode video whenever possible; it is not necessary to use special HTML wmode embed parameters.
Note: The hardware decoding feature does not affect playback of Sorensen Spark or On2 VP6–encoded video.
In the public beta, the desktop Flash Player doesn't perform checks to determine the version of your video card driver. Because it is possible to install video card drivers that have bugs related to hardware decoding, you might encounter distorted video playback, a failure to free up memory after playing video, or even crashing due to bad video drivers.
If you experience problems when playing video with the beta on a Windows desktop machine, please note your graphics card and driver, along with your operating system and browser, so that we can reproduce and investigate issues. Please be sure to include this information as described in Instructions for reporting video bugs (PDF, 1.6 MB). This will help us remove faulty drivers from the list of known good drivers. When troubleshooting, you can disable hardware decoding by accessing the Settings menu in the Flash Player context menu and deselecting the hardware acceleration option.
The final release version of Flash Player 10.1 will activate support for H.264 hardware decoding only with drivers that support the H.264 profile and work properly with hardware acceleration.
Hardware-accelerated H.264 decoding on Windows desktop, notebook, and netbook systems is supported on some video cards and drivers running on Windows XP, Windows Vista, and Windows 7. These include some recent NVIDIA, AMD/ATI, and Intel graphics cards. The player also supports hardware decoding with hardware such as some Broadcom video decoders.
Please read the Flash Player 10.1 public beta release notes (PDF, 105 KB) to learn about supported hardware and find links to download supported drivers. We recommend updating to install the latest drivers available.
In Flash Player 10.1, H.264 hardware acceleration is not supported under either Linux or Mac OS X. Linux currently lacks a developed standard API that supports H.264 hardware video decoding, and Mac OS X does not expose access to the required APIs. The Flash Player team will continue to evaluate adding hardware acceleration to Linux and Mac OS X in future releases.
Flash Player 10.1 supports hardware decoding of H.264 on mobile devices such as smartphones, significantly improving performance and extending battery life on these devices. Be sure to visit the Flash Player 10.1 page on Adobe Labs to get more information about supported devices for the final release of Flash Player 10.1.
Consider the following points when working with H.264 hardware decoding on a desktop machine:
Important limitations to keep in mind when designing H.264 content for playback on mobile devices include the following:
In addition to hardware H.264 decoding, mobile devices that support access to OpenGL ES 2.0 can use Flash Player 10.1 to render all graphical elements (except Pixel Bender shaders) using GPU hardware to increase graphics performance. Desktop players will continue to use software rendering; support for hardware rendering is expected in a future release.
Hardware rendering in Flash Player 10.1 differs substantially from the GPU support available in Flash Player 10. The earlier feature, known as hardware compositing or GPU compositing, involved Flash Player using the GPU to layer (composite) graphics when the HTML page included the wmode=gpu embed parameter. In Flash Player 10, the software renderer draws individual graphical elements and then the resulting image is composited to the screen by the GPU using the appropriate blend mode.
Although hardware compositing in Flash Player 10 improves performance in some cases, it can decrease performance in others. In addition, driver support varies widely on desktops. Given these challenges, Flash Player 10.1 on the desktop also composites SWF content included with the wmode=gpu embed parameter in software.
In contrast to the earlier hardware compositing, the new hardware rendering capability available in Flash Player 10.1 uses the GPU rather than with the software renderer to draw graphics. This shift yields dramatic performance improvements with optimized content. Hardware rendered objects include vector graphics, bitmaps, video, text, and filters. With hardware rendering, the GPU renders and composites graphic elements.
Flash Player 10.1 hardware rendering is automatically enabled on supported devices, and it's not necessary to add the wmode=gpu embed parameter to enable it. However, when working with Flash Player 10.1, the wmode=opaque or wmode=transparent embed parameters will disable hardware rendering, causing the software to render the graphics.
Rendering on the GPU is not 100% pixel accurate with reference to the software renderer. Some content may look slightly chunkier when using the hardware renderer. In addition, Flash Player 10.1 has a limitation that can prevent on-screen Pixel Bender effects from rendering. In some cases, Pixel Bender effects may render as a black square when using hardware rendering. Stay tuned: hardware rendering support for Pixel Bender is expected in a future release of Flash Player.
Because the desktop player continues to use software rendering in this release, pay close attention when comparing the rendering differences between software rendering and the hardware rendering used by many mobile devices.
Another difference between desktop and mobile devices is that Flash Player strives to improve performance by defaulting to medium quality on mobile devices. This generally yields good results since targeted mobile devices have greater display pixel density (dots per inch) than typical desktop displays. However, this can make it harder to notice varying levels of quality when testing.
Although hardware rendering can greatly improve performance of SWF content, the content's design plays an important role. Remember that settings that have historically worked well in software rendering might not work well with GPU rendering. The following tips will help you achieve good performance under GPU rendering without incurring any performance penalty under software rendering.
Since many mobile devices supporting hardware rendering in Flash Player 10.1 will access SWF content across the web, we recommend that you consider the following when creating any SWF content to ensure the best experience across all screens:
wmode=transparent or wmode=opaque in HTML embed parameters. These can result in decreased performance and a small loss in audio-video synchronization under both software and hardware rendering. Also, many platforms do not support GPU rendering when these modes are in effect, significantly impairing performance.When developing content for mobile devices, always remember that mobile devices are not as powerful as desktop machines, even when they leverage hardware rendering support.
The following general tips are not specific to GPU acceleration. However, these best practices can improve performance for SWF content using both hardware and software playback.
transparent. Remove unwanted objects from the display list by setting their parent to null instead.Table 1. Mip mapping levels for different bitmap dimensions
| Dimensions | Suitability for mip mapping | Explanation |
|---|---|---|
| 999 × 200 | Poor | A bitmap with these dimensions will never mip map because one dimension (999) is an odd number |
| 998 × 200 | Acceptable | Reduces to one mip level (499 × 100) |
| 1000 × 200 | Good | Reduces to three mip levels (500 × 100, 250 × 50, 125 × 25) |
| 1024 × 256 | Best | Reduces to eight mip levels, evenly dividing all the way down to 4 × 1 |
To learn more tips and best practices, refer to Optimizing mobile content for the Adobe Flash Platform in the online documentation.
Hopefully this article has familiarized you with the new features included in the public beta of Flash Player 10.1. As you create Flash-based content in the future, be sure to keep hardware acceleration and the limitations of mobile devices in mind.
This article is also a beta, and we welcome your questions and comments. What other information would be helpful as you take advantage of hardware acceleration in Flash Player? Please share your thoughts and request further information in the comments section below. Your feedback is greatly appreciated.
Flash Player 10.1 introduces new hardware acceleration features that can improve performance of SWF content and open the door to delivering compelling mobile experiences on the web. Try incorporating some of the techniques described in this article into your workflow to optimize performance. Doing so will allow users to enjoy your content on the go as well as on the desktop.
Good performance and responsiveness are key elements of great user experiences, but they are only the foundation. As you develop SWF content for mobile devices, consider the other new features available in Flash Player 10.1. Using new features like improved text handling, accelerometer support, and multi-touch input will help you create richer, more contextual, and more compelling experiences than ever before.
Further resources:

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License