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.
Steven Walters [Thu, 14 Oct 2010 01:53:50 +0000 (21:53 -0400)]
Detect Avisynth initialization failures
Detect if there is a critical Avisynth initialization failure and print the associated error.
This, however, requires a feature present in the latest version of Avisynth alpha (2.6).
Previous versions are unaffected.
Fiona Glaser [Fri, 26 Nov 2010 06:12:07 +0000 (22:12 -0800)]
Automatically restrict QPs to avoid quantization (under|over)flow
--cqm jvt and similar should now work "out of the box" instead of requiring futzing with --qpmin.
Don't try to get timecodes if reading frame failed
This fixes "input timecode file missing data for frame" warning with piped input where we don't know total number of frames.
Alex Wright [Wed, 24 Nov 2010 10:19:51 +0000 (02:19 -0800)]
Make --weightp 1 a better speed tradeoff
Since fade analysis is now so fast, weightp 1 now does fade analysis but no reference duplication.
This is the opposite of what it used to do (reference duplication but no fade analysis).
This also gives weightp's better fade quality to faster presets (up to superfast).