Rate control algorithm based on quality factor optimization for Dirac video codec

https://doi.org/10.1016/j.image.2008.07.003Get rights and content

Abstract

Rate control plays an essential role in video coding and transmission to provide the best video quality at the receiver end given the constraint of certain network conditions. This paper proposes a rate control algorithm for the wavelet-based open-source Dirac video codec. The existing Dirac architecture has a constant-quality control mechanism based on rate–distortion optimization (RDO), giving variable bitrate. The proposed algorithm exploits the existing constant-quality control, which is governed by a parameter called quality factor (QF) to give a constant bitrate. A mathematical model called the rate–quality factor (R–QF) is derived to generate optimum QF for the current coding frame using the bitrate resulting from the encoding of the previous frame in order to meet the target bitrate. The proposed algorithm is a complete one-pass process and does not require complex mathematical computation. The process of calculating the QF is simple and, further, calculation is not required for each coded frame. It also provides the rate control solution for both intra-frame-only and inter-frame coding modes. The experimental results show that the proposed algorithm can control the bitrate precisely (i.e. within 1% of target bitrate in average for inter-frame coding mode and near-perfect flat response in generated bits vs. frame number curve in intra-frame-only coding mode). Moreover, the variation of bitrate over each group of pictures (GOP) in inter-frame coding mode is lower than that of H.264 using JM11. This is an advantage in preventing the buffer overflow and underflow for real-time multimedia data streaming. More importantly, there is no PSNR performance loss because of application of the proposed rate control algorithm. It gives superior quality over relatively static motion sequences and fast motion sequences with average quality as shown in the analysis and evaluations presented in this paper.

Introduction

In real-time visual communication, an efficient rate control algorithm at the encoder is very important to assure successful transmission of coded video data. Essentially, the rate control part of the encoder tries to regulate varying bitrate characteristics of coded bitstreams in order to produce high-quality decoded frame at the receiver for a given target bitrate so that compressed bitstreams can be delivered through the available channel bandwidth without causing buffer overflow and underflow. In other words, without rate control, any video encoder would be practically hard to use for real-time end-to-end video communication.

Nowadays, rate control has become one of the important research topics in the field of video compression and transmission. To achieve constant bitrate, most of the rate control algorithms dynamically adjust the encoder parameters in order to produce high-quality decoded frames at a given target bitrate. In [16], a novel rate control algorithm for H.264 is proposed, where bit allocation is performed on both frame level and macroblock (MB) level, and the quantization parameter (QP) is calculated from the allocated number of bits. The algorithm gives the bitrate much closer to the target bitrate. The joint source–channel rate control strategy, which considers the end-to-end distortion caused by source quantization and channel error, is proposed in [15]. However, the consideration in [15], [16] is only for the base line profile of H.264, which consists of IPPP coding, and there is no bit allocation procedure for the B frames. The mathematical-model-based rate control scheme for MPEG-2, which enables prediction of bits and the distortion generated from an encoded frame at a given QP and vice versa is proposed in [6]. Even though the scheme achieves 0.52–1.84 dB PSNR gain over MPEG-2 test model version 5 (TM5), the prediction error of generated bits and the distortion are still too high. In [17], methods for bit-stream allocation based on the concept of fractional bitplanes are reported for wavelet-based scalable video coding. In its low complexity method, it is assumed that the minimum rate–distortion (RD) slope of the same fractional bitplane within the same bitplane across different subbands is higher than or equal to the maximum RD slope of the next fractional bitplane. Even though the proposed idea performs very well for wavelet-based scalable video coding application, its performance for inter-frame video coding are unknown since the algorithm is applied only to intra-frames to compare with JPEG2000. Rate–distortion optimization (RDO)-based rate control algorithm is proposed in [11], where a coding mode that minimizes the cost function is chosen and the corresponding QP is used for actual encoding. Even though their proposed algorithm achieves a maximum gain of 0.48 dB over H.264 current rate control scheme, the algorithm requires two-pass RDO process in finding the optimum QP, which introduces unnecessary coding delay and complexity to the encoder. Some research has considered the coding rate and distortion as the percentage of zeros among the quantized transformed coefficients for low-bitrate applications, especially for H.263 in [4], [5], [9]. Derivation of rate-quantization model from the RD function based on the distribution of source data to be quantized is considered in [8], [7]. It is assumed that the data to be quantized has Laplacian distribution in [7] and generalized Gaussian distribution in [8]. However neither of these distributions is likely to occur in all types of video sequences and transformed methods. So, an accurate and less computationally complex rate control algorithm that works on any video format (QCIF–HD) and any type of video sequence becomes necessary. The main objective of this research is to implement a simple and efficient rate control algorithm for the Dirac video encoder [1] since there is no such mechanism in its alpha release, in order to be able to be used in real-time video broadcasting.

