In terms of mobile video playback, hard decoding based on special chip has become the preferred scheme of mobile video decoding because of its high speed and low power consumption. However, the long deployment cycle and slow iteration speed of hard decoding chip restrict the updating speed of mobile video coding technology to a considerable extent. In recent years, with the continuous enhancement of the general processing capacity of smart phones, software decoding has gradually become popular due to its convenient deployment. So, how much power advantage does hard decoding have over soft decoding? With this problem in mind, we selected several typical mobile phones to test the power consumption difference between h.264/avc hard solution, h.264/avc soft solution, h.265/hevc hard solution, h.265/hevc soft solution and avs2 soft decoding, and found an important phenomenon: the power consumption advantage of hard decoding over soft decoding is gradually losing, and the smart phones produced in recent years are in the mainstream 720p (1280x720) And smaller resolution video, the power consumption difference between hard solution and soft solution has been very small. This means that the update and iteration speed of mobile video coding technology will be greatly accelerated. The test process and results are described in detail below.
Hardware decoding depends on the terminal chip, and smart phones generally support hardware decoding of h.264/avc; Mobile phones that support hevc / h.265 hardware decoding are not completely popular. Take Apple phones as an example, apple phones before iPhone 6S do not support hevc hard decoding; Avs2 is still lack of hard solution support in mobile terminals. In terms of soft decoding, ffmpeg has built-in software decoding libraries of H.264 and h.265; Our team has developed avs2 soft decoding library - uavs2d, which supports mobile applications, and can realize real-time decoding of 1080p video by smart phones [1]. The power consumption performance of different soft and hard solutions on different grades of mobile phones is tested through experiments.
1. Test conditions
1) Test video
The test video includes video clips of 5 different scenes, covering indoor scenes, outdoor sports, natural scenery, interviews and other scenes. The test videos are divided into three groups, which are encoded by H.264, hevc and avs2 respectively. The three groups of videos come from the same video source and have similar coding quality at the same resolution. Specific video specifications are as follows:
2) Test model
3) Test tools
Power consumption test tool: monsoon power monitor aaa10f
Video player: ijkplayerdemo
Software decoder: ffmpeg built-in H.264 and hevc decoder; Uavs2d decoder [2].
2. Test method
1) Configure test environment
a) Samsung S3: remove the battery, power monitor to power the mobile phone and connect the computer, set the output voltage to 3.7V, and use the main channel to test the data.
b) IPhone: connect the power monitor via USB and test the charging power at full power. The charging power is approximately the power consumption.
2) Turn on the flight mode, connect to the WiFi network, clear all background processes, fix the brightness to half of the maximum brightness, and mute.
3) First maintain the standby mode and wait for the power consumption data of the mobile phone to fluctuate smoothly.
4) Perform a set of tests
a) Start the recording program of power consumption tester;
b) Wait for 100s to open a group of network test videos (5min);
c) Wait 100s after video playback;
d) Export the power consumption data, and calculate the average power consumption of 100s before and after video playback and the average power consumption of 5 minutes.
5) Repeat 4) test five groups of data (H.264 hard solution, H.264 soft solution, h.265 hard solution, h.265 soft solution and avs2 soft solution).
6) Replace the mobile phone and repeat 1) - 5) to test Samsung S3, iPhone 6 plus, iPhone 6S and iPhone 8 in turn.
3. Test results
Data description
1) Total power consumption refers to the power consumption of the mobile phone during video playback.
2) Standby power consumption refers to the power consumption of the mobile phone when the mobile phone is on and there is no operation.
3) The test video is a network stream. Because the player has a data cache (15MB), the download will end in advance. Network download has a certain impact on power consumption.
4. Analysis of test results
With the improvement of the general processing capacity of smart phones, the power consumption gap between soft and hard solutions has gradually narrowed. For 720p video, the power consumption difference between H264 soft and hard solutions in iPhone 8 is only 14%, while the power consumption of avs2 soft solutions is only 8% higher than that of H264 hard solutions. The power consumption of different software decoding schemes varies greatly. Among the three schemes tested, avs2 soft decoding scheme has the lowest power consumption. Compared with H.264 soft decoding scheme, because avs2 has higher compression efficiency, the coding rate of avs2 can be 40% lower than that of H.264 for video of the same quality, and the lower code rate brings lower decoding complexity and network overhead. Because we are testing the open source hevc soft decoder with general computational efficiency, the power consumption of hevc soft solution is relatively high.
The video resolution has a great difference on the power consumption of soft solutions, as shown in Table 2. Taking iPhone 8 as an example, for 480p (640x480) video, the power consumption of avs2 soft solutions and H.264 hard solutions is the same; For 720p video, avs2 soft solution consumes 8% more power than H.264 hard solution; For 1080p video, the power consumption of avs2 soft solution is only 11% higher than that of H.264 hard solution. It should be pointed out that the power consumption of soft decoding is closely related to the specific implementation scheme. With the continuous optimization of soft decoding scheme, the power consumption gap between soft decoding and hard decoding will be further narrowed.
summary
With the enhancement of the general computing power of smart phones, the power consumption difference between soft solution and hard solution of mainstream mobile phones on mainstream video resolutions such as 480p and 720p has been very small, which means that the support dependence of mobile video decoding on special chips is reduced, and the iteration speed of mobile video technology will be greatly accelerated.