]> git.sesse.net Git - x264/log
x264
13 years agoDisable overflow compensation in CRF mode
Fiona Glaser [Tue, 9 Nov 2010 05:03:01 +0000 (21:03 -0800)]
Disable overflow compensation in CRF mode
Wasn't designed with CRF in mind, and acts really weird with CRF+VBV.

13 years agoFix stupid bug in B-frame VBV size prediction
Fiona Glaser [Tue, 9 Nov 2010 03:56:29 +0000 (19:56 -0800)]
Fix stupid bug in B-frame VBV size prediction

13 years agoFix regression in checkasm in r1666
Oskar Arvidsson [Fri, 29 Oct 2010 11:13:25 +0000 (13:13 +0200)]
Fix regression in checkasm in r1666
Buffer is uint16_t* regardless of whether x264 was compiled with high bit depth or not.

13 years agoFix overflows in satd, sa8d and hadamard_ac with high bit depth
Oskar Arvidsson [Fri, 29 Oct 2010 11:11:09 +0000 (13:11 +0200)]
Fix overflows in satd, sa8d and hadamard_ac with high bit depth

13 years agoFix potential problem with overflows in ssd_nv12
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).

13 years agoFix syntax for some parameterless functions
Fiona Glaser [Sat, 30 Oct 2010 21:36:01 +0000 (14:36 -0700)]
Fix syntax for some parameterless functions
Technically, such functions should be declared with (void), not ().

13 years agoFix fps reporting on mingw64
Steven Walters [Sat, 30 Oct 2010 20:51:01 +0000 (16:51 -0400)]
Fix fps reporting on mingw64
_ftime on mingw64 uses __timeb32 which is broken.
Use ftime instead.

13 years agoFix compilation on PPC with some recent GCCs
Manuel Rommel [Sun, 31 Oct 2010 18:19:10 +0000 (19:19 +0100)]
Fix compilation on PPC with some recent GCCs

13 years agoFix Altivec SATD with small strides
Manuel Rommel [Mon, 11 Oct 2010 20:50:09 +0000 (13:50 -0700)]
Fix Altivec SATD with small strides
Fixes chroma ME and some of lookahead on PPC.

13 years agoAddress remaining cacheline split issues in avg2
Holger Lubitz [Sun, 3 Oct 2010 17:07:00 +0000 (19:07 +0200)]
Address remaining cacheline split issues in avg2
Slightly improved performance on core 2.
Also fix profiling misattribution of w8/16/20 mmxext cacheline loops.

13 years agoTrim a few bytes off some x86 intra pred functions
Fiona Glaser [Thu, 30 Sep 2010 00:56:27 +0000 (18:56 -0600)]
Trim a few bytes off some x86 intra pred functions

13 years agoMove DTS compression from libx264 to x264cli
Yusuke Nakamura [Thu, 30 Sep 2010 15:37:39 +0000 (00:37 +0900)]
Move DTS compression from libx264 to x264cli
DTS compression is an ugly stupid hack and starting to encroach on unrelated areas like VBV.
Some people want it in the mp4 muxer for devices and/or splitters that don't support Edit Boxes.
We just say "throw these broken devices out the window".
DTS compression will remain as a muxer option, --dts-compress, at the user's own risk.
This option is disabled by default.

13 years agoUse a larger pic_init_qp with high bit depth
Fiona Glaser [Fri, 1 Oct 2010 05:24:51 +0000 (22:24 -0700)]
Use a larger pic_init_qp with high bit depth
Modify pic_init_qs for consistency.

13 years agoUpdate some of the information in doc/
Fiona Glaser [Sun, 3 Oct 2010 06:56:52 +0000 (23:56 -0700)]
Update some of the information in doc/

13 years agoUpdate header in depth.c
Fiona Glaser [Wed, 29 Sep 2010 00:48:00 +0000 (17:48 -0700)]
Update header in depth.c

