SPIE Membership Get updates from SPIE Newsroom
  • Newsroom Home
  • Astronomy
  • Biomedical Optics & Medical Imaging
  • Defense & Security
  • Electronic Imaging & Signal Processing
  • Illumination & Displays
  • Lasers & Sources
  • Micro/Nano Lithography
  • Nanotechnology
  • Optical Design & Engineering
  • Optoelectronics & Communications
  • Remote Sensing
  • Sensing & Measurement
  • Solar & Alternative Energy
  • Sign up for Newsroom E-Alerts
  • Information for:
SPIE Photonics West 2019 | Register Today

SPIE Defense + Commercial Sensing 2019 | Call for Papers

2019 SPIE Optics + Photonics | Call for Papers



Print PageEmail PageView PDF

Electronic Imaging & Signal Processing

A one-pass estimation algorithm for real-time video coding

Accurate source coding distortion approximations can be applied to practical video coding.
20 October 2011, SPIE Newsroom. DOI: 10.1117/2.1201110.003883

Digital representation of raw video signals requires a huge capacity. Consequently, video coding is typically adopted to reduce the video data rate. That makes it feasible to transmit the video in real time over a given communication channel or to store it in a device with a limited capacity. In the area of video communications, coding algorithms can compress raw video signals at high perceptual quality within a restricted channel bandwidth. Rate-control and rate-distortion optimization methods are the important factors in designing excellent video coding algorithms. With these methods, it is necessary to estimate the source coding distortion that is introduced into the encoded video, because some raw video signal information is lost.

Existing source coding distortion approximation algorithms1–5 for video coding fall into two categories: sequence-independent1 and sequence-dependent.2–5 However, the problem with these algorithms is that the source coding distortion cannot be accurately estimated for real-time video coding, an issue that has become increasingly important. To address this, we have developed a one-pass source coding distortion estimation algorithm6 for real-time video coding.

Analyzing motion-compensated predictions helps improve source coding distortion estimates.5 Therefore, we looked at motion-compensated predictions to consider whether the quantization step sizes for different frames may be different due to constraints in the constant bit rate (CBR), real-time video coding. We then used a linear prediction model to compute the residue discrete cosine transform (DCT) coefficient variances, an approach that does not require video sequence precoding. Finally, based on the video sequence characteristics, we estimated the source coding distortion.

Motion-compensated predictions showed that the residue DCT coefficients' variances in the current video frame consist of two parts, the variations between the current and previous video frames, and the source coding distortions of the previous frame's residue DCT coefficients. The variations between those frames can be surmised using a linear prediction model. Furthermore, multiple reference frames can be employed in practical intercoding. Thus, we can estimate the residue DCT coefficient variances in the current video frame.

If we suppose that the residue DCT coefficients follow the Laplacian distribution, we can use the source's distortion model to compute the residue DCT coefficients' coding alterations. We used an estimation method to calculate the error, which appears because we must assume the direct current coefficient to be Laplacian instead of Gaussian distributed. We can predict the source coding distortion according to the error and the coding irregularities of the residue DCT coefficients.

Table 1.Mean absolute difference of source coding distortion estimation.
Video sequencesReference 1Reference 2Reference 3Reference 4Reference 5Proposed
Akiyo 0.1933 0.1560 1.6020 0.1572 0.1307 0.0548
Container 0.3815 0.8516 3.3844 0.8531 0.2126 0.0652
Mother-daughter 0.4933 0.4363 2.4454 0.4389 0.2619 0.0763
Table 6.3796 2.2584 5.1792 2.2584 1.1197 0.6240
Mobile 5.5612 5.4503 25.6981 5.3919 10.1409 1.0591
Car phone 1.3266 0.7482 3.7922 0.7495 0.3924 0.1902
Foreman 3.7772 2.3291 3.3798 2.3288 0.9845 0.2551
News 2.0390 0.6710 2.9166 0.6799 0.6644 0.4257
Bus 21.9443 4.6475 10.5963 4.6965 2.9775 0.8160
Coastguard 15.5060 4.5010 10.1766 4.3036 2.2381 1.2479
Flower 26.7499 3.6227 16.5295 3.9090 8.3672 2.4671
Tempete 11.4442 3.8010 13.0416 3.7330 3.4946 0.7995
Waterfall 1.2957 2.5145 8.0989 2.5133 0.7554 0.2614
Average 7.4686 2.4606 8.2185 2.4625 2.4415 0.6417

To evaluate the performance, we used the H.264 reference software JM16.0 and tested 13 video sequences. Table 1 shows the mean absolute values of estimation errors of both the existing and proposed algorithms. For each of the sequences, the proposed algorithm's estimation error is the smallest. Figure 1 shows the source coding distortion curves for two video sequences. The curve of the proposed algorithm follows the actual source coding distortion curve very well.

Figure 1. Estimations of source coding distortion. (a) Mobile sequence, where the target bit rate is 80kbps, and (b) Tempete sequence, where the target bit rate is 600kbps.

In summary, we are proposing a one-pass source coding distortion estimation algorithm for real-time video coding. Our experimental results indicate that the proposed algorithm can achieve source coding distortion estimation more accurately than existing algorithms. The proposed algorithm is useful for designing rate-control and rate-distortion optimization methods. Our future work includes estimating the source coding distortion for B-frames, which are very important in practical video coding.

This work was supported by the Fundamental Research Funds for the Central Universities (JY10000901015), National Natural Science Foundation of China (60802032), the 111 Project (B08038), Program for Changjiang Scholars and Innovative Research Team in University (IRT0852), and by the Integrated Service Networks State Key Laboratory.

Wei Wu, Bin Song
Xidian University
Xi'an, China

Wei Wu, associate professor in the School of Telecommunication Engineering, focuses his research on video encoder control, video coding, and video signal processing.

1. J. Ribas-Corbera, S. Lei, Rate control in DCT video coding for low-delay communications, IEEE Trans. Circuits Syst. Video Technol. 9, no. 1, pp. 172-185, 1999. doi:10.1109/76.744284
2. S. Ma, W. Gao, Y. Lu, Rate-distortion analysis for H.264/AVC video coding and its application to rate control, IEEE Trans. Circuits Syst. Video Technol. 15, no. 12, pp. 1533-1544, 2005. doi:10.1109/TCSVT.2005.857300
3. H. Wang, S. Kwong, Rate-distortion optimization of rate control for H.264 with adaptive initial quantization parameter determination, IEEE Trans. Circuits Syst. Video Technol. 18, no. 1, pp. 140-144, 2008. doi:10.1109/TCSVT.2007.913757
4. N. Kamaci, Y. Altunbasak, R. M. Mersereau, Frame bit allocation for the H.264/AVC video coder via Cauchy-density-based rate and distortion model, IEEE Trans. Circuits Syst. Video Technol. 15, no. 8, pp. 994-1006, 2005. doi:10.1109/TCSVT.2005.852400
5. L. Guo, O. C. Au, M. Ma, Z. Liang, P. H. W. Wong, A novel analytic quantization-distortion model for hybrid video coding, IEEE Trans. Circuits Syst. Video Technol. 19, no. 5, pp. 627-641, 2009. doi:10.1109/TCSVT.2009.2017403
6. W. Wu, B. Song, One-pass source coding distortion estimation scheme for real-time video coding, Opt. Eng. 50, no. 6, pp. 067401, 2011. doi:10.1117/1.3584841