Move presets, tunings, and profiles into libx264
Now any application calling libx264 can use them.
Full documentation and guidelines for usage are included in x264.h.
Make b-pyramid normal the default
Now that b-pyramid works with MB-tree and is spec compliant, there's no real reason not to make it default.
Improves compression 0-5% depending on the video.
Also allow 0/1/2 to be used as aliases for none/strict/normal (for conciseness).
Abide by the MinCR level limit
Some Blu-ray analyzers were complaining about this.
New algorithm for AQ mode 2
Combines the auto-ness of AQ2 with a new var^0.25 instead of log(var) formula.
Works better with MB-tree than the old AQ mode 2 and should give higher SSIM.
Use short startcodes whenever possible
Saves one byte per frame for every slice beyond the first.
Only applies to Annex-B output mode.
Faster probe_skip, 2x2 DC transform handling
Move the 2x2 DC DCT into the dct_dc asm function to avoid some store-to-load forwarding penalties and extra register loads.
Use dct_dc as part of the early termination in probe_skip.
x86 asm partially by Holger Lubitz.
ARM NEON asm by David Conrad.
Actually error out if preset/tune/profile is invalid
Got lost somewhere in the move to libx264-based presets.
Fix various silly errors in the previous patches
Fix fastfirstpass
Apparently the libx264 preset changes made "fastfirstpass" into "fastsecondpass" inadvertantly.
Use short startcode in more possible situations
Previous patch didn't cover all possible uses according to B.1.2.
Remove unused function
Two other minor fixes.
Port Mans Rullgard's NEON intra prediction functions from ffmpeg
Fix one bug, one corner case in VBV
qp_novbv wasn't set correctly for B-frames.
Disable ABR code for frames with zero complexity.
Disable ABR code for CBR mode; it is completely unnecessary and can have negative consequences.
Fix a buffer overread on odd input resolutions
Disable Altivec and VIS optimizations when --disable-asm is specified
Cut size of MVD arrays by a factor of 2 again
Only store the MVDs of the edges of each MB.

Thanks to Michael Niedermayer for the idea.
Fix regression in r1449
Incorrectly placed thread MV check could result in rare thread MV internal errors, esp. with --non-deterministic.
These weren't fatal errors (x264 could recover and continue with slight compression loss).
Fix regression in r1453
r1453 broke psy-trellis with --trellis 2
Fix crash with intra-refresh + aq-mode 0
Fix regression in r1450
I_PCM blocks would cause x264 to crash or generate bad output. Simplify PCM handling.