]> git.sesse.net Git - x264/log
x264
14 years agoVarious motion estimation optimizations
Fiona Glaser [Sun, 14 Mar 2010 08:25:02 +0000 (00:25 -0800)]
Various motion estimation optimizations
Faster method of checking MV range.
Predict MVs and cache MVs/MVDs for bidir qpel-RD.
A whole bunch of other minor optimizations.
Slightly better performance and compression.

14 years agoOverhaul macroblock_cache_rect
Fiona Glaser [Sun, 14 Mar 2010 08:19:59 +0000 (00:19 -0800)]
Overhaul macroblock_cache_rect
Unify the rectangle functions into a single one similar to ffmpeg's fill_rectangle.
Remove all cases of variable-size cache_rect calls; create a function-pointer-based system for handling such cases.
Should greatly decrease code size required for such calls.

14 years agoMake a bunch of small functions ALWAYS_INLINE
Fiona Glaser [Sun, 14 Mar 2010 23:48:22 +0000 (16:48 -0700)]
Make a bunch of small functions ALWAYS_INLINE
Probably no real effect for now, but needed for the next patch.

14 years agoTwo compatibility fixes
Loic Minier [Wed, 10 Mar 2010 13:26:46 +0000 (05:26 -0800)]
Two compatibility fixes
Add IA64 support in configure.

14 years agoFaster x264_macroblock_encode_pskip
Henrik Gramner [Fri, 5 Mar 2010 02:19:47 +0000 (03:19 +0100)]
Faster x264_macroblock_encode_pskip
GCC is apparently unable to optimize out the calculation of a variable when it isn't used.

14 years agoMuch more accurate B-skip detection at 2 < subme < 7
Fiona Glaser [Sun, 7 Mar 2010 12:10:30 +0000 (04:10 -0800)]
Much more accurate B-skip detection at 2 < subme < 7
Use the same method that x264 uses for P-skip detection.
This significantly improves quality (1-6%), but at a significant speed cost as well (5-20%).
It also may have a very positive visual effect in cases where the inaccurate skip detection resulted in slightly-off vectors in B-frames.
This could cause slight blurring or non-smooth motion in low-complexity frames at high quantizers.
Not all instances of this problem are solved: the only universal solution is non-locally-optimal mode decision, which x264 does not currently have.

subme >= 7 or <= 2 are unaffected.

14 years agoReformat profile restrictions in --fullhelp.
Alexander Strange [Sun, 7 Mar 2010 07:57:04 +0000 (02:57 -0500)]
Reformat profile restrictions in --fullhelp.

Put "no interlaced", "no lossless" on their own line to avoid them
running into the default options list.

14 years agoFix typo in configure
James Darnley [Sun, 7 Mar 2010 02:28:07 +0000 (18:28 -0800)]
Fix typo in configure

14 years agoAdd support for spaces to iPhone GAS preprocessor script
David Conrad [Sat, 6 Mar 2010 18:29:57 +0000 (10:29 -0800)]
Add support for spaces to iPhone GAS preprocessor script

14 years agoFix slightly wrong mp4 duration.
Yusuke Nakamura [Sat, 6 Mar 2010 10:25:30 +0000 (19:25 +0900)]
Fix slightly wrong mp4 duration.

14 years agoFix link errors with newest gpac cvs
Yusuke Nakamura [Sat, 6 Mar 2010 10:24:32 +0000 (19:24 +0900)]
Fix link errors with newest gpac cvs
gpac decided to randomly break API and require us to use their own custom malloc and free.

14 years agoSave a few bits in slice headers
Kieran Kunhya [Fri, 5 Mar 2010 20:43:02 +0000 (20:43 +0000)]
Save a few bits in slice headers
Don't override the maximum ref index in the slice header if it's the same as the default.
Also update the naming of the relevant variables in the PPS.

14 years agoShrink some arrays in x264_t
Fiona Glaser [Thu, 4 Mar 2010 17:59:09 +0000 (09:59 -0800)]
Shrink some arrays in x264_t
Also remove an unnecessary assignment from cache_load.

14 years agoUse x264_log in more places instead of fprintf
Fiona Glaser [Wed, 3 Mar 2010 19:22:29 +0000 (11:22 -0800)]
Use x264_log in more places instead of fprintf

