Case Study: Implementing Intel x86 Support for Android with CRI Middleware

Published Date
01 - Apr - 2016
| Last Updated
04 - Apr - 2016
 
Case Study: Implementing Intel x86 Support for Android with CRI M...

Overview

Android* devices powered by the Intel® Atom™ processor are rising in popularity, and supporting applications are being released continuously. To meet the needs of application developers focused on creating games for Android devices with Intel Atom processors, middleware companies began supporting x86.

One such company, CRI Middleware Co., Ltd., offers runtime library x86 support for Android middleware. It has done this by changing the build settings of the makefile in the Android NDK and replacing the ARM* NEON* instructions. Included in x86 support of the middleware runtime library for Android devices is a plug-in for Unity*, a game engine developed by Unity Technologies, which allows developers to build games by simply setting the x86 folder as the build target with the Android NDK.

About CRI

CRI is a Japanese company researching, developing, and selling audio/video middleware. Founded in 1983 as a research institute of the independent IT solution vendor CSK Corporation, CRI developed middleware for the Sega home video game console. After going independent in 2001, it has racked up accomplishments with middleware for gaming consoles and is now producing products under the CRIWARE* brand.

In the past few years CRI has been focused on supporting smartphones and expanded its middleware for the iPhone* and Android. CRI currently provides the integrated sound middleware CRI ADX*2 for Android, the high quality and high performance movie middleware CRI Sofdec* 2, and the file compression/packing middleware FileMajik PRO. Using these, game and application developers are able to add powerful video to games and new rendering of communication with interactive sound, all while increasing development efficiency.

Integrated sound middleware CRI ADX 2

High quality and high performance movie middleware CRI Sofdec 2

Intel® x86 Supported Backgrounds

CRI has been focused on Intel x86 support for middleware since 2012 when Android devices powered by the Intel Atom processor arrived in the market. Software developers began to call for Android x86 emulator support. There were issues with the operating speed of the original ARM emulator that emulates the ARM architecture, but high-speed operation was achieved using the x86 emulator and the Intel® Hardware Accelerated Execution Manager (Intel® HAXM). Many developers who used it said that they wanted to use CRIWARE with the x86 emulator for development efficiency gains, and thus an x86 support version was first released in June 2013.

Yusuke Urushihata, CRI unit head, states, “X86 support is simple to achieve using Android NDK. We were actually able to add support by simply adding one line for the output destination to the makefile.”

CRI released CRIWARE for the Android NDK development environment.

NDK development environment

Later in August 2014 the game engine company Unity Technologies announced x86 support for Unity 4 and 5, and a native development environment was released. As a result, developers then called for CRI middleware x86 support for the Unity library which CRI later released.

Development integration manager at CRI, Atsushi Sakurai, stated, “Game developers (users) using the 3D game engine Unity strongly requested x86 support, so we decided to provide x86 middleware support.”

Unity development environment

Other than Unity, the 2D-oriented Coco2d-x is another CRI-supported video game framework, which runs in the native Android development environment. Because it is written in C++, it does not require a special library.

Development Focused on x86 Support

CRI developed the runtime library with the program development environment Android NDK, creating it in a pre-determined order and adding support without any hitches.

Most parts of the build settings of the Android NDK makefile (Android.mk) are repaired and added one line at a time such that they are output in x86 format.

When it came to decode processing of videos, CRI used ARM NEON instructions, however it produced a make error when running a build for x86. Therefore, CRI rewrote the decode processing code in optimized C and C++ that has proven itself on Intel® architecture-based platforms.

To establish x86 support immediately, it was crucial that the CRI-provided middleware was multi-platform. Multi-platform support was originally included in the design concept of CRI’s middleware, so that a framework like the NEON instruction set exists for switching to a different environment even in the event of a target-specific problem. For example, even if the endians in the source code are different, they are automatically distinguished using CRI to configure the environment built with little endians.

How to use CRIWARE* for x86 Support

CRI provides libraries for ARM and x86.

The procedure when using Unity for video game development and CRIWARE to provide x86 support for Android devices with Intel Atom processors is quite simple. All you need to do is use the Android NDK to run the application’s build. As long as you’re using an Intel Atom processor-based device with Android and you have a test environment, x86 support is easy to achieve.

In native development environment, the application makefile and x86-targeted settings are modified one line at a time when you run the build. During this process, the library with x86 support is stored in an x86 folder that is automatically created in the libs folder.

Evaluation and Future Prospects of Intel® Atom™ Processor-based Devices running Android

At the present time, CRI has not yet finished its data analysis and so hasn’t drawn any conclusions as to the performance of Android devices powered by the Intel Atom processor versus ARM-powered ones.

Nevertheless, an application’s video and audio processing speed almost always depends more on the platform and audio/video drivers than on architecture, so the processor matters. Intel Atom processor-based devices run smoothly and do not experience slow operations or unnatural screen movements.

Moving forward, the possibility of supporting Intel® Streaming SIMD Extensions (Intel® SSE) is being examined for processing ARM NEON’s video decode instructions. Furthermore, preparations for 64-bit Android have also begun. CRI is therefore hoping for continued provision of information and technical support from Intel.

For more such Android resources and tools from Intel, please visit the Intel® Developer Zone

https://software.intel.com/en-us/articles/case-study-implementing-intel-x86-support-for-android-with-cri-middleware