Buy the ARP T-Shirt! BIOS Optimization Guide Money Savers!
 

 16 January 2009
 N/A
  N/A
 Benchmarks
 graysky
 1.0
 Discuss here !
 166991
 
   
Desktop Graphics Card Comparison Guide Rev. 33.0
Covering 628 desktop graphics cards, this comprehensive comparison allows you ... Read here
BIOS Option Of The Week - Virtualization Technology
Since 1999, we have been developing the BIOS Optimization Guide, affectionately known... Read here
   
Buy The BOG Book Subscribe To The BOG! Latest Money Savers!
x264 Benchmark
Digg! Reddit!Add to Reddit | Bookmark this article:

x264 Benchmark FAQs
by graysky

The benchmark doesn't work on my machine, HELP!

There are three major reasons why this might be the case. The solution to all three of them can be found in the instructions on the previous page.

1) You didn't unRAR the file to c:\work2

2) You didn't install AVISynth 2.5.7

3) You forgot to copy the "DGDecode.dll" to your c:\Program Files\AviSynth 2.5\plugins directory.

 

What is AVISynth and why do I have to install it?

AVISynth is a frameserver. It allows the DVD video (MPEG-2 format) to be fed to the x264 encoder as if it were a standard AVI file. The x264 encoder cannot read MPEG-2 video clips without it.

 

Why do the output .mp4 files have different filesizes?

Odds are if you have a single core chip, the resulting file sizes for the video files (run1-480p.mp4 through run5-480p.mp4) will be identical whereas filesizes of the .mp4 files processed on a multicore chip will differ slightly. This has to do with x264 running in multithreaded mode. Don't worry about it since the output video quality are more or less identical.

Here is an example of two video quality measurments [SSIM and PSNR] using x264 in multithreaded mode vs. in single thread mode:

Multithreaded Mode:
Pass1: x264 [info]: x264 [info]: SSIM Mean Y:0.9660379
x264 [info]: PSNR Mean Y:38.014 U:44.609 V:44.008 Avg:39.289 Global:39.242 kb/s:
1850.84
Pass2: x264 [info]: SSIM Mean Y:0.9714373
x264 [info]: PSNR Mean Y:38.989 U:44.755 V:44.160 Avg:40.169 Global:40.103 kb/s:
1829.22
Singlethread Mode:
Pass 1: x264 [info]: SSIM Mean Y:0.9659990
x264 [info]: PSNR Mean Y:38.013 U:44.603 V:44.014 Avg:39.288 Global:39.238 kb/s:
1854.00
Pass 2: x264 [info]: SSIM Mean Y:0.9714169
x264 [info]: PSNR Mean Y:38.984 U:44.750 V:44.155 Avg:40.164 Global:40.104 kb/s:
1825.77

 

What does 480p mean? Is it like 720p or 1080i?

Well, technically, it's 480p24. The number 480 means there are 480 vertical lines of resolution. The letter p means the video frames are progressive (i.e. not interlaced), and the number 24 means there are 24 frames per second of video. 480p24 is the standard for most SDTV (standard definition TV) movies on DVD. The standard horizontal resolution of a 480p-formatted DVD is usually 720, thus giving a 720x480 picture. It can be other values as well.

Yes, it's like 720p only that it has 480 vertical lines, instead of 720. It's also like 1080i, but instead of 1080 vertical lines, there are only 480. The other difference is that these are progressive frames, not interlaced frames. Also, as you may or may not know, 720p and 1080i (or 1080p) are both HDTV (high definition TV) formats. 480p and 480i are SDTV (standard definition TV) formats.

Roughly to scale, here are the differences in resolution between the various SD and HD formats.

If you think of it in terms of pixels, like you would a digital camera, these resolutions would yield the following number of pixels (in megapixels, millions of pixels) :

720x480 = 0.35 MPixels
1280x720 = 0.92 MPixels
1920x1080 = 2.07 MPixels

 

What's the difference between progressive and interlaced frames?

If you've ever made a cartoon flipbook in a notepad, you've made a progressive frame movie in a sense. Progressive frames are just pictures set to display in a series. If you stop at any given frame, you'll see 100 % of the image as if it was a photograph. These photos are displayed in sequential order 1, 2, 3, etc.