14 years agoFix two nondeterminisms
Anton Mitrofanov [Wed, 3 Mar 2010 18:14:20 +0000 (10:14 -0800)]
Fix two nondeterminisms
Move noise reduction data into thread-specific data.
Use correct reference list for L1 temporal predictors.

14 years ago"CRF-max" support with VBV
Fiona Glaser [Fri, 19 Mar 2010 21:44:10 +0000 (14:44 -0700)]
"CRF-max" support with VBV
This is a rather curious feature that may have more use than is initially obvious.
In CRF mode with VBV enabled, CRF-max allows the user to specify a quality level which the encoder will never go below, even due to the effects of VBV.
This is not the same as qpmax, which is not aware of issues like scene complexity.
Setting this WILL cause VBV underflows in any situation where the encoder would have needed to exceed the relevant CRF to avoid underflow.

Why might one want to do this even if it would cause VBV underflows?
In the case of streaming, particularly ultra-low-latency streaming, it may be preferable to drop frames than to display frames that are of too low a quality.
Thus, in extremely complex scenes, rather than display completely awful video, the streaming server could simply drop to a lower framerate.
Scenecuts, which normally look terrible under situations like single-frame VBV, could be handled by just displaying them a bit later and dropping frames to compensate.
In other words, it's better to see the scenecut 150ms delayed than for it to look like a blocky mess for 150ms.

On the caller-side, this would be handled by detecting the output size of x264's frames and dropping future frames to compensate if necessary.

This can also be used in normal encoding simply to ensure that VBV does not hurt quality too much (at the cost of potentially causing underflows).
This can help quite a lot when using single-frame VBV and sliced threads, where VBV can often be somewhat unstable.

14 years agoBlu-ray support: NAL-HRD, VFR ratecontrol, filler, pulldown
Kieran Kunhya [Tue, 2 Mar 2010 08:57:10 +0000 (00:57 -0800)]
Blu-ray support: NAL-HRD, VFR ratecontrol, filler, pulldown
x264 can now generate Blu-ray-compliant streams for authoring Blu-ray Discs!
Compliance tested using Sony BD-ROM Verifier 1.21.
Thanks to The Criterion Collection for sponsoring compliance testing!

An example command, using constant quality mode, for 1080p24 content:
x264 --crf 16 --preset veryslow --tune film --weightp 0 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --b-pyramid strict --slices 4 --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 <input> -o <output>

This command is much more complicated than usual due to the very complicated restrictions the Blu-ray spec has.
Most options after "tune" are required by the spec.
--weightp 0 is not, but there are known bugged Blu-ray player chipsets (Mediatek, notably) that will decode video with --weightp 1 or 2 incorrectly.
Furthermore, note the Blu-ray spec has very strict limitations on allowed resolution/fps combinations.
Examples include 1080p @ 24000/1001fps (NTSC FILM) and 720p @ 60000/1001fps.

Detailed features introduced in this patch:

Full NAL-HRD compliance, with both VBR (no filler) and CBR (filler) modes.
Can be enabled with --nal-hrd vbr/cbr.
libx264 now returns HRD timing information to the caller in the form of an x264_hrd_t.
x264cli doesn't currently use it, but this information is critical for compliant TS muxing.

Full VFR ratecontrol support: VBV, 1-pass ABR, and 2-pass modes.
This means that, even without knowing the average framerate, x264 can achieve a correct bitrate in target bitrate modes.
Note that this changes the statsfile format; first pass encodes make before this patch will have to be re-run.

Pulldown support: libx264 allows the calling application to specify a pulldown mode for each frame.
This is similar to the way that RFFs (Repeat Field Flags) work in MPEG-2.
Note that libx264 does not modify timestamps: it assumes the calling application has set timestamps correctly for pulldown!
x264cli contains an example implementation of caller-side pulldown code.

Pic_struct support: necessary for pulldown and allows interlaced signalling.
Also signal TFF vs BFF with delta_poc_bottom: should significantly improve interlaced compression.
--tff and --bff should be preferred to the old --interlaced in order to tell x264 what field order to use.

Huge thanks to Alex Giladi and Lamont Alston for their work on code that eventually became part of this patch.

