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.
Ignore XYSCSS in y4m if the newer standard C tag is present

Apparently y4mscaler will generate 4:2:0 files with XYSCSS set to 444
Faster hpel_filter
On ssse3, use pmaddubsw for h filter too (similar to v filter).
Change 32-bit v and c filters to write the result non-temporal.
Add commented-out defines to disable non-temporal operation.
Hardly any black magic here, but still a measurable win especially for ssse3.