Fix zone bitrate multiplier and QP forcing in 2-pass mode
Previously zone changes could affect frames outside of the given frame range (around 20 neighboring frames).
Anton Mitrofanov [Tue, 19 Apr 2011 22:54:49 +0000 (02:54 +0400)]
Validate input parameters more carefully
Get rid of redundant warnings upon encoder_reconfig calls.
Also avoid encoder_reconfig turning off psy_rd/trellis.
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.
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.
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.
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.
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.
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.
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.
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.
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.