14 years agoTimecode input/output
Yusuke Nakamura [Mon, 1 Mar 2010 05:42:19 +0000 (21:42 -0800)]
Timecode input/output
--tcfile-in allows a user to specify a timecode v1 or v2 file to override input timestamps.
Useful for dealing with VFR input, especially when FFMS/LAVF support isn't available.
--tcfile-out writes a timecode v2 file containing the timecodes of the output file.
New --timebase option allows a user to change the stream timebase.
Intended primarily for forcing timebase with timecode files if necessary.
When using --seek, note that x264 will seek in the timecode file as well.

14 years agoMixed-refs support for B-frames
Alex Wright [Sun, 28 Feb 2010 09:29:15 +0000 (01:29 -0800)]
Mixed-refs support for B-frames
Small speed cost, usually a few percent at most. Generally has lowest cost in cases when it isn't very useful. Up to ~2% better compression overall on highly complex sources.

Also fix a few minor bugs in B-frame analysis and various bits of cleanup.

14 years agoFaster rounding of chroma DC coefficients
Henrik Gramner [Mon, 1 Mar 2010 21:01:04 +0000 (22:01 +0100)]
Faster rounding of chroma DC coefficients

14 years agoFaster cabac_encode_decision_asm
Holger Lubitz [Tue, 23 Mar 2010 23:54:39 +0000 (00:54 +0100)]
Faster cabac_encode_decision_asm
Minimizes instruction count, which also means smaller code.
Various other slight changes to allow more instruction level parallelism.

14 years agoFaster hpel_filter
Holger Lubitz [Tue, 23 Mar 2010 22:13:54 +0000 (23:13 +0100)]
Faster hpel_filter
On ssse3, use pmaddubsw for h filter too (similar to v filter).
Change 32-bit v and c filters to write the result non-temporal.
Add commented-out defines to disable non-temporal operation.
Hardly any black magic here, but still a measurable win especially for ssse3.

14 years agoIgnore XYSCSS in y4m if the newer standard C tag is present
David Conrad [Mon, 1 Mar 2010 01:34:09 +0000 (20:34 -0500)]
Ignore XYSCSS in y4m if the newer standard C tag is present

Apparently y4mscaler will generate 4:2:0 files with XYSCSS set to 444

14 years agoFix regression in r1450
Fiona Glaser [Tue, 2 Mar 2010 18:51:15 +0000 (10:51 -0800)]
Fix regression in r1450
I_PCM blocks would cause x264 to crash or generate bad output. Simplify PCM handling.

14 years agoFix crash with intra-refresh + aq-mode 0
Fiona Glaser [Sat, 27 Feb 2010 22:26:02 +0000 (14:26 -0800)]
Fix crash with intra-refresh + aq-mode 0

14 years agoFix regression in r1453
Fiona Glaser [Fri, 26 Feb 2010 13:04:48 +0000 (05:04 -0800)]
Fix regression in r1453
r1453 broke psy-trellis with --trellis 2

14 years agoFix regression in r1449
Fiona Glaser [Thu, 25 Feb 2010 10:07:48 +0000 (02:07 -0800)]
Fix regression in r1449
Incorrectly placed thread MV check could result in rare thread MV internal errors, esp. with --non-deterministic.
These weren't fatal errors (x264 could recover and continue with slight compression loss).

14 years agoCut size of MVD arrays by a factor of 2 again
Fiona Glaser [Thu, 25 Feb 2010 04:51:43 +0000 (20:51 -0800)]
Cut size of MVD arrays by a factor of 2 again
Only store the MVDs of the edges of each MB.

Thanks to Michael Niedermayer for the idea.

14 years agoDisable Altivec and VIS optimizations when --disable-asm is specified
David Conrad [Thu, 25 Feb 2010 00:39:57 +0000 (19:39 -0500)]
Disable Altivec and VIS optimizations when --disable-asm is specified

14 years agoFix a buffer overread on odd input resolutions
Loren Merritt [Wed, 24 Feb 2010 07:50:23 +0000 (23:50 -0800)]
Fix a buffer overread on odd input resolutions

14 years agoFix one bug, one corner case in VBV
Fiona Glaser [Wed, 24 Feb 2010 11:49:32 +0000 (03:49 -0800)]
Fix one bug, one corner case in VBV
qp_novbv wasn't set correctly for B-frames.
Disable ABR code for frames with zero complexity.
Disable ABR code for CBR mode; it is completely unnecessary and can have negative consequences.

