- 14 Jan, 2010 1 commit
-
-
Kieran Kunhya authored
libx264 now takes three new API parameters. b_vfr_input tells x264 whether or not the input is VFR, and is 1 by default. i_timebase_num and i_timebase_den pass the timebase to x264. x264_picture_t now returns the DTS of each frame: the calling app need not calculate it anymore. Add libavformat and FFMS2 input support: requires libav* and ffms2 libraries respectively. FFMS2 is _STRONGLY_ preferred over libavformat: we encourage all distributions to compile with FFMS2 support if at all possible. FFMS2 can be found at http://code.google.com/p/ffmpegsource/. --index, a new x264cli option, allows the user to store (or load) an FFMS2 index file for future use, to avoid re-indexing in the future. Overhaul the muxers to pass through timestamps instead of assuming CFR. Also overhaul muxers to correctly use b_annexb and b_repeat_headers to simplify the code. Remove VFW input support, since it's now pretty much redundant with native AVS support and LAVF support. Finally, overhaul a large part of the x264cli internals. --force-cfr, a new x264cli option, allows the user to force the old method of timestamp handling. May be useful in case of a source with broken timestamps. Avisynth, YUV, and Y4M input are all still CFR. LAVF or FFMS2 must be used for VFR support. Do note that this patch does *not* add VFR ratecontrol yet. Support for telecined input is also somewhat dubious at the moment. Large parts of this patch by Mike Gurlitz <mike.gurlitz@gmail.com>, Steven Walters <kemuri9@gmail.com>, and Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>.
-
- 25 Nov, 2009 1 commit
-
-
Fiona Glaser authored
-
- 12 Nov, 2009 1 commit
-
-
Fiona Glaser authored
New type-punning macros perform write/read-combining without aliasing violations per the second-to-last part of 6.5.7 in the C99 specification. GCC 4.4, however, doesn't seem to have read this part of the spec and still warns about the violations. Regardless, it seems to fix all known aliasing miscompilations, so perhaps the GCC warning generator is just broken. As such, add -Wno-strict-aliasing to CFLAGS.
-
- 09 Nov, 2009 2 commits
-
-
Loren Merritt authored
-
Dylan Yudaken authored
Merge Dylan's Google Summer of Code 2009 tree. Detect fades and use weighted prediction to improve compression and quality. "Blind" mode provides a small overall quality increase by using a -1 offset without doing any analysis, as described in JVT-AB033. "Smart", the default mode, also performs fade detection and decides weights accordingly. MB-tree takes into account the effects of "smart" analysis in lookahead, even further improving quality in fades. If psy is on, mbtree is on, interlaced is off, and weightp is off, fade detection will still be performed. However, it will be used to adjust quality instead of create actual weights. This will improve quality in fades when encoding in Baseline profile. Doesn't add support for interlaced encoding with weightp yet. Only adds support for luma weights, not chroma weights. Internal code for chroma weights is in, but there's no analysis yet. Baseline profile requires that weightp be off. All weightp modes may cause minor breakage in non-compliant decoders that take shortcuts in deblocking reference frame checks. "Smart" may cause serious breakage in non-compliant decoders that take shortcuts in handling of duplicate reference frames. Thanks to Google for sponsoring our most successful Summer of Code yet!
-
- 12 Oct, 2009 1 commit
-
-
Fiona Glaser authored
"Flashes" are defined as any scene which lasts a very short period before a previous scene returns. A common example of this is of course a camera flash. Accordingly, look ahead during scenecut analysis and rule out the possibility of certain frames being scenecuts. Also handles cases of tons of short scenes in sequence and avoids making those scenecuts as well. Can only catch flashes of 1 frame in length with b-adapt 1. With b-adapt 2, can catch flashes of length --bframes. Speed cost should be negligible.
-
- 23 Sep, 2009 1 commit
-
-
Anton Mitrofanov authored
Avoid unnecessary cond_wait
-
- 02 Sep, 2009 1 commit
-
-
Steven Walters authored
Move lookahead into a separate thread, set to higher priority than the other threads, for optimal performance. Reduces the amount that lookahead bottlenecks encoding, greatly increasing performance with lookahead-intensive settings (e.g. b-adapt 2) on many-core CPUs. Buffer size can be controlled with --sync-lookahead, which defaults to auto (threads+bframes buffer size). Note that this buffer is separate from the rc-lookahead value. Note also that this does not split lookahead itself into multiple threads yet; this may be added in the future. Additionally, split frames into "fdec" and "fenc" frame types and keep the two separate. This split greatly reduces memory usage, which helps compensate for the larger lookahead size. Extremely special thanks to Michael Kazmier and Alex Giladi of Avail Media, the original authors of this patch.
-
- 27 Aug, 2009 1 commit
-
-
Fiona Glaser authored
Avoid an int->float conversion with a small table. Change lowres_inter_types to a bitfield; cut its size by 75%. Somewhat lower memory usage with lots of bframes. Make log2/exp2 tables global to avoid duplication.
-
- 24 Aug, 2009 1 commit
-
-
David Conrad authored
Originally written for ffmpeg by Mans Rullgard; ported by David. Luma and chroma inter deblocking; no intra yet.
-
- 23 Aug, 2009 1 commit
-
-
David Conrad authored
Neither GCC nor ARMCC support 16 byte stack alignment despite the fact that NEON loads require it. These macros only work for arrays, but fortunately that covers almost all instances of stack alignment in x264.
-
- 19 Aug, 2009 1 commit
-
-
Fiona Glaser authored
Parameter structs can now be passed with individual frames. The previous method would only change the parameter of what was currently being encoded, which due to delay might be very far from an intended exact frame. Also add support for changing aspect ratio. Only works in a stream with repeating headers and requires the caller to force an IDR to ensure instant effect.
-
- 17 Aug, 2009 1 commit
-
-
Fiona Glaser authored
Use the large-scale lookahead capability introduced in MB-tree for ratecontrol purposes. (Does not require MB-tree, however.) Greatly improved quality and compliance in 1-pass VBV mode, especially in CBR; +2db OPSNR or more in some cases. Fix some other bugs in VBV, which should improve non-lookahead mode as well. Change the tolerance algorithm in row VBV to allow for more significant mispredictions when buffer is nearly full. Note that due to the fixing of an extremely long-standing bug (>1 year), bitrates may change by nontrivial amounts in CRF without MB-tree.
-
- 13 Aug, 2009 1 commit
-
-
Loren Merritt authored
fix a buffer overread in x264_mbtree_propagate_cost_sse2. no effect on actual behavior, only theoretical correctness. fix x264_slicetype_frame_cost_recalculate on I-frames, which previously used all 0 mb costs. shut up a valgrind warning in predict_8x8_filter_mmx.
-
- 09 Aug, 2009 2 commits
-
-
Loren Merritt authored
AQ was applied inconsistently, with some AQed costs compared to other non-AQed costs. Strangely enough, fixing this increases SSIM on some sources but decreases it on others. More investigation needed. Account for weighted bipred. Reduce memory, increase precision, simplify, and early terminate.
-
Fiona Glaser authored
Eliminates a memory leak.
-
- 08 Aug, 2009 1 commit
-
-
Steven Walters authored
Fuzz tests show that all mallocs appear to be checked correctly now.
-
- 07 Aug, 2009 1 commit
-
-
Fiona Glaser authored
On by default; can be turned off with --no-mbtree. Uses a large lookahead to track temporal propagation of data and weight quality accordingly. Requires a very large separate statsfile (2 bytes per macroblock) in multi-pass mode. Doesn't work with b-pyramid yet. Note that MB-tree inherently measures quality different from the standard qcomp method, so bitrates produced by CRF may change somewhat. This makes the "medium" preset a bit slower. Accordingly, make "fast" slower as well, and introduce a new preset "faster" between "fast" and "veryfast". All presets "fast" and above will have MB-tree on. Add a new option, --rc-lookahead, to control the distance MB tree looks ahead to perform propagation analysis. Default is 40; larger values will be slower and require more memory but give more accurate results. This value will be used in the future to control ratecontrol lookahead (VBV). Add a new option, --no-psy, to disable all psy optimizations that don't improve PSNR or SSIM. This disables psy-RD/trellis, but also other more subtle internal psy optimizations that can't be controlled directly via external parameters. Quality improvement from MB-tree is about 2-70% depending on content. Strength of MB-tree adjustments can be tweaked using qcompress; higher values mean lower MB-tree strength. Note that MB-tree may perform slightly suboptimally on fades; this will be fixed by weighted prediction, which is coming soon.
-
- 17 Jul, 2009 1 commit
-
-
Fiona Glaser authored
~70% faster chroma MC on 32-bit Conroe Also slightly faster SSSE3 intra_sad_8x8c
-
- 26 Feb, 2009 1 commit
-
-
Fiona Glaser authored
Deblocking was very slightly incorrect with partitions=all. Bug found by BugMaster.
-
- 09 Feb, 2009 1 commit
-
-
Guillaume Poirier authored
This will allow simplifying vectors loads that can only load 16-bytes aligned data (such as AltiVec).
-
- 20 Jan, 2009 1 commit
-
-
Fiona Glaser authored
The benefit in the most extreme contrived situation was at most 0.001db PSNR, at the cost of slower decoding. As this option was basically useless, it was a waste of code and prevented some other useful optimizations. Remove some unused mc code related to sub-8x8 partitions. Small deblocking speedup when p4x4 is used. Also remove unused x264_nal_decode prototype from x264.h.
-
- 22 Dec, 2008 1 commit
-
-
Loren Merritt authored
reduce memory if using ESA and not p4x4
-
- 29 Nov, 2008 1 commit
-
-
Fiona Glaser authored
-
- 11 Nov, 2008 1 commit
-
-
Fiona Glaser authored
Only for experimental purposes and ultra-fast encoding. Probably not a good idea for firstpass.
-
- 10 Nov, 2008 1 commit
-
-
Fiona Glaser authored
-
- 09 Nov, 2008 1 commit
-
-
Fiona Glaser authored
Factor out pow to be only called once per macroblock. Speeds up b-adapt, especially b-adapt 2, considerably. Speed boost is as high as 24% with b-adapt 2 + b-frames 16.
-
- 22 Oct, 2008 1 commit
-
-
Fiona Glaser authored
Most of the MV checks can be skipped, resulting in faster strength calculation
-
- 02 Oct, 2008 1 commit
-
-
Ralf Terdic authored
-
- 17 Sep, 2008 1 commit
-
-
Fiona Glaser authored
-
- 16 Sep, 2008 1 commit
-
-
Fiona Glaser authored
This vastly speeds up b-adapt 2, especially at large bframes values. This changes output because now MV prediction in lookahead only uses L0/L1 MVs, not bidir. This isn't a problem, since the bidir prediction wasn't really correct to begin with, so the change in output is neither positive nor negative. This also allowed the removal of some unnecessary memsets, which should also give a small speed boost. Finally, this allows the use of the lowres motion vectors for predictors in some future patch.
-
- 15 Sep, 2008 1 commit
-
-
Fiona Glaser authored
This method (--b-adapt 2) uses a Viterbi algorithm somewhat similar to that used in trellis quantization. Note that it is not fully optimized and is very slow with large --bframes values. It also takes into account weightb, which should improve fade detection. Additionally, changes were made to cache lowres intra results for each frame to avoid recalculating them. This should improve performance in both B-frame decision methods. This can also be done for motion vectors, which will dramatically improve b-adapt 2 performance when it is complete. This patch also reads b_adapt and scenecut settings from the first pass so that the x264 header information in the output file will have correct information (since frametype decision is only done on the first pass).
-
- 14 Sep, 2008 1 commit
-
-
Fiona Glaser authored
This change improves VBV accuracy and improves bit distribution in CRF and 2pass. Instead of being applied after ratecontrol, AQ becomes part of the complexity measure that ratecontrol uses. This allows for modularity for changes to AQ; a new AQ algorithm can be introduced simply by introducing a new aq_mode and a corresponding if in adaptive_quant_frame. This also allows quantizer field smoothing, since quantizers are calculated beofrehand rather during encoding. Since there is no more reason for it, aq_mode 1 is removed. The new mode 1 is in a sense a merger of the old modes 1 and 2. WARNING: This change redefines CRF when using AQ, so output bitrate for a given CRF may be significantly different from before this change!
-
- 21 Aug, 2008 2 commits
-
-
Loic Le Loarer authored
-
Loren Merritt authored
-
- 19 Aug, 2008 2 commits
-
-
Fiona Glaser authored
Convert the style of the deblocking code to the standard x264 style Eliminate some trailing whitespace
-
Fiona Glaser authored
Along with a bit of related code reorganization and macroification
-
- 16 Aug, 2008 1 commit
-
-
Loren Merritt authored
-
- 15 Aug, 2008 1 commit
-
-
Fiona Glaser authored
Early termination for bS=0, alpha=0, beta=0 Refactoring, various other optimizations About 30% faster deblocking overall.
-
- 24 Jul, 2008 1 commit
-
-
Fiona Glaser authored
-