On Android*, communication apps that do video streaming can take advantage of hardware acceleration available on Intel® Atom™ processors. This is an easy way to gain performance, while reducing CPU utilization and power.
In the fall of 2014, Intel worked with JumpChat, a WebRTC video chat ISV to optimize its Android app’s performance on the Intel Atom processor E3800 tablets. As a result of the effort, we were able to lower CPU utilization by 10% and power wattage by 1.3 watts for the app running two-way HD video chat. This case study describes how we went about achieving this with the ISV, with the aim of showing you how easy it is to enable hardware acceleration for supported codecs using MediaCodec.
JumpChat is a video conferencing app available on Android, iOS*, and the Chrome*, Firefox*, and Opera* browsers. This app makes video chat easy by not requiring any logins or accounts. To start a video call, you just send the room URL out to recipients, and a guaranteed safe and encrypted connection is created. Some of the stand-out features are that JumpChat also supports desktop sharing and file transfer during video conferencing.
Software Decode on Atom Processor E800
One of the first things JumpChat did was port the app to x86 and enable HD videoconferencing. We also worked on various UI improvements and bug fixes. Using the 1.0.7 version, we were able to achieve a baseline 2-way video call between two KitKat Atom Processor E3800 tablets using average bandwidth (500 kbps). The picture quality was good without video lags or audio delays compared to a native, non-WebRTC competitor, but the devices did get noticeably warmer with extended use. A power and performance collection using a NI_DAQ* instrumented system showed overall 60% CPU usage and ~7.0 watts of power consumed during the video call:
In an effort to lower the power and CPU utilization, we looked to the modules most active during the run. By far, libjingle_peerconnection_so.so (Google’s WebRTC code) was the hottest module, contributing ~56% to the active JumpChat process time. Many JumpChat threads were running at higher frequencies than the display refresh rate of 60Hz, which also prevents the CPU from going in to a sleep state.
To reduce CPU utilization and offload likely encode/decode activities to the GPU, we decided to look into how much of a difference hardware-accelerated decode would make over the software codecs currently being used. Since the app is implemented on top of WebRTC, JumpChat was primarily using the VP8 codec. Atom Processor E3800 tablets support hardware-accelerated VP8 decode, but not hardware-accelerated VP8 encode. For its 1.0.8 version, JumpChat enabled hardware-accelerated decode for x86 and ARM* through MediaCodec. Android’s MediaCodec class can be used to access low-level media components. To select the hardware decoder on your device through Java*, query MediaCodecInfo for the appropriate MIME type (VP8_MIME_TYPE in this case) using the getSupportedTypes assessor. Intel’s hardware-accelerated encoders and decoders for Atom Processor E3800 tablets begin with the prefix “OMX.Intel”, and the string returned would be OMX.Intel.VideoDecoder.VPX. Create and configure the decoder initialization properties as usual.
Hardware Decode on Atom Processor E3800
Another NI_DAQ collection was made between the same KitKat Atom Processor E3800 devices using the 1.0.8 version of JumpChat, which showed overall 51% CPU usage and ~5.6 watts of total power consumed during the video call:
Offloading the VP8 encode to the GPU by using the hardware- accelerated decoder versus the software decoder reduced CPU usage by ~10% and power consumption by ~1.3 watts. Hardware-accelerated encode of VP8 comes with the follow-on platforms to Atom Processor E800, and with it, this reduction could be even more significant.1
1Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark* and MobileMark*, are measured using specific computer systems, components, software, operations, and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. For more information go to http://www.intel.com/performance
For applications doing heavy video streaming, using platform-supported hardware-accelerated decoders and encoders through MediaCodec is an easy way to reduce CPU utilization and power.
For more such Android resources and tools from Intel, please visit the Intel® Developer Zone
Other Popular Deals
- The 10 best job hunting apps on AndroidTop 10 Android launchers (June 2017)
- The 10 scariest horror games on AndroidAndroid app stores: 5 best alternatives to Google Play Store
- Best Android apps for rooted devices18 apps for a memorable Valentine's Day
- Top 15 Android games that you should playThe 20 best looking games for mobile phones
- 8 Android apps to tickle your funny bone17 must have apps for any Android device (plus alternatives)
- 5 apps to get the Android Lollipop look on your smartphoneTake control of your Android device with these apps
- 7 weird and strange apps for your Smartphone10 neat Google apps you may not know of
- 10 essential Indian apps for Android devicesPerfect Viewer