14 years agoPort Mans Rullgard's NEON intra prediction functions from ffmpeg
David Conrad [Wed, 24 Feb 2010 05:29:21 +0000 (00:29 -0500)]
Port Mans Rullgard's NEON intra prediction functions from ffmpeg

14 years agoRemove unused function
Fiona Glaser [Tue, 23 Feb 2010 21:52:15 +0000 (13:52 -0800)]
Remove unused function
Two other minor fixes.

14 years agoUse short startcode in more possible situations
Fiona Glaser [Tue, 23 Feb 2010 18:00:41 +0000 (10:00 -0800)]
Use short startcode in more possible situations
Previous patch didn't cover all possible uses according to B.1.2.

14 years agoFix fastfirstpass
Fiona Glaser [Tue, 23 Feb 2010 17:50:12 +0000 (09:50 -0800)]
Fix fastfirstpass
Apparently the libx264 preset changes made "fastfirstpass" into "fastsecondpass" inadvertantly.

14 years agoFix various silly errors in the previous patches
Anton Mitrofanov [Tue, 23 Feb 2010 17:10:26 +0000 (09:10 -0800)]
Fix various silly errors in the previous patches

14 years agoActually error out if preset/tune/profile is invalid
Fiona Glaser [Tue, 23 Feb 2010 10:18:07 +0000 (02:18 -0800)]
Actually error out if preset/tune/profile is invalid
Got lost somewhere in the move to libx264-based presets.

14 years agoFaster probe_skip, 2x2 DC transform handling
Fiona Glaser [Tue, 23 Feb 2010 01:33:17 +0000 (17:33 -0800)]
Faster probe_skip, 2x2 DC transform handling
Move the 2x2 DC DCT into the dct_dc asm function to avoid some store-to-load forwarding penalties and extra register loads.
Use dct_dc as part of the early termination in probe_skip.
x86 asm partially by Holger Lubitz.
ARM NEON asm by David Conrad.

14 years agoUse short startcodes whenever possible
Fiona Glaser [Mon, 22 Feb 2010 01:30:52 +0000 (17:30 -0800)]
Use short startcodes whenever possible
Saves one byte per frame for every slice beyond the first.
Only applies to Annex-B output mode.

14 years agoNew algorithm for AQ mode 2
Anton Mitrofanov [Sun, 21 Feb 2010 21:21:11 +0000 (13:21 -0800)]
New algorithm for AQ mode 2
Combines the auto-ness of AQ2 with a new var^0.25 instead of log(var) formula.
Works better with MB-tree than the old AQ mode 2 and should give higher SSIM.

14 years agoAbide by the MinCR level limit
Fiona Glaser [Sun, 21 Feb 2010 21:20:19 +0000 (13:20 -0800)]
Abide by the MinCR level limit
Some Blu-ray analyzers were complaining about this.

14 years agoMake b-pyramid normal the default
Fiona Glaser [Sun, 21 Feb 2010 11:56:06 +0000 (03:56 -0800)]
Make b-pyramid normal the default
Now that b-pyramid works with MB-tree and is spec compliant, there's no real reason not to make it default.
Improves compression 0-5% depending on the video.
Also allow 0/1/2 to be used as aliases for none/strict/normal (for conciseness).

14 years agoMove presets, tunings, and profiles into libx264
Fiona Glaser [Sun, 21 Feb 2010 09:56:12 +0000 (01:56 -0800)]
Move presets, tunings, and profiles into libx264
Now any application calling libx264 can use them.
Full documentation and guidelines for usage are included in x264.h.

14 years agoFaster, more accurate psy-RD caching
Anton Mitrofanov [Fri, 19 Feb 2010 18:45:22 +0000 (10:45 -0800)]
Faster, more accurate psy-RD caching
Keep more variants of cached Hadamard scores and only calculate them when necessary.
Results in more calculation, but simpler lookups.
Slightly more accurate due to internal rounding in SATD and SA8D functions.

14 years agoMuch faster and more efficient MVD handling
Fiona Glaser [Fri, 19 Feb 2010 01:01:38 +0000 (17:01 -0800)]
Much faster and more efficient MVD handling
Store MV deltas as clipped absolute values.
This means CABAC no longer has to calculate absolute values in MV context selection.
This also lets us cut the memory spent on MVDs by a factor of 2, speeding up cache_mvd and reducing memory usage by 32*threads*(num macroblocks) bytes.
On a Core i7 encoding 1080p, this is about 3 megabytes saved.