In this paper, a rate control algorithm is proposed by deriving the rate–quality factor (R–QF) model since quality factor (QF), which is an integral parameter of Dirac encoder, plays an important role in controlling the quality of the encoded video sequence or the number of bits generated. The current Dirac architecture controls constant quality rather than bitrate by using a single QF as quality indicator to maintain the desired quality. The algorithm presented in this paper exploits this idea by considering QF as a varying parameter in order to achieve constant bitrate. It has the advantage of giving stable quality while delivering the desired constant bitrate. The research in this paper is the extension of our preliminary work from [13] in which only a brief explanation together with our preliminary data were presented.

The performance of the proposed rate control algorithm in Dirac is compared with the rate control scheme in H.264 JM11 in order to justify the proposed work since there is no previous work in Dirac as far as the rate control mechanism is concerned. Rate control algorithm (JVT-G012) [10] of H.264 reference software (JM11) [3] consists of three tightly consecutive components: group of pictures (GOP) level rate control, picture level rate control, and the optional basic unit level rate control. The basic unit is defined as a group of successive MBs in the same frame. When the basic units arise, each shall contain at least a MB. Among them, basic unit level rate control algorithm possesses better performance in allocating the data bits than the other level rate controls. The algorithm is based on a linear mean absolute difference (MAD) prediction model being used to circumvent the chicken-and-egg dilemma and the conventional MPEG-4 Q2 R-Q model [2] being employed to calculate, given the allocated bits and predicted coding complexity. Detail description of the algorithm can be found in [10].

The organization of this paper is as follows. Section 2 provides a brief introduction to Dirac video codec. Section 3 presents the detailed procedure of the proposed rate control algorithm. The results and discussions followed by conclusions are presented in 4 Results and discussion, 5 Conclusion, respectively.

Section snippets

Dirac video codec

Dirac is an open-source video codec aimed at resolutions from QCIF (176×144) to HDTV (1920×1080) progressive or interlaced, initially developed by BBC [1]. It aims to be competitive with the other state-of-the-art standard video codecs and its performance is very much better than that of MPEG-2 and slightly less than that of H.264 even in the Alpha development stage. However, performance was not the only factor driving its design. Dirac is intended to be simple, powerful, and modular. It uses

The proposed rate control algorithm

As mentioned in Section 1, the current Dirac architecture controls constant quality rather than bitrate by using a user-defined parameter, QF, as quality indicator to maintain the desired quality. The proposed algorithm exploits this idea by considering QF as a varying parameter in order to achieve average bitrate which is constant over each GOP. Since the QF plays an important role in controlling the quality of the encoded video sequence or the number of bits generated in the encoding process

Results and discussion

In order to evaluate the performance of the proposed algorithm, several test sequences in QCIF, CIF, and HD formats were used. As for the test platform, Dirac version 0.6 from [1] and H.264/AVC JM11 reference software from [3] have been employed. The proposed rate control algorithm is applied to both inter-frame and intra-frame-only coding in Dirac. The rate control in H.264 JM11 [10] is used only for the verification and justification of our work since there is no previous work in Dirac as far

Conclusion

This paper has presented a rate control algorithm that is efficient and simple to integrate in the Dirac encoder. Even though the algorithm is designed mainly for Dirac, it can also be used in other types of video codec, e.g. H.264, by incorporating a parameter that controls the quality of the encoded video sequence. The quality control parameter can be derived from Lagrangian multiplier and hence can be used in any type of encoder that uses RDO. Experimental results have shown that the

Acknowledgments

The authors gratefully acknowledge the financial support from the BBC R&D, UK and Brunel University, UK. The authors would also like to thank Dr Thomas Davies and Dr Tim Borer from the BBC R&D for their insightful and constructive comments on this work.

References (17)

  • T. Zgaljic et al.

    Bit-stream allocation methods for scalable video coding supporting wireless communications

    Elsevier J. Signal Process. Image Commun.

    (2007)
  • BBC Research and Development, Dirac video codec, 〈http://dirac.sourceforge.net/〉...
  • T. Chiang et al.

    A new rate control scheme using quadratic rate distortion model

    IEEE Trans. Circuits Syst. Video Technol.

    (February 1997)
  • H264/AVC JM11Reference Software, 〈http://iphome.hhi.de/suehring/tml/〉...
  • Zhihai He et al.

    Optimum bit allocation and accurate rate control for video coding via ρ-domain source modeling

    IEEE Trans. Circuits Syst. Video Technol.

    (October 2002)
  • Zhihai He, Yong Kwan Kim, S.K. Mitra, ρ-domain source modeling and rate control for video coding and transmission, in:...
  • S. Hong et al.

    Rate control of MPEG video for consistent picture quality

    IEEE Trans. Broadcast.

    (March 2003)
  • Seonki Kim, Yo-Sung Ho, Rate control algorithm for H.264/AVC video coding standard based on rate-quantization model,...
There are more references available in the full text version of this article.

Cited by (4)

View full text