|
x264 Parameters Comparison Download as PDF
August 2006 Averaging Methods and Explanation of Charts Appendix: Sequences Description
© YUVsoft Corp., 2006-2007 This electronic document should be referenced as: YUVsoft Corp. x264 Codec Capabilities Analysis / Parameters Comparison. 2006. www.yuvsoft.com/ technologies/pdf/x264_parameters_comparison.pdf PurposeThe goal of this document is to show typical codec’s analysis to support future tuning. x264 codec implementing H.264 standard was chosen as an example. Strong and weak spots of x264 in terms of encoding speed and video quality are found and recommendations on use of codec’s presets are given. This document may be of interest to companies analyzing usefulness of tuning/elaboration of their own codecs and also for users of x264 codec. More about YUVsoft’s services on developing, tuning and testing videocodecs and other R&D services and opportunities may be found at www.yuvsoft.com/technologies/codecs_testing/index.html. CodecWe have chosen x264 as a demo codec because of few reasons. x264 has a lot of parameters for precise tuning, and many features of H.264 standard are implemented in it. Open sources of the codec allow a more detailed analysis of obtained testing results. Another reason is codec’s quality – according to H.264 comparisons[1], x264 is one of the best H.264 codecs for the present time. We used a codec compiled from sources labeled as “x264-snapshot-20060406-2245”. The reference codec JM 9.8 was used for decoding. Sequences
Our test set includes mainly movies and standard sequences from different sources with different types of motion. A more detailed description of all used sequences can be found in Appendix: Sequences Description. Averaging Methods and Explanation of ChartsOne of the most important characteristics of a codec is quality of encoded video. Besides problems regarding how to measure “video quality”, there are difficulties in comparing different codecs or modes of functioning of a certain codec since it is non-trivial to represent quality by a single value. Some reasonable assumptions and well-grounded aggregation methods are necessary to perform such a comparison. The following approach was used. First of all, we run all chosen presets of x264 for all test sequences at 10 different bitrates: 100, 225, 340, 460, 700, 938, 1140, 1340, 1840 and 2340 Kbps. Encoded sequences were compared with corresponding originals using objective metrics such as PSNR, SSIM, etc. It made us able to create and operate with Bitrate/Quality charts or Rate-Distortion curves of the codec. These data are necessary to correctly compare different modes (presets) of the codec, or, as it also might be the case, to correctly compare different codecs. We used the notion of “relative bitrate” meaning what bitrate in percents should be to achieve the same quality (by, for example, PSNR criterion) as for some reference preset whose bitrate is taken for 100%. The first step to get relative bitrate of two presets (codecs) is “rotating” of Rate-Distortion (RD) charts, changing axis of the charts (Figure 1, Figure 2). It allows us to calculate ratio of bitrates for the same quality. The advantage of bitrates ratio for the same quality instead of, for example, PSNR difference for the same bitrate, is that bitrates ratio does not generally depend on an objective quality metric being used. After that it is necessary to choose interval of averaging. We used an internal area of RD curves where missed bitrate values can be interpolates between the nearest values (see Figure 2). It means that we did not use extrapolation because of big possible mistakes of RD curves extrapolation. Linear interpolation was used to get values between the existing points. Previous experiments convinced us that more complex interpolation methods usually give very little for better accuracy. To get average values we calculated sizes of areas under the curves and divided one by the other (see Figure 3).
To get relative encoding time for two presets, we calculated relative time for each sequence and use arithmetic mean to average those values. For each sequences we divided total encoding time for each preset (time to encode sequence with 10 bitrates) by encoding time of a chosen reference preset. This method allows us to take into account small sequences with the same weight as long sequences. Average Relative Bitrate graphs, which are often used in this document, are a visualization of relative speed and relative bitrate (for the same quality) for all presets. A certain default preset was selected as a reference; it is always placed in point (1, 1) on these figures. For each preset relative time and relative bitrate were calculated against the reference and placed on the charts as shown on Figure 4.
Metrics Used in ComparisonDuring testing the following metrics were calculated: · PSNR (Y component) · SSIM (Y component) · Blocking (Y component) Information of these metrics can be found here: http://www.compression.ru/video/quality_measure/info_en.html All types of analysis in this document were made using Y-PSNR metric. Relative bitrates were calculated using this classic metric, as described in section “Averaging Methods and Explanation of Charts”.
We have chosen many different presets (codec parameters combinations) in order to try to select optimal presets in terms of speed and objective video quality. Since we can’t test presets on all sequences available all over the world, so we compared presets on test sequences that were enumerated above. This test set is deemed to be representative for common applications. The chosen presets are described in the following table. It might be convenient to print this table for a more convenient study of subsequent charts.
|