14 years agoAdd temporal predictor support to interlaced encoding
Fiona Glaser [Thu, 18 Feb 2010 18:37:57 +0000 (10:37 -0800)]
Add temporal predictor support to interlaced encoding
0.5-1% better compression in interlaced mode

14 years agoKeep track of macroblock partitions
Fiona Glaser [Thu, 18 Feb 2010 06:41:16 +0000 (22:41 -0800)]
Keep track of macroblock partitions
Allows vastly simpler motion compensation and direct MV calculation.

14 years agoMuch faster and simpler direct spatial calculation
Fiona Glaser [Tue, 16 Feb 2010 18:13:33 +0000 (10:13 -0800)]
Much faster and simpler direct spatial calculation

14 years agoSimpleBlock requires Matroska Doctype v2
Fiona Glaser [Sun, 21 Feb 2010 22:21:26 +0000 (14:21 -0800)]
SimpleBlock requires Matroska Doctype v2

14 years agoAdd GPAC version check
Yusuke Nakamura [Tue, 16 Feb 2010 19:05:21 +0000 (11:05 -0800)]
Add GPAC version check

14 years agoFix stupid regression in interlaced in r1430
Fiona Glaser [Tue, 23 Feb 2010 09:44:44 +0000 (01:44 -0800)]
Fix stupid regression in interlaced in r1430
With ref > 8 or b-pyramid, an array over-read could cause slightly incorrect B-frames.

14 years agoFix overread of scratch buffer
Fiona Glaser [Mon, 22 Feb 2010 21:04:47 +0000 (13:04 -0800)]
Fix overread of scratch buffer
Could cause crashes on non-mod16 frames.

14 years agoFix integer overflow in chroma SSD check
Fiona Glaser [Mon, 22 Feb 2010 19:21:51 +0000 (11:21 -0800)]
Fix integer overflow in chroma SSD check
Could cause bad skips at very high quantizers on extreme inputs.

14 years agoFix I and B-frame QPs with threads
Anton Mitrofanov [Tue, 16 Feb 2010 17:41:55 +0000 (09:41 -0800)]
Fix I and B-frame QPs with threads
Rounding errors resulted in slightly wrong QPs with threads enabled.

14 years agoFix compilation on ARM
David Conrad [Mon, 15 Feb 2010 09:02:46 +0000 (01:02 -0800)]
Fix compilation on ARM

14 years agoRemove unnecessary PIC support macros
Loren Merritt [Thu, 28 Jan 2010 18:09:07 +0000 (18:09 +0000)]
Remove unnecessary PIC support macros
yasm has a directive to enable PIC globally

14 years agoDon't even try direct temporal when it would give junk MVs
Fiona Glaser [Sat, 13 Feb 2010 19:19:38 +0000 (11:19 -0800)]
Don't even try direct temporal when it would give junk MVs
In PbBbP pyramid structure, the last "b" cannot use temporal because L0Ref0(L1Ref0) != L0Ref0.
Don't even bother analyzing it, just use spatial.
Should improve speed and direct auto effectiveness in CRF and 1-pass modes when b-pyramid is used.
Also makes --direct temporal useful with --b-pyramid, since it will fall back to spatial for frames where temporal is broken.

14 years agoiPhone compilation support
David Conrad [Sun, 4 Oct 2009 11:24:42 +0000 (07:24 -0400)]
iPhone compilation support
Also add --sysroot to configure options

To build for iPhone 3gs / iPod touch 3g:
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk

For older devices, add
--extra-cflags='-arch armv6 -mcpu=arm1176jzf-s' --extra-ldflags='-arch armv6' --disable-asm

14 years agoARM NEON versions of weightp functions
David Conrad [Sat, 9 Jan 2010 03:40:09 +0000 (22:40 -0500)]
ARM NEON versions of weightp functions

14 years agoUse #ifdef instead of #if in checkasm
David Conrad [Sat, 13 Feb 2010 09:25:56 +0000 (01:25 -0800)]
Use #ifdef instead of #if in checkasm

14 years agoMake the ABR buffer consider the distance to the end of the video
Fiona Glaser [Sat, 13 Feb 2010 08:52:31 +0000 (00:52 -0800)]
Make the ABR buffer consider the distance to the end of the video
Should improve bitrate accuracy in 2-pass mode.
May also slightly improve quality by allowing more variation earlier-on in a file.

