Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Richardson I.E.H.264 and MPEG-4 video compression.2003.pdf
Скачиваний:
38
Добавлен:
23.08.2013
Размер:
4.27 Mб
Скачать

DESIGN AND PERFORMANCE

254

of H.264) out-performed H.263++ and MPEG-4 ASP by an average of 3.0 dB and 2.0 dB respectively. The H.26L CODEC achieved roughly the same performance at a coded bitrate of 32 kbit/s as the other two CODECs at a bitrate of 64 kbit/s (QCIF video, 10 frames per second), i.e. in this test H.26L produced the same decoded quality at around half the bitrate of MPEG-4 ASP and H.263++. At higher bitrates (512 kbps and above) the gain was still significant (but not so large). An overview of rate-constrained encoder control and a comparison of H.264 performance with H.263, MPEG-2 Video and MPEG-4 Visual is given in [38].

7.4.4 Computational Performance

MPEG-4 Visual and (to a lesser extent) H.264 provide a range of optional coding modes that have the potential to improve compression performance. For example, MPEG-4’s Advanced Simple Profile is designed to offer greater compression efficiency than the popular Simple Profile (see Chapter 5); the Main Profile of H.264 is capable of providing better compression efficiency than the Baseline Profile (see Chapter 6). Within a specific Profile, a designer or user of a CODEC can choose whether or not to enable certain coding features. A Main Profile H.264 decoder should support both Context Adaptive VLCs (CAVLC) and arithmetic coding (CABAC) but the encoder has the choice of which mode to use in a particular application.

Improved coding efficiency often comes at the cost of higher computational complexity. The situation is complicated by the fact that the computational cost and coding benefit of a particular mode or feature can depend very much on the type of source material. In a practical application, the choice of possible coding modes may depend on the limitations of the processing platform and it may be necessary to choose encoding parameters to suit the source material and available processing resources.

Example

The first 25 frames of the ‘Violin’ sequence (QCIF, 25 frames per second, see Figure 7.18) were encoded using the H.264 test model software (version JM4.0) with a fixed quantiser parameter of 36. The sequence was encoded with a range of coding parameters to investigate the effect of each on compression performance and coding time. Two reference configurations were used as follows.

Basic configuration: CAVLC entropy coding, no B-pictures, loop filter enabled, rate–distortion optimisation disabled, one reference frame for motion compensation, all block sizes (down to 4 × 4) available.

Advanced configuration: CABAC entropy coding, every 2nd picture coded as a B-picture, loop filter enabled, rate–distortion optimisation enabled, five reference frames, all block sizes available.

The ‘basic’ configuration represents a suitable set-up for a low complexity, real-time CODEC whilst the ‘advanced’ configuration might be suitable for a high-complexity, high-efficiency CODEC. Table 7.3 summarises the results. The luminance PSNR (objective quality) of each sequence is almost identical and the differences in performance are apparent in the coded bitrate and encoding time.

The ‘basic’ configuration takes 40 seconds to encode the sequence and produces a bitrate of 46 kbps (excluding the bits produced by the first I-slice). Using only 8 × 8 or larger motion compensation block sizes reduces coding time (by c. 6 seconds) but increases the coded bitrate, as

PERFORMANCE

 

 

 

255

 

 

 

 

 

 

 

Table 7.3 Computational

performance of H.264 optional modes: violin, QCIF, 25 frames

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Average luminance

Coded bitrate

Encoding time

 

Configuration

 

PSNR (dB)

(P/B slices) (kbps)

(seconds)

 

 

 

 

 

 

 

 

 

Basic

 

29.06

45.9

40.4

 

 

 

Basic + min. block size of 8 × 8

29.0

46.6

33.9

 

 

 

Basic + 5 reference frames

 

29.12

46.2

157.2

 

 

 

Basic + rate-distortion optimisation

29.18

44.6

60.5

 

 

 

Basic + every 2nd picture coded

29.19

42.2

55.7

 

 

 

as a B-picture

 

 

 

 

 

 

 

Basic + CABAC

 

29.06

44.0

40.5

 

 

 

Advanced

 

29.57

38.2

180

 

 

 

Advanced (only one reference

29.42

38.8

77

 

 

 

frame)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

might be expected. Using multiple reference frames (five in this case) increases coding time (by almost four times) but results in an increase in coded bitrate. Adding rate–distortion optimisation (in which the encoder repeatedly codes each macroblock in different ways in order to find the best coding parameters) reduces the bitrate at the expense of a 50% increase in coding time. B-pictures provide a compression gain at the expense of increased coding time (nearly 50%); CABAC gives a compression improvement and does not increase coding time.

The ‘advanced’ configuration takes over four times longer than the ‘basic’ configuration to encode but produces a bitrate 17% smaller than the basic configuration. By using only one reference frame, the coding time is reduced significantly at the expense of a slight drop in compression efficiency.

These results show that, for this sequence and this encoder at least, the most useful performance optimisations (in terms of coding efficiency improvement and computational complexity) are CABAC and B-pictures. These give a respectable improvement in compression without a high computational penalty. Conversely, multiple reference frames make only a slight improvement (and then only in conjunction with certain other modes, notably rate-distortion optimised encoding) and are computationally expensive. It is worth noting, however, (i) that different outcomes would be expected with other types of source material (for example, see [36]) and (ii) that the reference model encoder is not optimised for computational efficiency.

7.4.5 Performance Optimisation

Achieving the optimum balance between compression and decoded quality is a difficult and complex challenge. Setting encoding parameters at the start of a video sequence and leaving them unchanged throughout the sequence is unlikely to produce optimum rate–distortion performance since the encoder faces a number of inter-related choices when coding each macroblock. For example, the encoder may select a motion vector for an inter-coded MB that minimises the energy in the motion-compensated residual. However, this is not necessarily the best choice because larger MVs generally require more bits to encode and the optimum choice of MV is the one that minimises the total number of bits in the coded MB (including header, MV and coefficients). Thus finding the optimal choice of parameters (such as MV, quantisation parameter, etc.) may require the encoder to code the MB repeatedly before selecting the combination of parameters that minimise the coded size of the MB. Further, the choice of