Interlaced movies, on the other hand, are more complicated. At the risk of oversimplifying the concept, an interlaced movie involves displaying half of a progressive image (the odd numbered lines), followed by the other half of a progressive image (the even numbered lines). These are displayed at a higher frame rate than a progressive frame movie, and in a different order (termed 3:2 pulldown).

For more on these concepts, see the following Wikipedia articles - Progressive Scan and Interlace.

 

What Is 3:2 Pulldown?

This is difficult to explain without pictures, so I'll point you to the following links - here and here.

 

Why do you need to encode the video clip in two passes?

You can encode video in a single pass, but two passes will typically give a higher quality result. In a single-pass encode, the encoder doesn't have any idea what's coming up next in the video and is forced to guess based on what it's currently seeing.

In a two-pass enconde, the encoder scans through the entire clip in the first pass, analyzing it so that the second pass can dynamically use more bits on more complex scenes and less on less complex scenes. This gives you better quality video at the same filesize, making it more efficient. Other video formats that also take advantage of multi-pass encodes include Xvid, DivX and MPEG-2 (this is the format DVD movies use).

 

Why does the first pass encode faster than the second pass?

The first pass is just a scanning pass. This analytical step will occur much faster than the actual encoding process in the second pass. No doubt, you see this reflected in your benchmark results. On my machine, the first pass was roughly 4x faster than the second pass.

 

Why doesn't the first pass use 100 % of my multi-core processor?

As mentioned above, the first pass simply isn't as CPU-intensive as the second pass. Therefore, it's not unexpected for the first pass to use less than 100 % of the CPU time.

 

What does all that information at the beginning of the test mean?

Starting at the top. The Qf is an outdated measure of video quality that has been replaced by other benchmarks. You can calculate it using this formula :

        v is the vertical resolution
h is the horizontal resolution
f is the frame rate
b is the bit rate

It's really a measure of bits per pixel-frame. Even though there is much more than Qf to dictate video quality, it does still give you a rough idea. Typical values for Qf are between 0.10 and 0.25. The lower the number, the less bits/pixel-frame you have. Usually, a Qf between 0.20 and 0.24 will give you a high-quality x264 video.

The rest of the information displayed is the x264 command line settings used for the second-pass encode. Some of these are just settings that determine what gets displayed to the screen (such as --progress and --quiet). I'll provide a short description for the settings that affect the video quality. FYI, you can get the full list of commands on x264.exe just by running it with the --fullhelp option from the command-line.

x264 --pass 2 --progress --quiet --bitrate 1823 --stats "1.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --b-rdo --bime --weightb --direct auto --subme 6 --trellis 1 --analyse all --8x8dct --threads auto --thread-input --me hex --sar 427:360 --no-dct-decimate --no-psnr --no-ssim --output "C:\work2\run1-480p.mp4" "C:\work2\test\test-480p.avs" 2>&1 | tee run1pass2.log

I literally copy and pasted most of this from the contextual help file provided with meGUI and some online guides which I referenced when I used their content:

ref 5 - Uses 5 reference frames. This setting controls how many previous frames can be referenced by a P- or B-frame. The higher the number, the higher the quality up to a point, as well as the slower the encode. It's generally accepted that using more than 5 reference frames isn't practical since 5 is the point of diminishing returns, where anything more would result in an increase in quality that is only marginal in comparison to the increase in time required.

mixed-refs - Allows each 8x8 or 16x8 partition in a macroblock to independently select a reference frame, as opposed to only one reference frame per macroblock.

no-fast-pskip - Disables the "fast-pskip" option. Leaving pskip enabled can speed up the encode, but can lead to visual artifacts in flat scenes and gradients.

b-frames 3 - Uses a maximum of 3 consecutive B-frames. Bi-directional Predictive Frames are highly compressed as they only store the data that has changed from the previous frame or that is different from the next frame. B-frames generally have less quality than I- or P- frames but can increase the overall quality of the video by storing data more efficiently.

b-pyramid - Allows B-frames to be used as references for other B-frames, increasing compression efficiency when 2 or more B-frames are used.

b-rdo - Enables RDO (Rate Distortion Optimization) mode decision for B-frames. Improved motion estimation for B-frames at the cost of encoding speed.