Also fix abr_buffer with 1-pass: it does something very different than what it does for 2-pass.
Thus, the earlier change that increased it based on threads caused 1-pass ABR to be somewhat less accurate.

14 years agoMark cli_input/output_t variables as const when possible
Alexander Strange [Sat, 13 Feb 2010 07:22:04 +0000 (02:22 -0500)]
Mark cli_input/output_t variables as const when possible

14 years agomkv: Write the x264 version into the file header
Alexander Strange [Sat, 13 Feb 2010 07:00:57 +0000 (02:00 -0500)]
mkv: Write the x264 version into the file header

This only updates the "writing application"; matroska_ebml.c is the
"muxing application", but the version string for that is still hardcoded.

14 years agomkv: Write SimpleBlock instead of Block for frame headers
Alexander Strange [Sat, 13 Feb 2010 06:41:41 +0000 (01:41 -0500)]
mkv: Write SimpleBlock instead of Block for frame headers

mkvtoolnix writes these by default since 2009/04/13.
Slightly simplifies muxer and allows 'mkvinfo -s' to show B-frames
as 'B' (but not B-ref frames).

14 years agoAllow | as a separator between psy-rd and psy-trellis values.
Alexander Strange [Mon, 10 Nov 2008 05:55:20 +0000 (00:55 -0500)]
Allow | as a separator between psy-rd and psy-trellis values.
[,:/] are all taken when setting psy-trellis in a zone in an mencoder option.

Also fix a comment typo and remove a useless line of code.

14 years agoBackport various speed tweak ideas from ffmpeg
Fiona Glaser [Sat, 13 Feb 2010 05:15:12 +0000 (21:15 -0800)]
Backport various speed tweak ideas from ffmpeg
Add mv0 early termination to spatial direct calculation
Up to twice as fast direct mv calculation on near-motionless video.

Branchless CAVLC level code adjustment based on trailing ones.
A few clocks faster.

Check tc value before clipping in C version of deblock functions.
Much faster, but nobody uses those anyways.

Thanks to Michael Niedermayer for the ideas.

14 years agoImplement direct temporal + interlaced
Fiona Glaser [Fri, 12 Feb 2010 11:33:54 +0000 (03:33 -0800)]
Implement direct temporal + interlaced
This was much easier than I expected.
It will also be basically useless until TFF/BFF support gets in, since it requires delta_poc_bottom to be set correctly to work well.

14 years agoAllow longer keyints with intra refresh
Fiona Glaser [Wed, 10 Feb 2010 21:44:28 +0000 (13:44 -0800)]
Allow longer keyints with intra refresh
If a long keyint is specified (longer than macroblock width-1), the refresh will simply not occur all the time.
In other words, a refresh will take place, and then x264 will wait until keyint is over to start another refresh.

14 years agoOverhaul sliced-threads VBV
Fiona Glaser [Wed, 10 Feb 2010 20:12:29 +0000 (12:12 -0800)]
Overhaul sliced-threads VBV
Make predictors thread-local and allow each thread to poll the others to get their predicted sizes.
Many, many other tweaks to improve quality with small VBV and sliced threads.
Note this may somewhat increase the risk of a VBV underflow in such extreme situations (single-frame VBV).
This is tolerable, as most relevant use-cases are better off with a few rare underflows (even if they have to drop a slice) than consistent low quality.

14 years agoPrint psy-(rd|trellis) with more precision in userdata SEI
Fiona Glaser [Tue, 9 Feb 2010 23:08:31 +0000 (15:08 -0800)]
Print psy-(rd|trellis) with more precision in userdata SEI

14 years agoMore formatting fixes in x264 help
Fiona Glaser [Mon, 15 Feb 2010 08:55:16 +0000 (00:55 -0800)]
More formatting fixes in x264 help

14 years agoFaster 2x2 chroma DC dequant
Henrik Gramner [Mon, 8 Feb 2010 23:53:52 +0000 (15:53 -0800)]
Faster 2x2 chroma DC dequant

14 years agoWrite PASP atom in mp4 muxing
Yusuke Nakamura [Mon, 8 Feb 2010 09:48:38 +0000 (01:48 -0800)]
Write PASP atom in mp4 muxing
Adds container-level aspect ratio support for mp4.

