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).
Fiona Glaser [Sun, 21 Nov 2010 07:30:42 +0000 (23:30 -0800)]
Change qpmin default to 0
There's probably no real reason to keep it at 10 anymore, and lowering it allows AQ to pick lower quantizers in really flat areas.
Might help on gradients at high quality levels.
The previous value of 10 was arbitrary anyways.
Fiona Glaser [Sun, 14 Nov 2010 11:34:26 +0000 (03:34 -0800)]
Chroma weighted prediction
Like luma weighted prediction, dramatically improves compression in fades.
Up to 4-8db chroma PSNR gain in extreme cases (short, perfect fade-outs).
On actual videos, helps up to ~1% overall.
One example video with a decent number of fades (ef OP): 0.8% bitrate reduction overall, 7% bitrate reduction just counting chroma.
Fixes a lot of artifacts in fades at lower bitrates.
Original patch by Dylan Yudaken <dyudaken@gmail.com>.
Oskar Arvidsson [Sat, 30 Oct 2010 18:16:33 +0000 (20:16 +0200)]
x86 asm for high-bit-depth pixel metrics
Overall speed change from these 6 asm patches: ~4.4x.
But there's still tons more asm to do -- patches welcome!
Breakdown from this patch:
~13x faster SAD than C.
~11.5x faster SATD than C (only MMX done).
~18.5x faster SA8D than C.
~19.2x faster hadamard_ac than C.
~8.3x faster SSD than C.
~12.4x faster VAR than C.
~3-4.2x faster intra SAD than C.
~7.9x faster intra SATD than C.
Fiona Glaser [Sun, 31 Oct 2010 02:13:05 +0000 (19:13 -0700)]
x86 asm for some high-bit-depth coefficient functions
~7.9x faster denoise than C.
~2.3x faster coeff_level_run than C.
~6.6x faster coeff_last than C.
~4.3x faster decimate_score than C.
Kieran Kunhya [Fri, 12 Nov 2010 21:53:28 +0000 (21:53 +0000)]
Fix HRD with intra-refresh
x264 was incorrectly calculating cpb_removal_delay with respect to the first keyframe.
It should have been calculating cpb_removal_delay with respect to the last keyframe.
Fiona Glaser [Sun, 7 Nov 2010 00:47:27 +0000 (17:47 -0700)]
Improve flash detection's behavior near the end of the video
Flash detection catches situations like AAAABBCCDDDD, where A,B,C,D are frames in different scenes.
x264 would place a keyframe on the first "D".
However, if the video ended on the last "C", x264 would place a keyframe on the first "C", even though C classifies as a flash.
This change fixes this issue.
Fiona Glaser [Sun, 31 Oct 2010 22:51:48 +0000 (15:51 -0700)]
Improve quantizer handling
The default value for i_qpplus1 in x264_picture_t is now X264_QP_AUTO. This is currently 0, but may change in the future.
qpfiles no longer use -1 to indicate "auto"; QP is just omitted. The old method should still work though.
CRF values now make sense in high bit depth mode.
--qp should be used for lossless mode, not --crf.
--crf 0 will still work as expected in 8-bit mode, but won't be lossless with higher bit depths.
Add bit depth to statsfiles.
These changes are required to make the QP interface sensible in combination with high bit depth.
Fiona Glaser [Mon, 1 Nov 2010 22:08:03 +0000 (15:08 -0700)]
Disable weightp offset=-1 dupes with high bit depth
They're a hack to compensate for crappy rounding, and thus not worth doing at high bit depth, which fixes most of the rounding issues.
Loren Merritt [Sat, 30 Oct 2010 21:39:50 +0000 (14:39 -0700)]
Add numeric names for the presets (0==ultrafast ... 9==placebo)
This mapping will of course change if new presets are added in between, but will always be ordered from fastest to slowest.
Fiona Glaser [Tue, 9 Nov 2010 06:14:58 +0000 (22:14 -0800)]
Fix CBR ratecontrol bug with extremely high qscales
Caused CBR ratecontrol to take a very long time to recover from extreme situations (e.g. /dev/urandom).
Oskar Arvidsson [Fri, 29 Oct 2010 10:34:42 +0000 (12:34 +0200)]
Fix potential problem with overflows in ssd_nv12
The risk of overflows increases exponentially with the bit depth.
The 8-bit asm versions may still overflow with image widths >= 11008 (or 6604 if interlaced).