HEVC and VP9 Acceleration with Mali GPU
October 1, 2014, Arm TechCon, Santa Clara, CA—Mukund Srinivasan from Ittiam described the requirements and results of accelerating the newest codecs on GPUs. The needs for higher compression ratios for video is facing the challenges of compute workloads and CPU capacity.
The market is seeing much more video on all devices, but particularly on mobile devices. Traffic for video is now about half of all traffic on the mobile networks, and is expected to increase to four-fifths of all traffic by ’18. This video traffic includes YouTube streams which account for a quarter of all video traffic, and other video streams which are moving to full HD. The amount of traffic calls for higher efficiency compression and the latest codecs are responding to the needs.
One issue is that the HEVC or H.265 codecs are asking for a license fee of $0.20 per unit while the VP 9 codec from Google is free. Both offer much greater compression at the cost of more complexity and a larger transform size. The longer filters and additional tags call for higher numbers of complex computations squeezing the compute capacityof the CPUs in the mobile devices.
One alternative is to use OpenCL with the CPU and GPU to leverage system resources. The GPU is not needed for playout, so it can be used to improve the compute efficiency and can generate more parallel threads. The language allows better load balancing and permits the video algorithm to be split between the CPU and the GPU. The CPU can do the parsing, enhancement code, and intra-frame decoding while the GPU can do motion compensation, inverse quantization, inverse transforms, and reconstruction functions.
For example, motion compensation predicts the movement of pixels per block from the reference frame. The sub-pixel interpolation is a highly parallel functions that is well suited to the GPU capabilities. In the same way, the inverse quantization, inverse transforms, frame reconstruction, and loop filters are highly parallel functions that are processed in a function-serial fashion.
In comparison, the GPU is not well suited for functions like video decode, which is an 8-or 16-bit integer operation. The GPU is a 32-bit integer or floating point processor, so a byte-wide operation is fairly inefficient. One could always add additional steps to concatenate bytes into 32-bit words, but the extra aggregate-disaggregate operations may take more time and energy than the CPU.
The Mali GPU does have a 128-bit ALU which can be configured for 8-and 16-bit operations and OpenCL used workgroups in multiples of 8 and 16 up to 64×64. The GPU takes any 4 x N (with N= 2-16) size block. However, the use of conditional code and differences in thread length will reduce operating efficiency by half. Some coding tricks for the GPU can enable separate thread processes with zero divergence.
Another area for power efficiency gains is to take advantage of the big-little architectures and OpenCL. The maximum use of the little CPU improves operating efficiency. Increasing data dependencies and improving cache coherency through OpenCL can result in dramatic improvements in system performance metrics. A GPU/CPU combination with 4-ARM cores and one Mali (4-GPU cores) with OpenCL code can provide a 50 percent increase in frames per second over a CPU only implementation. At the same time, the power consumption for the pair is one third lower than the CPU or GPU only versions of the code.