13 years agoRemove some old unused stuff in the build tree
Fiona Glaser [Sun, 3 Oct 2010 06:12:41 +0000 (23:12 -0700)]
Remove some old unused stuff in the build tree
Regression test (hasn't been updated since svn).
Doxy (was never used).

13 years agoVarious cosmetics
Anton Mitrofanov [Wed, 29 Sep 2010 07:19:06 +0000 (00:19 -0700)]
Various cosmetics
Exorcise some CamelCase.

13 years agoAdd missing mod4 stack check to sse2_misalign mc_chroma
Fiona Glaser [Sun, 10 Oct 2010 11:39:36 +0000 (04:39 -0700)]
Add missing mod4 stack check to sse2_misalign mc_chroma
Required for ICC compilation.

13 years agoFix 2pass ratecontrol with --nal-hrd cbr
Anton Mitrofanov [Fri, 8 Oct 2010 14:08:23 +0000 (18:08 +0400)]
Fix 2pass ratecontrol with --nal-hrd cbr

13 years agoFix minor bug in intra pred with intra refresh
Fiona Glaser [Mon, 4 Oct 2010 20:33:23 +0000 (13:33 -0700)]
Fix minor bug in intra pred with intra refresh
i8x8 blocks didn't properly avoid predicting from top-right when necessary.
This could cause intra refresh to not completely refresh the frame.

13 years agoFix filter parsing with --extra-cflags="-DNDEBUG"
Anton Mitrofanov [Wed, 29 Sep 2010 18:06:27 +0000 (22:06 +0400)]
Fix filter parsing with --extra-cflags="-DNDEBUG"

13 years agoMake sigint handler variable volatile
Fiona Glaser [Wed, 29 Sep 2010 07:15:14 +0000 (00:15 -0700)]
Make sigint handler variable volatile
Didn't actually cause any problems, but is necessary because it can be modified by another thread (the signal call).

13 years agoAdd High 10 Intra profile support (AVC-Intra)
Fiona Glaser [Mon, 27 Sep 2010 04:04:30 +0000 (21:04 -0700)]
Add High 10 Intra profile support (AVC-Intra)
x264 should now be able to encode compliant AVC-Intra 50.
With a 10-bit-compiled version of x264, a sample commandline for 1080i25 might be:
--interlaced --keyint 1 --vbv-bufsize 2000 --bitrate 50000 --vbv-maxrate 50000 --nal-hrd cbr

Also print "Constrained Baseline" for baseline profile, since that's all x264 (and everything else in the world) supports.
Also reorganize parameter validation a bit to reduce some spurious warnings.

13 years agoFinish support for high-depth video throughout x264
Oskar Arvidsson [Mon, 27 Sep 2010 14:02:20 +0000 (16:02 +0200)]
Finish support for high-depth video throughout x264
Add support for high depth input in libx264.
Add support for 16-bit colorspaces in the filtering system.
Add support for input bit depths in the interval [9,16] with the raw demuxer.
Add a depth filter to dither input to x264.

13 years agoChroma mode decision/subpel for B-frames
Alex Wright [Sun, 19 Sep 2010 12:08:22 +0000 (05:08 -0700)]
Chroma mode decision/subpel for B-frames
Improves compression ~0.4-1%. Helps more on videos with lots of chroma detail.
Enabled at subme 9 (preset slower) and higher.

13 years agoVarious cosmetics
Fiona Glaser [Mon, 27 Sep 2010 12:39:02 +0000 (05:39 -0700)]
Various cosmetics

13 years agoMake slice-max-size more aggressive in considering escape bytes
Fiona Glaser [Wed, 22 Sep 2010 00:11:00 +0000 (17:11 -0700)]
Make slice-max-size more aggressive in considering escape bytes
The x264 assumption of randomly distributed escape bytes fails in the case of CABAC + an enormous number of identical macroblocks.
This patch attempts to compensate for this.
It is probably safe to assume in calling applications that x264 practically never violates the slice size limitation.

13 years agoAdd missing emms for dump-yuv
Fiona Glaser [Mon, 27 Sep 2010 12:39:13 +0000 (05:39 -0700)]
Add missing emms for dump-yuv

13 years agoFix CFR ratecontrol with timebase != 1/fps
Anton Mitrofanov [Sat, 25 Sep 2010 22:55:32 +0000 (15:55 -0700)]
Fix CFR ratecontrol with timebase != 1/fps
Fixes VBV + DTS compression, among other things.

13 years agoFix DTS/bitrate calculation if the first PTS wasn't zero
Anton Mitrofanov [Mon, 20 Sep 2010 09:10:13 +0000 (13:10 +0400)]
Fix DTS/bitrate calculation if the first PTS wasn't zero
Fix bitrate calculation with DTS compression.

13 years agoFix regression in r1716
Anton Mitrofanov [Sun, 19 Sep 2010 15:11:06 +0000 (19:11 +0400)]
Fix regression in r1716

13 years agoCosmetics in me.c and frame.c
Fiona Glaser [Sun, 19 Sep 2010 07:25:27 +0000 (00:25 -0700)]
Cosmetics in me.c and frame.c

13 years agoAdd support for arbitrary user SEIs
Kieran Kunhya [Mon, 13 Sep 2010 14:09:06 +0000 (15:09 +0100)]
Add support for arbitrary user SEIs
This allows calling applications to insert SEIs that x264 doesn't know about while maintaining HRD/VBV accuracy.

13 years agoAdd full chroma input flag to swscale
Steven Walters [Thu, 16 Sep 2010 00:42:08 +0000 (20:42 -0400)]
Add full chroma input flag to swscale
Improves quality of colorspace conversions involving RGB(A).

13 years agoAdd --disable-gpl option to configure
James Darnley [Fri, 17 Sep 2010 11:06:59 +0000 (04:06 -0700)]
Add --disable-gpl option to configure
Used for commercially-licensed versions of x264.
Doesn't currently change anything, but may be used to disable GPL-only CLI tools, such as video filters, in the future.
Also print the x264 license and libavformat license in version info.

13 years agoUpdate source file headers
Fiona Glaser [Fri, 17 Sep 2010 11:03:27 +0000 (04:03 -0700)]
Update source file headers
Update dates, improve file descriptions, make things more consistent.
Also add information about commercial licensing.

13 years agoFix intra refresh to not exceed max recovery_frame_cnt
Fiona Glaser [Wed, 15 Sep 2010 19:06:47 +0000 (12:06 -0700)]
Fix intra refresh to not exceed max recovery_frame_cnt
The spec constrains recovery_frame_cnt to [0, MaxFrameNum-1].
So make MaxFrameNum bigger in the case of intra refresh.

13 years agoMake intra refresh finish one frame faster
Fiona Glaser [Thu, 16 Sep 2010 10:36:17 +0000 (03:36 -0700)]
Make intra refresh finish one frame faster
In some cases, the last frame of intra refresh was redundant.
Saves a few bits.

13 years agoFix intra refresh to not predict from invalid pixels
Fiona Glaser [Tue, 14 Sep 2010 19:20:00 +0000 (12:20 -0700)]
Fix intra refresh to not predict from invalid pixels
The blocks on the right side of the intra refresh column should not predict from top-right.

13 years agoAdd configure check for mingw64 prefixing
Steven Walters [Mon, 13 Sep 2010 22:47:33 +0000 (18:47 -0400)]
Add configure check for mingw64 prefixing
This compensates for the inconsistent prefixing seen in different versions of the compiler.

13 years agoUpdate some Altivec function prototypes
Manuel Rommel [Sun, 5 Sep 2010 02:31:53 +0000 (19:31 -0700)]
Update some Altivec function prototypes
Silences a lot of warnings.

13 years agoAdd support for level 1b
Takashi Hirata [Mon, 30 Aug 2010 09:13:49 +0000 (18:13 +0900)]
Add support for level 1b
This level is a stupid hack in the H.264 spec, so it's a stupid hack in x264 too.
Since level is an integer, calling applications need to set level_idc=9 to use it.
String-based option handling will accept "1b" just fine though, so CLI users don't have to worry.

13 years agoUse smaller values for idr_pic_id
Fiona Glaser [Thu, 2 Sep 2010 22:29:29 +0000 (15:29 -0700)]
Use smaller values for idr_pic_id
Saves a few bits and fixes problems on certain fantastically terrible decoders,
such as the Apple iPad.

13 years agoUse POC type 2 for streams with no B-frames
Fiona Glaser [Mon, 30 Aug 2010 19:32:31 +0000 (12:32 -0700)]
Use POC type 2 for streams with no B-frames
Saves a few bits per slice header.

13 years agoFaster cabac_encode_ue_bypass
Fiona Glaser [Mon, 30 Aug 2010 05:18:07 +0000 (22:18 -0700)]
Faster cabac_encode_ue_bypass
Use CLZ + a lut instead of a loop.

13 years agoFaster nal_escape asm
Henrik Gramner [Tue, 31 Aug 2010 22:53:42 +0000 (00:53 +0200)]
Faster nal_escape asm

13 years agoAllow --demuxer forcing with known extensions
Anton Mitrofanov [Tue, 31 Aug 2010 15:45:22 +0000 (08:45 -0700)]
Allow --demuxer forcing with known extensions

13 years agoMinor fixes/cosmeticcs in commandling parsing
Anton Mitrofanov [Fri, 3 Sep 2010 20:33:44 +0000 (13:33 -0700)]
Minor fixes/cosmeticcs in commandling parsing

13 years agoFix overflow in stats printing
Anton Mitrofanov [Fri, 3 Sep 2010 15:39:48 +0000 (08:39 -0700)]
Fix overflow in stats printing

13 years agoFix bug in 2pass if the first P-frames are all skip
Anton Mitrofanov [Sun, 29 Aug 2010 12:35:32 +0000 (16:35 +0400)]
Fix bug in 2pass if the first P-frames are all skip
last_qscale_for was read before being initialized in this case, resulting
in the value from the previous iteration being used instead.

13 years agoDon't do deblock-aware RD if deblocking is off
Fiona Glaser [Thu, 26 Aug 2010 13:12:01 +0000 (09:12 -0400)]
Don't do deblock-aware RD if deblocking is off

13 years agoCAVLC "trellis"
Fiona Glaser [Sat, 21 Aug 2010 07:15:53 +0000 (00:15 -0700)]
CAVLC "trellis"
~3-10% improved compression with CAVLC.
--trellis is now a valid option with CAVLC.
Perhaps more importantly, this means psy-trellis now works with CAVLC.

This isn't a real trellis; it's actually just a simplified QNS.
But it takes enough shortcuts that it's still roughly as fast as a trellis; just not quite optimal.
Thus the name is a bit of a misnomer, but we're reusing the option name because it does the same thing.
A real trellis would be better, but CAVLC is much harder to trellis than CABAC.
I'm not aware of any published polynomial-time solutions that are significantly close to optimal.

13 years agoAdd global #define for maximum reference count
Fiona Glaser [Sat, 21 Aug 2010 21:51:39 +0000 (16:51 -0500)]
Add global #define for maximum reference count
This should make it easier to play around with reference frame counts that exceed the spec maximum.

13 years agoSimplify addressing logic for interlaced-related arrays
Fiona Glaser [Tue, 17 Aug 2010 00:47:11 +0000 (17:47 -0700)]
Simplify addressing logic for interlaced-related arrays
In progressive mode, just make [0] and [1] point to the same place.

13 years agoAdd missing emms to x264_nal_encode
Fiona Glaser [Mon, 23 Aug 2010 22:59:35 +0000 (18:59 -0400)]
Add missing emms to x264_nal_encode
Only matters for applications using the low-latency callback feature.

13 years agoFix 2 bugs with slice-max-size
Fiona Glaser [Tue, 17 Aug 2010 21:38:41 +0000 (14:38 -0700)]
Fix 2 bugs with slice-max-size
Macroblock re-encoding didn't restore mv/tex bit counters (slightly inaccurate 2-pass).
Bitstream buffer check didn't work correctly (insanely large frames could break encoding).

13 years agoNV12 version of Altivec chroma MC
Manuel Rommel [Thu, 12 Aug 2010 19:54:00 +0000 (12:54 -0700)]
NV12 version of Altivec chroma MC

13 years agoDeblock-aware RD
Fiona Glaser [Tue, 10 Aug 2010 23:55:05 +0000 (16:55 -0700)]
Deblock-aware RD
Small quality gain (~0.5%) at lower bitrates, potentially larger with QPRD.
May help more with psy, maybe not.
Enabled at subme >= 9.  Small speed cost (a few %).

13 years agoCorrect X header path usage in configure
Brad Smith [Sun, 8 Aug 2010 22:13:32 +0000 (18:13 -0400)]
Correct X header path usage in configure
Don't unconditionally set the header path for OpenBSD but do so if the
--enable-visualize flag is specified.

13 years agoFix lavf input with delayed frames
golgol7777 [Sun, 8 Aug 2010 06:01:46 +0000 (23:01 -0700)]
Fix lavf input with delayed frames

13 years agoSlightly improve the filtering section of x264 --help
Alexander Strange [Sun, 8 Aug 2010 05:29:12 +0000 (22:29 -0700)]
Slightly improve the filtering section of x264 --help

13 years agoFix debug message typo with DTS compression
Fiona Glaser [Sun, 8 Aug 2010 05:32:06 +0000 (22:32 -0700)]
Fix debug message typo with DTS compression

13 years agoTry to guess input length for lavf input
Yasuhiro Ikeda [Tue, 3 Aug 2010 13:10:15 +0000 (22:10 +0900)]
Try to guess input length for lavf input
Allows printing of progress indicator when using lavf input.

13 years agoWorkaround bug in fps/timestamp handling with lavf input
Yasuhiro Ikeda [Tue, 3 Aug 2010 13:07:36 +0000 (22:07 +0900)]
Workaround bug in fps/timestamp handling with lavf input
reordered_opaque in lavf doesn't work correctly in the identity case (no reordering).
Fixes incorrect output for some file types (e.g. raw in mov).

13 years agoFix aspect ratio writing in the MKV muxer
Mike Matsnev [Sun, 1 Aug 2010 19:08:20 +0000 (12:08 -0700)]
Fix aspect ratio writing in the MKV muxer
The braindead Matroska spec dictates aspect ratio to be measured in pixels instead of, well, an actual aspect ratio.

13 years agoAdd libavcore check in configure
Anton Mitrofanov [Thu, 29 Jul 2010 16:23:55 +0000 (20:23 +0400)]
Add libavcore check in configure

13 years agoImprove quantizer distribution with sliced-threads+VBV
Fiona Glaser [Mon, 26 Jul 2010 22:38:13 +0000 (15:38 -0700)]
Improve quantizer distribution with sliced-threads+VBV
Should help avoid cases of very uneven quantizer choice between slices.

13 years agoRemove dead code in slicetype.c
Fiona Glaser [Wed, 28 Jul 2010 18:42:06 +0000 (11:42 -0700)]
Remove dead code in slicetype.c

13 years agoFix incorrect duration/framerate/bitrate in flv header
golgol7777 [Tue, 27 Jul 2010 15:54:38 +0000 (00:54 +0900)]
Fix incorrect duration/framerate/bitrate in flv header

13 years agoinvalidate_reference fixes
Fiona Glaser [Wed, 28 Jul 2010 21:23:53 +0000 (14:23 -0700)]
invalidate_reference fixes
invalidate_reference didn't actually invalidate the immediate previous frame, only frames that came before that.
Make sure that reordering is forced when invalidate_reference is used, so that the reference list is correct decoder-side.

13 years agoFiltering system-related fixes
Steven Walters [Sun, 25 Jul 2010 23:45:27 +0000 (19:45 -0400)]
Filtering system-related fixes
Fix configure to check for outdated libavutil in resize filter support.
Do not print an explicit error message in ffms when requesting a frame beyond the number of frames in the source.
Mention in --*help that filtering options can be specified as name=value.
Fix the shadowing warning in the resize filter on posix systems.

13 years agoImprove reference_invalid support
Fiona Glaser [Thu, 22 Jul 2010 00:40:14 +0000 (17:40 -0700)]
Improve reference_invalid support
Reference invalidation can now be used to invalidate multiple frames at a time, rather than being limited to one per encoder_encode call.

13 years agoEradicate all mention of SI/SP-frames
Loren Merritt [Thu, 22 Jul 2010 06:40:12 +0000 (06:40 +0000)]
Eradicate all mention of SI/SP-frames

13 years agoFix stack alignment with MB-tree
Fiona Glaser [Wed, 21 Jul 2010 18:25:11 +0000 (11:25 -0700)]
Fix stack alignment with MB-tree
Broke 2-pass with MB-tree when calling from compilers with broken stack alignment (e.g. MSVC).

13 years agoAvisynth 2.6 colorspace support
Steven Walters [Sat, 17 Jul 2010 21:43:37 +0000 (17:43 -0400)]
Avisynth 2.6 colorspace support
Use a customized avisynth_c.h to detect the new planar colorspaces.

13 years agoPrevent some cases of cache aliasing.
Loren Merritt [Fri, 16 Jul 2010 06:49:03 +0000 (23:49 -0700)]
Prevent some cases of cache aliasing.
Avoid cases where image strides were a large power of 2.
Core 2: +3% speed at widths 898..960, +6% at widths 1922..1984, most other resolutions unaffected.
Nehalem and AMD: similar amount of speedup, but fewer resolutions affected.

13 years agoFix stack alignment for adaptive quant
Fiona Glaser [Fri, 16 Jul 2010 02:35:52 +0000 (19:35 -0700)]
Fix stack alignment for adaptive quant
Broke calls from compilers with broken stack alignment (e.g. MSVC).

13 years agoFix compilation with shared ffmpeg libs
David Conrad [Thu, 15 Jul 2010 22:58:28 +0000 (18:58 -0400)]
Fix compilation with shared ffmpeg libs
lavf input uses libavutil functions, so it must request flags for libavutil from pkg-config.

13 years agoFix another PCM bug
Fiona Glaser [Thu, 15 Jul 2010 20:20:50 +0000 (13:20 -0700)]
Fix another PCM bug
CABAC assumes that NNZ is 0 or 1, not the number of actual nonzero coefficients.
Didn't actually break the output; only had a tiny effect on RD.

13 years agoFix regression in r1666
Oskar Arvidsson [Thu, 15 Jul 2010 12:01:36 +0000 (14:01 +0200)]
Fix regression in r1666
Broke encoding of PCM macroblocks.

13 years agoFix build with bit_depth > 8
Oskar Arvidsson [Thu, 15 Jul 2010 06:04:47 +0000 (08:04 +0200)]
Fix build with bit_depth > 8
Definition of x264_cli_plane_copy was inconsistent with declaration.

13 years agoConvert x264 to use NV12 pixel format internally
Loren Merritt [Thu, 8 Jul 2010 19:24:16 +0000 (12:24 -0700)]
Convert x264 to use NV12 pixel format internally
~1% faster overall on Conroe, mostly due to improved cache locality.
Also allows improved SIMD on some chroma functions (e.g. deblock).
This change also extends the API to allow direct NV12 input, which should be a bit faster than YV12.
This isn't currently used in the x264cli, as swscale does not have fast NV12 conversion routines, but it might be useful for other applications.

Note this patch disables the chroma SIMD code for PPC and ARM until new versions are written.

13 years agoAdd video filtering system to x264cli
Steven Walters [Mon, 5 Jul 2010 21:37:47 +0000 (17:37 -0400)]
Add video filtering system to x264cli
Similar to mplayer's -vf system.
Supports some basic operations like resizing and cropping.  Will support more in the future.
See the help for more details.

13 years agoEliminate edge cases for MV predictors
Fiona Glaser [Tue, 6 Jul 2010 20:39:44 +0000 (13:39 -0700)]
Eliminate edge cases for MV predictors
Saves a few clocks in mv pred.

13 years agoImprove scenecut detection a bit
Fiona Glaser [Thu, 8 Jul 2010 19:45:25 +0000 (12:45 -0700)]
Improve scenecut detection a bit
Put a minimum value on the scenecut threshold; makes x264 more likely to catch successive scenecuts (but might increase the odds of false detection).
This also fixes scenecut detection with keyint=infinite.
Also print keyint=infinite in the x264 SEI and statsfile correctly.

13 years agoFix 8x8dct+slices+no sliced threads+cavlc+deblock
Fiona Glaser [Thu, 15 Jul 2010 01:47:14 +0000 (18:47 -0700)]
Fix 8x8dct+slices+no sliced threads+cavlc+deblock
Deblocking was done slightly incorrectly.
Regression in r1612.

13 years agoFix off-by-one error in slice VBV predictor updates
Fiona Glaser [Thu, 8 Jul 2010 23:20:48 +0000 (16:20 -0700)]
Fix off-by-one error in slice VBV predictor updates

13 years agoFix disabling of progress with --log-level
Anton Mitrofanov [Mon, 5 Jul 2010 13:44:15 +0000 (17:44 +0400)]
Fix disabling of progress with --log-level

14 years agoSupport for 9 and 10-bit encoding
Oskar Arvidsson [Fri, 2 Jul 2010 02:06:08 +0000 (04:06 +0200)]
Support for 9 and 10-bit encoding
Output bit depth is specified on compilation time via --bit-depth.
There is currently almost no assembly code available for high-bit-depth modes, so encoding will be very slow.
Input is still 8-bit only; this will change in the future.

Note that very few H.264 decoders support >8 bit depth currently.
Also note that the quantizer scale differs for higher bit depth.  For example, for 10-bit, the quantizer (and crf) ranges from 0 to 63 instead of 0 to 51.

14 years agoSupport infinite keyint (--keyint infinite).
Fiona Glaser [Wed, 30 Jun 2010 20:55:46 +0000 (13:55 -0700)]
Support infinite keyint (--keyint infinite).
This just means x264 won't insert non-scenecut keyframes.
Useful for streaming when using interactive error recovery or some other mechanism that makes keyframes unnecessary.

Also change POC logic to limit POC/framenum LSB size (to save bits per slice).
Also fix a bug in the CPB underflow detection code (didn't affect the bitstream, just resulted in the failure to print certain warning messages).

14 years agoDon't check i16x16 planar mode unless previous modes were useful
Fiona Glaser [Wed, 30 Jun 2010 20:06:22 +0000 (13:06 -0700)]
Don't check i16x16 planar mode unless previous modes were useful
Saves ~160 clocks per MB at subme=1, ~270 per MB at subme>1 (measured on Core i7).
Negligle effect on compression.

Also make a few more arrays static.

14 years agoCentralize logging within x264cli
Steven Walters [Sat, 26 Jun 2010 20:28:49 +0000 (16:28 -0400)]
Centralize logging within x264cli
x264cli messages will now respect the log level they pertain to.
Slightly reduces binary size.

14 years agoMake open-GOP Blu-ray compatible
Lamont Alston [Tue, 29 Jun 2010 17:11:42 +0000 (10:11 -0700)]
Make open-GOP Blu-ray compatible
Blu-ray is even more braindamaged than we thought.
Accordingly, open-gop options are now "normal" and "bluray", as opposed to display and coded.
Normal should be used in all cases besides Blu-ray authoring.

14 years agoCallback feature for low-latency per-slice output
Fiona Glaser [Mon, 28 Jun 2010 22:02:33 +0000 (15:02 -0700)]
Callback feature for low-latency per-slice output
Add a callback to allow the calling application to send slices immediately after being encoded.
Also add some extra information to the x264_nal_t structure to help inform such a calling application how the NAL units should be ordered.

Full documentation is in x264.h.

14 years agoSimplify pixel_ads
Loren Merritt [Sun, 27 Jun 2010 03:55:59 +0000 (20:55 -0700)]
Simplify pixel_ads

14 years agoInteractive encoder control: error resilience
Fiona Glaser [Thu, 24 Jun 2010 00:29:34 +0000 (17:29 -0700)]
Interactive encoder control: error resilience
In low-latency streaming with few clients, it is often feasible to modify encoder behavior in some fashion based on feedback from clients.
One possible application of this is error resilience: if a packet is lost, mark the associated frame (and any referenced from it) as lost.
This allows quick recovery from errors with minimal expense bit-wise.

The new i_dpb_size parameter allows a calling application to tell x264 to use a larger DPB size than required by the number of reference frames.
This lets x264 and the client keep a large buffer of old references to fall back to in case of lost frames.
If no recovery is possible even with the available buffer, x264 will force a keyframe.

This initial version does not support B-frames or intra refresh.
Recommended usage is to set keyint to a very large value, so that keyframes do not occur except as necessary for extreme error recovery.

Full documentation is in x264.h.

Move DTS/PTS calculation to before encoding each frame instead of after.
Improve documentation of x264_encoder_intra_refresh.

14 years agoLookaheadless MB-tree support
Fiona Glaser [Thu, 17 Jun 2010 21:50:07 +0000 (14:50 -0700)]
Lookaheadless MB-tree support
Uses past motion information instead of future data from the lookahead.
Not as accurate, but better than nothing in zero-latency compression when a lookahead isn't available.
Currently resets on keyframes, so only available if intra-refresh is set, to avoid pops on non-scenecut keyframes.
Not on by default with any preset/tune combination; must be enabled explicitly if --tune zerolatency is used.

Also slightly modify encoding presets: disable rc-lookahead in the fastest presets.
Enable MB-tree in "veryfast", albeit with a very short lookahead.

14 years agoOpen-GOP support
Lamont Alston [Wed, 16 Jun 2010 17:05:17 +0000 (10:05 -0700)]
Open-GOP support
Allows B-frames immediately prior to keyframes (in display order).
This helps reduce keyframe popping and improve compression with short keyframe intervals.
Due to a staggering display of braindamage in the Blu-ray spec, two open-GOP modes are available.
The two modes calculate keyframe interval differently: one based on coded distance and one based on display distance.
The latter is superior compression-wise, but for no comprehensible reason, Blu-ray requires the former if open-GOP is used.

14 years agoUse threadpools to avoid unnecessary thread creation
Steven Walters [Wed, 9 Jun 2010 22:14:52 +0000 (18:14 -0400)]
Use threadpools to avoid unnecessary thread creation
Tiny performance improvement with fast settings and lots of threads.
May help more on some OSs with slow thread creation, like OS X.
Unify inconsistent synchronized abbreviations to sync.

14 years agoImprove 2-pass bitrate prediction
Fiona Glaser [Sat, 19 Jun 2010 08:41:07 +0000 (01:41 -0700)]
Improve 2-pass bitrate prediction
Adapt based on distance to the end in bits, not in frames.
Helps in videos with absurdly simple end sections, e.g. black frames.