Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flash Player Developer Center /

Flash Player 10.1 hardware acceleration for video and graphics

by Chris Nuuja

Chris Nuuja
  • Adobe

by Tom Nguyen

Tom Nguyen

Content

  • H.264 video hardware decoding
  • Tips for H.264 hardware decoding
  • Hardware (GPU) graphics rendering
  • Tips for optimizing hardware rendering performance
  • Tips for improving graphics performance on mobile devices

Modified

24 February 2010

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash Player Flash Professional Flex

Requirements

User level

Intermediate

Required products

  • Flex Builder (Download trial)
  • Flash Professional CS4 (Download trial)

Additional Requirements

Flash Player 10.1 beta

  • Download

Choose a SWF authoring tool:

Flex Builder 3

or

Flash CS4 Professional

Hardware requirements

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.

H.264 video hardware decoding

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.

Beta testing Flash Player 10.1

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.

Desktop hardware support for H.264 hardware decoding

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.

Mobile hardware support for H.264 hardware decoding

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.

Tips for H.264 hardware decoding

Consider the following points when working with H.264 hardware decoding on a desktop machine:

  • Most desktop hardware decoders can accelerate multiple H.264 streams concurrently. The amount of acceleration will depend on the specifications of the decoder. If a hardware decoder cannot handle an additional stream, Flash Player will decode that stream in software.
  • There are many different options for encoding H.264, and support for specific formats varies with different hardware decoders. However, in general, desktop decoders will support H.264 baseline, main, and high profiles.

Important limitations to keep in mind when designing H.264 content for playback on mobile devices include the following:

  • On most mobile phones, software decoding of H.264 will often be below 10 fps.
  • In the set of devices that support GPU-based H.264 decoding, not all will support all H.264 profiles and features. Support may be limited to baseline profile, or main profile in limited screen resolutions (such as 640 × 480 and lower).
  • Most mobile devices can decode only one H.264 stream at a time. Additional streams will be decoded in software and may play back with very low frame rates.

Hardware (GPU) graphics rendering

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 differences

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.

Tips for optimizing hardware rendering performance

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:

  • Avoid using 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.
  • Stick to the standard and alpha blend modes. Avoid using other blend modes, especially the layer blend mode. Not all blend modes can be reproduced faithfully when rendered with the GPU.
  • When a GPU renders vector graphics, it breaks them up into meshes made of small triangles before drawing them, a process called tesselating. There is a small cost to doing this, which increases as the complexity of the shape increases. To minimize performance impact, avoid morph shapes, which must be retesselated on every frame.
  • Avoid self-intersecting curves, very thin curved regions (such as a thin crescent moon), and intricate details along the edges of a shape. These are complex shapes for the GPU to tessellate into triangle meshes. To understand why, consider two vectors: a 500 × 500 square and a 100 × 10 crescent moon. A GPU could easily render the big square because it's just two triangles; but it takes many triangles to describe the curve of the crescent moon, making the shape more complicated for the GPU to render even though it involves fewer pixels.
  • Avoid large changes in scale, as this can also cause retesselation.
  • Avoid overdrawing (layering multiple graphical elements so that they obscure each other) whenever possible. Using the software renderer, each pixel is drawn only once, so there is no penalty no matter how many graphical elements are covering each other at that pixel location. By contrast, the hardware renderer must draw each pixel for each element whether that region is obscured by other elements or not. If two rectangles overlap each other, the hardware renderer will draw the overlapped region twice while the software renderer will draw the region only once. Although you might not notice a performance impact of overdraw on the desktop (which uses the software renderer), many overlapping shapes may adversely affect performance on devices using GPU rendering. Consider removing objects from the display list rather than hiding them, whenever you objects to disappear from view.
  • Avoid using a big filled rectangle as a background. Set the background color of the Stage instead.
  • Avoid the default bitmap fill mode of bitmap repeat whenever possible, and use bitmap clamp mode instead to achieve better performance.

Tips for improving graphics performance on mobile devices

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.

  • Avoid high-rate ActionScript timers; also avoid using many different timers in the same project.
  • Keep SWF frame rate as low as possible. If necessary, set the frame rate of the Stage dynamically as needed.
  • Don't hide objects by placing them off-screen or setting the alpha to transparent. Remove unwanted objects from the display list by setting their parent to null instead.
  • Keep your display list small. Hundreds of children on the display list can cause a significant overhead. The GPU cannot help with this overhead.
  • If the project displays a great deal of individual graphical elements that will never animate, consider replacing them with a pre-rendered bitmap graphic—using a static image to create the desired texture.
  • If individual graphic elements must animate but do not require mouse events, consider using the Graphics class drawing API instead of representing each one with an individual sprite or movie clip.
  • DisplayObject.cacheAsBitmap can be used to flatten a tree of graphical elements into a quick-to-render bitmap at runtime. However, if that display object never changes, it is more efficient to replace that display object with a bitmap graphic instead.
  • Do not use DisplayObject.cacheAsBitmap on content that changes often, as this practice also causes increased overhead.
  • Filters are expensive. Avoid using them to achieve subtle effects. Use filters only when the filter or the content being filtered will animate. If the content and the filtered result never change, replace the effect with a pre-rendered bitmap instead.
  • Keep bitmaps as small as possible. Bitmaps that are downsampled at runtime because they are drawn at a smaller size than their native resolution are a waste of speed, memory, and bandwidth.
  • If possible, make bitmaps in sizes that can be mip mapped (read Tinic Uro's article on mip mapping to learn more). Your bitmap dimensions do not have to be a power of two, but the more iterations over which they can be evenly divided, the better. Table 1 compares mip mapping levels for different bitmap dimensions.

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.

Where to go from here

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:

  • Introducing Adobe Flash Player 10.1 public prerelease
  • Flash Player 10.1 public prerelease demos and interviews with engineers
  • Adobe Labs: Adobe Flash Player 10.1

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

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement