Improve Blu-ray compliance
Use dec_ref_pic_marking SEIs to repeat B-ref referencing information.
Don't allow B-frames to reference frames outside their minigop.
Consolidate Blu-ray hacks into --bluray-compat
This option is now required for Blu-ray compatibility.
--open-gop bluray is now gone (using bluray-compat and open-gop implies a Blu-ray compatible open-gop).
This option doesn't automatically enforce every aspect of Blu-ray compatibility (e.g. resolution, framerate, level, etc).
Warn users when using --(psnr|ssim) without --tune (psnr|ssim)
This is a counter to the proliferation of incredibly stupid psnr/ssim "benchmarks" of x264 in which the benchmarker conveniently "forgot" --tune psnr/ssim, crippling x264 in the test.
Manuel Rommel [Sun, 26 Dec 2010 20:41:33 +0000 (21:41 +0100)]
Add Altivec versions of mbcmp_x functions
These aren't merged versions, they just call the existing asm code.
A merged implementation would of course be faster.
Fiona Glaser [Fri, 11 Feb 2011 08:54:51 +0000 (00:54 -0800)]
Improve slice-max-size handling of escape bytes
More accurate but a bit slower. Helps deal with a few obnoxious corner cases where the current algorithm failed.
Fiona Glaser [Sat, 5 Feb 2011 09:16:49 +0000 (01:16 -0800)]
Windows: restore previous console title after encoding
MSDN docs claim that SetConsoleTitle's effect is reverted when the process terminates, but this doesn't always work properly.
Accordingly, manually revert the console title at the end of encoding.
Anton Mitrofanov [Mon, 31 Jan 2011 21:43:03 +0000 (00:43 +0300)]
Fix possible division by zero in mkv and flv muxers on close
This could crash if anything failed before output.set_param (for example, incorrect params refused by x264_encoder_open).
Bug introduced in r1873.
Fiona Glaser [Thu, 27 Jan 2011 13:33:25 +0000 (05:33 -0800)]
Check for OS AVX support in addition to CPUID
Even if not using ymm registers, AVX operations will cause SIGILLs on unsupported OSs.
On Windows, AVX is only available on Windows 7 SP1 or later.
Fiona Glaser [Tue, 18 Jan 2011 08:52:03 +0000 (00:52 -0800)]
VBV emergency mode
Allow ratecontrol to select "quantizers" above the maximum.
These "quantizers" progressively decimate the source to avoid VBV underflow.
x264 is now VBV compliant even with input as evil as /dev/random.
Fiona Glaser [Wed, 12 Jan 2011 17:54:33 +0000 (09:54 -0800)]
Initial AVX support
Automatically handle 3-operand instructions and abstraction between SSE and AVX.
Implement one function with this (denoise_dct) as an initial test.
x264 can't make much use of the 256-bit support of AVX (as it's float-only), but 3-operand could give some small benefits.
Fiona Glaser [Tue, 11 Jan 2011 19:04:52 +0000 (11:04 -0800)]
Double the base framerate for frame-sequential 3D files
A 60fps frame-sequential 3D file is really only 30 FPS, just alternating between eyes.
Accordingly, ratecontrol should treat it as if it was really 30 FPS.
This will increase the bitrate at the same CRF level for such videos when --frame-packing 5 is used.
Tony Young [Fri, 21 Jan 2011 21:06:28 +0000 (13:06 -0800)]
Two improvements to regression test script
Use SHA-1 hashes for temporary file names to avoid exceeding OS filename length limits.
Correctly return to the original branch after testing if you were on a branch.
Fiona Glaser [Thu, 20 Jan 2011 22:45:57 +0000 (14:45 -0800)]
Don't die in x264_encoder_close if an error occurred in x264_encoder_encode
Also clean up properly in x264.c (mostly useful for finding bugs in cleanup).
Steven Walters [Sun, 23 Jan 2011 20:19:11 +0000 (15:19 -0500)]
Fix x264 CPU detection with >=64 CPUs on Windows
x264 won't actually use more than one processor group's worth of CPUs, however.
This isn't a problem, as a single x264 instance can't effectively use a full 64 cores anyways.
Holger Lubitz [Fri, 21 Jan 2011 16:17:29 +0000 (17:17 +0100)]
Fix illegal instruction in high bit depth ssd_nv12_mmxext
Unfortunately paddq isn't available in mmxext, only in sse2 and up.
Also fixes to actually allow widths up to 16416/32832 without overflow.
Fiona Glaser [Fri, 24 Dec 2010 00:33:01 +0000 (19:33 -0500)]
VFR/framerate-aware ratecontrol, part 2
MB-tree and qcomp complexity estimation now consider the duration of a frame in their calculations.
This is very important for visual optimizations, as frames that last longer are inherently more important quality-wise.
Improves VFR-aware PSNR as much as 1-2db on extreme test cases, ~0.5db on more ordinary VFR clips (e.g. deduped anime episodes).
WARNING: This change redefines x264's internal quality measurement.
x264 will now scale its quality based on the framerate of the video due to the aforementioned frame duration logic.
That is, --crf X will give lower quality per frame for a 60fps video than for a 30fps one.
This will make --crf closer to constant perceptual quality than previously.
The "center" for this change is 25fps: that is, videos lower than 25fps will go up in quality at the same CRF and videos above will go down.
This choice is completely arbitrary.
Note that to take full advantage of this, x264 must encode your video at the correct framerate, with the correct timestamps.
Fiona Glaser [Sat, 1 Jan 2011 03:54:16 +0000 (22:54 -0500)]
Improve reference ordering in interleaved 3D video
Provides a decent compression improvement when encoding interleaved 3D content (--frame-packing 5).
Helps more without B-frames and at lower bitrates.
Note that x264 will not do this optimization unless --frame-packing 5 is used to tell x264 that the source is interleaved 3D.
Tests consistently show that interleaved frame packing is by far the best way to compress 3D content.
It gives a ~35-50% compression benefit over separate streams or top/bottom or left/right coding.
Also finally add support for L1 reference reordering (in B-frames).
Also add support for reordered ref0 in L0 and L1 lists; could be useful in the future for other things.
Daniel Kang [Fri, 24 Dec 2010 04:19:39 +0000 (23:19 -0500)]
MMX high bit depth 4x4 intra predict functions
DDR and HD directions, as well as making HU faster.
Also enable some SSE2 versions of high bit depth functions that were added but not properly enabled.
Daniel Kang [Wed, 22 Dec 2010 21:51:22 +0000 (16:51 -0500)]
SSE2 high bit depth 8x8 intra predict functions
DDL, DDR, VR, HU, and HD directions, as well as the 8x8 filter.
Also make 8-bit MMX VR faster, by backporting the optimizations from the high bit depth version.