14 years agoFix 2-pass ratecontrol continuation in case of missing statsfile
Fiona Glaser [Thu, 4 Feb 2010 04:27:57 +0000 (20:27 -0800)]
Fix 2-pass ratecontrol continuation in case of missing statsfile
Didn't work properly if MB-tree was enabled.

14 years agoSmarter QPRD
Fiona Glaser [Thu, 4 Feb 2010 04:01:16 +0000 (20:01 -0800)]
Smarter QPRD
Catch some cases in which RD checks can be avoided; reduces QPRD RD calls by 10-20%.

14 years agoFix subpel iteration counts with B-frame analysis and subme 6/8
Fiona Glaser [Thu, 4 Feb 2010 02:36:44 +0000 (18:36 -0800)]
Fix subpel iteration counts with B-frame analysis and subme 6/8
Since subme 6 means "like subme 5, except RD on P-frames", B-frame analysis
shouldn't use the RD subpel counts at subme 6.  Similarly with subme 8.
Slightly faster (and very marginally worse) compression at subme 6 and 8.

14 years agoSimplify decimate checks in macroblock_encode
Fiona Glaser [Thu, 4 Feb 2010 02:19:29 +0000 (18:19 -0800)]
Simplify decimate checks in macroblock_encode
Also fix a misleading comment.

14 years agoImprove bidir search, fix some artifacts in fades
Fiona Glaser [Tue, 2 Feb 2010 11:15:18 +0000 (03:15 -0800)]
Improve bidir search, fix some artifacts in fades
Modify analysis to allow bidir to use different motion vectors than L0/L1.
Always try the <0,0,0,0> motion vector for bidir.
Eliminates almost all errant motion vectors in fades.
Slightly improves PSNR as well (~0.015db).

14 years agoSlightly faster predictor_difference_mmxext
Fiona Glaser [Mon, 1 Feb 2010 21:04:47 +0000 (13:04 -0800)]
Slightly faster predictor_difference_mmxext

14 years agoAdd ability to adjust ratecontrol parameters on the fly
Fiona Glaser [Fri, 29 Jan 2010 10:40:41 +0000 (02:40 -0800)]
Add ability to adjust ratecontrol parameters on the fly
encoder_reconfig and x264_picture_t->param can now be used to change ratecontrol parameters.
This is extraordinarily useful in certain streaming situations where the encoder needs to adapt the bitrate to network circumstances.

What can be changed:
1) CRF can be adjusted if in CRF mode.
2) VBV maxrate and bufsize can be adjusted if in VBV mode.
3) Bitrate can be adjusted if in CBR mode.
However, x264 cannot switch between modes and cannot change bitrate in ABR mode.

Also fix a bug where x264_picture_t->param reconfig method would not always be frame-exact.

Commit sponsored by SayMama video calling.

14 years agoFix regression in r1406
Yusuke Nakamura [Sat, 30 Jan 2010 21:53:01 +0000 (13:53 -0800)]
Fix regression in r1406
Bitrate was printed incorrectly for some input framerates.

14 years agoFix log2f detection, include order, some gcc warnings
Loren Merritt [Sat, 30 Jan 2010 20:01:51 +0000 (12:01 -0800)]
Fix log2f detection, include order, some gcc warnings
r1413 caused crashes on any system with malloc.h.
Also switch to std=c99 or std=gnu99 if supported by the compiler.
Fix visualize support.

14 years agoFix abstraction violations in x264.c
Fiona Glaser [Fri, 29 Jan 2010 19:01:44 +0000 (11:01 -0800)]
Fix abstraction violations in x264.c
No calling application--not even x264cli--should ever look inside x264_t.

14 years agoMove -D CFLAGS to config.h
Diogo Franco [Fri, 29 Jan 2010 01:28:03 +0000 (17:28 -0800)]
Move -D CFLAGS to config.h

14 years agoFix stat with large file support
Steven Walters [Fri, 29 Jan 2010 01:26:40 +0000 (17:26 -0800)]
Fix stat with large file support

14 years agoImplement ffms2 version check
Diogo Franco [Thu, 28 Jan 2010 04:29:50 +0000 (20:29 -0800)]
Implement ffms2 version check
Depends on ffms2 version 2.13.1 (r272).
Tries pkg-config's built-in version checking first.
Uses only the preprocessor to avoid cross-compilation issues.