bime - Enables Bi-Directional Motion Estimation. An additional options which searches for forwards and backwards vectors when encoding a bi-directional B-frames, improving quality.

weight b - Enables B-frame Weighted Prediction. Uses"brightness" weighting of B-frames which improves fades and color gradients i.e. the sky in background.

direct auto - Sets B-Frame Mode to auto (options are none/auto/spatial/temporal). This setting determines how motion vectors for B-frames are derived. Spatial uses neighboring blocks in the same frame which may result in higher PSNR. Temporal makes use of neighboring frames which may be perceived as higher quality. Auto selects direct mode per frame.

subme 6 - Sets subpixel motion estimation and partition to level 6 (options are 1-7). Controls the decision quality of motion estimation. Lower values will make faster and less accurate decisions. Higher values will improve quality but will reduce encoding speed. Every guide/document I have ever read recommends a setting NO lower than 5. 6 is widely accepted as a good setting for high-quality videos.

trellis 1 - Tells the encoder when to use Trellis Quantization (options 0/1/2 where 0 is off, 1 is only on macroblocks, and 2 is always). A setting of 2 (which is on all frames) reduces the second pass encode speed by about 50 %.

analyse all --8x8dct- Macroblock analysis size options. A setting of all will command the encoder to analyze all macroblock size options. The 8x8dct option is also required when encoding to high profiles.

threads auto - Sets the number of threads that x264 will use to 1.5 times your number of processor cores. Therefore, a dual-core CPU would use 3 threads; a quad-core CPU would use 6 threads, and so on.

thread-input - Gives AVISynth its own thread.

me hex - Motion Estimation Mode (options are diamond/hexagon/uneven-multi-hexagon/exhaustive). Controls the method used to search for motion vectors. The hex option searches horizontally, vertically, then diagonally. Uneven-multi-hex does the same thing except it does so via hexagons of varying sizes, giving a higher-quality result. Exhaustive search is not recommended for normal use as it is exceptionally slow and does not provide significant improvements in visual quality.

sar 437:360 - Source Aspect Ratio. Sets the SAR to 437/360 which for some reason with this MPEG-2 source gives the correct 16:9 ratio in the final video file. Normally, this is set to the AR of your video source. For example, 16:9 or 4:3 or 37:20 (for anamorphic wide screen), etc.

no-dct-decimate - Disables DCT-decimation. The following is taken from DeathTheSheep's x264 guide - Decimation is x264's decision when to neglect writing certain DCT blocks to the stream. That is, when x264 decides a certain transform/block-change isn't required, this process allows x264 to simply skip coding it, saving bitrate which would otherwise have been wasted on what x264 considers useless information. In this respect, DCT decimation is similar to Fast P-skip and Trellis in that it makes decisions regarding what information to ignore (if any). However, in this case, I'd recommend leaving this option checked whenever possible, for disabling it results in a substantially larger filesize under constant quantizer with very little appreciable quality gain across the bitrate spectrum. However, if you decide to use Trellis, you might consider turning this off in order to best allow trellis to be the determining factor in what information gets dropped/skipped without interference from other options.

no-psnr - Disable PSNR (Peak-to-peak Signal-to-Noise) Computation. Prevents PSNR calculations that are reported on completion. Provides a small increase in speed.

no-ssim - Disable SSIM (Structural SIMilarity) Computation. Again prevents the SSIM calculations to provide a small increase in speed.



<<< What Is This Test?, Initial Setup, Running The Test, Reporting Results, Results to Date, FAQ : Previous Page

 

 
   
NVIDIA GeForce GTX 580 Tech Report
Intel Turbo Boost Performance Advantage Revealed Rev. 2.0
Counterfeit GeCube Radeon HD Graphics Cards
Aztech Modem Bad Flash Recovery Guide Rev. 2.0
Scythe Ninja Plus Heatpipe CPU Cooler
512MB SanDisk Memory Stick PRO Review Rev. 2.0
Rome : Total War Review
NVIDIA GeForce 6800GT Vs. ATI RADEON X800 Pro Comparison
Toshiba Portégé M200 Tablet PC Review
Cooler Master Musketeer 2 Review

 


Copyright © Tech ARP.com. All rights reserved.