Although RDO is very powerful, in practice it's not very helpful on its own. This is because both the bit rates and the quality (whatever measure of quality is used) that result from doing RDO will vary. In practice, video coding applications require constant quality, if they're not too bandwidth constrained, or constant bit rate. The best subjective performance results from having roughly constant quality, and large variations of quality, either from frame to frame or within a frame, tend to be disliked by viewers.
Dirac incorporates a rudimentary form of constant-quality encoding by adapting RDO parameters for each type of frame until a quality metric is met. For the moment, the quality metric is PSNR, which has many drawbacks, especially for lower-resolution pictures, but has the advantages of objectivity and simplicity. So the encoder will iterate coding a frame until the PSNR is within a certain range of the target value.
The iteration process is assisted by modelling the relationship between PSNR and the Lagrangian parameter λ. Experimentally, this seems to be a linear relationship if λ is in log coordinates - that is log(λ) varies linearly with PSNR. The linear model parameters can be used to predict the value of λ that will give the required PSNR.
The model parameters are fairly stable provided the video sequence does not change too much. However, they can be adapted by measuring the actual PSNRs that result from using given Lagrangian parameters. Even so, they can be thrown off by cuts or scene changes in the video, mainly because these result in poorer quality predicted frames. Luckily Dirac also detects these and inserts Intra frames at these point which helps somewhat.
Constant bit rate coding (CBR) is needed when you're in a strictly bandwidth-constrained environment and you need real-time decoding - broadcasting, for example. The key question to ask in CBR coding is 'Constant over what?', as this determines the size of your buffers and how much the bit rate of individual frames needs to be smoothed. The relationship between bitstream buffers, picture buffers, and CBR parameters is not simple because the decoder also needs to display frames at exactly regular intervals, which contrains frames from being very big or very small even if they would meet the CBR constraints. We don't yet have a CBR mode for Dirac.
Table of contents Previous: Rate-Distortion Optimisation Next: Transform Coding