14 years agoFix implicit CBR message to only print when in ABR mode
Fiona Glaser [Thu, 28 Jan 2010 03:41:27 +0000 (19:41 -0800)]
Fix implicit CBR message to only print when in ABR mode
Also make it print outside of debug mode.

14 years agoAdd configure check for log2 support
Diogo Franco [Wed, 27 Jan 2010 21:11:08 +0000 (13:11 -0800)]
Add configure check for log2 support
Some incredibly braindamaged operating systems, such as FreeBSD, blatantly ignore the C specification and omit certain functions that are required by ISO C.
log2f is one of these functions that periodically goes missing in such operating systems.

14 years agoAdd config.log support
Diogo Franco [Wed, 27 Jan 2010 18:12:42 +0000 (10:12 -0800)]
Add config.log support
Now, if configure fails, you'll be able to see why.

14 years agoFix cross-compiling with lavf, add support for ffms2.pc
Diogo Franco [Wed, 27 Jan 2010 17:26:35 +0000 (09:26 -0800)]
Fix cross-compiling with lavf, add support for ffms2.pc
Also update configure script to work with newest ffms.

14 years agoImprove DTS generation, move DTS compression into libx264
Yusuke Nakamura [Wed, 27 Jan 2010 00:01:54 +0000 (16:01 -0800)]
Improve DTS generation, move DTS compression into libx264
This change fixes some cases in which PTS could be less than DTS.

Additionally, a new parameter, b_dts_compress, enables DTS compression.
DTS compression eliminates negative DTS (i.e. initial delay) due to B-frames.
The algorithm changes timebase in order to avoid duplicating DTS.
Currently, in x264cli, only the FLV muxer uses it.  The MP4 muxer doesn't need it, as it uses an EditBox instead.

14 years agoVarious threading-related cosmetics
Anton Mitrofanov [Tue, 26 Jan 2010 19:41:18 +0000 (11:41 -0800)]
Various threading-related cosmetics
Simplify a lot of code and remove some unnecessary variables.

14 years agoHardcode the bs_t in cavlc.c; passing it around is a waste
Fiona Glaser [Mon, 25 Jan 2010 19:23:55 +0000 (11:23 -0800)]
Hardcode the bs_t in cavlc.c; passing it around is a waste

Saves ~1.5kb of code size, very slight speed boost.

14 years agoFix lavf input with pipes and image sequences
David Conrad [Sun, 24 Jan 2010 02:05:25 +0000 (18:05 -0800)]
Fix lavf input with pipes and image sequences
x264 should now be able to encode from an image sequence using an image2-style formatted string (e.g. file%02d.jpg).

14 years agoFix bitstream alignment with multiple slices
Fiona Glaser [Fri, 22 Jan 2010 07:07:11 +0000 (23:07 -0800)]
Fix bitstream alignment with multiple slices
Broke multi-slice encoding on CPUs without unaligned access.
New system simply forces a bitstream realignment at the start of each writing function and flushes when it reaches the end.

14 years agoMerge nnz_backup with scratch buffer
Fiona Glaser [Thu, 21 Jan 2010 18:00:07 +0000 (10:00 -0800)]
Merge nnz_backup with scratch buffer
Slightly less memory usage.

14 years agoUse cross-prefix properly with pkg-config for cross-compiling
Steven Walters [Wed, 20 Jan 2010 17:00:54 +0000 (09:00 -0800)]
Use cross-prefix properly with pkg-config for cross-compiling

14 years agoVarious performance optimizations
Fiona Glaser [Tue, 19 Jan 2010 04:29:33 +0000 (20:29 -0800)]
Various performance optimizations
Simplify and compact storage of direct motion vectors, faster --direct auto.
Shrink various arrays to save a bit of cache.
Simplify and reorganize B macroblock type writing in CABAC.
Add some missing ALIGNED macros.

14 years agoFix crash on new AMD M300 and similar CPUs
Fiona Glaser [Mon, 18 Jan 2010 23:50:06 +0000 (15:50 -0800)]
Fix crash on new AMD M300 and similar CPUs
Apparently these CPUs have SSE4a, but not misaligned SSE.

14 years agoFix intra refresh with subme < 6
Fiona Glaser [Mon, 18 Jan 2010 00:11:05 +0000 (19:11 -0500)]
Fix intra refresh with subme < 6
Also improve the quality of intra masking.