Squashed 'captive/librtmp/csrc/src/' changes from 7340f6d..a3ac64b

a3ac64b OpenCL support improvement/refactoring
c47347c x86: shave a few instructions off AVX deblock
b547a4e x86: AVX2 dequant_4x4_dc
907573d x86: AVX2 high bit-depth dequant
442c6a4 x86-64: 64-bit variant of AVX2 hpel_filter
26a6451 x86: AVX2 high bit-depth denoise_dct
db95d6a x86: AVX2 high bit-depth quant
327386f x86: AVX2 add16x16_idct_dc
c82db4e x86: faster AVX2 quant_4x4x4
b79f4a6 x86: AVX2 intra_sad_x3_8x8c
2c0bca3 x86: AVX2 high bit-depth intra_sad_x3_8x8
b2c30e1 x86: AVX2 deblock strength
37edf16 x86: Faster high bit-depth intra_sad_x3_4x4
a9ed051 x86: faster SSSE3 hpel
9373d5f x86-64: faster SSSE3 trellis
2a71604 x86: 32-byte align the stack if possible
eefaff1 x86inc: Utilize the shadow space on 64-bit Windows
b4be6e5 x86: Don't use explicitly aligned versions of SAD on AVX CPUs
99f553e x86: Add missing initializations for high bit-depth sad_aligned
42f2f78 x86: add Jaguar CPU detection
f12a17f x86inc: Remove .rodata kludges
c3b166a checkasm: Use 64-bit cycle counters
e943696 checkasm: Fix stack alignment bug
b1749e2 Fix invalid memcpy in sliced-threads
76a5c3a Fix two bugs in slice-min-mbs and slices-max
3b1f1f7 x86: SSSE3 LUT-based faster coeff_level_run
c05bf54 x86-64: BMI2 cabac_residual functions
437f808 x86: SSSE3 ads_mvs
2ad961f x86: AVX2 pixel_ssd_nv12_core
40406b8 x86: AVX2 high bit-depth pixel_ssd
c2852be x86: AVX2 high bit-depth pixel_sad_x3/pixel_sad_x4
fa9dcd0 x86: AVX2 high bit-depth vsad
567d036 x86: AVX2 high bit-depth pixel_sad
6cc9f16 x86: AVX2 high_bit_depth pixel_avg2, get_ref, mc_copy_w16, mc_luma
c371128 x86: AVX2 nal_escape
255271f x86: AVX memzero_aligned
43632cc x86: AVX2 predict_16x16_dc
dcad117 x86: AVX2 predict_8x8c_p/predict_8x16c_p
f5bff68 x86: AVX2 predict_16x16_p
92eb201 x86: AVX high bit-depth predict_16x16_v
16f3261 x86: AVX2 high bit-depth predict_4x4_h
a38b5fc x86: AVX2 high bit-depth predict_16x16_h
89f8263 x86: AVX2 high bit-depth predict_8x8c_h/predict_8x16c_h
78b8af8 x86util: Support ymm registers in HADD macros
d07b421 x86: more AVX2 framework, AVX2 functions, plus some existing asm tweaks
e228f65 x86inc: create xm# and ym#, analagous to m#
e916dfb x86inc: fix AVX emulation of cmp(p|s)(s|d)
5b01ce1 x86-64: cabac_block_residual assembly
3a5f6c0 OpenCL lookahead
e436158 weightp: improve scale/offset search, chroma
389d06e Add slices-max feature
f546e98 Add slice-min-mbs feature
1db4621 Disable mbtree asm with cpu-independent option
fceb3b1 Show "avs: no" --disable-avs option instead of empty string
68ee80a lavf input: don't use deprecated AVStream fields
5980580 Fix y4m input with C420paldv colorspace
580cc69 x86: correctly check stack alignment for Atom hadamard_ac
b3c15fc x86inc: fix some corner cases of SWAP
89aecb4 Fix array overreads that caused miscompilation in gcc 4.8
e355b0e Fix undefined behavior in x264_ratecontrol_mb
c832fe9 ARM: Fix bug in x264_quant_4x4x4_neon
b3065e6 ARM: update NEON mc_chroma to work with NV12 and re-enable it
e82cf2c CABAC/CAVLC: use the new bit-iterating macro here too
253e2c3 quant_4x4x4: quant one 8x8 block at a time
eaae05e Add AvxSynth support to the AviSynth input module.
b2c70f6 Eliminate some branchiness in ME/analysis
9d600d6 Fix some store forwarding stalls There's quite a few others, but most of them don't help to fix or there's no easy way to avoid them.
9fe40b1 x86: faster AVX satd/sa8d/sa8d_satd/hadamard_ac
4f24bb3 x86: detect Bobcat, improve Atom optimizations, reorganize flags
d556d55 x86: combined SA8D/SATD dsp function
5c2ca5d x86: port SSE2+ SATD functions to high bit depth
b09bc0c x86: faster high bit depth ssd
9104985 x86: optimize and clean up predictor checking Branchlessly handle elimination of candidates in MMX roundclip asm. Add a new asm function, similar to roundclip, except without the round part. Optimize and organize the C code, and make both subme>=3 and subme<3 consistent. Add lots of explanatory comments and try to make things a little more understandable. ~5-10% faster with subme>=3, ~15-20% faster with subme<3.
a216e5c Fix two bugs in predictor checking pmv wasn't checked properly in some cases, as well as zero vector. Output-changing portion of the following patch.
4d220bc Improve lookahead-threads auto selection Smarter decision to improve fast-first-pass performance in 2-pass encodes. Dramatically improves CPU utilization on multi-core systems.
c63a518 x86: Use SSE instead of SSE2 for copying data
0ce5b43 64-bit cabac optimizations
51a5976 configure: add QNX support
486ff39 Windows: Enable DEP and ASLR
8da42b7 x86inc: Set ELF hidden visibility for global constants
9890192 x86inc: Add cvisible macro for C functions with public prefix
91b0f0e x86inc: rename program_name to private_prefix Synced from libav. The new name is more descriptive and will allow defining a separate public prefix for externally visible library symbols.
a4e7759 x264.h: improve x264_encoder_reconfig documentation
ce9efea Cosmetics: stricter definition of parameterless functions
e403db4 Update "Install and compile x264" in doc/regression_test.txt
c13fbaf Fix possible non-determinism with mbtree + open-gop + sync-lookahead
736d69b x86: don't use the red zone on win64
637005e x86-64: fix trellis asm with interlacing
ba5ce76 x86-32: use simple nop codes for <= sse
bc13772 Bump dates to 2013
3508f4a x86inc: Drop tzcnt workaround
b924133 AVX2/FMA3 version of mbtree_propagate First AVX2 function for testing. Bump yasm version to 1.2.0 for AVX2 support.
d967c09 x86inc: Use VEX-encoded instructions in AVX functions Automatically use VEX-encoding in AVX/AVX2/XOP/FMA3/FMA4 functions for all instructions that exists in a VEX-encoded version. This change makes it easier to extend existing code to use AVX2. Also add support for AVX emulation of a few instructions that were missing before.
f6c6286 x86inc: activate REP_RET automatically Now RET checks whether it immediately follows a branch, so the programmer dosen't have to keep track of that condition. REP_RET is still needed manually when it's a branch target, but that's much rarer. The implementation involves lots of spurious labels, but that's ok because we strip them.
755fece x86inc: support stack mem allocation and re-alignment in PROLOGUE Use this in 8-bit loopfilter functions so they can be used if there is no aligned stack (e.g. x86-32 MSVC or ICC 10.x).
c69e2d0 Update config.guess and config.sub
9c4ba4b Fix crash if the first frame is forced to a non-keyframe This is obviously bad user input, but x264 shouldn't crash if it happens.
593e8cc Fix build on ARM with binutils >= 2.23.51.0.6 GAS doesn't seem to like spaces in vld1 anymore, so remove those.
55b5162 Fix pthread_join emulation on win32 and BeOS Doesn't actually affect x264, but it's more correct.
0059dcf Fix typo in r2222 Slightly wrong numbers in level table.
28ee1f4 configure: fix gpac detection with -Wp,-D_FORTIFY_SOURCE=2
67a69c0 Solaris: use sysconf to get processor count Solaris responds correctly to the same value as Cygwin, so let's use that.
6e68ab7 lavf input: allocate AVFrame correctly Allocate AVFrames correctly with avcodec_alloc_frame(). This caused crashes with newer libavcodecs that try to free frame extradata.
a632fe1 Fix crash when using libx264.dll compiled with ICL for X86_64
1cffe9f Fix possible issues with out-of-spec QP values Fixes a possible regression in r2228.
349b9bd Attempt to optimize PPS pic_init_qp in 2-pass mode Small compression improvement; up to ~0.5% in extreme cases. Helps more with small slice sizes (tiny resolutions or slice-max-size). Note that this changes the 2-pass stats file format.
8437d0d Improve slice header QP selection Use the first macroblock of each slice instead of the last of the previous. Lets us pick a reasonable initial QP for the first slice too. Slightly improved compression.
d2d8364 Update level dpb size calculation to match newer H.264 spec Doesn't actually change encoding behavior, but makes it more correct. Warning messages should now be accurate at higher bit depths and non-4:2:0. Technically, since it redefines x264_level_t, this is an API version increment.
28ddb0d Add support for the ffmpeg/vapoursynth high bit depth y4m extensions
64cbe75 x86inc: Rename 3dnow2 to 3dnowext The name "3dnowext" is more common than "3dnow2". Doesn't affect x264.
f418867 x86inc: only define program_name if the macro is unset. This allows overriding the value from outside the file. This can be useful if x86inc.asm is used outside of x264.
f6a8615 Disable ARM NEON MRC CPU test for Apple devices The Apple A6 CPU doesn't support performance counters, so this test caused a crash.
6889f2c Fix crash with no-scenecut + mbtree
4dbfcd4 Fix reconfiguring to crf=0 Lossless mode can't currently be enabled mid-stream.
2ec8c64 Fix ALIGNED_ARRAY_EMU macros on ICL ICL's preprocessor doesn't handle it correctly. This fix is similar to libav's fix in 0db2d9.
2f154ac Fix use of deprecated av_close_input_file call
9fc0065 Fix pkg-config for dynamic vs static linking
b22f22f Set libm in the configure script if the OS has libm Prerequisite for another configure patch after this. Idea copied from libpthread.
198a7ea Enhance mb_info: add mb_info_update This feature lets the callee know which decoded macroblocks have changed.
f6e9002 Fix mb_info_free with sliced threads x264 would free mb_info before it was completely done using it.
de725e9 Enhance nalu_process Add the input frame opaque pointer to the arguments. This makes it easier to use with multiple simultaneous x264 encodes.
174cfac Improve mb_info constant mb optimization Allow fast skipping even if the pskip MV isn't zero.
f57e707 Export the average effective CRF of each frame Useful to judge the resulting quality of a frame when VBV is enabled.
d7fd6cc Remove special-casing for OpenBSD pthread handling Previously it was policy to use -pthread, but OpenBSD now recommends -lpthread. its been libpthread anyway and policy has changed to stop using -pthread.
8f76448 x86inc: automatically insert vzeroupper for YMM functions Backported from libav.
68dfb7b Free user supplied data when deleting a frame This eliminates a memory leak when calling x264_encoder_close.
d9d2288 Revert r2204 People don't seem to like this so I'm just going to get rid of it.
5f615f7 Faster predictor checking with subme<3 Fix a typo that made an early-skip less effective. Avoid a relatively unpredictable branch. Slightly changed output due to the typo-fix. ~50 cycles faster on Core i7.
5af86be Try 8x8 transform analysis even when sub8x8 partitions are present Turn off the sub8x8 partitions, try it, and turn them back on if it didn't help. Small compression improvement with p4x4 on (~0.1-0.5%). Also update related comments.
913485d Support changing resolutions between passes with macroblock-tree Implement a basic separable bilinear filter to rescale the quantizer offsets. Structure inspired by swscale, but floating-point instead of fixed-point. Not as optimized as it could be, but it's quite fast already.
8b535d9 Print elapsed time in encoding progress indicator
11e32c5 Cap ratecontrol predictor parameters Limits VBV mispredictions after long periods of relatively constant video.
e21e9c9 x86inc: import patches from libav Allow manual invocation of WIN64_SPILL_XMM even under INIT_MMX SSE version of mova is movaps rather than movdqa. YMM version of movnta. Add mp size for named arguments. Fix DEFINE_ARGS when used outside of a cglobal. Define a few more cpuflags. 3-argument wrappers for a few more instructions.
37be552 Fix crash with --fps 0 Fix some integer overflows and check input parameters better. Also fix incorrect type specifiers for demuxer info printing.
999b753 Threaded lookahead
ecfbf9d Add support for RGB formats in bit-depth conversion filter
1c97f35 Fix some bugs in mb_info code
69a0443 Add mb_info API for signalling constant macroblocks Some use-cases of x264 involve encoding video with large constant areas of the frame. Sometimes, the caller knows which areas these are, and can tell x264. This API lets the caller do this and adds internal tracking of modifications to macroblocks to avoid problems. This is really only suitable without B-frames. An example use-case would be using x264 for VNC.
df6252c Faster chroma weight cost calculation
cce88eb Add Level 5.2 support
ee30c84 Eradicate all mention of Extended Profile x264 never supported it and never will because nobody uses it.
8ca49cc Fix disabling of mbtree when using 2pass encoding and zones
3691332 configure: force select -mXX gcc option for i386/x86-64 Makes multilib compilation more convenient.
e1ccbf9 Update config.guess and config.sub Adds support for a bunch of targets, including: aarch64 (armv8) arm-linux-androideabi
f876197 configure: correct use of RC variable and add --extra-rcflags
35cf912 ICL/MSVS: Fix shared library generation and usage MSVS requires exported variables to be declared with the DATA keyword, and requires that imported variables be declared with dllimport. This does not fix x264 cli being unable to use a shared library built by ICL however.
259a6e5 Fix intra-refresh + hrd
e0351cd Fix frame input colorspace check
7392c8c Fix comment in deblock.c The code does, in fact, handle CAVLC+8x8dct correctly already.
6979713 Fix sliced-threads ratecontrol bug Was using qp instead of qscale; could cause NANs (not to mention less accurate results).
5c85e0a Fix clobbering of mutex/cvs Regression in r2183. Bizarrely seemed to work on many platforms, but crashed on win64 and may have been slower. Only affected sliced threads during encoding, but could cause crashes on x264 encoder close even without sliced threads.
c522ad1 Sliced-threads: do hpel and deblock after returning Lowers encoding latency around 14% in sliced threads mode with preset superfast. Additionally, even if there is no waiting time between frames, this improves parallelism, because hpel+deblock are done during the (singlethreaded) lookahead. For ease of debugging, dump-yuv forces all of the threads to wait and finish instead of setting b_full_recon.
6a27a48 Add full-recon API option Fully reconstruct frames even without dump-yuv.
e856755 x86inc: switch to amdnops Recent AMD CPUs' instruction decoders choke horribly on extremely long nops (i.e. with 4 prefixes). Won't affect much, since we don't use ALIGN much.
5a242c5 BMI1 decimate functions Intel was nice enough to make tzcnt equal to "rep bsf", which is backwards-compatible. This means we don't actually have to add new functions to make it work.
ac31c59 Minor asm changes
83561e5 Add row-reencoding support to VBV for improved accuracy Extremely accurate, possibly 100% so (I can't get it to fail even with difficult VBVs). Does not yet support rows split on slice boundaries (occurs often with slice-max-size/mbs). Still inaccurate with sliced threads, but better than before.
5a69f8e Abstract bitstream backup/restore functions Required for row re-encoding.
037d123 Add an small per-MB cost penalty for lowres Helps avoid VBV predictors going nuts with very low-cost MBs. One particular case this fixes is zero-cost MBs: adaptive quantization decreases the QP a lot, but (before this patch), no cost penalty gets factored in for this, because anything times zero is zero.
de5a0ad Remove explicit run calculation from coeff_level_run Not necessary with the CAVLC lookup table for zero run codes.
9f1ac3b Export PSNR/SSIM in x264 API
7e85ec0 x86inc: support yasm -f win64 Not necessary for x264, as -m amd64 already does the right thing, but used by external users of x86inc.
02c3d5e Fix incorrect zero-extension assumptions in x86_64 asm Some x264 asm assumed that the high 32 bits of registers containing "int" values would be zero. This is almost always the case, and it seems to work with gcc, but it is *not* guaranteed by the ABI. As a result, it breaks with some other compilers, like Clang, that take advantage of this in optimizations. Accordingly, fix all x86 code by using intptr_t instead of int or using movsxd where neccessary. Also add checkasm hack to detect when assembly functions incorrectly assumes that 32-bit integers are zero-extended to 64-bit.
01f7a33 Fix possible alignment crash when linking from MSVC x264_cavlc_init needs to be stack-aligned now.
b17c247 Fix rare overflow in 10-bit intra_satd_x3_16x16 asm
1446fe7 ICL: fix out of tree building and resource file usage on Windows
d3efb00 Add error handling for out-of-tree build
ec41b19 Fix RGB colorspace input BGR/BGRA input was correct.
39a4c6f Fix interlaced + extremal slice-max-size Broke if the first macroblock in the slice exceeded the set slice-max-size.
3f72c99 Fix regression in r2141 Broke register preservation in x264_cpu_cpuid and x264_cpu_xgetbv. Did not cause any problems.
da19765 TBM, AVX2, FMA3, BMI1, and BMI2 CPU detection support TBM and BMI1 are supported by Trinity/Piledriver. The others (and BMI1) will probably appear in Intel's upcoming Haswell. Also update x86inc with AVX2 stuff.
efef200 x86inc: add TAIL_CALL macro to abstract a common asm idiom
a7e6e17 Minor asm optimizations/cleanup
56ba096 Clean up and optimize weightp, plus enable SSSE3 weight on SB/BDZ Also remove unused AVX cruft.
961a278 XOP frame_init_lowres Covers both 8-bit and 16-bit, ~5-10% faster on Bulldozer.
c580999 XOP 8x8 zigzags Field: 35(mmx) ->16(xop) cycles Frame: 32(ssse3)->20(xop) cycles
14dc11f AVX 32-bit hpel_filter_h Faster on Sandy Bridge. Also add details on unsuccessful optimizations in these functions.
2fcd044 x86inc: add high halfword register support Might be useful in a few cases.
5c4b848 Change %ifdef directives to %if directives in *.asm files This allows combining multiple conditionals in a single statement.
1b558de Use TV range algorithm for bit-depth conversions Such sources are more common, so better to be correct for the common case. This also produces less error for the case of full range than the previous algorithm produced for the case of TV range.
83c371d Bump dates to 2012
a2925c5 Add Windows resource file Displays version info in Windows Explorer.
98ade83 Fix win32 pthread_cond_signal Isn't used by x264 currently, so didn't cause a problem. Fix backported from libav.
a3f4407 ARM: align asm functions to 4 bytes. Some linkers apparently fail to correctly align ARM functions when mixing with Thumb code.
d3a39c9 Fix normalization of colorspace when input is packed YUV 4:2:2
236763e Force keyint-min 1 with Blu-ray Fixes an issue with referencing across I-frames that's prohibited in Blu-ray for some godforsaken reason.
8a1189a Fix crash in --demuxer y4m with unsupported colorspace
1ab0877 Fix overread/possible crash with intra refresh + VBV
bcd41db Fix trellis 2 + subme >= 8 Trellis didn't return a boolean value as it was supposed to. Regression in r2143-5.
748fe16 CABAC trellis opts part 4: x86_64 asm Another 20% faster. 18k->12k codesize.
cfdb36e CABAC trellis opts part 3: make some arrays non-static
65bd12a CABAC trellis opts part 2: C optimizations
e176619 CABAC trellis opts part 1: minor change in output Due to different tie-break order.
4e87f36 x86inc improvements for 64-bit
84a06e6 High bit depth SSE2/AVX add8x8_idct8 and add16x16_idct8 From Google Code-In.
c605e31 MMX/SSE2/AVX predict_8x16_p, high bit depth fdct8 From Google Code-In.
6b06f6d XOP 8-bit fDCT Use integer MAC for one of the SUMSUB passes.  About a dozen cycles faster for 16x16.
c4b54c8 High bit depth intra_sad_x3_4x4 From Google Code-In.
c032fba Use a large LUT for CAVLC zero-run bit codes Helps the most with trellis and RD, but also helps with bitstream writing. Seems at worst neutral even in the extreme case of a CPU with small L2 cache (e.g. ARM Cortex A8).
ebb1429 High bit depth intra_sad_x3_8x8, intra_satd_x3_4x4/8x8c/16x16 Also add an ACCUM macro to handle accumulator-induced add-or-swap more concisely.
6d921c5 MMX 10-bit predict_8x8c_h and predict_8x16c_h From Google Code-In.
47cdaa9 Some MBAFF x86 assembly functions. deblock_chroma_420_mbaff, plus 422/422_intra_mbaff implemented using existing functions. From Google Code-In.
027b05e More ARM NEON assembly functions predict_8x8_v, predict_4x4_dc_top, predict_8x8_ddl, predict_8x8_ddr, predict_8x8_vl, predict_8x8_vr, predict_8x8_hd, predict_8x8_hu. From Google Code-In.
658a358 More 4:2:2 asm functions High bit depth version of deblock_h_chroma_422. Regular and high bit depth versions of deblock_h_chroma_intra_422. High bit depth pixel_vsad. SSE2 high bit depth and MMX 8-bit predict_8x8_vl. Our first GCI patch this year!
978abe0 SSE2 and SSSE3 versions of sub8x16_dct_dc Also slightly faster sub8x8_dct_dc
61a78a1 Resize filter updates Use AVPixFmtDescriptors to pick the most compatible x264 csp for any pixel format. Fix deprecated use of av_set_int. Now requires libavutil >= 51.19.0
bc6c98c Add out-of-tree build support
f33c8cb Limit SSIM to 100db Avoids floating point error for infinite SSIM (lossless).
c0d6988 Fix wrong conditional inclusion of inttypes.h inttypes.h is required by encoder/ratecontrol.c for SCNxxx macros, and HAVE_STDINT_H does not imply having inttypes.h. stdint.h is a subset of inttypes.h, but this isn't enough for x264. This change fixes building x264 with Android's toolchain.
b081d17 Fix crash with sliced threads and input height <= 112
64da5f9 Fix loading custom 8x8 chroma quant matrices in 4:4:4
4c08e42 Fix PCM cost overflow
489a9b2 Fix overflow in 8-bit x86 vsad asm function
c291a9d Fix crash in --fullhelp when compiled against recent ffmpeg Don't assume all pixel formats have a description.
0c7dab9 Fix regression in r2118 Broke trellis with i16x16 macroblocks.
0637cd6 Modify MBAFF chroma deblock functions to handle U/V at the same time Allows for more convenient asm implementations.
67f1fdc CABAC trellis optimizations: use SIMD quant Significant speed increase, minor change in output due to rounding.
e047b3c YUV range detection and support for x264CLI Two new options: --input-range and --range. --input-range forces the range of the input in case of misdetection; auto by default. -- range sets the range of the output; x264cli will convert if necessary, TV by default. --fullrange is now removed as a CLI option (but the libx264 API is unchanged).
00df989 Pass through user data
04a0aee Remove unpredictable branch in CABAC dqp
4185ee8 x86inc: AVX symmetry optimization 3-arg AVX ops with a memory arg can only have it in src2, whereas SSE emulation of 3-arg prefers to have it in src1 (i.e. the move). So, if the op is symmetric and the wrong one is memory, swap them. Eliminates redundant moves in some cases when using 3-operand without AVX with memory arguments. Also fix movss and movsd in some cases, and flag shufps correctly as float.
cc129ad checkasm: shut up gcc warnings, fix some naming of functions in results
f0ccc98 checkasm: fix build on ARM Because of how ALIGNED_ARRAY_16 is defined on ARM, array initialisers cannot be used here.  Use memset() instead.
d8d8e75 Improve makefile rules Remove the need for "make clean" after most reconfigures.
e6d33a9 Mark some local functions as static, cosmetics
e0c11dc Fix crash if timecode file opening fails
a14db08 Configure: force PIC for shared build on PARISC and MIPS
6a0bd42 Improve yasm version check Previous check allowed certain earlier versions that weren't fully compatible.
07efeb4 Add fenc prefetching to adaptive quant Many fewer cache misses, faster adaptive quant.
81a9984 Split prefetch_fenc between colorspaces Add 4:2:2 version.
9f872e1 Some more 4:2:2 x86 asm coeff_last8, coeff_level_run8, var2_8x16, predict_8x16c_dc, satd_4x16, intra_mbcmp_8x16c_x3, deblock_h_chroma_422
f52aa86 Remove obsolete versions of intra_mbcmp_x3 intra_mbcmp_x3 is unnecessary if x9 exists (SSSE3 and onwards).
2f0384d SSSE3/SSE4/AVX 9-way fully merged i8x8 analysis (sa8d_x9) x86_64 only for now, due to register requirements (like sa8d_x3).
46d1f3a SSSE3/SSE4/AVX 9-way fully merged i8x8 analysis (sad_x9) ~3 times faster than current analysis, plus (like intra_sad_x9_4x4) analyzes all modes without shortcuts.
077d453 Merge i4x4 prediction with intra_mbcmp_x9_4x4 Avoids a redundant prediction after analysis.
55a9d38 Inline i4x4/i8x8 encode into intra analysis Larger code size, but faster.
afd9bc2 Initial XOP and FMA4 support on AMD Bulldozer ~10% faster Hadamard functions (SATD/SA8D/hadamard_ac) plus other improvements.
8cf5049 ARM: update NEON chroma deblock functions to NV12 pixel format
f7e640a Add /usr/lib/{64/}values-xpg6.o to $LDFLAGS on Solaris This is required for POSIX.1-2001 compliance.
a0ce295 Fix linker test for -Bsymbolic The Solaris linker only accepts -Bsymbolic for objects compiled in dynamic mode (i.e. shared objects), so pass -shared to gcc. Additionally, for x86_32 unresolved textrels cause a linker error so mark the .text section as 'impure'.
9aa0f65 Add $SOFLAGS to exported SOFLAGS make variable
d32d091 Allow setting a chroma format at compile time Gives a slight speed increase and significant binary size reduction when only one chroma format is needed.
6eac7c3 Improve profile help List high422/high444 profiles, and don't show non-high-bit-depth profiles in high bit depth builds.
896fff4 Fix infinite loop parsing TDecimate Mode 3 timecode v1 files
2697313 Fix some integer overflows/signedness errors found by IOC The only real bug here is in slicetype.c, which may or may not affect real encodes.
d259483 Fix pixel_var2 with 4:2:2 encoding Might have caused artifacts or suboptimal chroma compression.
1fe87df Fix chroma intra analysis in 4:4:4 lossless mode
c4644d8 Fix use of uninitialized MVs in sub8x8 RDO
f8825a4 Fix detection of Alpha CPU arch on alphaev67
8a62835 Optimize x86 asm for Intel macro-op fusion That is, place all loop counter tests right before their conditional jumps.
f7cd45b CAVLC: clean up and restructure Somewhat faster CAVLC and RD bit-counting.
4a89c20 CABAC: clean up and restructure Somewhat faster CABAC and RD bit-counting.
62fc472 Some initial 4:2:2 x86 asm
bb9216d 4:2:2 encoding support
b7fa2ff SSSE3/SSE4 9-way fully merged i4x4 analysis (sad/satd_x9)
b1bb23c Faster intra_mbcmp_x3 for versions without dedicated asm Select asm subroutines more intelligently in the wrapper functions.
265cfae Optimize x86 intra_predict_4x4 and 8x8
fe5729d Use realistic alignment for intra pred benchmarks in checkasm
926a03a Fix frame packing SEI with --frame-packing 0 According to the spec, when frame_packing_arrangement_type is equal to 0, quincunx_sampling_flag shall be equal to 1.
03a542a Fix install/uninstall shared libs if SYS is WINDOWS/CYGWIN
2641b9e Add Hurd support to configure
dabc19e Optimize x86 intra_satd_x3_* ~7% faster.
419f1bf Optimize x86 intra_sa8d_x3_8x8 ~40% faster. Also some other minor asm cosmetics.
b581755 Scale interlaced refs/mvs for mvr predictors Slightly improves compression and fixes a Valgrind error.
0c2ddc1 Optimize predict_8x8_filter and incidentally remove a valgrind false-positive
afeb240 Don't override flat SSE2 dequant functions with non-flat AVX ones Slightly faster.
d89a7d5 Shut up some valgrind false-positives
6881f24 Avoid some unnecessary allocations with B-frames/CABAC off
ddf82cd Fix typo in p8x8 RD analysis Passed wrong idx to trellis.
14de378 Fix invalid memory accesses in x86 lowres_init when width <= 16
8332643 Fix intermediate conversion for YUVJ* pixfmts with 4:4:4 encoding
86c5510 Fix pic_out returned by x264_encoder_encode with 4:4:4
b232a9d Fix zeroing of mvr predictors in bskip blocks
fd3fb34 Fix: chroma planes for weightp analysis were not initted if U early-terminates and V doesn't.
ada894d Expand borders before chroma weightp analysis Prevents mc from using uninitialized source pixels.
b21640e Another 4:4:4 chroma weightp bug fix
317d883 Fix typo in help
0ba8a9c Improve support for varying resolution between passes Should give much better quality, but still doesn't support MB-tree yet. Also check for the same interlaced options between passes. Various minor ratecontrol cosmetics.
fd681ea asm cosmetics: base-4 constants for shuffles
a718aad Enable some existing asm functions that were missing function pointers pixel_ads1_avx, predict_8x8_hd_avxx High bit depth mc_copy_w8_sse2, denoise_dct_avx, prefetch_fenc/ref, and several pixel*sse4.
444dae1 Remove some unused, broken, and/or useless functions Unused frame_sort. Unused x86_64 dequant_4x4dc_mmx2, predict_8x8_vr_mmx2. Unused and broken high_depth integral_init*h_sse4, optimize_chroma_*, dequant_flat_*, sub8x8_dct_dc_*, zigzag_sub_*. Useless high_depth dequant_sse4, dequant_dc_sse4.
43f62a2 asm cosmetics: merge all the variants of ABS macros
4b429c6 asm cosmetics part 2 These changes were split out of the cpuflags commit because they change the output executable.
c0cda6a asm cosmetics: INIT_MMX/XMM/YMM now support a cpuflags argument
12f12a2 Import x86inc.asm patches from libav
b787351 Cosmetics: s/mmxext/mmx2/
59cb2eb Fix two bugs in 4:4:4 chroma weightp analysis Caused slightly worse compression.
fafa6a2 Fix "--asm avx" Previously required "--asm sse2fast,fastshuffle,sse4.2,avx".
47f2263 Re-add support for glibc <2.6, which doesn't have CPU_COUNT
9949438 Avoid using deprecated libavformat functions Replace av_find_stream_info with avformat_find_stream_info. Now requires libavformat 53.3.0 or newer.
392e762 Use assembly versions of some deblocking functions in MBAFF
1c7dbec Move X264_VERSION / X264_POINTVER from config.h to x264_config.h This makes them available to external programs as part of the public API.
178455c Fix padding bug in x264_expand_border_mbpair
e927cc3 Timecode parsing: Add missing initialization Fix crash when failed to parse timecode file before malloc pts. Fix detection of user timebase considered to be exceeding H.264 maximum.
75eb1cd Fix crash with high bitdepth 4:2:0 input
45b6e45 x86 asm cosmetics Use FDEC_STRIDEB where appropriate.
c28471e Fix a bug in lossless sub-8x8 RD Caused crashes in rare cases with lossless encoding.  Regression in 4:4:4.
f8ebd4a Improved p8x4/4x8 search decision Use the same thresholding as for p16x8/8x16. Does p8x4/4x8 search more often, for a small compression improvement.
9977b59 Add --subme 11, which disables all early terminations in analysis Necessary for a future trellis mode decision/motion estimation patch. Also add the slowest presets to the regression test.
207ca3e Some trivial changes to RD thresholds The output-changing portion of the next patch.
882badf Allow setting a wider range of chroma QP offsets This allows use of the full range of chroma QP offsets, even in combination with the automatic psy-based adjustments.
6fa146c Optimize macroblock_deblock_strength, add more early terminations
ded542e Function-pointerify MBAFF deblocking functions
68be4f2 Clean up MBAFF deblocking code
d4e7faa Optimize frame_deblock_row
2bd11d1 Shrink two arrays
c3445f6 Add support for the new (4:4:4) colorspaces to x264_picture_alloc
75c6080 Various cosmetics
419df03 Improve configure help
88f6bbd Use $optarg for some configure options
44c8817 Linux x264_cpu_num_processors(): use glibc macros The cpu_set_t structure is considered opaque. Also handle sched_getaffinity() error case if "cpusetsize is smaller than the size of the affinity mask used by the kernel."
7fcf1cf Fix spurious "stream properties changed" with --seek option on some inputs
3765dfd Fix use of deprecated libavcodec functions Replace avcodec_open with avcodec_open2. Now requires libavcodec 53.6.0 or newer.
f23a615 Fix nalu_process callback with HRD
4bc22b0 Fix incorrect chroma swap for some input pixfmts
9cc407d Fix resize filter crash with YUVJ* input pixfmt
ffc4154 RGB encoding support Much less efficient than YUV444, but easy to support using the YUV444 framework.
c07df2f 4:4:4 encoding support
2809cb6 Properly weight slice header lambda in chroma weightp analysis
e976f64 Better x86 high bit depth predict_8x8c_p Avoid the need to check for corner cases by reordering arithmetic. Also make a minor optimization to high bit depth predict_16x16_p.
eaf9589 Eliminate extra layer of indirection for sps/pps references Also remove poc type 1 support (it didn't work anyways) to reduce sps size.
6fce39a Fix SSIM calculation with sliced threads
2e5620d Avoid possible NaNs in B-frame output stats
c9ba582 ARM: do not override the toolchain default for FPU ABI
3c78047 Fix link errors with libswscale/libavutil as shared libraries
073f081 Fix deprecation in libavformat usage Replace av_open_input_file with avformat_open_input. Now requires libavformat 53.2.0 or newer.
4c552d8 Fix various issues with VBV+threads Eliminate the race condition with interframe row predictors and threads. Recalculate frame_size_estimated at the end of a frame, for improved update_vbv_plan. Some cosmetics.
c726805 Fix MBAFF row VBV ratecontrol Reverts most of r1984 and implements a much simpler solution.
5bae8ae Make ratecontrol_mb less slow
48830bb Resize filter updates Fix use of deprecated sws_getContext. Fix uses of sws_format_name. Fix stream change warning not occurring on the first resolution change. Drop cpu detection, as it is now performed internally by swscale. Update swscale version requirements.
1392798 AVX mbtree_propagate Up to ~20-30% faster than SSE2 on Sandy Bridge.
74b19b0 Use -vsync 0 with ffmpeg regression test
0facc4b Inline emms instructions on x86 if possible
48d2185 Make left_index_table const Should allow for some missed compiler optimizations in macroblock_cache_load.
cb97de7 Make --profile main/baseline force off CQMfile
e2d73a2 Fix VBV bug caused by zero i_row_satd value for first and last row
774555b Fix crash with VBV + forced QP
8ca923e Fix VBV bug with MinCR limit
4e5eaf0 Fix bitstream reallocation with slice-max-size + MBAFF
c1e60b9 Improve build system capabilities Make static lib and CLI optional. Support linking CLI to system libx264. Don't strip by default, to match GNU packaging guidelines.
330e258 Slightly speed up x86 CABAC asm Also make some various cleanups.
160557a Faster pixel_memset ~4x faster. Also inline plane_expand_border for improved constant propagation.
9202f13 Add checkasm tests for memcpy_aligned, memzero_aligned Also make memcpy_aligned support sizes smaller than 64.
9498466 MBAFF: Add regularization to VSAD metric Bias towards the MBAFF decisions made in neighboring mb pairs. ~2% better compression on a random 1080i HDTV source.
1fa5e45 MBAFF: Improve handling of bottom row mod32 padding Force skip on any MBs entirely outside the frame If an mb pair in the bottom row is chosen to be progressive, re-pad the bottom rows progressively.
3c23f73 MBAFF: Add frame/field MB stats
a97285e MBAFF: Template direct spatial
d4ef7d3 MBAFF: Template cache_load and cache_load_neighbours
1a4bffb MBAFF: Make interlaced support a compile time option
8bea09d MBAFF: Don't call zigzag_init for every mb
20d9cb8 MBAFF: Modify ratecontrol to update every two rows
87b054d MBAFF: Add support for slice-max-size
3f31da3 MBAFF: Add support for slice-max-mbs
0da9676 MBAFF: Adaptive quantization
115225d MBAFF: Enable adaptive MBAFF with VSAD decision
6ec0022 MBAFF: Create a VSAD DSP function
896014c MBAFF: Direct spatial
d26878b MBAFF: Direct temporal
f1715be MBAFF: Calculate bipred POCs
7da52fa MBAFF: Use both left macroblocks for ref_idx calculation
8c281d9 MBAFF: First edge deblocking
0a6f865 MBAFF: Implement left edge deblocking functions
dce1b21 MBAFF: Add extra data to the deblock strength structure
ed158a9 MBAFF: Deblocking support
abc1930 MBAFF: Move common code from deblock functions
4fd4559 MBAFF: Add mbaff deblock strength calculation
e1a96db MBAFF: Update x264_cabac_mvd_sum_mmxext to work with larger MVDs.
1f07f32 MBAFF: Clamp MVDs to 66 instead of 33
e2d4d91 MBAFF: CABAC encoding of skips
cf58ce0 MBAFF: Track what interlace decision the decoder is using
7b7632b MBAFF: Fix mvy bounds
3e6c7de MBAFF: Copy deblocked pixels to other plane
31ae5dd MBAFF: Disallow skip where predicted interlace flag would be wrong
44f28de MBAFF: Inter support
fbd06b2 MBAFF: Neighbour calculation
353802b MBAFF: Store references to the two left macroblocks
2614f1e MBAFF: Store left references in a table
e8f5970 MBAFF: Disable adaptive MBAFF when subme 0 is used
7af7889 MBAFF: Save interlace decision for all macroblocks
06f5fa5 Fix bug in NAL buffer resizing Also properly terminate if NAL buffer resizing fails.
c132d7b Fix zone bitrate multiplier and QP forcing in 2-pass mode Previously zone changes could affect frames outside of the given frame range (around 20 neighboring frames).
8cb10c1 Use float constants in qp rounding Slight performance improvement and fixes slight difference in output between gcc 3.4 and 4.5.
9a40ee6 Fix bugs with ratecontrol reconfiguration Initialization of some parameters was missed or wasn't synchronized with other threads
5ac5779 More validation of input parameters This fixes a crash with --me umh and insane values of --me-range.
a1ac972 Fix bug in --b-adapt 2 with --rc-lookahead >248 Problem caused by buffer overflow in strcpy.
d18995e Check for invalid pixfmts in lavf demuxer
b56cb86 Fix regression in r1944 Broke sliced-threads + slice-max-size/slice-max-mbs.
b5a8ad7 Precalculate CABAC initialization contexts Slightly faster encoding with lots of slices.
896a1fc Avoid redundant log2f calls in mv cost initialization Saves around 100 million clock cycles on x264 init.
4b08350 CABAC residual: cleanup and optimizations Also kill all Hungarian notation while we're at it. Trim an instruction off cabac_encode_bypass.
bd00852 Validate input parameters more carefully Get rid of redundant warnings upon encoder_reconfig calls. Also avoid encoder_reconfig turning off psy_rd/trellis.
6e33b51 Fix VFR MB-tree to work as intended Should improve quality with FPSs much larger or smaller than 25.
e41a777 Support more recent GPAC versions
02df696 Fix decoder desync with positive --chroma-qp-offset and zones
f5db2e4 Use AVMEDIA_TYPE_VIDEO instead of deprecated CODEC_TYPE_VIDEO
b250180 Force pic-struct for Blu-ray compat + fake-interlaced
f87bc04 Fix open-gop with no-psy
aa21558 Fix build with disabled asm
7a9e08d Improve Blu-ray compliance Use dec_ref_pic_marking SEIs to repeat B-ref referencing information. Don't allow B-frames to reference frames outside their minigop.
f9e7f53 Consolidate Blu-ray hacks into --bluray-compat This option is now required for Blu-ray compatibility. --open-gop bluray is now gone (using bluray-compat and open-gop implies a Blu-ray compatible open-gop). This option doesn't automatically enforce every aspect of Blu-ray compatibility (e.g. resolution, framerate, level, etc).
f422ec9 Add SSE support to rectangle.h for 16-byte stores Uses GCC vector intrinsics; may be suboptimal on particularly old GCC versions.
bdf23fe Do not force Intel Compiler to target pre-mmx architecture for x86 Caused a speed penalty against gcc equivalents.
0ef8a32 Warn users when using --(psnr|ssim) without --tune (psnr|ssim) This is a counter to the proliferation of incredibly stupid psnr/ssim "benchmarks" of x264 in which the benchmarker conveniently "forgot" --tune psnr/ssim, crippling x264 in the test.
e577efb Remove redundant mbcmp calls in weightp analysis
529bbef Use integer math for filler size calculation
89d92e5 Disable progress for FFMS input with --no-progress
86d1963 Fix bug in intra-refresh ratecontrol Row SATDs were slightly incorrect.
62dfb25 Cosmetics: fix some signedness issues found by -Wsign-compare
e9e74e9 Minor fixes Fix a comment typo. Align an array properly. Make x264_scan8 unsigned: saves a bunch of movsxd instructions on x86_64.
4be6702 Improve C99 support checks in configure Fixes configuration with Intel compiler in some cases.
08d04a4 Eliminate the possibility of CAVLC level code overflow Instead, if it happens, just re-encode the MB at higher QPs until it fits.
10d56be x86 SIMD versions of optimize_chroma_dc SSE2/SSSE3/SSE4/AVX implementations. About 3x faster.
13afdfa Add Altivec version of mc_weight
35b6462 Add Altivec versions of mbcmp_x functions These aren't merged versions, they just call the existing asm code. A merged implementation would of course be faster.
372ba94 Recognize cygwin as itself when not targeting mingw Also fix broken thread detection on cygwin.
9b7b3c7 Patch Intel's CPU dispatcher Reduces Intel Compiler's bias against non-Intel CPUs.
b41d182 Intel Compiler support
c7e352c Cosmetics: make struct definition braces consistent
d5ba9ed Fix restoring of console title on Windows with ffms indexing
17ab74b Fix possible buffer overflow in mp4 muxer
ee0245f Remove inline asm syntax not supported by LLVM's assembler Doesn't affect compiled output outside of LLVM.
5fd3dce Fix 10L in r1912 SSSE3 code got used in MMX/SSE2 and vice versa (in hpel).
36385ab Add AVX functions where 3+ arg commands are useful
49fd289 Frame-packing 3D: don't place scenecuts on right views Caused problems for some players.
d00e31a Improve slice-max-size handling of escape bytes More accurate but a bit slower.  Helps deal with a few obnoxious corner cases where the current algorithm failed.
129d8ca Use bs_write1 wherever possible in header writing
02b0f74 Remove obsolete mvcost init code
429af21 Fix memory leak on encoder close if not all frames are flushed
0926279 Fix signedness bug in CPU detection Luckily didn't affect anything due to C signedness rules.
4835f7c Fix dumb bug caused by stray semicolon Caused noise reduction to run incorrectly in part of RD, but probably had no effect.
1f69cb3 Fix malloc of zero size Caused x264 to fail with some settings on systems that return a NULL pointer for malloc(0), like Solaris.
9a705ef Fix crash in mp4 muxer after failure of x264_encoder_open
c8bf13c Fix shadowed variable warning in ffms.c
e5926dc Fix some Intel compiler warnings
60ef1f8 Fix 10L in r1886 Aspect ratio can't be set before SPS is initted.
e6738f2 Improve update interval of x264cli progress information Now updates every 0.25s instead of every N frames.
e6f00af Windows: restore previous console title after encoding MSDN docs claim that SetConsoleTitle's effect is reverted when the process terminates, but this doesn't always work properly. Accordingly, manually revert the console title at the end of encoding.
16868ec Allow WEIGHTP_FAKE in interlaced mode It seems to work fine as-is even though real weightp doesn't support interlacing yet.
eb16899 Output pic struct information in libx264 API
0494e8e Enable FastShuffle on Penryn and Nehalem CPUs without SSE4
53b229c Minor cosmetics in configure
5681836 Various --help cosmetics
08141fe x86inc.asm: error on duplicate functions Compile error if there's two functions of the same name, instead of silently renaming one of them.
dce07ee Bump yasm version requirement to handle AVX
1dae625 Fix rare corruption with subme=10 Also fix dumb bug in VBV emergency AQ scaling.
aaa7525 Fix overflow in ARM NEON i16x16 planar pred Patch backported from ffmpeg.
ad58211 Fix incorrect frame duration for VFR input for some frames
7231bdc 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.
6dd825d Fix reconfiguration of parameters that modify the SPS For now, this is only aspect ratio.
1e45ed5 Fix possible crash on Phenom with lookahead thread disabled Misalign mask needs to be set for the main thread on entry, too.
7313bb5 Hotfix for some bugs in VBV emergency
9e0b9b7 Fix warnings in cpu.c
f6d0c95 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.
cd53fa4 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.
f74136e 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.
065f696 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.
bb4182d Add --input-fmt option to lavf input Conforms to ffmpeg's `-f` option. Use this when lavf fails to guess the input format.
f04f004 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.
1a321d7 Add some missing values to the non-extended SAR table
78b4fc4 Bump dates to 2011
62b661a More correctly write frame-packing SEI flags
172018c 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).
515d9fb Fix reconfiguration of b_tff Attempting to change field order during encoding could cause slight corruption.
b8e1d1b 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.
4c92c10 Remove high bit depth mmx quant It was using pmuludq which is sse2, and the function isn't really possible without pmuludq.
ef2a080 Fix cacheline check in avg2 w20 cache32 Didn't result in incorrect output, only slightly decreased speed on a few obsolete systems.
b4865a6 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.
22bfd31 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).
950de54 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.
29fc527 Cosmetics: fref0/1 -> fref[2] and i_ref0/1 -> i_ref[2] A much-needed refactoring, plus makes the next patch easier.
f9bbe48 Check an extra offset during weightp analysis Up to 0.1 - 0.6 dB gain on some fade-ins with --weightp 1, less with --weightp 2.
8c160db SSE2 high bit depth SSIM functions
aab8418 SSE2 high bit depth intra_predict_(8x8c|16x16)_p
bd54872 MMX high bit depth coeff_last4
658b6ae SSE2 high bit depth zigzag_interleave_cavlc
2b8f973 MMX/SSE2/SSSE3 high bit depth frame_init_lowres functions
1da49a2 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.
9247e58 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.
cf0c82a MMX/SSE2 high bit depth 8x8c intra predict functions
8d96f7d MMX version of high bit depth plane_copy And various cosmetics.
8cf764e Faster x86 predict_8x8c_dc, MMX/SSE2 high bit depth versions
e570fc2 SSSE3 high bit depth sad_aligned functions
a715df2 MMX/SSE2 high bit depth interleave functions
5e11ab6 MMX/SSE2 high bit depth avg functions
985a8ec MMX/SSE2 high bit depth deinterleave functions
b519e0f Shut up some incorrect gcc uninitialized variable warnings
103e796 Write --crop-rect and --frame-packing options to x264 SEI
96e54b2 Add missing space to parameter SEI
0f6a8f7 Fix typo in documentation
131aa22 Fix redundant linebreaks in statsfile with weightp
f05aff2 Use cross_prefix for strings in endian test and as test
ee59e69 Fix checkasm test for quant in high bit depth Eliminate some spurious failures.
4a7b7e1 Fix broken YV12 handling in the resize filter
c500639 Fix bug with negative lookahead mb costs in high bit depth
a7ed3c5 Fix overflow in SSIM calculation in 10-bit
cb15f76 Fix some possible overflows in VFR ratecontrol with extreme timebases
21a6034 Fix memory leak in lavf demuxer. Leak only occurred with input files that have more than one video stream.
a4406c1 Fix satd predictors with high bit depth Resulted in odd CRF-mode results with --no-mbtree, as well as suboptimal VBV handling.
147e8eb Fix compile error with high bit depth and disable-asm
b59be2b Really fix gcc win32 misalignment crash gcc's -fno-zero-initialized-in-bss only works if an explicit initializer (e.g. = {0}) is used.
a51816a Support for native Windows threads
b5e2366 MMX/SSE2 high bit depth weight_cache/offset(sub|add) functions
70271f4 SSE2 high bit depth dequant functions
38ff5d3 SSE2 high bit depth zigzag functions
6d9310e MMX/SSE2 versions of high bit depth store_interleave
3ee357a Add frame-packing SEI support for signalling 3D video
78e3bc9 Allow 8x8dct+cavlc+lossless with subme>=6
8ca6222 Add interlaced/no-interlaced case to regression test script
39a5799 Save more memory with weightp in >8-bit
84d7a95 .gitignore more untracked file types
fd8ff33 Work around gcc/ld alignment bug on win32 Fixes problems due to misalignment of static zero arrays (win32 ld can't align .bss properly).
5fbb9d6 Fix high bit depth intra pred functions And re-enable them accordingly.
22af357 Fix weightp analysis with high bit depth
e8ca7be Fix build error in high depth Caused by multiple definitions of x264_add8x8_idct_sse2.
fdcf2ae Hotfix for high bit depth Temporary fix for some unaligned access crashes.
a2e043d Delete x264_config.h on distclean
0a39e00 Tons of high bit depth intra predict asm
3f2f3f9 SSE2 high bit depth 8x8/16x16 idct/idct_dc
64b7648 Create and install x264_config.h This header can be used to determine the bit-depth and license of libx264.
62a2dc0 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.
2b0451f 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.
2a59dfa 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.
e0f5dbe Fix possible overflow in sub4x4_dct in 10-bit builds
c2cc8c3 Fix bug in intra-refresh + threads Intra refresh bar quality increase wasn't correctly applied.
b2a6aa4 Fix file handle leak in libx264 on error
71cf5fd Fix incompatible csp format issue Problem occurred with unknown pixel formats and non mod2 resolutions in the resize filter.
f6482d8 Really fix fittobox resize rounding code
fba116f Fix regression in rev1549 Skip auto timebase denominator generation when generated timebase denominator exceeds UINT32_MAX. Also fix double free.
96c4835 Fix --tcfile-in if timecode v2 file starts from nonzero pts
3534560 SPARC/Solaris build fixes
e89c4cf Fix typo in r1797
04b5966 Add Python regression test script
e440dc0 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).
61d7203 SSE versions of some high-bit-depth DCT functions Our first Google Code-In patch!
6a8ed0f Clean up weightp analysis function
7226b4e Add API function to return max number of delayed frames
9cae442 Copy field order flag in encoder_reconfig
1bcb63e Cosmetics in configure
372f398 Add some more info to `x264 --version`
0425664 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.
2f8ad97 Fix ticks_per_frame check for VFR input
21877a0 Fix configure so that boolean configuration options are 1/0
b38fd04 Only build SPARC VIS asm if high bit-depth is disabled
ee75acd Fix build on SPARC Solaris 10
8eaf8a6 Fix resize filter rounding code
af1a741 Fix regression in chroma weightp Missing cache calls could cause artifacts, encoder/decoder desync.
c764e29 Fix some crashes with high bit depth Not all arrays were sufficiently aligned.
9488de4 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.
2eadb94 Support custom cropping rectangles Supposedly useful for 3D television applications.
fc90061 Convert X264_HIGH_BIT_DEPTH to HIGH_BIT_DEPTH Less verbose.
80174bf 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!
3b81819 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.
faed8d5 x86 asm for high-bit-depth motion compensation ~8x faster qpel MC than C. ~10x faster hpel than C.
38861b9 x86 asm for high-bit-depth quant ~3.1-4.2x faster than C.
82a3dc1 x86 asm for high-bit-depth DCT Only MMX and DCT done so far; iDCT still needs asm as well. ~4.4x faster than C.
2584843 x86 asm for high-bit-depth deblocking ~3.3x faster than C.
c593bcf Use a 16-bit buffer in hpel_filter regardless of bit depth This only works up to and including 10-bit (but we don't support anything higher yet).
a9d7826 Use enums instead of magic numbers in x264_mb_partition_pixel_table
e19e5f0 Improve configure script logging Now prints the test program that failed in addition to error messages.
fb3ef61 Fix constrained intra pred mode selection
2824c3a Various high-bit-depth ratecontrol fixes
8c16b4d Fix a crash in --dump-yuv for odd resolutions
c9dad9e Improve flash detection algorithm change in r1765 Now only disables scenecuts only near real end of video, not just prior to forced keyframes.
c3c8efa Update ffms2 support for its latest API break.
2f656aa Modify the x264 header accordingly if --disable-gpl is used
8442a65 Save a bit of memory with weightp + high bit depth
39787c8 Fix bugs in qpfile parsing with omitted QPs
7f0f88b 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.
f9f0035 Fix bug in r1753 Overflow compensation fix broke CRF with --no-mbtree.
601c0e3 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.
d0406d4 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.
666aef8 VFR-aware PSNR/SSIM measurement First step to VFR-aware MB-tree and bit allocation.
e38c7fd 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.
d70087b Make the ffmpeg -vpre error message more descriptive
fe0808b 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.
490bf93 Update benchmarks in doc/threads.txt
75b0181 Make the #if'd out naive ESA actually match the real implementation
6541afc Move mv/ref prefetch code to the correct location Prefetching of top blocks should be done under if(top), not if(left).
17f54d0 Link x264cli explicitly against lavf Fixes some problems with crappy linkers.
6640744 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).
8d7c2d0 Disable overflow compensation in CRF mode Wasn't designed with CRF in mind, and acts really weird with CRF+VBV.
5dfbfc3 Fix stupid bug in B-frame VBV size prediction
d6a1303 Fix regression in checkasm in r1666 Buffer is uint16_t* regardless of whether x264 was compiled with high bit depth or not.
c85ec3e Fix overflows in satd, sa8d and hadamard_ac with high bit depth
a6cab1a 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).
527d196 Fix syntax for some parameterless functions Technically, such functions should be declared with (void), not ().
49e2d55 Fix fps reporting on mingw64 _ftime on mingw64 uses __timeb32 which is broken. Use ftime instead.
7f5771a Fix compilation on PPC with some recent GCCs
1fda37a Fix Altivec SATD with small strides Fixes chroma ME and some of lookahead on PPC.
4785e8e Address remaining cacheline split issues in avg2 Slightly improved performance on core 2. Also fix profiling misattribution of w8/16/20 mmxext cacheline loops.
0a5cc5e Trim a few bytes off some x86 intra pred functions
80d0bd4 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.
7a9d518 Use a larger pic_init_qp with high bit depth Modify pic_init_qs for consistency.
e16c5f2 Update some of the information in doc/
3a18f20 Update header in depth.c
60748ae Remove some old unused stuff in the build tree Regression test (hasn't been updated since svn). Doxy (was never used).
368f174 Various cosmetics Exorcise some CamelCase.
db224e3 Add missing mod4 stack check to sse2_misalign mc_chroma Required for ICC compilation.
c68140d Fix 2pass ratecontrol with --nal-hrd cbr
78c6450 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.
be2a065 Fix filter parsing with --extra-cflags="-DNDEBUG"
4cba08a 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).
b20059a 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
284b314 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.
b6ae390 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.
e87b7ec Various cosmetics
643e57f 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.
4e3bf80 Add missing emms for dump-yuv
3d0d9cd Fix CFR ratecontrol with timebase != 1/fps Fixes VBV + DTS compression, among other things.
5f104e9 Fix DTS/bitrate calculation if the first PTS wasn't zero Fix bitrate calculation with DTS compression.
b02df7b Fix regression in r1716
e757d68 Cosmetics in me.c and frame.c
01e9f8c Add support for arbitrary user SEIs This allows calling applications to insert SEIs that x264 doesn't know about while maintaining HRD/VBV accuracy.
9e443f2 Add full chroma input flag to swscale Improves quality of colorspace conversions involving RGB(A).
fa56d4e 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.
0596dff Update source file headers Update dates, improve file descriptions, make things more consistent. Also add information about commercial licensing.
ae403c4 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.
0974adf Make intra refresh finish one frame faster In some cases, the last frame of intra refresh was redundant. Saves a few bits.
9b87744 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.
416461a Add configure check for mingw64 prefixing This compensates for the inconsistent prefixing seen in different versions of the compiler.
3e7f374 Update some Altivec function prototypes Silences a lot of warnings.
c276662 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.
518dbbc Use smaller values for idr_pic_id Saves a few bits and fixes problems on certain fantastically terrible decoders, such as the Apple iPad.
a67e619 Use POC type 2 for streams with no B-frames Saves a few bits per slice header.
6e85307 Faster cabac_encode_ue_bypass Use CLZ + a lut instead of a loop.
e344d6e Faster nal_escape asm
44ff90e Allow --demuxer forcing with known extensions
7bb60b1 Minor fixes/cosmeticcs in commandling parsing
d55fc72 Fix overflow in stats printing
5978cbc 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.
5b8f407 Don't do deblock-aware RD if deblocking is off
cd21d05 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.
636d85b Add global #define for maximum reference count This should make it easier to play around with reference frame counts that exceed the spec maximum.
c74f9c9 Simplify addressing logic for interlaced-related arrays In progressive mode, just make [0] and [1] point to the same place.
08b1e36 Add missing emms to x264_nal_encode Only matters for applications using the low-latency callback feature.
31e458f 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).
c41b8f0 NV12 version of Altivec chroma MC
26c17a1 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 %).
d0c4173 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.
003a7f2 Fix lavf input with delayed frames
dd363d7 Slightly improve the filtering section of x264 --help
12002b9 Fix debug message typo with DTS compression
a414ccb Try to guess input length for lavf input Allows printing of progress indicator when using lavf input.
13230db 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).
7e1e9bc 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.
7fc564f Add libavcore check in configure
0b36c6d Improve quantizer distribution with sliced-threads+VBV Should help avoid cases of very uneven quantizer choice between slices.
a4cd317 Remove dead code in slicetype.c
3e15334 Fix incorrect duration/framerate/bitrate in flv header
d939ccf 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.
d2cfa96 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.
62997d6 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.
757f5c1 Eradicate all mention of SI/SP-frames
84a051f Fix stack alignment with MB-tree Broke 2-pass with MB-tree when calling from compilers with broken stack alignment (e.g. MSVC).
1a6fd47 Avisynth 2.6 colorspace support Use a customized avisynth_c.h to detect the new planar colorspaces.
87c0f8f 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.
cd8929f Fix stack alignment for adaptive quant Broke calls from compilers with broken stack alignment (e.g. MSVC).
19df41a Fix compilation with shared ffmpeg libs lavf input uses libavutil functions, so it must request flags for libavutil from pkg-config.
6c486d2 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.
2484aa0 Fix regression in r1666 Broke encoding of PCM macroblocks.
d846e88 Fix build with bit_depth > 8 Definition of x264_cli_plane_copy was inconsistent with declaration.
c9b2fcb 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.
d797a1b 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.
04e40ff Eliminate edge cases for MV predictors Saves a few clocks in mv pred.
27e4a3a 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.
c953140 Fix 8x8dct+slices+no sliced threads+cavlc+deblock Deblocking was done slightly incorrectly. Regression in r1612.
d6228ae Fix off-by-one error in slice VBV predictor updates
ce136d6 Fix disabling of progress with --log-level
d058f37 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.
293b47b 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.
f378994 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.
ce052b8 Centralize logging within x264cli x264cli messages will now respect the log level they pertain to. Slightly reduces binary size.
22bf167 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.
4f74306 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.
aa1a843 Simplify pixel_ads
57b2e56 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.
7865fcb 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.
40c8c49 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.
ccb8391 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.
f7ca499 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.
ef0c268 SSE4 and SSSE3 versions of some intra_sad functions Primarily Nehalem-optimized.
88b90d9 Improve HRD accuracy In a staggering display of brain damage, the spec requires all HRD math to be done in infinite precision despite the output being of quite limited precision. Accordingly, convert buffer management to work in units of timescale. These accumulating rounding errors probably didn't cause any real problems, but might in theory cause issues in very picky muxers on extremely long-running streams.
4c27afb Use -fno-tree-vectorize to avoid miscompilation Some versions of gcc have been reported to attempt (and fail) to vectorize a loop in plane_expand_border. This results in a segfault, so to limit the possible effects of gcc's utter incompetence, we're turning off vectorization entirely. It's not like it ever did anything useful to begin with.
69e9d85 Fix SIGPIPEs caused by is_regular_file checks Check to see if input file is a pipe without opening it.
4fa7d53 Fix compilation on ARM w/ Apple ABI
20cbe10 Faster mbtree_propagate asm Replace fp division by multiply with the reciprocal. Only ~12% faster on penryn, but over 80% faster on amd k8. Also make checkasm slightly more tolerant to rounding error.
4d8d930 Convert the OPT_ defines in x264.c to an enum
be94782 Don't allow baseline profile streams with fake-interlaced Indicate use of --fake-interlaced in encoding options SEI.
71502ea Allocate space for null terminator in param_apply_tune
0c7bceb Fix regression in r1501. Could cause slightly incorrect analysis in rare cases, but no serious encoding issues. Also shut up gcc warning about pels_v.
8c69931 Fix crash with --subme 0 + --weightp > 0. Regression in r1535
0cd5d69 Replace some divisions with shifts
02f1bba Warn about shadowed variable declarations Also get rid of a few instances of variable shadowing.
3df2c90 Template load_pic_pointers based on interlaced Significantly speeds up cache_load in the non-interlaced case. Also various other minor optimizations in cache_load and cache_save.
0c94769 Remove double-dereferences for MB width/height data Store it in x264_t instead of going through the SPS.
609f7ab Exempt Win x86_64 from memalign hack The API mandates all mallocs are 16 byte aligned. Remove unused int that stores sizeof malloc in memalign hack.
2e541dd Preprocessing cosmetics Unify input/output defines to HAVE_* format. Define values as 1 to simplify conditionals.
5001505 Take more shortcuts in i4x4/i8x8 analysis Based on the scores of the H and V modes, rule out modes which are unlikely. Small compression loss (0.1-0.5%) and large speed gain (10-30% faster intra analysis). Not enabled in slower encoding modes.
2d2abd8 Display SSIM measurement in db as well
c41f0c0 Make version.sh indicate "M" for local commits too
3c92ef9 Add error message for invalid [de]muxer selection
0d0dc6a Deduplicate the ALIGN macro, move it to common.h
2fafcb5 Fix a use of ALIGNED_ARRAY_16 on ARM
5079abd Add missing emms after nal_encode Caused random, bizarre failures with some calling applications.
b474d0e Fix crash in fake-interlaced at some resolutions
2e81ce1 Fix no-mbtree + aq-mode=0
b794258 Add API function to fix x264_picture_t initialization Calling applications that do not use x264_picture_alloc need to use x264_picture_init to initialize x264_picture_t structures. Previously, if the calling application didn't zero x264_picture_t, Bad Things could happen.
d0d8751 Fix Avisynth input Regression in r1624.  A more permanent solution to the problem will be committed later.
fbe0255 Convert to a unified "dctcoeff" type for DCT data Necessary for future high bit-depth support.
d3ff95c Convert to a unified "pixel" type for pixel data Necessary for future high bit-depth support. Various macros and extra types have been introduced to make operations on variable-size pixels more convenient.
a6c6afa Add API tool to apply arbitrary quantizer offsets The calling application can now pass a "map" of quantizer offsets to apply to each frame. An optional callback to free the map can also be included. This allows all kinds of flexible region-of-interest coding and similar.
6dc1217 x86 assembly code for NAL escaping Up to ~10x faster than C depending on CPU. Helps the most at very high bitrates (e.g. lossless). Also make the C code faster and simpler.
bdc68d6 Re-enable i8x8 merged SATD Accidentally got disabled when intra_sad_x3 was added.
0c7cf0b Some deblocking-related optimizations
77b568b Optimize out some x264_scan8 reads
794713a Add fast skip in lookahead motion search Helps speed very significantly on motionless blocks.
5832bdf Merge some of adaptive quant and weightp Eliminate redundant work; both of them were calculating variance of the frame.
a7f8709 Fix omission in libx264 tuning documentation
8098997 Fix ultrafast to actually turn off weightb
d51fde5 Fix crash with MP4-muxing if zero frames were encoded
2bcbac3 Fix cavlc+deblock+8x8dct (regression in r1612) Add cavlc+8x8dct munging to new deblock system. May have caused minor visual artifacts.
81e75e9 Fix 10L in r1612 Stats need to be calculated before deblock strength, not after. Broke ref stats in x264cli (no affect on actual output).
97c7ecc Overhaul deblocking again Move deblock strength calculation to immediately after encoding to take advantage of the data that's already in cache. Keep the deblocking itself as per-row.
036db85 Detect Atom CPU, enable appropriate asm functions I'm not going to actually optimize for this pile of garbage unless someone pays me. But it can't hurt to at least enable the correct functions based on benchmarks.
7c2fd41 Slightly faster mbtree asm
cca28cd Faster deblock strength asm on conroe/penryn
2dd5ce2 Avoid an extra var2 in chroma encoding if possible Also remove a redundant if.
23e92b5 Avoid a redundant qpel check in lookahead with subme <= 1.
d202981 Fix ABR rate control calculations Incorrect frame numbers were used, resulting in slightly inaccurate ratecontrol.
e627569 Fix calculation of total bitrate printed after stop by CTRL+C
bed1323 Fix typo in fake-interlaced documentation
cf5769d Fix CABAC+PCM, regression in r1592 Changes to queue in CABAC didn't get propagated to PCM code.
69588a7 Fix performance regression in r1582 Set the correct compiler flags.
b9ec3ea Rewrite deblock strength calculation, add asm Rewrite is significantly slower, but is necessary to make asm possible. Similar concept to ffmpeg's deblock strength asm. Roughly one order of magnitude faster than C. Overall, with the asm, saves ~100-300 clocks in deblocking per MB.
9b47cb0 Fix different output with differing sync-lookahead Also reduce memory consumption.
dd4972a Mark Win32 executable as large address aware
1b48874 Add "Fake interlaced" option This encodes all frames progressively yet flags the stream as interlaced. This makes it possible to encode valid 25p and 30p Blu-Ray streams. Also put the pulldown help section in a more appropriate place.
8ff16c5 Modify version.sh to output to stdout. Update configure to match.
629a56a Set correct filesystem permissions for various files
c787658 Fix regression in r1566 Intra stats need to be kept track of for fast intra decision.
ff0fede Fix rc-lookahead in encoding options SEI in 2-pass with VBV
86c8fec Reduce memory usage in 2-pass with b-adapt 2
95aacc4 Overhaul CABAC: faster, less cache usage Horribly munge up the CABAC tables to allow deduplication of some data. Saves 256 bytes of L1d cache in non-RD, 512 bytes in RD. Add asm versions of bypass and terminal; save L1i cache by re-using putbyte code. Further optimize encode_decision. All 3 primary CABAC functions fit in under 256 bytes of code total on x86_64.
03ff36e Fix typo in pulldown
e07cd36 Fix bitrate calculation in progress status Was slightly incorrect due to using pts, which is out of order.
444794d Fix crash with sliced-threads on Phenom
cb06143 Fix condition for printing rc=cbr in options SEI Also fix crf-max formatting.
4b4f8eb Shrink even more constant arrays
15686c0 Add API function to trigger intra refresh Useful for interactive applications where the encoder knows that packet loss has occurred on the client. Full documentation is in x264.h.
29b379c Fix intra refresh behavior with I-frames Intra refresh still allows I-frames (for scenecuts/etc). Now I-frames count as a full refresh, as opposed to instantly triggering a refresh.
09b5a94 More cosmetics
7608d73 Fix unresolved symbol in r1573 gnu ld didn't complain, but some other linkers did.
90b6dd0 Remove unnecessary --enable options Change --enable-visualize to actually check for X11 support.
174aedc Don't force row QPs to integer values with VBV VBV should no longer raise the bitrate of the video.  That is, at a given quality level or average bitrate, turning on VBV should only lower the bitrate. This isn't quite true if adaptive quant is off, but nobody should be doing that anyways. Also may result in slightly more accurate per-row VBV ratecontrol.
8508412 Add field-order detection to y4m demuxer
44f83cc Fix sliced-threads + interlaced Broken in r1546.
3cf182b Improve temporal MV prediction Predict based on the results of p16x16 search, not final MVs. This lets us get predictions even if mode decision chose intra. Also improves cache coherency.
c82273d More accurate MV prediction on edges in lookahead
ccc03ec Error out on invalid input stride Might catch some crashes due to buggy calling applications.
21c030d Remove unnecessary debugging assert Shouldn't have been in r1568 to begin with.
181fc45 Shrink some more constant arrays
41be22f Deduplicate asm constants, automate name prefixing Auto-prefix global constants with x264_ in cextern. Eliminate x264_ prefix from asm files; automate it in cglobal. Deduplicate asm constants wherever possible to save data cache (move them to a new const-a.asm). Remove x264_emms() entirely on non-x86 (don't even call an empty function). Add cextern_naked for a non-prefixed cextern (used in checkasm).
9ec07af Shrink a few x86 asm functions Add a few more instructions to cut down on the use of the 4-byte addressing mode.
9d66767 Make options SEI use weight* instead of wpred* More intuitive and maps more reasonably to the CLI options. Breaks statsfile backwards-compatibility.
d9db8b3 r1548 broke subme < 3 + p8x8/b8x8 Caused significantly worse compression.  Preset-wise, only affected veryfast. Fixed by not modifying mvc in-place.
bff0df7 More write-combining
41b877e Reduce lookahead memory usage, cache misses Merge lowres_types with lowres_costs.
bf49210 Fix build on x86 with asm on but SSE off
dffb848 Don't calculate ref/partition stats if not necessary
167d68a Split out MV prediction into mvpred.c Make common/macroblock.c a bit less gigantic.
a927654 Fix mv predictor clipping on non-x86 (regression in r1548)
fbcc1ec Move getopt.c to x264cli sources from libx264 Only affects builds on systems without getopt.c.
8fae650 Move deblocking code to a separate file Should clean up frame.c a bit.
f648d24 fix ffms demuxer to support input timebase values > 2^31
4ce8f12 Fix 10l in cache_load changes Broke constrained intra pred, probably not anything else.
f611440 Faster fullpel predictor checking Also shave a few instructions off dia/hex motion estimation loops.
f48356d Fix checkasm's generation of deblock inputs (regression in r1517)
e37a490 Fix printing of bitrate when timestamps aren't available Doesn't affect x264cli, but was broken in some other apps in CFR mode.
5b1798e Don't check mv0 twice One less SAD in motion estimation. Also rename bmv -> pmv; more accurate naming.
c76069f Remove reordering restrictions from weightp Apparently the spec does allow two consecutive copies of the same frame in the reference list. This involves an incredibly ugly hack to wrap around the frame number. Very slight compression improvement.
d6d63a0 Print intra chroma pred modes in stats
4013f8d Add mv0 special case in pskip chroma MC Significantly faster pskip MC.
156bf75 Fix build scripts to work with non-GNU tools
a34ad7c Faster deblock reference frame checks Use a lookup table to simplify logic
5dab1ef Faster chroma CBP handling
28fd5fb Fix issues with extremely large timebases With timebase denominators >= 2^30 , x264 would silently overflow and cause odd issues. Now x264 will explicitly fail with timebase denominators >= 2^31 and work with timebase denominators 2^31 > x >= 2^30.
aaf2194 MMX code for predictor rounding/clipping Faster predictor checking at subme < 3.
bc9103c Fix four minor bugs found by Clang
46fd4ae Move deblocking/hpel into sliced threads Instead of doing both as a separate pass, do them during the main encode. This requires disabling deblocking between slices (disable_deblock_idc == 2). Overall performance gain is about 11% on --preset superfast with sliced threads. Doesn't reduce the amount of actual computation done: only better parallelizes it.
a7ec5e2 Prefetch MB data in cache_load Dramatically reduces L1 cache misses. ~10% faster cache_load.
017ade0 Fix a ton of pessimization caused by aliasing in cache_save and cache_load
674926f Add CP128/M128 macros using SSE
5b86182 Fix various early terminations with slices Neighbouring type values (type_top, etc) are now loaded even if the MB isn't available for prediction. Significant overall performance increase (as high as 5-10%+) with lots of slices (e.g. with slice-max-size).
dabc4b1 Enable --fast-pskip on fast firstpass
2efd119 Make interlaced detection in avisynth only apply to field-based input Fixes improper flagging of progressive sources.
0f92441 Set psy=0 in lossless mode Doesn't actually affect output, just what's written in the SEI.
bd72d46 Fix a use of sad_x4 that had non-mod64 stride Minimal speed improvement, but fixes a violation of internal api.
15f5e7e Make keyint_min auto by default Gives more reasonable default settings when using short GOPs.
c7c8693 Faster mv predictor checking at subme < 3 Simplify the predicted MV cost check.
f21ff8a Special case in qpel refine for subme=1 ~15-20% faster qpel refine with subme=1. Some minor cleanups in refine_supel.
7c9870b Cosmetics: VLC tables
825e3a9 Add faster mv0 special case for macroblock-tree Improves performance on low-motion video.
4f8c44c Add miscompilation check for x264_clz Running a Phenom-optimized build of x264 (e.g. -march=amdfam10) on a non-Phenom CPU didn't SIGILL; instead it would silently produce incorrect output. Now, instead, it will error out loudly.
1390886 Fixing floating-point exception in level-checking Doesn't cause any issues for x264cli, but might impact some calling apps that care (e.g. Delphi apps).
f1320f8 Save a few bits in multislice encoding Set the initial QP for each slice to the last QP of the previous slice.
bc42c5a Early termination in 16x8/8x16 search Combine the actual cost of the first partition with the predicted cost of the second to avoid searching the second when possible. Reduces the number of times the second partition is searched by up to ~75% in non-RD mode, ~10% in RD mode. Negligible effect on compression.
040fddd Make MV prediction work across slice boundaries Should improve motion search with lots of small slices, e.g. with slice-max-size. Still restricted by sliced threads (won't cross the boundary between two threadslices). The output-changing part of the previous patch.
469fae2 Cleanup and simplification of macroblock_load Doesn't do anything now, but will be useful for many future changes. Splitting out neighbour calculation will make MBAFF implementation easier. Calculation of neighbour_frame value (actual neighbouring MBs, ignoring slices) will be useful for some future patches.
fb449c7 Add missing #include to display-x11.c
819d121 Add TFF/BFF detection to all demuxers Fix interlaced Avisynth input, automatically weave field-based input.
058d67e Correctly mark output frames as BREF Simplify pic_out code.
25ca5b0 Fix HRD compliance As usual, the spec is so insanely obfuscated that it's impossible to get things right the first time.
f8671ce Better b16x8/8x16 early termination in B-frames A bit slower but up to 1-2% better compression.
a1e4e58 Fix 10L in B-skip improvement patch
9d08bf4 Fix printing of SEI header with VBV + ABR SEI header shouldn't say CBR unless bitrate == maxrate.
385716e Simplify slicetype_frame_cost Avoid redundant calculations when VBV is on (due to the intra-only call). Move most of the logic into per-MB code.
769adff Faster CABAC state copying for small partitions Save ~25 clocks per i4x4, i8x8, and sub8x8 RD call.
4abe704 Massive cosmetic and syntax cleanup Convert all applicable loops to use C99 loop index syntax. Clean up most inconsistent syntax in ratecontrol.c, visualize, ppc, etc. Replace log(x)/log(2) constructs with log2, and similar with log10. Fix all -Wshadow violations. Fix visualize support.
2f432c8 Fix array overread in b8x16 search
385f6e2 Faster direct check with subpartitions off Also simplify the whole function a bit.
d8d8e7e Print crf-max with appropriate precision in SEI
ffd1cd1 Fix 10l in timecode seeking
ae83402 Fix 10L: Remove needless error check This error check was for cfr input + --timebase, but that doesn't happen, and brings about a bug with vfr input.
f9ff003 Don't use 2 L1 refs with pyramid + ref=1 Slightly faster encoding with ref=1.
33d382a Update copyright year in SEI header
5b1fdfa New "superfast" preset, much faster intra analysis
a76ac87 Avoid redundant MV prediction in duplicate refs
a1edfa6 Cosmetics in mvd handling Use a 2D array instead of doing manual pointer arithmetic.
9904be8 Fix make uninstall on systems with executable suffixes
5543435 Add tune for still image compression There has been some demand for this from companies looking to use x264 for still image compression (it can outperform JPEG or JPEG-2000 by a factor of 2 or more). Still image compression is a bit different; because temporal stability isn't an issue, we can get away with far more powerful psy settings.
93b1d5a Pad non-mod16 resolutions using the correct field
a882f7a Document slow/fast firstpass in --fullhelp
ce6bd49 Fix some misattributions in profiling Cycles spent in load_hadamard and the avg2 w16 ssse3 cacheline split code were misattributed.
2678a7a Much faster non-RD intra analysis Since every pred mode costs at least 1 bit, move that part into the initial SATD cost. This lets i4x4/i8x8 analysis terminate earlier. If the cost of the predicted mode is less than the cost of signalling any other mode, early-terminate the analysis.
6314e08 Fix stack alignment in sliced threads Could cause crashes when called from non-GCC-compiled applications.
8a919f8 Cosmetics: use sizeof() where appropriate
ae92e7f Split up analyse_init Save some time by avoiding some unnecessary inits and moving other parts to per-thread init.
5d767b1 Reduce stack usage of b-adapt 2's trellis Also remove some redundant code.
081b90d 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.
e73a769 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.
4f42c3c Make a bunch of small functions ALWAYS_INLINE Probably no real effect for now, but needed for the next patch.
6b58509 Two compatibility fixes Add IA64 support in configure.
49eb50c Faster x264_macroblock_encode_pskip GCC is apparently unable to optimize out the calculation of a variable when it isn't used.
513e9b9 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.
ec39f7b Reformat profile restrictions in --fullhelp.
632af66 Fix typo in configure
ea93d78 Add support for spaces to iPhone GAS preprocessor script
d84a1a9 Fix slightly wrong mp4 duration.
d0c898a Fix link errors with newest gpac cvs gpac decided to randomly break API and require us to use their own custom malloc and free.
db2bae3 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.
e19bef2 Shrink some arrays in x264_t Also remove an unnecessary assignment from cache_load.
f36b1e4 Use x264_log in more places instead of fprintf
6951964 Fix two nondeterminisms Move noise reduction data into thread-specific data. Use correct reference list for L1 temporal predictors.
81eee06 "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.
c6de864 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!
a5f5690 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.
ece1dd2 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.
e5b108a Faster rounding of chroma DC coefficients
8ec5a5e Faster cabac_encode_decision_asm Minimizes instruction count, which also means smaller code. Various other slight changes to allow more instruction level parallelism.
c572d28 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.
279c9d9 Ignore XYSCSS in y4m if the newer standard C tag is present
c8900a2 Fix regression in r1450 I_PCM blocks would cause x264 to crash or generate bad output. Simplify PCM handling.
7d533c5 Fix crash with intra-refresh + aq-mode 0
1144615 Fix regression in r1453 r1453 broke psy-trellis with --trellis 2
7eac249 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).
3ae44d9 Cut size of MVD arrays by a factor of 2 again Only store the MVDs of the edges of each MB.
6a443d3 Disable Altivec and VIS optimizations when --disable-asm is specified
4091b29 Fix a buffer overread on odd input resolutions
479a9e8 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.
4132e0b Port Mans Rullgard's NEON intra prediction functions from ffmpeg
e29c758 Remove unused function Two other minor fixes.
f2428d2 Use short startcode in more possible situations Previous patch didn't cover all possible uses according to B.1.2.
7fcffde Fix fastfirstpass Apparently the libx264 preset changes made "fastfirstpass" into "fastsecondpass" inadvertantly.
ad64d48 Fix various silly errors in the previous patches
9e35bd0 Actually error out if preset/tune/profile is invalid Got lost somewhere in the move to libx264-based presets.
377814e 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.
6823cbc Use short startcodes whenever possible Saves one byte per frame for every slice beyond the first. Only applies to Annex-B output mode.
74f2fd6 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.
a6c91c9 Abide by the MinCR level limit Some Blu-ray analyzers were complaining about this.
1d94f30 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).
1007cb7 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.
7a7fbea 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.
40284df 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.
10e9e95 Add temporal predictor support to interlaced encoding 0.5-1% better compression in interlaced mode
8b67d5e Keep track of macroblock partitions Allows vastly simpler motion compensation and direct MV calculation.
4574b58 Much faster and simpler direct spatial calculation
1a6d32b SimpleBlock requires Matroska Doctype v2
966fd12 Add GPAC version check
482646a Fix stupid regression in interlaced in r1430 With ref > 8 or b-pyramid, an array over-read could cause slightly incorrect B-frames.
f0da961 Fix overread of scratch buffer Could cause crashes on non-mod16 frames.
28e6eb6 Fix integer overflow in chroma SSD check Could cause bad skips at very high quantizers on extreme inputs.
4784723 Fix I and B-frame QPs with threads Rounding errors resulted in slightly wrong QPs with threads enabled.
781d300 Fix compilation on ARM
b8485e8 Remove unnecessary PIC support macros yasm has a directive to enable PIC globally
d227758 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.
520ba2b iPhone compilation support Also add --sysroot to configure options
2b5a0c6 ARM NEON versions of weightp functions
40dce15 Use #ifdef instead of #if in checkasm
aa2626c 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.
dcef20c Mark cli_input/output_t variables as const when possible
dffb203 mkv: Write the x264 version into the file header
f3de174 mkv: Write SimpleBlock instead of Block for frame headers
9eb5b91 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.
41db4e8 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.
58fd854 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.
b322512 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.
9f24231 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.
8463781 Print psy-(rd|trellis) with more precision in userdata SEI
8ab4907 More formatting fixes in x264 help
16a1fdd Faster 2x2 chroma DC dequant
ca95449 Write PASP atom in mp4 muxing Adds container-level aspect ratio support for mp4.
bb09908 Fix 2-pass ratecontrol continuation in case of missing statsfile Didn't work properly if MB-tree was enabled.
3461651 Smarter QPRD Catch some cases in which RD checks can be avoided; reduces QPRD RD calls by 10-20%.
da9b9d3 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.
698bbac Simplify decimate checks in macroblock_encode Also fix a misleading comment.
1ec82b8 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).
08d4a99 Slightly faster predictor_difference_mmxext
f555cf3 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.
fcf70c2 Fix regression in r1406 Bitrate was printed incorrectly for some input framerates.
3f3343a 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.
63b74d8 Fix abstraction violations in x264.c No calling application--not even x264cli--should ever look inside x264_t.
2d2c861 Move -D CFLAGS to config.h
3838c30 Fix stat with large file support
6bd24a9 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.
38cfabe Fix implicit CBR message to only print when in ABR mode Also make it print outside of debug mode.
d355878 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.
6169001 Add config.log support Now, if configure fails, you'll be able to see why.
f20aace Fix cross-compiling with lavf, add support for ffms2.pc Also update configure script to work with newest ffms.
d81c26d Improve DTS generation, move DTS compression into libx264 This change fixes some cases in which PTS could be less than DTS.
3659b81 Various threading-related cosmetics Simplify a lot of code and remove some unnecessary variables.
0f98524 Hardcode the bs_t in cavlc.c; passing it around is a waste
00f933f 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).
1a1b356 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.
90a249a Merge nnz_backup with scratch buffer Slightly less memory usage.
20fa784 Use cross-prefix properly with pkg-config for cross-compiling
952aa77 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.
bef4e3e Fix crash on new AMD M300 and similar CPUs Apparently these CPUs have SSE4a, but not misaligned SSE.
6cb6086 Fix intra refresh with subme < 6 Also improve the quality of intra masking.
cc65eab Add support for multiple --tune options Tunes apply in the order they are listed in the case of conflicts. Psy tunings, i.e. film/animation/grain/psnr/ssim, cannot be combined. Also clarify --profile, which forces the limits of a profile, not the profile itself.
e4acb95 Various bugfixes and tweaks in analysis Fix the oldest-ever bug in x264: b16x8 analysis used the wrong width for predict_mv. Fix cache_ref calls for slightly better MV prediction in bsub16x16 analysis. Make B-partition analysis consider reference frame costs. Various other minor changes. Overall very slightly improved mode decision and motion search in B-frames.
6662db3 More --me tesa optimizations
7ff6867 Fix typo in configure
1d3ab22 Make --fps force CFR mode
3d0f110 Eliminate intentional array overflow in quant matrix handling While it probably never caused problems, it was incredibly ugly and evil.
918ca1e Faster --me tesa
d26e79d Fix static pthreads + dynamically linked x264 on win32 Add the necessary static pthread initialization code to a new DLLmain function.
eda7bf0 Add getopt_long to the included getopt.c Fixes option handling on OSs that have a nonworking/missing getopt (e.g. Solaris).
ecca2f5 Faster psy-trellis init Remove some unncessary zigzags.
f6d92e5 Simplfy intra mode availability handling Slightly faster, 1.5kb smaller binary size, less code.
d260e6b Fix free callback, add x264_encoder_parameters function x264 would try to use the passed param struct after freeing if the param_free callback was set. Probably didn't cause any issues, as probably no programs used the callback in this location yet.
8466942 Fix x264 compilation on Apple GCC Apple's GCC stupidly ignores the ARM ABI and doesn't give any stack alignment beyond 4.
a48a48a Faster weightp motion search For blind-weight dupes, copy the motion vector from the main search and qpel-refine instead of doing a full search. Fix the p8x8 early termination, which had unexpected results when combined with blind weighting. Overall, marginally reduces compression but should potentially improve speed by over 5%.
e9f998b More correct padding constants for lowres planes Since lowres analysis isn't interlace-aware, we don't need to double the vertical padding for interlaced video.
1b68cbd Fix some invalid reads caught by valgrind Temporal predictor calculation was misled by invalid reference counts for I-frames.
52a4fbe Periodic intra refresh Uses SEI recovery points, a moving vertical "bar" of intra blocks, and motion vector restrictions to eliminate keyframes. Attempt to hide the visual appearance of the intra bar when --no-psy isn't set. Enabled with --intra-refresh. The refresh interval is controlled using keyint, but won't exceed the number of macroblock columns in the frame. Greatly benefits low-latency streaming by making it possible to achieve constant framesize without intra-only encoding. Combined with slice-max size for one slice per packet, tests suggest effective resiliance against packet loss as high as 25%. x264 is now the best free software low-latency video encoder in the world.
8b9dcd8 LAVF/FFMS input support, native VFR timestamp handling 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.
27355a2 More help typo fixes
b9823ca Fix x264_clz on inputs > 1<<31 (though x264 never generates such inputs)
3feaec2 Don't do sum/ssd analysis if weightp == 1 Typo fixes in comments and help.
c9cafc7 Fix two bugs in 2-pass ratecontrol last_qscale_for wasn't set during the 2pass init code. abr_buffer was way too small in the case of multiple threads, so accordingly increase its buffer size based on the number of threads. May significantly increase quality with many threads in 2-pass mode, especially in cases with extremely large I-frames, such as anime.
85eb400 Avisynth-MT and 2.6 compatibility fixes Explain to the user why YV12 conversion is forced with Avisynth 2.6. Fix encoding with Avisynth-MT scripts by inserting the necessary Distributor() call; speeds such scripts back up to expected levels.
4322f63 Fix zone parsing on mingw Due to MinGW evidently being in the hands of a pack of phenomenal idiots, MinGW does not have strtok_r, a basic string function. As such, remove the dependency on strtok_r in zone parsing. Previously, using zones for anything other than ratecontrol failed.
28c1d44 More lookahead optimizations Under subme 1, don't do any qpel search at all and round temporal MVs accordingly. Drop internal subme with subme 1 to do fullpel predictor checks only. Other minor optimizations.
385df7f Various minor missing changes from previous commits Boolify sliced threads too Remove unused constants from dct-a.asm Fix a few typos/minor errors in preset documentation
65b3d0f Fix regression in direct=auto/temporal in r1364 Bug caused rare race condition in frame reference handling. This resulted in invalid bitstreams in some B-frames and, very rarely, crashes.
ec8e586 Add fast pskip to x264 SEI info header
11cfc44 Minor seeking fix with Avisynth input Seeking past the end of the input with --seek would result in the same frame being repeated over and over.
de5beae Add support for MB-tree + B-pyramid Modify B-adapt 2 to consider pyramid in its calculations. Generally results in many more B-frames being used when pyramid is on. Modify MB-tree statsfile reading to handle the reordering necessary. Make differing keyint or pyramid between passes into a fatal error.
ca1112b Use aliasing-avoidance macros in array_non_zero
77fc510 MMX version of 8x8 interlaced zigzag Just as fast as SSSE3 on Nehalem (and faster on Conroe/Penryn), so remove the SSSE3 version.
e8b73a9 Bring back slice-based threading support Enabled with --sliced-threads Unlike normal threading, adds no encoding latency. Less efficient than normal threading, both performance and compression-wise. Useful for low-latency encoding environments where performance is still important, such as HD videoconferencing. Add --tune zerolatency, which eliminates all x264 encoder-side latency (no delayed frames at all). Some tweaks to VBV ratecontrol and lookahead (in addition to those required by sliced threading). Commit sponsored by a media streaming company that wishes to remain anonymous.
a8f670b Add more detailed help for presets/tunes/profiles Shows what options they represent.
e5faf71 qpel RD no longer needs mbcmp_unaligned
733b660 ensure that all boolean options are {0,1} so they print consistently in the options SEI
528c100 Actually do r1356 Somehow commit r1356 got lost in the ether.  I'm not sure how, but now it's fixed.
4951771 Remove some unused code from x264.c
77d0631 SSSE3 version of zigzag_8x8_field Slightly faster interlaced encoding with 8x8dct. Helps most on Nehalem, somewhat disappointing on Conroe/Penryn.
225d1dc Fix crash in interlaced with >8 refs Crash introduced in weightp.
4bf27ff Significantly faster qpel-RD Cache the results of MC, like in bidir-RD. Slightly changes output due to the necessary reordering of satd/RD calls. 5-10% faster qpel-RD.
83bda2e Add x264 prefix to functions with ffmpeg equivalents Not important now, but will be when we add libav* input support.
636f98f 10L in r1353 Broke mp4 output.
380a201 Enhanced Avisynth input support Requires avisynth_c.h from the Avisynth API headers. Reports errors properly from Avisynth script input. Automatically construct input scripts for almost any input file. Tries ffmpegsource2, DSS2, directshowsource, and many other sourcing methods, based on the input file extension. Automatically converts to YV12.
d487de4 Much faster weightp Move sum/ssd calculation out of lookahead and do it only once per frame. Also various minor optimizations, cosmetics, and cleanups.
f3cdc6a Fix bugs in fps/timestamp handling in FLV muxer
626affe Fix bug in weightp analysis Weights weren't reset upon early terminations, so old (wrong) weights could stick around. Small compression improvement.
a1705b6 Minor deblocking optimization, update comments
1c2c568 Fix weightb with delta_poc_bottom Has no effect yet, but will be required once we add TFF/BFF signalling support in interlaced mode. Gives 0.5-0.7% better compression with proper TFF/BFF signalling.
5ddd61b Give more meaningful error if 1st/2nd pass resolution differ
0b0f4a3 Fix extremely rare deadlock with sync-lookahead Patch partially by Anton Mitrofanov.
ed04677 Only print weightp stats if there were P-frames
4a31a47 Faster lookahead with subme=1 If it hasn't been clear already, don't use subme=1 as a "fast first pass" option. Use subme=2 instead; 1 and below now enable a fast (lower quality) lookahead mode.
c0215c8 Faster weightp analysis Modify pixel_var slightly to return the necessary information and use it for weight analysis instead of sad/ssd. Various minor cosmetics.
e8501ef Fix two issues in weightp If analysis decided on an offset of -128, x264 would create non-compliant streams. Fix some cases with nearly all intra blocks where analysis could pick very weird weights. Also add some asserts to check compliancy.
4f0a545 Allow compilation with non-Apple GCC on OS X
1d54b2c Use __attribute__((may_alias)) for type-punning GCC thinks pointer casts to unions aren't valid with strict aliasing. See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html#Type_002dpunning. Also use M32() in y4m.c. Enable -Wstrict-aliasing again since all such warnings are fixed.
82b80ef 100l in deadlock fix
6f5f8c0 FLV muxing support
e76a4ad Fix rare deadlock introduced in weightp
2a35a01 Actually add -Wno-strict-aliasing to configure
0e706cc Various weightp fixes Make weightp results match in threaded vs non-threaded mode. Fix two-pass with slow-firstpass.
cbd43d1 Fix all aliasing violations 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.
b28d98b Fix 10l in weightp on ARM
70f8869 Fix one (of possibly many) miscompilations in weightp Use NOINLINE and some emms calls to fix emms reordering issues. This issue occurred with some GCC versions if threads > 1 and the phase of the moon was right. Also a cosmetic in x264.c.
c3e72f6 Fix pixel_ssd on win64 Didn't preserve XMM registers, may or may not have caused problems.
af612d7 Fix weightp logfile parsing on MinGW
03639d0 cosmetics
2bedf89 Fix weightp on ARM + PPC No ARM or PPC assembly yet though.
87de234 Weighted P-frame prediction 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.
3daa02e Fix assert failure in the case of forced i-frames Note that this applies to non-IDR i-frames, not IDR-frames. This fix is also required for future open-gop.
02fe6a5 Fix issues relating to input/output files being pipes/FIFOs
3d1a128 Various ARM-related fixes Fix comment for mc_copy_neon. Fix memzero_aligned_neon prototype. Update NEON (i)dct_dc prototypes. Duplicate x86 behavior for global+hidden functions.
820380f Fix miscompilation with gcc 4.3 on ARM Aliasing violation in spatial prediction caused nasty artifacts. Shut up two other GCC warnings while we're at it.
bea99fb Fix extremely rare infinite loop in 2-pass VBV Implicit conversion from double->float lost enough precision to cause the loop termination condition to never trigger. Bug report by Tal Aloni.
028b3ff Fix large file support, broken in r1302
96bad1a Dramatically reduce size of pixel_ssd_* asm functions ~10k of code size eliminated.
678a703 fix bottom-right pixel of lowres planes, which was uninitialized. weirdly, valgrind reported this only with --no-asm.
fe83a90 Further reduce code size in bime ~7-8 kilobytes saved, ~0.6% faster subme 9.
5c7133b Fix case in which MB-tree didn't propagate all data correctly Should improve quality in all cases. Also some minor cosmetic improvements.
7016c83 Take into account chroma MV offset during interlaced motion search Small improvement in interlaced compression.
d4b7db5 Slightly faster ssse3 width4 chroma MC Cacheline-aware in the same fashion as width8, but not conditional.
40a4708 Eliminate some rare cases where MB-tree gave incorrect results in B-frames Also get rid of some unnecessary memcpies.
35146ef Fix cases in which b-adapt 1 could result in AUTO-type frames. This didn't actually cause any issues, but it removes the need for the fixing-up code that prevented said issues.
1f9c733 Motion compensation optimizations Turning off inlining saves a whole boatload of code size for near-zero speed cost. Simplify offset calculation. Various other optimizations.
e361348 Minor CAVLC optimizations
ec46ace cosmetics
6a4277e ISC-license x86inc.asm As the assembly abstraction layer is very useful in non-x264 projects, it is now ISC (simplified BSD) so that others, even in commercial projects, can use it as well.
c9d2c06 Various minor CABAC optimizations
ece74ca Fix bug in b-pyramid strict Bug caused invalid streams in some situations.
b1ad8d0 Remove non-mod16 warning Compression only "suffers" by an extremely marginal amount and too many people misinterpret the warning.
b89ca04 Fix two warnings + some minor optimizations
ec3b5bf Fix a typo in b-pyramid help And an errant space in common/macroblock.c
3679792 A bit more write-combining in macroblock_cache_load
6169a3f split muxers.c into one file per format simplify internal muxer API
bcba15d Update fprofile with the latest change to b-pyramid
909bded Fix assertion fail and incorrect costs with pyramid+VBV Deal properly with QPfile'd B-refs.  x264 should handle multiple B-refs per minigop now, though only via forced frametypes.
2eb0458 Improve CRF initial QP selection, fix get_qscale bug If qcomp=1 (as in mb-tree), we don't need ABR_INIT_QP. get_qscale could give slightly weird results with still images
513abc7 Print more accurate error message if dump_yuv fails
cdf623f Reduce memory usage of b-adapt 2 trellis Also fix a minor bug where the algorithm ignored the last frame in the trellis.
e2659db Make B-pyramid spec-compliant The rules of the specification with regard to picture buffering for pyramid coding are widely ignored. x264's b-pyramid implementation, despite being practically identical to that proposed by the original paper, was technically not compliant. Now it is. Two modes are now available: 1) strict b-pyramid, while worse for compression, follows the rule mandated by Blu-ray (no P-frames can reference B-frames) 2) normal b-pyramid, which is like the old mode except fully compliant. This patch also adds MMCO support (necessary for compliant pyramid in some cases). MB-tree still doesn't support b-pyramid (but will soon).
b826fd5 Add missing free for nal_buffer Fixes a memory leak.
813fe72 sync yasm macros to ffmpeg
7ae3ed9 eliminate some divisions
e381f6d Fix glitches with slow-firstpass + weightb + multiref + 2pass Bug in r1277
9045fbe Simplify some code in b-adapt 2's trellis
b47aca5 Fix a very rare integer overflow in slicetype analysis Caused an assert failure when it occurred. Bug is as old as adaptive B-frames.
2ceb2cc Reduce the aggressiveness of 2-pass VBV Now that B-frames are properly covered, we don't have to be as aggressive. This eliminates some issues with skyrocketing QPs in B-frames in 2-pass VBV.
a65d361 Fix regression: disable flash detection without B-frames
287641a change all dct arrays to 1d. the C standard doesn't allow you to iterate 1-dimensionally over 2d arrays, and nothing other than the dsp functions themselves cares about the 2dness of dct. this fixes a miscompilation in x264_mb_optimize_chroma_dc.
bcc9a4b Add row-based VBV for B-frames While B-frames still aren't explicitly covered by ratecontrol, this should resolve issues of VBV underflows due to larger-than-expected B-frames.
7182ae8 Improve VBV, fix bug in 2-pass VBV introduced in MB-tree Bug caused AQ'd row/frame costs to not be calculated (and thus caused underflows). Also make VBV more aggressive with more threads in 2-pass mode. Finally, --ratetol now affects VBV aggressiveness (higher is less aggressive).
60c630c Optimize exp2fix8 Slightly faster and more accurate rounding.
e8b83b7 Avoid scenecuts in flashes and similar situations "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.
fc4926a Fix bug where x264 generated non-compliant bitstreams with insane SAR values
39f6499 rm msvc project files and related ifdefs
5cda2cf SSE4 version of 4x4 idct 27->24 clocks on Nehalem. This is really just an excuse to use "movsd" in a real function. Add some comments to subsum-related macros in x86util.
d971ace Constrained intra prediction support Enable with --constrained-intra.  Significantly reduces compression, but required for the base layer of SVC encodes and maybe some other use-cases.
a88f2d7 Slightly improve non-RD p8x8 mode decision Subpartition costs are effectively zero in CABAC if sub-8x8 search is off.
c318d8f Reorder reference frames optimally on second pass About +0.1-0.2% compression at normal bitrates, up to +1% at very low bitrates. Only works if the first pass uses the same number of refs as the second (i.e. not with fast first pass). Thus, only worthwhile at insanely slow speeds: as such, enable slow-firstpass by default with preset placebo. Note that this changes the stats file format!
4f3ad6a Fix typo in ratecontrol_summary
8be3935 Clip log2_max_frame_num It's still much higher than it needs to be, but that will be fixed with the upcoming MMCO patch. Also make sure we don't write too large a frame_num or poc in slice header.
83ca0f2 Fix some issues with 3-pass statsfile handling The value of i_frame during encoder_close was incorrect.
a4334d4 Fix ctrl-C termation message with few frames encoded
db518ea Add support for single-frame VBV, improve compliance This allows both constant-framesize and capped-framesize encoding. Literal constant framesize isn't actually supported yet due to the lack of filler support. Example with 30fps video: --vbv-bufsize 200 --vbv-maxrate 6000 will ensure that no frame is ever larger than 200 kilobits.
496d79d Fix 10l in API change frame_num was set to 1, not 0, for the first frame.  This broke spec compliance. Didn't actually seem to cause any problems though except for breaking decoding on Quicktime.
2b4e823 Allow user-set FPS for inputs other than YUV
e8b9dfe Improve threaded frame handling Avoid unnecessary cond_wait
d542926 Attempt to detect miscompilation due to bug in gcc 4.2 I don't know if this bug still affects latest x264, but it can't hurt to try to detect it. Accordingly refuse to open the encoder if detected. Apparently VLC (on Windows) has been distributed for some time with a completely broken x264 due to the use of a completely broken compiler (gcc 4.2).  In particular, the MV costs seem to be calculated incorrectly on win32 when linking from an application compiled without -ffast-math to an application with -ffast-math. I am not entirely certain why this occurs, but the result is, unsurprisingly, encoding quality that makes MPEG-2 look good, due to the motion search being completely broken.
c62060d Really fix encoder_close crash this time Not-entirely-fixed in r1253.
d166e7f Check for 16x16 partitions masquerading as smaller ones Saves a few bits when using qpel-RD.
c49e14f Update config.guess/sub; add Snow Leopard support
d52d2db Fix integer overflow in 2-pass VBV Bug caused slight undersizing in 2-pass mode in some cases.
ca95d61 Fix bug with various bizarre commandline combinations and mbtree Second pass would have mbtree on even though the first pass didn't (and thus encoding would immediately fail).
91f3e81 Add intra prediction modes to output stats Also eliminate some NANs in stat output with intra-only encoding. Marginal speedup: disable stat calculation if log level is below X264_LOG_INFO. Various minor cosmetics.
c91a3c9 Overhaul syntax in muxers.c/matroska.c The inconsistent syntax in these files has finally come to an end.
031e25d Major API change: encapsulate NALs within libx264 libx264 now returns NAL units instead of raw data.  x264_nal_encode is no longer a public function. See x264.h for full documentation of changes. New parameter: b_annexb, on by default.  If disabled, startcodes are replaced by sizes as in mp4. x264's VBV now works on a NAL level, taking into account escape codes. VBV will also take into account the bit cost of SPS/PPS, but only if b_repeat_headers is set. Add an overhead tracking system to VBV to better predict the constant overhead of frames (headers, NALU overhead, etc).
dd026f2 Add missing fclose for mbtree input statsfile on second pass Bug report by VFRmaniac
8cbb85d Improve progress indicator behavior Progress indicator will now indicate based on output frame, not input frame.
b5770ea Update yasm configure check lzcnt apparently requires yasm 0.6.2.
935488e Make MV costs global instead of static Fixes some extremely rare threading race conditions and makes the code cleaner. Downside: slightly higher memory usage when calling multiple encoders from the same application.
4f6a007 Don't print scenecut message multiple times in verbose mode Occurred mostly with b-adapt 2.
411ee50 Optimize rounding of luma and chroma DC coefficients Reduce bitrate mostly-losslessly at low quantizers. In some rare cases, bitrate reduction may be as high as 10%. Luma rounding optimization (helps much less than chroma) requires trellis.
08c8396 Fix crash if encoder_close is called before delayed frames are flushed Also no longer flush frames when ctrl-Cing x264, so x264 will close faster.
b9b7c12 Improve x264 help Now has three help options: --help, --longhelp, and --fullhelp. --help only shows the most basic options; most users should not need more than these. Add usage examples. Fix typo in a comment.
e553a4c Factor out a redundant RD call in qpel-RD Fixes a problem that was supposed to be, but didn't, get fully fixed in r1238.
643cef5 Fix RD early-skip Small quality improvement and speedup, was broken by r1214.
83a033e Faster CAVLC mb header writing for B macroblocks
e390cbf Compile fixes for pre-ARMv6T2 and/or PIC
b3efbe5 Change priority handling on some OSs Instead of setting the lookahead thread to max priority, lower all the other threads' priorities instead. This is particularly useful when the "max priority" is "realtime", as in Windows, which can cause some problems.
5b3c89c Threaded lookahead 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.
326113b Force a link error in case of incompatible API This is because the number of bug reports due to miscompiled ffmpeg builds is reaching critical mass. The name of x264_encoder_open is now #defined based on the current X264_BUILD. Note that this changes the calling convention required for dlopen, but not for ordinary calls to x264_encoder_open.
775a12c Get rid of "CBR" descriptor from qcomp Though technically accurate in some vague way, I have never actually seen this option used correctly, rather it has been used by hundreds of people who can't read the documentation and believe that qcomp=0 is what should be used for CBR encoding.
2cd0054 Faster me=tesa But it still spends all too much time in me_search_ref rather than asm.
4d553ed Multi-slice encoding support Slicing support is available through three methods (which can be mixed): --slices sets a number of slices per frame and ensures rectangular slices (required for Blu-ray).  Overridden by either of the following options: --slice-max-mbs sets a maximum number of macroblocks per slice. --slice-max-size sets a maximum slice size, in bytes (includes NAL overhead). Implement macroblock re-encoding support to allow highly accurate slice size limitation.  Might be useful for other things in the future, too.
bfcb4f6 Fix a valgrind warning in b-adapt 2
35627b6 fix asm symbols for oprofile (regression in r1221)
3db6c9d Fix bug in intra analysis in B-frames i8x8/i4x4 never got analysed when fast_intra was toggled and RD was off; up to a 2-3% quality improvement in non-RD mode. With this bug dating back to r369, this is probably the second-oldest bug ever fixed in x264.
d551106 Fix bug in b16x16 qpel RD Incorrect cost was used to initialize the search.
1b2a1c6 Check minimum chroma QP in addition to luma QP during CQM init Correctly error out if the implied minimum chroma QP is too low. Add missing emms to checkasm macroblock_tree_propagate test.
e6c973a Faster mbtree propagate and x264_log2, less memory usage 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.
448b138 Fix keyint=1 + VBV + rc-lookahead
0d8efaa Faster x264_exp2fix8 22->13 cycles on Core 2 with mfpmath=sse
ee95ca7 compile x86 with fpmath=sse by default
c8edc12 ARM configure: enable NEON-related options by default When compiling for ARM, x264 will compile by default for Cortex A8 unless specified otherwise. To compile for pre-ARMv6, --disable-asm is required.
533b473 2-pass VBV fixes Properly run slicetype frame cost with 2pass + MB-tree. Slash the VBV rate tolerance in 2-pass mode; increasing it made sense for the highly reactive 1-pass VBV algorithm, but not for 2-pass. 2-pass's planned frame sizes are guaranteed to be reasonable, since they are based on a real first pass, while 1-pass's, based on lookahead SATD, cannot always be trusted.
9754af3 GSOC merge part 8: ARM NEON intra prediction assembly functions (partial) 4x4 dc/h/ddr/ddl, 8x8 dc/h, 8x8c h/v, 16x16 dc/h/v
a81c398 GSOC merge part 7: ARM NEON deblock assembly functions (partial) Originally written for ffmpeg by Mans Rullgard; ported by David. Luma and chroma inter deblocking; no intra yet.
dcd9ac9 GSOC merge part 6: ARM NEON quant assembly functions (partial) (de)quant 4x4, (de)quant 8x8, (de)quant DC, coeff_last
e695eda GSOC merge part 5: ARM NEON dct assembly functions (i)dct4x4dc, (i)dct4x4, (i)dct8x8, (i)dct_dc, zigzag_scan_frame_4x4
2ac8b8d GSOC merge part 4: ARM NEON mc assembly functions prefetch, memcpy_aligned, memzero_aligned, avg, mc_luma, get_ref, mc_chroma, hpel_filter, frame_init_lowres
8a84fd9 GSOC merge part 3: ARM NEON pixel assembly functions SAD, SADX3/X4, SSD, SATD, SA8D, Hadamard_AC, VAR, VAR2, SSIM
00d9fb7 GSOC merge part 2: ARM stack alignment 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.
3b4ee73 Fix unaligned accesses in bitstream writer Fixes x264 on CPUs with no unaligned access support (e.g. SPARC). Improves performance marginally on CPUs with penalties for unaligned stores (e.g. some x86).
d0ee6f8 Fix bug in calculation of I-frame costs with AQ.
f6bf719 GSOC merge part 1: Framework for ARM assembly optimizations x264 will detect which ARM core it's building for and only build NEON asm if the target is ARMv6 or above, then enable NEON at runtime.
3331007 Fix a bug in checkasm and two OSX fixes MC chroma checkasm test could crash in some situations Remove -lmx, as it's not needed and the iPhone doesn't have it. Remove unused sqrtf emulation; it breaks if math.h is included.
441c36c Improve QPRD Always check the last macroblock's QP, even if the normal search doesn't reach it. Raise the failure threshold when moving towards the last macroblock's QP. 0.2-1% improved compression.
d345ab0 Fix MB-tree with keyint<3 Also slightly improve VBV keyint handling.
5e9ae4c Fix bug in VBV lookahead + no MB-tree I-frames need to have VBV lookahead run on them as well.
d6846d3 Add support for frame-accurate parameter changes 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.
9892984 Fix x264_encoder_reconfig with multithreading New behavior: reconfigging the encoder will result in changes being applied to each of the encoding threads as they finish encoding the current frame.
c07d292 Fix two bugs in QPRD QPRD could in some cases force blocks to skip when they shouldn't be ~(+0.01db) Force QPRD to abide by qpmin/qpmax restrictions.
1b6086c Lookahead VBV 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.
1febc6b Fix bug in b-adapt 1 B-adapt 1 didn't use more than MAX(1,bframes-1) B-frames when MB-tree was off.
8236cc9 Fix a potential failure in VBV If VBV does underflow, ratecontrol could be permanently broken for the rest of the clip. Revert part of the previous VBV changes to fix this.
42d6b17 new API function x264_encoder_delayed_frames. fix x264cli on streams whose total length is less than the encoder latency.
62df17e Add no-mbtree to fprofile (and fix pyramid in fprofile)
7f8aa6f Don't print a warning about direct=auto in 2pass when B-frames are off
8eb6720 fix lowres padding, which failed to extrapolate the right side for some resolutions. 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.
9a54c48 simd part of x264_macroblock_tree_propagate. 1.6x faster on conroe.
886d1e9 MB-tree fixes: 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.
3b047a2 Add missing free()s for new data allocated for MB-tree Eliminates a memory leak.
6f4054f Fix keyframe insertion with MB-tree and no B-frames
21a3835 Fix MP4 output (bug in malloc checking patch)
7139b08 Gracefully terminate in the case of a malloc failure Fuzz tests show that all mallocs appear to be checked correctly now.
71506ae Fix a potential infinite loop in QPfile parsing on Windows ftell doesn't seem to work properly on Windows in text mode.
cb0b71f Fix delay calculation with multiple threads Delay frames for threading don't actually count as part of lookahead.
a1ed468 Add "veryslow" preset Apparently some people are actually *using* placebo, so I've added this preset to bridge the gap.
bb66c48 Macroblock-tree ratecontrol 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.
f21e71a Various 1-pass VBV tweaks Make predictors have an offset in addition to a multiplier. This primarily fixes issues in sources with lots of extremely static scenes, such as anime and CGI. We tried linear regressions, but they were very unreliable as predictors. Also allow VBV to be slightly more aggressive in raising QPs to avoid not having enough bits left in some situations. Up to 1db improvement on some clips.
5d75a9b Fix another 10L in QPRD An entry in subpel_iterations was missing. I have no idea how QPRD was working at all without this change.
97ed270 Update help and cleanup in ratecontrol.c Deal with some out-of-date information.
0538c56 15% faster refine_bidir_satd, 10% faster refine_bidir_rd (or less with trellis=2) re-roll a loop (saves 44KB code size, which is the cause of most of this speed gain) don't re-mc mvs that haven't changed
306c3ee Faster bidir_rd plus some bugfixes Cache chroma MC during refine_bidir_rd and use both the luma and chroma caches to skip MC in macroblock_encode. Fix incorrect call to rd_cost_part; refine_bidir_rd output was incorrect for i8>0. Remove some redundant clips. ~12% faster refine_bidir_rd.
d6eed01 Add "fastdecode" tune option It does what it says it does.
43773d2 Fix two bugs in QPRD fprofile settings now actually fprofile QPRD. Don't use i_mbrd before initializing it.
9d0b5e9 Fix 10l in QPRD Trellis used wrong lambda with trellis=1
4074956 Fix a nondeterminism with threads and subme>7 Also add a few more checks to eliminate the need for spel_border.
7733721 Add QPRD support as subme=10 Refactor trellis lambda selection to be done in analyse_init instead of in trellis. This will allow for more easy adaption of lambda later on; for now it allows constant lambda across variable QPs. QPRD is only available with adaptive quantization enabled and generally improves SSIM and visual quality. Additionally, weight the SSD values from RD based on the relative QP offset for chroma; helps visually at high QPs where chroma has a lower QP than luma. This fixes some visual artifacts created by QPRD at high QPs. Note that this generally hurts PSNR and SSIM, and so is only on when psy-RD is on.
f5e6980 SSSE3 cachesplit workaround for avg2_w16 Palignr-based solution for the most commonly used qpel function. 1-1.5% faster overall on Core 2 chips.
2956905 shut up valgrind warnings in trellis
88b35c2 New AQ algorithm option "Auto-variance" uses log(var)^2 instead of log(var) and attempts to adapt strength per-frame. Generates significantly better SSIM; on by default with --tune ssim. Whether it generates visually better quality is still up for debate. Available as --aq-mode 2.
f21daff Cacheline-split SSSE3 chroma MC ~70% faster chroma MC on 32-bit Conroe Also slightly faster SSSE3 intra_sad_8x8c
6c13403 Improve documentation of qp/crf options
49bf767 Merge array_non_zero into zigzag_sub Faster lossless, cleaner code. SSSE3 version of zigzag_sub_4x4_field, faster lossless interlaced coding.
b63f591 Fix bug in reference frame autoadjustment For some types of input file, x264 did the adjustment before width/height were known.
96e2229 Fix fprofile settings to match changes in defaults Also add b-adapt 2 to fprofile.
3f6713d Slightly faster dequant_flat assembly Eliminate some redundant shifts.
af2a4ec Totally new preset system for x264.c (not libx264), new defaults Other new features include "tune" and "profile" settings; see --help for more details. Unlike most other settings, "preset" and "tune" act before all other options. However, "profile" acts afterwards, overriding all other options. Our defaults have also changed: new defaults are --subme 7 --bframes 3 --8x8dct --no-psnr --no-ssim --threads auto --ref 3 --mixed-refs --trellis 1 --weightb --crf 23 --progress. Users will hopefully find these changes to greatly improve usability.
72534d4 Update Gabriel's email address in AUTHORS
f4dac81 Early termination for chroma encoding Faster chroma encoding by terminating early if heuristics indicate that the block will be DC-only. This works because the vast majority of inter chroma blocks have no coefficients at all, and those that do are almost always DC-only. Add two new helper DSP functions for this: dct_dc_8x8 and var2_8x8.  mmx/sse2/ssse3 versions of each. Early termination is disabled at very low QPs due to it not being useful there. Performance increase is ~1-2% without trellis, up to 5-6% with trellis=2. Increase is greater with lower bitrates.
7fd6a90 Fix bug in checkasm frame_init_lowres_core check didn't check the C plane. However, all x86 and PPC assembly was correct regardless of the unit test being incorrect.
f6d3166 Add subpartition cost for sub-8x8 blocks Improves sub-p8x8 mode decision.
b484fe1 Yet more CABAC and CAVLC optimizations Also clean up a lot of pointless code duplication in CAVLC MV coding.
2c7cb4c Various CABAC optimizations and cleanups Faster CABAC CBF context calculation for inter blocks. Add x264_constant_p(), will probably be useful in the future as well. Simpler subpartition functions. Clean up and optimize mvd_cpn a bit more. Various other minor optimizations.
364d7df AltiVec version of frame_init_lowres_core. 22.4x faster than C on PPC7450 and 25x on PPC970MP.
ab85c9b MMX CABAC mvd sum calculation Faster CABAC mvd coding.
803c9d9 Faster MV prediction Smaller code size, plus I get to use goto.
6199685 Fix potential crash in checkasm ssim_end4_sse2 requires aligned sums
b555e3f SSSE3, faster SSE2/MMX integral_init4v The real reason I wrote this was an excuse to use shufpd.
6841c5e configure check for uclinux
a952697 fix a crash on frame width <= 48 pixels
3f56e27 configure check for cc, rather than reporting lack of compiler as an asm error. configure check for -mno-cygwin, since it's removed from gcc4.
f7bfcfa a better way to keep track of mv candidates. 2-4% faster dia, hex, and umh.
8572d51 reorder some motion estimation patterns. this change is useless on its own, but segregates the bitstream-changing part out of my next optimization.
79377d7 Fix VBV warning broken in r915 x264 will now correctly warn about maxrate specified without bufsize even when a level is not set.
3da3f95 configure check for ssse3-capable binutils
a2c01c1 Fix 10L in r1155 Broke --me esa/tesa due to forgetting to add handling for x264_cost_mv_fpel.
37241b8 Fix bug where satd was incorrectly used with subme<=1 Faster subme<=1 with i4x4 enabled.
be17f03 Remove some pointless error handling code in cabac/cavlc
b6470f0 Save some memory on mv cost arrays Have quantizers that use the same lambda share the same cost array.
83d2c12 Various CABAC and CAVLC optimizations Backport CAVLC partial-inlining early termination to CABAC (~2-4% faster CABAC residual coding)
7b6ce6a fix a race condition at the end of thread_input
fb4e284 Various trellis speed optimizations
e86a173 Make i686 the default arch on x86_32 Disabling asm will default to a generic arch. Also fix configure for gcc 4.4.
0e05066 Faster signed golomb coding 3% faster CAVLC RDO and bitstream writing.
3b80f23 Faster spatial direct MV prediction unroll/tweak col_zero_flag
400740b More CABAC and CAVLC optimizations Simplified function calling for block_residual_write_(cabac|cavlc) and improved sigmap coding. Tried making 0/1-bit specific versions of CABAC asm, but benefit was minimal under GCC 4.3. Helped a decent bit under 3.4, but you shouldn't be using such old versions anyways.
f526f24 Various optimizations in frametype lookahead
ecae94a Some cosmetics/cleanup Move some macros to x86util.asm that should have been there to begin with. Fix a typo that didn't cause any issues.
d2e1e1c fix "incompatible types in initialization" compilation issues with GCC 4.3 (which is stricter than previous compiler version)
4fc8c03 fix conversions between vectors with differing element types or numbers of subparts errors
7554705 Add "coded blocks" stat to output information. This measures the total percentage of blocks, intra and inter, which have nonzero coefficients. "y,uvAC,uvDC" refers to luma, chroma DC, and chroma AC blocks. Note that skip blocks are included in this stat.
a908c88 Enable asm predict_8x8_filter I'm not entirely sure how this snuck its way out of holger's intra pred patch.
c74726e Remove various bits of dead code found by CLANG.
37424f8 Slightly faster SSE4 SA8D, SSE4 Hadamard_AC, SSE2 SSIM shufps is the most underrated SSE instruction on x86.
1024283 Various CABAC optimizations Move calculation of b_intra out of the core residual loop and hardcode it where applicable. Inlining cabac_mb_mvd was unnecessary and wasted tremendous amounts of code size.  Inlining only cache_mvd is faster and significantly smaller.
fe11a6f CAVLC optimizations faster bs_write_te, port CABAC context selection optimization to CAVLC.
1fda882 Faster CABAC RDO Since the bypass case is quite unlikely, especially when doing merged sigmap/level coding, it's faster to use a branch than a cmov.
3f9ba82 Activate intra_sad_x3_8x8c in lookahead
9d0c378 MBAFF interlaced coding is not allowed in baseline profile
b8808bf intra_sad_x3_8x8 assembly
8df40a4 intra_sad_x3_4x4 assembly
d39f8ae intra_sad_x3_8x8c assembly Also fix intra_sad_x3_16x16's use of "n" as a loop variable (broke SWAP)
d3ca464 Shave one instruction off CABAC encode_decision range_lps>>6 ranges from 4-7, so (range_lps>>6)-4 == (range_lps>>6) & 3
8475977 Faster probe_skip Add a second chroma threshold after the DC transform.
c109c8e Add missing "static" qualifier to two arrays Should slightly improve performance.
682b54d SSE2 zigzag_interleave Replace PHADD with FastShuffle (more accurate naming). This flag represents asm functions that rely on fast SSE2 shuffle units, and thus are only faster on Phenom, Nehalem, and Penryn CPUs.
8d82fec Faster integral_init palignr to avoid unaligned loads is worth it in inith, but not initv.
96733ab Faster SSSE3 hpel_filter_v ~10% faster hpel_filter on 64-bit Penryn. 32-bit version by Jason Garrett-Glaser.
10d6ef0 Faster SSE2 pixel_var Optimized using the DEINTB method from r1122.  ~32% faster var_16x16 on Conroe.
e1c7f12 SSSE3 hpel_filter_v Optimized using the same method as in r1122.  Patch partially by Holger. ~8% faster hpel filter on 64-bit Nehalem
3d78062 Update some asm copyright headers
2dca5f5 Vastly faster SATD/SA8D/Hadamard_AC/SSD/DCT/IDCT Heavily optimized for Core 2 and Nehalem, but performance should improve on all modern x86 CPUs. 16x16 SATD: +18% speed on K8(64bit), +22% on K10(32bit), +42% on Penryn(64bit), +44% on Nehalem(64bit), +50% on P4(32bit), +98% on Conroe(64bit) Similar performance boosts in SATD-like functions (SA8D, hadamard_ac) and somewhat less in DCT/IDCT/SSD. Overall performance boost is up to ~15% on 64-bit Conroe.
f387217 Update x264 copyright date
8544346 Remove pre-scenecut from fprofile commands as well Also add psy-trellis to fprofile
6f0b2a9 Slightly faster 8x16 SAD on Penryn Core 2 Same as MMX 8x16 cacheline SAD, but calls SSE2 8x16 SAD in non-cacheline case. Only Nehalem benefits from sizes smaller than 8x16, and Nehalem doesn't use cacheline functions, so no smaller versions are included.
1cc16dc Fix scenecut and VBV with videos of width/height <= 32 Also remove an unused variable
3e4946f Remove non-pre scenecut Add support for no-b-adapt + pre-scenecut (patch by BugMaster) Pre-scenecut was generally better than regular scenecut in terms of accuracy and regular scenecut didn't work in threaded mode anyways. Add no-scenecut option (scenecut=0 is now no scenecut; previously it was -1) Fix an incorrect bias towards P-frames near scenecuts with B-adapt 2. Simplify pre-scenecut code.
7ddb2c7 Add AltiVec version of hadamard_ac. 2.4x faster than the C version. Note this this implementation is pretty naive and should be improved by implementing what's discussed in this ML thread: date: Mon, Feb 2, 2009 at 6:58 PM subject: Re: [x264-devel] [PATCH] AltiVec implementation of hadamard_ac routines
11863ac Fix regression in r1085 Deblocking was very slightly incorrect with partitions=all. Bug found by BugMaster.
a933a3e Optimize neighbor CBP calculation and fix related regression r1105 introduced array overflow in cbp handling
cc4f807 Show FPS when importing a raw YUV file
f43e22a Windows 64-bit support A "make distclean" is probably required after updating to this revision.
d56e13f Minor fixes and cosmetics Suppress a GCC warning, fix a non-problematic array overflow, one REP->REP_RET.
05afd8e fix 10l in 75b495f2723fcb77f Original thread: date: Mon, Feb 9, 2009 at 9:37 PM subject: [x264-devel] commit: Spare a vec_perm and a vec_mergeh though using a LUT of permutation vectors . (Guillaume Poirier )
75b495f Spare a vec_perm and a vec_mergeh though using a LUT of permutation vectors.
37f98cb Promote chroma planes to 16 byte alignment. This will allow simplifying vectors loads that can only load 16-bytes aligned data (such as AltiVec).
b5b9728 Fix 10L in intra pred Forgetting a %define resulted in SIGILL on 32-bit systems without SSE (e.g. Athlon XP).
0ee50db Add decimation in i16x16 blocks Up to +0.04db with CAVLC, generally a lot less with CABAC.
9bf45f6 Much faster CABAC residual context selection Up to ~17% faster CABAC RDO, ~36% faster intra-only CABAC RDO. Up to 7% faster overall in extreme cases.
3927938 Faster coeff_last64 on 32-bit
3261574 More intra pred asm optimizations SSSE3 version of predict_8x8_hu SSE2 version of predict_8x8c_p SSSE3 versions of both planar prediction functions Optimizations to predict_16x16_p_sse2 Some unnecessary REP_RETs -> RETs. SSE2 version of predict_8x8_vr by Holger. SSE2 version of predict_8x8_hd. Don't compile MMX versions of some of the pred functions on x86_64. Remove now-useless x86_64 C versions of 4x4 pred functions. Rewrite some of the x86_64-only C functions in asm.
711e6e8 Speed-up mc_chroma_altivec by using vec_mladd cleverly, and unrolling. Also put width == 2 variant in its own scalar function because it's faster than a vectorized one.
b69548a Merging Holger's GSOC branch part 2: intra prediction Assembly versions of most remaining 4x4 and 8x8 intra pred functions. Assembly version of predict_8x8_filter. A few other optimizations. Primarily Core 2-optimized.
122a54a0 10l: fix compilation with GCC 4.3+
c0be810 Faster 8x8dct+CAVLC interleave Integrate array_non_zero with the CAVLC 8x8dct interleave function. Roughly 1.5-2x faster than the original separate array_non_zero method.
91bffdc Measure CBP cost in i8x8 RD refinement ~0.02-0.05db PSNR gain at high quants in intra-only encoding, pretty small otherwise. Allows a small optimization in i8x8 encoding.
e404f35 Take advantage of saturated signed horizontal sum instructions in the variance computation epilogue since there won't be any overflow triggering an overflow. Suggested by Loren Merritt
4c171c3 Massive overhaul of nnz/cbp calculation Modify quantization to also calculate array_non_zero. PPC assembly changes by gpoirior. New quant asm includes some small tweaks to quant and SSE4 versions using ptest for the array_non_zero. Use this new feature of quant to merge nnz/cbp calculation directly with encoding and avoid many unnecessary calls to dequant/zigzag/decimate/etc. Also add new i16x16 DC-only iDCT with asm. Since intra encoding now directly calculates nnz, skip_intra now backs up nnz/cbp as well. Output should be equivalent except when using p4x4+RDO because of a subtlety involving old nnz values lying around. Performance increase in macroblock_encode: ~18% with dct-decimate, 30% without at CRF 25. Overall performance increase 0-6% depending on encoding settings.
8ae672f Add PowerPC support for "checkasm --bench", reading the time base register. This isn't ideal since the `time base' register is running at a fraction of the processor cycle speed, so the measurement isn't as precise as x86's rdtsc. It's better than nothing though...
c9095eb fix detection of pthread and isfinite on OpenBSD
1df50b9 remove $ECHON kludge, which broke on SunOS. bring back `gcc -MT`. remove auto-reconfigure on svn update, which has done nothing since we stopped using svn. fix $AS on sparc (was disabled by mmx check). fix --extra-asflags (was ignored). mark bash scripts as bash, not sh
60f4cd8 1.6x faster satd_c (and sa8d and hadamard_ac) with pseudo-simd. 60KB smaller binary.
71c5a8d Hack around a potential failure point in VBV pred_b_from_p can become absurdly large in static scenes, leading to rare collapses of quality with VBV+B-frames+threads. This isn't a final fix, but should resolve the problem in most cases in the meantime.
8e2c4b7 Much faster chroma encoding and other opts ~15% faster chroma encode by reorganizing CBP calculation and adding special-case idct_dc function, since most coded chroma blocks are DC-only. Small optimization in cache_save (skip_bp) Fix array_non_zero to not violate strict aliasing (should eliminate miscompilation issues in the future) Add in automatic substitutions for some asm instructions that have an equivalent smaller representation.
355c445 add AltiVec implementation of x264_mc_copy_w16_aligned
71ac0a3 add AltiVec implementation of x264_pixel_var_16x16 and x264_pixel_var_8x8
1959672 add AltiVec 16 <-> 32 bits conversions macros
39a2796 Replace 16x16=>32 mul + pack + add by a simple 16x16=>16 multiply-add. Suggested by Loren.
5fb6417 Eliminate support for direct_8x8_inference=0 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.
a48d1d0 Add AltiVec and CPU numbers detection on OpenBSD.
09e76c9 Add AltiVec implementation of predict_8x8c_p. 2.6x faster than scalar C.
bde164d Warn if direct auto wasn't set on the first pass And, if it wasn't, run direct auto as if it was the first pass, rather than simply forcing temporal direct mode on all frames. Also a small tweak to coeff_level_run asm.
201f7ad Changes the PowerPC ppccommon.h header so it no longer checks for a particular OS such as Linux but instead looks for HAVE_ALTIVEC_H being set. Fixes all *BSD/PowerPC builds.
56e9183 update x264_hpel_filter_altivec's prototype to match the one of the C version. It changed in commit 045ae4045a1827555b3eaab4fbf3c9809e98c58f (factorization of mallocs) (NB: Altivec implementation wasn't allocating and writing to any scratch memory.)
d2b6423 rename vector+array unions to closer match the vector typedefs names.
264e447 Add Altivec implementation of all the remaining 16x16 predict routines.
e46f648 Cache ref costs and use more accurate MV costs New MV costs should improve quality slightly by improving the smoothness of the field of MV costs (and they're closer to CABAC's actual costs). Despite being optimized for CABAC, they still help under CAVLC, albeit less. MV cost change by Loren Merritt
79bfb03 Support forced frametypes with scenecut/b-adapt This allows an input qpfile to be used to force I-frames, for example. The same can be done through the library interface. Document the format of the qpfile in --longhelp and the forcing of frametypes in x264.h Note that forcing B-frames and B-refs may not always have the intended result. Patch partially by Steven Walters <kemuri9@gmail.com>.
7c4f829 Remove an IDIV from i8x8 analysis Only one IDIV is left in macroblock level code (transform_rd)
b6bb3d4 Fix regression in r1066 With some combinations of video width and other settings, the scratch buffer was slightly too small. This caused heap corruption on some systems. Also prevent merange from being raised during encoding with esa/tesa through encoder_reconfig, as this no longer works.
6a4a9be Disable B-frames in lossless mode They hurt compression anyways, and direct auto was bugged with lossless.
f586ba5 Factorize in ppccommon.h the conditional inclusion of altivec.h on Linux systems.
87b6d55 Disable __builtin_clz() intrinsic on gcc versions prior to 3.4. The function did not exist before that version.
6f7c9be Small tweaks to coeff asm Factor out a few redundant pxors Related cosmetics
ed32ad2 Use the correct strtok under MSVC Also change one malloc -> x264_malloc
390d26a Add stack alignment for lookahead functions Should allow libx264 to be called from non-gcc-compiled applications without adding force_align_arg_pointer.
00cef64 Add support for SSE4a (Phenom) LZCNT instruction Significantly speeds up coeff_last and coeff_level_run on Phenom CPUs for faster CAVLC and CABAC. Also a small tweak to coeff_level_run asm.
045ae40 factor mallocs out of hpel, ssim, and esa. there should now be no memory allocation outside of init-time.
681544e Much faster CAVLC RDO and bitstream writing Pure asm version of level/run coding.  Over 2x faster than C. Up to 40% faster CAVLC RDO.  Overall benefit up to ~7.5% with RDO or ~5% with fast encoding settings.
648e132 Cosmetics: cleaner syntax for defining temporary registers in asm Globally define t#[qdwb], so that only t# needs to be locally defined when reorganizing registers
84a1ca6 Much faster CABAC RDO Since RDO doesn't care about what order bit costs are calculated, merge sigmap and level coding into the same loop in RDO. This is bit-exact for 4x4dct but slightly incorrect for 8x8dct due to the sigmap containing duplicated contexts. However, the PSNR penalty of this is extremely small (~0.001db). Speed benefit is about 15% in 4x4dct and 30% in 8x8dct residual bit cost calculation at QP20. Overall encoding speed benefit is up to 5%, depending on encoding settings. Also remove an old unnecessary CABAC table that hasn't been used for years.
40ad1b6 VLC table optimizations Slightly reorganize VLC tables for ~2% faster block_residual_write_cavlc. Also a small optimization in p8x8 CAVLC.
839cd8c Fix crash in --me esa/tesa introduced in r1058 Also suppress the last mingw warning message
42070df Optimize variance asm + minor changes Remove SAD argument from var, not needed anymore. Speed up var asm a bit by eliminating psadbw and instead HADDWing at end. Eliminate all remaining warnings on gcc 3.4 on cygwin Port another minor optimization from lavc (pskip)
265d61b Minor CABAC cleanups and related optimizations Merge the two list tables to allow cleaner MC/CABAC/CAVLC code Remove lots of unnecessary {s Port some very minor opts from lavc
a4ec102 faster ESA init reduce memory if using ESA and not p4x4
5f8a149 More macroblock_cache optimizations Patch partially by Loren Merritt
e59ee24 Faster macroblock_cache_rect Explicit loop unrolling
2b8d6a6 Optimizations in predict_mv_direct Add some early terminations and minor optimizations This change may also fix the extremely rare direct+threading MV bug.
918ff3c Fix visual corruption when picture width was not mod 32. The previous Altivec implemention of mc_chroma assumed that i_src_stride was always mod 16.
9089d21 Add support for FSF GCC version >= 4.3 on OSX. So far, only Apple GCC version was supported.
ad2c84f More accurate refcost for p8x8 CAVLC Slightly better quality, especially in non-RD mode, with CAVLC.
549cc55 use lookup tables instead of actual exp/pow for AQ Significant speed boost, especially on CPUs with atrociously slow floating point units (e.g. Pentium 4 saves 800 clocks per MB with this change). Add x264_clz function as part of the LUT system: this may be useful later. Note this changes output somewhat as the numbers from the lookup table are not exact.
877d22e Suppress saveptr warnings on Windows GCC
0fdd040 More small speed tweaks to macroblock.c
77028cd Much faster CAVLC residual coding Use a VLC table for common levelcodes instead of constructing them on-the-spot Branchless version of i_trailing calculation (2x faster on Nehalem) Completely remove array_non_zero_count and instead use the count calculated in level/run coding.  Note: this slightly changes output with subme > 7 due to different nonzero counts being stored during qpel RD.
f773bf0 fix compilation with GCC-4.3+
71d34b4 High Profile allows 25% higher maxbitrate/cpb Correct level detection to take this into account.
cc40e30 s/nasm/yasm in VS project file
6c3e025 Cosmetic: update various file headers.
2f031b0 add date and compiler to `x264 --version`
5df2a71 10L in r1041
12724e6 Significantly faster CABAC and CAVLC residual coding and bit cost calculation Early-terminate in residual writing using stored nnz counts To allow the above, store nnz counts for luma and chroma DC Add assembly functions to find the last nonzero coefficient in a block Overall ~1.9% faster at subme9+8x8dct+qp25 with CAVLC, ~0.7% faster with CABAC Note this changes output slightly with CABAC RDO because it requires always storing correct nnz values during RDO, which wasn't done before in cases it wasn't useful. CAVLC output should be equivalent.
1591275 dequant_4x4_dc assembly About 3.5x faster DC dequant on Conroe
2338e13 fix an overflow in dct4x4dc_mmx (unlikely to have occurred in any real video)
a7fd9f5 Remove nasm support Nasm won't correctly parse the SSE4 code introduced a few revisions ago, so we're removing support. Users should upgrade to yasm 0.6.1 or later.
0fe9b85 Fix rare warning messages in ratecontrol due to r1020
adffb7f Fix MSVC compilation and clean up MSVC build file Remove Release64 which never worked anyways.
e1013e8 Faster width4 SSD+SATD, SSE4 optimizations Do satd 4x8 by transposing the two blocks' positions and running satd 8x4. Use pinsrd (SSE4) for faster width4 SSD Globally replace movlhps with punpcklqdq (it seems to be faster on Conroe) Move mask_misalign declaration to cpu.h to avoid warning in encoder.c. These optimizations help on Nehalem, Phenom, and Penryn CPUs.
cab23dd fix indentation, whitespace cleanup, more consistent indentation of macro backslashes
4bf4109 Change some macros to be more sensitive to memory alignment, thus avoiding useless loads/stores and calculations of permutation vectors. Affected functions are all of mc_luma, mc_chroma, 'get_ref', SATD, SA8D and deblock. Gains globally vary from ~5% - 15% on a depending on settings running on a 1.42 ghz G4.
8215f79 refactor satd. 20KB smaller binary. refactor sa8d. slightly faster. more checkasm for hadamard.
3a028c8 Fix crash with threads and SSEMisalign on Phenom Misalign mask needed to be set separately for each encoding thread.
f9dba8b Phenom CPU optimizations Faster hpel_filter by using unaligned loads instead of emulated PALIGNR Faster hpel_filter on 64-bit by using the 32-bit version (the cost of emulated PALIGNR is high enough that the savings from caching intermediate values is not worth it). Add support for misaligned_mask on Phenom: ~2% faster hpel_filter, ~4% faster width16 multisad, 7% faster width20 get_ref. Replace width12 mmx with width16 sse on Phenom and Nehalem: 32% faster width12 get_ref on Phenom. Merge cpu-32.asm and cpu-64.asm Thanks to Easy123 for contributing a Phenom box for a weekend so I could write these optimizations.
cb3c213 A few tweaks to decimate asm A little bit faster on both 32-bit and 64-bit
83baa7f Nehalem optimization part 2: SSE2 width-8 SAD Helps a bit on Phenom as well ~25% faster width8 multiSAD on Nehalem
aa14719 Add subme=0 (fullpel motion estimation only) Only for experimental purposes and ultra-fast encoding.  Probably not a good idea for firstpass.
745a48b Fix minor memory leak in r1022
fdb6114d r1024 borked checkasm Remove idct/dct2x2 from checkasm as they are no longer in dctf
2652abe Faster chroma encoding 9-12% faster chroma encode. Move all functions for handling chroma DC that don't have assembly versions to macroblock.c and inline them, along with a few other tweaks.
f13d463 Various cosmetics and minor fixes Disable hadamard_ac sse2/ssse3 under stack_mod4 Fix one MSVC compilation warning Fix compilation in debug mode in certain cases on x64 Remove eval.c from MSVC project Fix crash when VBV is used in CQP mode Patches by MasterNobody
7cdaf63 Faster b-adapt + adaptive quantization 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.
852579b Faster CABAC residual encoding 6% faster block_residual_write_cabac in RD mode.
418cace Fix potential crash in the case that the input statsfile is too short Also resolve various other potential weirdness (such as multiple copies of the same error message in threaded mode).
a5ac6a5 Initial Nehalem CPU optimizations movaps/movups are no longer equivalent to their integer equivalents on the Nehalem, so that substitution is removed. Nehalem has a much lower cacheline split penalty than previous Intel CPUs, so cacheline workarounds are no longer necessary. Thanks to Intel for providing Avail Media with the pre-release Nehalem CPU needed to prepare these (and other not-yet-committed) optimizations. Overall speed improvement with Nehalem vs Penryn at the same clock speed is around 40%.
41b8069 Fix potential infinite loop in VBV under GCC 4.2
e4c4568 Encoder_reconfig: esa/tesa can only be enabled if they were on to begin with Bug report by kemuri-_9.
dbc5ef0 Fix bug in hadamard_ac SSE assembly Some extreme inputs could cause overflows.
a0a1bfa Full sub8x8 RD mode decision Small speed penalty with p4x4 enabled, but significant quality gain at subme >= 6 As before, gain is proportional to the amount of p4x4 actually useful in a given input at the given bitrate.
aa40e41 Optimize CABAC bit cost calculation Speed up cabac mvd and add new precalculated transition/entropy table. Add "noup" function for cabac operations to not update the state table when it isn't necessary. 1-3% faster macroblock_size_cabac. Cosmetics
d7df1a4 Replace "git-command" with "git command" in version.sh for git 1.6 support
990274c Add assembly version of CAVLC 8x8dct interleave Faster CAVLC encoding and RDO with 8x8dct
86a0fe5 Add support for psy-rd/trellis to encoder_reconfig
4c78f09 Fix Darwin speed regression
8ca555e Further improve prediction of bitrate and VBV in threaded mode
8fa0bf3 Sub-8x8 Qpel-RD in P-frames Improves quality when using p8x4/p4x8/p4x4 subpartitions Benefit is proportional to how many sub-8x8 partitions are used; helps most at high bitrates and low resolutions.
d0add77 Faster qpel-RD 3-4% faster qpel-RD; avoid re-checking bmv/pmv during the hex search.
f451563 Some minor optimizations in RD refinement Don't write b subpartition in CABAC RDO Calculate nonzero count in i4x4 CAVLC RDO
84ede33 Faster deblocking when p4x4 isn't used Most of the MV checks can be skipped, resulting in faster strength calculation
ce0b110 Print profile and level information upon starting encode Previously level was only printed as part of autodetect, and only in verbose mode.
296b39d Fix possible crash in trellis at very low QPs
f5da811 Add assembly versions of decimate_score 3-7x faster decimation, 1-3% faster overall
6d9ef8a Fix typo in subme8/9 lossless qpel-RD Slightly improves compression.
79194ca Extend trellis to support luma/chroma DC and chroma AC Small speed loss in trellis 1, slightly larger in trellis 2, but significant quality improvement.
cc51047 rm gtk, avc2avi. I don't remember why I allowed a gui into the repository in the first place. There's nothing that makes this one special relative to all the other x264 guis. avc2avi doesn't compile since we removed the bitstream reader. And avc doesn't belong in avi.
6768543 Resolve quality regression in r996 Accidentally removed the wrong line of code.  I think this classifies as a "10l". Thanks to techouse for initial bug report and skystrife for helping me find it.
65b837f Fix minor memory leak accidentally added with the addition of b-adapt 2
c89bc90 Rework subme system, add RD refinement in B-frames The new system is as follows: subme6 is RD in I/P frames, subme7 is RD in all frames, subme8 is RD refinement in I/P frames, and subme9 is RD refinement in all frames. subme6 == old subme6, subme7 == old subme6+brdo, subme8 == old subme7+brdo, subme9 == no equivalent --b-rdo has, accordingly, been removed.  --bime has also been removed, and instead enabled automatically at subme >= 5. RD refinement in B-frames (subme9) includes both qpel-RD and an RD version of bime.
2324c70 Fix potential miscompilation of some inline asm Caused problems under some gcc 4.x versions with predictive lossless
b35a044 Replace High 4:4:4 profile lossless with High 4:4:4 Predictive. This improves lossless compression by about 4-25% depending on source. The benefit is generally higher for intra-only compression. Also add support for 8x8dct and i8x8 blocks in lossless mode; this improves compression very slightly. In some rare cases 8x8dct can hurt compression in lossless mode, but its usually helpful, albeit marginally. Note that 8x8dct is only available with CABAC as it is never useful with CAVLC. High 4:4:4 Predictive replaced the previous profile in a 2007 revision to the H.264 standard. The only known compliant decoder for this profile is the latest version of CoreAVC. As I write this, JM does not actually correctly decode this profile. Hopefully this lack of support will soon change with this commit, as x264 will be (to my knowledge) the first compliant encoder.
37269f4 Fix typo in progress indicator when using piped input
e21b11f avg_weight_ssse3
972814a fix bitstream writer on bigendian 64bit (regression in r903)
7265a21 remove authors whose code no longer exists
4873401 more diagnostics when configure finds an unsuitable assembler
41c9e22 Make x264 progress indicator more concise Now the % indicator should be readable on the header of a minimized window on Windows systems.
e71168d Fix deblocking + threads + AQ bug At low QPs, with threads and deblocking on, deblocking could be improperly disabled. Revision in which this bug was introduced is unknown; it may be as old as b_variable_qp in x264 itself.
24961b0 Resolve possible crash in bime, improve the fix in r985
e256ea1 Fix rare crash issue in b-adapt Regression *probably* in r979
36223ea Merging Holger's GSOC branch part 1: hpel_filter speedups
b4b6483 r980 borked weighted bime
cc0fd8a Disable I_PCM with psy-RD psy-RD seems to put the PCM threshold a bit lower than it should be, so PCM is now disabled under psy-RD.
9e319ff Merge avg and avg_weight avg_weight no longer has to be special-cased in the code; faster weightb
b4cb6ef Rewrite avg/avg_weight to take two source pointers This allows the use of get_ref instead of mc_luma almost everywhere for bipred
6d4af8d Use low-resolution lookahead motion vectors as an extra predictor Improves quality considerably (0-5%) in 1pass/CRF mode, especially with lower --me values and complex motion. Reverses the order of lowres lookahead search to improve the usefulness of the extra predictors.
dcb123f Add missing free() for f_qp_offset in frame.c
2042a19 Correct misprediction of bitrate in threaded mode Improves bitrate accuracy in cases with large numbers of threads. Loosely based on a patch by BugMaster.
7eaff17 Fix a case in which VBV underflows can occur Fix a potential case where a frame might be initially allocated too low a QP, which would then have to be raised a low during row-based ratecontrol. In some cases, this could even produce VBV underflows in 2pass mode.
90220ef Use correct format specifier for uint64_t
a92bbc2 Cache motion vectors in lowres lookahead 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.
f473669 Fix regression in b-adapt patch: encoder_open failed for multipass encodes without bframes.
cbdaeb0 Stop SAR in y4m input from overriding --sar on commandline
ead8857 hadamard_ac for psy-rd c version is 1.7x faster than satd+sa8d+sad ssse3 version is 2.3x faster than satd+sa8d+sad
abe6416 Psychovisually optimized rate-distortion optimization and trellis The latter, psy-trellis, is disabled by default and is reserved as experimental; your mileage may vary. Default subme is raised to 6 so that psy RD is on by default.
9818865 Add optional more optimal B-frame decision method 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).
173b40c Move adaptive quantization to before ratecontrol, eliminate qcomp bias 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!
869d5e4 Fix crash when using b-adapt at resolutions 32x32 or below. Original patch by BugMaster, but was mostly rewritten in order to make b-adapt actually *work* at such resolutions, not merely stop crashing.
bb11e37 Add title-bar progress indicator under WIN32 Also add bitrate-so-far output when piping data to x264 (total frames not known) Patch mostly by recover from Doom9.
3d2983d Revert part of r963 In some rare (but significant) cases, the optimized nal_encode algorithm gave incorrect results.
e48a952 Predict 4x4_DC asm Also remove 5-year-old unnecessary #define that reduced speed unnecessarily under MSVC-compiled builds
d21665d Faster NAL unit encoding and remove unused nal_decode Small speedup at very high bitrates
e0d7f9e CAVLC cleanup and optimizations Also move some small functions in macroblock.c to a .h file so they can be inlined.
954117a Faster avg_weight assembly Unrolling the loop a bit improves performance
f4d733a Faster H asm intra prediction functions Take advantage of the H prediction method invented for merged intra SAD and apply it to regular prediction, too.
b0c599b Add merged SAD for i16x16 analysis Roughly 30% faster i16x16 analysis under subme=1
f622946 Add sad_aligned for faster subme=1 mbcmp Distinguish between unaligned and aligned uses of mbcmp SAD_aligned, for MMX SADs, uses non-cacheline SADs.
7ce0f2c Improve progress indicator Show average bitrate so far during encoding Decrease update interval for longer encodes (max of 10 frames encoded between updates)
7b71d58 Fix speed regression in r951 Row SATDs are only necessary in VBV mode, so don't need to be checked if VBV is off.
d4265bb zigzag asm
6b33ca9 fix SOFLAGS used when building gtk frontend patch by Markus Kanet %darkvision A gmx P eu%
3727f2b remove the distinction between itex and ptex (changes 2pass statsfile format)
0886318 hardcode the ratecontrol equation, and remove the rceq option
445d87e Fix some uses of uninitialized row_satd values in VBV Resolves some issues with QP51 in I-frames with scenecut
3c3dc3c Activate trellis in p8x8 qpel RD Also clean up macroblock.c with some refactoring Note that this change significantly reduces subme7+trellis2 performance, but improves quality. Issue originally reported by Alex_W.
60c4f7e Improve VBV accuracy Don't use the previous frame's row SATD as a predictor if it is too different from this frame's row SATD.
9d4d168 improve generation of Darwin libraries Patch by vmrsss %vmrsss A gmail P com%
af82aae Fix compilation in gcc 3.4.x (issue in r946) Due to a bug in gcc 3.4.x, in certain cases of inlining, the array_non_zero_int_mmx inline asssembly is miscompiled and causes a crash with --subme 7 --8x8dct. This minor hack fixes this issue.
e3a0622 shut up various gcc warnings
82efeea fix a crash with invalid args and --thread-input (introduced in r921)
36caec4 drop support for x86_32 PIC.
bff4dba use permute macros in satd move some more shared macros to x264util.asm
fd5cc6d cosmetics
ae8da3e r940 broke threads
2cdc944 Cleanups in macroblock_cache_save/load A bit more loop unrolling, and moving some constant code to the global init function
bae10fe Deblocking code cleanup and cosmetics Convert the style of the deblocking code to the standard x264 style Eliminate some trailing whitespace
9881ffd 4% faster deblock: special-case macroblock edges Along with a bit of related code reorganization and macroification
d994e0b Add dedicated variance function instead of using SAD+SSD Faster variance calculation
7c35ae4 6% faster deblock: remove some clips, earlier termiantion on low qps.
c6456de Faster deblocking Early termination for bS=0, alpha=0, beta=0 Refactoring, various other optimizations About 30% faster deblocking overall.
fd1de69 asm cosmetics
4b24e98 yet another posix-emulating define on solaris
ad47d25 update msvc projectfile
26600fe drop support for msvc6
91d865c Prevent VBV from lowering quantizer too much This code seemed to act up unexpectedly sometimes, creating a situation where in 1-pass VBV mode, a frame's quantizer would drop all the way to qpmin and then shoot back upwards to qpmax, causing serious visual issues. This change may decrease bitrate in VBV mode, but that is preferable to the artifacting produced by this code.
245833c Improve subme7 at low QPs and add subme7 support in lossless mode
4816918 cosmetics: merge x86inc*.asm
d1fe093 Add missing x264util.asm
e5eeedc Basic sanity checking of qpmax/qpmin options
9e864aa Fix regression in r922 set the chroma DC coefficients to zero for residual coding in qpel-rd fix C99ism
c51c761 Refactor asm macros part 2: DCT
90b30e6 Refactor asm macros part 1: DCT
4e7f5cb Improve intra RD refine, speed up residual_write_cabac a do/while loop can be used for residual_write, but i8x8 had to be fixed so that it wouldn't call residual_write with zero coeffs proper nnz handling added to cabac intra rd refine chroma cbp added to 8x8 chroma rd cbp was tested, but wasn't useful
c761eb0 Fix a few more minor memleaks
8c8acae stats summary: print distribution of numbers of consecutive B-frames
cf466eb add interlacing to the list of stuff checked by x264_validate_levels
91fe97b Fix C99-ism in r907
244f9be Faster temporal predictor calculation Split into a separate commit because this changes rounding, and thus changes output slightly.
aa0e627 Align lowres planes for improved cacheline split performance
14046ae autodetect level based on resolution/bitrate/refs/etc, rather than defaulting to L5.1 if vbv is not enabled (and especially in crf/cqp), we have to guess max bitrate, so we might underestimate the required level.
fee2f2c fix bs_write_ue_big for values >= 0x10000. (no immediate effect, since nothing writes such values yet)
64848ff Fix lossless mode borked in r901
9c5e557 Relax QPfile restrictions Allow a QPfile to contain fewer frames than the total number of frames in the video and have ratecontrol fill in the rest. Patch by kemuri9.
8a440db Limit MVrange correctly in interlaced mode Bug report by Sigma Designs, Inc.
0976ead Fix bug with PCM and adaptive quantization In rare cases CABAC desync could occur, causing bitstream corruption
21ee122 Fix memory leak upon x264 closing Doesn't affect the CLI, but potentially important for programs which call x264 as a shared library.
8cd5d60 Fix compilation on PPC systems (borked in r903) Bigendian systems didn't have endian_fix32 defined
7f67bb4 Add L1 reflist and B macroblock types to x264 info Also remove display of "PCM" if PCM mode is never used in the encode. L1 reflist information will only show if pyramid coding is used.
ceb2df9 Fix and enable I_PCM macroblock support In RD mode, always consider PCM as a macroblock mode possibility Fix bitstream writing for PCM blocks in CAVLC and CABAC, and a few other minor changes to make PCM work. PCM macroblocks improve compression at very low QPs (1-5) and in lossless mode.
ca9c628 de-duplicate vlc tables
3d2b000 faster ue/se/te write
8951797 faster bs_write
58ffd4e cosmetics in ssd asm
58d7d06 Various optimizations and cosmetics Update AUTHORS file with Gabriel and me update XCHG macro to work correctly in if statements Add new lookup tables for block_idx and fdec/fenc addresses Slightly faster array_non_zero_count_mmx (patch by holger) Eliminate branch in analyse_intra Unroll loops in and clean up chroma encode Convert some for loops to do/while loops for speed improvement Do explicit write-combining on --me tesa mvsad_t struct Shrink --me esa zero[] array Speed up bime by reducing size of visited[][][] array
a9af942 Resolve floating point exception with frame_init_lowres mmx In some cases, the mmx version of frame_init_lowres could leave the FPU uninitialized for use in ratecontrol, resulting in floating point exceptions. Since frame_init_lowres is such a time-consuming function, an emms was just put at the end, since it costs almost nothing compared to the total time of frame_init_lowres.
f8428ed Update my email address
6b3087c Update file headers throughout x264 Update "Authors" lists based on actual authorship; highest is most important Update copyright notices and remove old CVS tags from file headers Add file headers to GTK and other sections missing them Update FSF address Other header-related cosmetics
79bd599 denoise_dct asm
65df9eb cosmetics in permutation macros SWAP can now take mmregs directly, rather than just their numbers
16b8f79 Fix bug in adaptive quantization In some cases adaptive quantization did not correctly calculate the variance. Bug reported by MasterNobody
3440cf1 lowres_init asm rounding is changed for asm convenience. this makes the c version slower, but there's no way around that if all the implementations are to have the same results.
1c8f807 Optimizations and cosmetics in macroblock.c If an i4x4 dct block has no coefficients, don't bother with dequant/zigzag/idct.  Not useful for larger sizes because the odds of an empty block are much lower. Cosmetics in i16x16 to be more consistent with other similar functions. Add an SSD threshold for chroma in probe_skip to improve speed and minimize time spent on chroma skip analysis. Rename lambda arrays to lambda_tab for consistency.
ad1d7a4 some asm functions require aligned stack. disable these when compiling with msvc/icc.
2ca4593 Move bitstream end check to macroblock level Additionally, instead of silently truncating the frame upon reaching the end of the buffer, reallocate a larger buffer instead.
a55f1c3 Convert NNZ to raster order and other optimizations Converting NNZ to raster order simplifies a lot of the load/store code and allows more use of write-combining. More use of write-combining throughout load/save code in common/macroblock.c GCC has aliasing issues in the case of stores to 8-bit heap-allocated arrays; dereferencing the pointer once avoids this problem and significantly increases performance. More manual loop unrolling and such. Move all packXtoY functions to macroblock.h so any function can use them. Add pack8to32. Minor optimizations to encoder/macroblock.c
2c59717 mc_chroma_sse2/ssse3
cb29306 checkasm --bench=function_name
22d3c04 interleave psnr/ssim computation with reference frame filtering, to improve cache coherency
1075536 Add more inline asm and a runtime check for MMXEXT support x264 will now terminate gracefully rather than SIGILL when run on a machine with no MMXEXT support. A configure option is now available to build x264 without assembly support for support on such old CPUs as the Pentium 2, K6, etc.
63657b5 Use aligned memcpy for x264_me_t struct and cosmetics
23132cb Cosmetics and loop unrolling GCC is not very good at loop unrolling in cases where it can perform constant propagation, so the unrolling unfortunately has to be done manually.
cfaac5c Fix regression in 64-bit in r882 i_mvc needs to be 64-bit when used with a 64-bit memory pointer
11ae289 More tweaks to me.c Added inline MMX version of UMH's predictor difference test Various cosmetics throughout me.c Removed a C99-ism introduced in r878.
e098505 Fix regression in r736 r736 added intra RD refinement to B-frames; however, it is possible for subme=7 to be used without b-rdo. This means intra RD isn't run, and therefore it is possible for intra chroma analysis to not have been run, since update_cache was never called for an intra block, and chroma ME is not required even at subme=7. r801, which removed a memset, made this worse because previously the chroma prediction mode was at least initialized to zero; now it was not initialized at all. Therefore, --no-chroma-me, --subme 7, and no --b-rdo had the potential to crash. This change restricts intra RD refinement to only be run when --b-rdo is enabled (sensible to begin with), thus preventing a crash in this case.
2389de2 Fix regression in r850 Bug resulted in rare incorrect chroma encoding
3464b0e Cosmetics in VBV handling
a95ecfd Tweaks and cosmetics in me.c Use write-combining for predictor checking and other tweaks.
c74a8e2 Partially inline trellis quantization Inlining trellis into the 4x4/8x8 trellis wrappers increases trellis speed by about 5-10% through constant propagation.
82ea3a4 Various cosmetic changes.
8a74b3f avg_weight_sse2
86c70b0 many changes to which asm functions are enabled on which cpus. with Phenom, 3dnow is no longer equivalent to "sse2 is slow", so make a new flag for that. some sse2 functions are useful only on Core2 and Phenom, so make a "sse2 is fast" flag for that. some ssse3 instructions didn't become useful until Penryn, so yet another flag. disable sse2 completely on Pentium M and Core1, because it's uniformly slower than mmx. enable some sse2 functions on Athlon64 that always were faster and we just didn't notice. remove mc_luma_sse3, because the only cpu that has lddqu (namely Pentium 4D) doesn't have "sse2 is fast". don't print mmx1, sse1, nor 3dnow in the detected cpuflags, since we don't really have any such functions. likewise don't print sse3 unless it's used (Pentium 4D).
2998b17 enable ssse3 phadd satd on Penryn.
0591b7a benchmark most of the asm functions (checkasm --bench).
100d067 Cosmetic: fix C99-ism
c98aab0 Use a gaussian window for cplxblur Cplxblur was originally intended to use a gaussian window, but in its current form did not.  This change provides a tiny improvement to 2pass ratecontrol.
ea2648b cosmetics
601b46e nasm compatible NX stack
c4c85ba CQP is incompatible with AQ
ba3ac82 memzero_aligned_mmx
02a04f2 binmode stdin on mingw, not just msvc
f88d094 omit redundant mc after non-rdo dct size decision, and in b-direct rdo
9a9d39a allow fractional CRF values with AQ.
26088fc fix some uninitialized partitions in rdo
7331ea4 2-pass VBV support and improved VBV handling Dramatically improves 1-pass VBV ratecontrol (especially CBR) and provides support for VBV in 2-pass mode.  This consists of a series of functions that attempts to find overflows and underflows in the VBV from the first-pass statsfile and fix them before encoding. 1-pass VBV code partially by Dark Shikari.
c415d98 Fix noise reduction in threaded mode. Previously enabling noise reduction with threads had no effect. Note that this is not an optimal solution; each thread still tracks noise reducation separately (unlike in single-threaded mode).
ce13bb6 fix a crash on win32 with threads. r852 introduced an assumption in deblock that the stack is aligned.
0903472 remove nasm version check. a feature check is all that's needed. silence stderr in yasm version check.
d86d4bd cosmetics in cabac
bd6ce40 faster residual_write_cabac
5c25793 change DEBUG_DUMP_FRAME to run-time --dump-yuv
a50d364 x264_median_mv_mmxext this is the first non-runtime-detected use of mmxext, but it has to be inlined
6f74cfa factor duplicated code out of deblock chroma mmx
1451b12 deblock_luma_intra_mmx
e11ef38 write aspect ratio in mp4
18a1d7e omit delta_quant in i16x16 blocks with no residual (all other block types were already covered, but i16x16 cbp is special)
911904c explicit write combining, because gcc fails at optimizing consecutive memory accesses
b907329 force unroll macroblock_load_pic_pointers and a few other minor optimizations
76c9f3d quant_2x2_dc_ssse3
fcee08a r836 borked lossless cabac nnz
9386865 use elf instead of a.out on netbsd
ee0c7dc fix x264_realloc when not using libc realloc.
5e10302 don't pretend to support win64. remove all related code. it hasn't worked since probably some time in 2005, and won't ever be fixed unless someone steps up to maintain it.
97fc930 cosmetics: replace last instances of parm# asm macros with r#
1b75bd4 remove DEBUG_BENCHMARK
b55625d faster probe_skip
27c3071 drop support for pre-SSE3 assemblers
8ce08be s/x264_cpu_restore/x264_emms/ no point in giving it a generic name when it's not generic
45cc42c faster cabac_mb_cbp_luma ported from ffmpeg
5dae513 remove some redundant nnz counts move some nnz counts from macroblock_encode to cavlc if cabac doesn't need them
a9057b5 compute missing nnz count in subme7 cavlc
5a562eb remove a division in macroblock-level bookkeeping
2b3d65e omit P/B-skip mc from macroblock_encode if the pixels haven't been overwritten since probe_skip
2f75bcc earlier termination in SEA if mvcost exceeds residual
971301a remove void* arithmetic from r821
5ca01b3 Fix define of illegal function identifiers (as defined in section "7.1.3 Reserved identiers" of C99 spec)
ef36548 Fix define of illegal identifier (as defined in section "7.1.3 Reserved identiers" of C99 spec) "__UNUSED__", and use the one defined in common/osdep.h, i.e. "UNUSED" based on a patch by Diego Biurrun
ee95c7f more consistent include name (in line with other PPC includes)
29ae7d1 fix illegal identifiers in multiple inclusion guards patch by Diego Biurrun % diego A biurrun P de %
138601d AQ now treats perfectly flat blocks as low energy, rather than retaining previous block's QP. fixes occasional blocking in fades.
15f3190 checkasm cabac
f892ee1 s/movdqa/movaps/g
d940f6e --asm to allow testing of different versions of asm without recompile
9b52ed5 copy left neighbor pixels directly from previous mb instead of main plane
44361e9 cacheline split workaround for mc_luma
d50f9cb add "SECTION_RODATA" before "SECTION .text" to setup the fakegot label used in macho binaries. This fixes compilation with --enable-pic Requires Yasm 0.7.0 or newer Patch by Dave Lee % davelee P com A gmail P com %
0414d78 more hpel fixes
d4b7d2b update msvc projectfile
6917276 r810 borked hpel_filter_sse2 on unaligned buffers
761630d threads=auto on multicore now implies thread input, just like explicit thread numbers already did
c9a928b dct4 sse2
b32dacb faster x86_32 dct8
a7eec58 macros to deal with macros that permute their arguments
0feb9f1 mmx cachesplit sad of non-square sizes checked height instead of width
9f0db01 sfence after nontemporal stores
2487cdf simplify hpel filter asm (move control flow to C) and add sse2, ssse3 versions
5cc926a more mmx/xmm macros (mova, movu, movh)
6cf65da improve handling of cavlc dct coef overflows support large coefs in high profile, and clip to allowed range in baseline/main
08b5132 fix shared libs on MacOSX based on a patch by İsmail Dönmez
457ce6a typo in r803
decfd7b fix a crash on mp4 muxing with invalid params
dc4f40c variance-based psy adaptive quantization new options: --aq-mode --aq-strength AQ is enabled by default
ae3d8b1 fix naming of .dll on mingw
a09f8f5 don't distinguish between mingw and cygwin
73cfc9e remove a memset
3239082 typo. don't evaluate rd pskip when p16x16 found ref>0.
bd0d9a5 r784 borked lossless dc zigzag
17e5dac fix an arithmetic overflow that disabled SEA threshold after finding a mv with SAD < mvcost.
2f6fd93 fix hpel_filter_altivec picked up by checkasm Patch by Manuel %maaanuuu A gmx.net % and Noboru Asai % noboru P asai A gmail P com %
5e0e058 faster residual
261873e nasm doesn't like align(nop) in structs
4b18012 reduce the size of some cabac arrays
e403fe9 use cabac context transition table from trellis in normal residual coding too
6ae3355 rearrange cabac struct to reduce code size
7255f68 higher precision RD lambda improves quality at QP<=12.
1035c63 faster cabac_encode_ue_bypass
bf9bf7a cabac asm. mostly because gcc refuses to use cmov. 28% faster than c on core2, 11% on k8, 6% on p4.
3687987 cosmetics in cabac
d4f9f60 inline cabac_size_decision
aa5391a cosmetics in DECLARE_ALIGNED
192768d don't distinguish between luma4x4 and luma4x4ac
36fe32a faster lossless zigzag
170f57b more alignment
9bdc256 add tesa and lossless to fprofile
5a66f30 cosmetics in residual_write
571dda6 remove unused bitstream reader
5d47436 cosmetics in quant asm
afba69a special case dequant for flat matrix
02e6102 faster dequant
e8448ff simplify hpel_filter_c
32fb497 use x264_mc_copy_w16_sse2 in mc.copy, it was previously only in mc_luma
adfab36 new ssd_8x*_sse2 align ssd_16x*_sse2 unroll ssd_4x*_mmx
e1d815e update altivec zigzags
2be14de r768 borked cavlc
b6a966a cosmetics in intra predict
67a130f faster intra predict 8x8 hu/hd
3f48ce7 reduce zigzag arrays from int to int16_t
84452e5 reduce the size of some arrays
f46c3bc skip intra pred+dct+quant in cases where it's redundant (analyse vs encode) large speedup with trellis=2, small speedup with trellis=0 and/or subme>=6
123f29a cosmetics in asm
1df5f84 satd_4x4_ssse3
dcf2604 get_ref_sse2
0949975 continue instead of crash when the threading mv constraint is violated. doesn't fix the underlying bug, but hopefully less annoying until we find it.
1fc702f remove remaining reference to clip1.h
4c02055 fix name mangling again. apparently it's not just a convention, dll build fails if you try to export a non-prefixed name.
5774122 update msvc projectfile
018a6e0 missing #ifdef HAVE_SSE3
205d011 don't define offsetof since it's standard
4d9499b shut up gcc warning in offsetof
2c8600e increase alignment of mv arrays
91991ba memcpy_aligned_sse2
ede2a6e checkasm check whether callee-saved regs are correctly saved x86_32 only for now since x86_64 varargs are annoying
357ab33 fix x86_32 ads which failed to preserve a register
5862a17 fix some name mangling issues introduced by the merge
dafc72c remove x264_mc_clip1. it's wrong for sufficiently perverse inputs, and clip_uint8 is faster anyway.
c4680ac merge x86_32 and x86_64 asm, with macros to abstract calling convention and register names
096b390 git compatible version script
397d1bf check for broken versions of yasm
6e55e8a increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction. patch by Alexander Strange.
233a760 .gitignore
1cce7bb pic macros now keep track of which register holds the GOT, so variable access doesn't have to care
01d7b8a remove x86_64 predict_8x8_ddl_mmxext because sse2 is faster even on amd
bce7d0f cosmetics in dsp init
e4059f8 sse2 16x16 intra pred. port the remaining intra pred functions from x86_64 to x86_32. patch by Dark Shikari.
c34e109 some simplifications to mmx intra pred that should have been done way back when we switched to constant fdec_stride. and remove pic spills in functions that have a free caller-saved reg. patch partly by Dark Shikari.
9da2fac faster array_non_zero
c32cac2 x86_32 sse2 idct8 ported from ffmpeg by Dark Shikari
8f32196 checkasm: relax the threshold for floating-point ssim
56fca1c checkasm: test idct with the range of coefficients what can really be encountered, as opposed to random numbers which might overflow.
641416d intra_rd_refine in B-frames
d4d76b9 print average of macroblock QPs instead of frame's nominal QP
ebdc49f update date
efeb097 remove colorspace conversion support, because it has no business in any codec
c1940b9 misc fixes in checkasm
ea9eaa7 remove a useless bit of me=umh (originally copied from JM, where it was used for something)
a93d7bf fix a memleak in cqm
6f9cb0d fix a memleak in mkv muxer patch by saintdev
fa58b84 satd exhaustive motion search (--me tesa)
2c437ce fix cabac context for nonzero delta_qp of the 2nd mb of a frame in interlaced mode
c111a8e fix mapping of mvs to partitions in p4x4_chroma patch by Noboru Asai
3ef36bc fix mvp for b16x8 and b8x16 L1 search patch by Wei-Yin Chen
47ea39d shave a couple cycles off cabac functions
6cbea64 faster and smaller x264_macroblock_cache_mv etc
573314c configure test for endianness
41d021e change the meaning of --ref: it now selects DPB size (including B-frames), rather than L0 size (which B-frames are added to)
5d3a62a add / fix support for FreeBSD, based on a patch by Igor Mozolevsky % igor A hybrid-lab P co P uk %
85d88a4 shut up some valgrind warnings
810c096 slightly wrong memory allocation in r717, fixes a potential crash with merange>32
fd9ab6c convert absolute difference of sums from mmx to sse2 convert mv bits cost and ads threshold from C to sse2 convert bytemask-to-list from C to scalar asm 1.6x faster me=esa (x86_64) or 1.3x faster (x86_32). (times consider only motion estimation. overall encode speedup may vary.)
9f38e60 round esa range to a multiple of 4
eb978d2 use define _WIN32 instead of __WIN32__ or WIN32 defines. NSDN reference: http://msdn2.microsoft.com/en-us/library/b0084kay(VS.80).aspx Patch by BugMaster %BugMaster A narod P ru% Original thread: date: Dec 27, 2007 3:18 AM subject: [x264-devel] VS2008 compilation error (need of replacement __WIN32__ with _WIN32)
96a5959 tweak x264_pixel_sad_x4_16x16_sse2 horizontal sum. 168 -> 166 cycles on core2.
22fbdf3 fix a nondeterminism involving 8x8dct, rdo, and threads.
0d0bbed also test arch-specific x264_zigzag_* implementations in checkasm.c patch by Patch by Noboru Asai % noboru P asai A gmail P com%
9fb4e53 Add AltiVec implementation of - x264_zigzag_scan_4x4_frame_altivec() - x264_zigzag_scan_4x4ac_frame_altivec() - x264_zigzag_scan_4x4_field_altivec() - x264_zigzag_scan_4x4ac_field_altivec() each around 1.3 tp 1.8x faster than C version Patch by Noboru Asai % noboru P asai A gmail P com%
795c3c1 adds AliVec implementation of predict_16x16_p() over 4x faster than C version
fec0482 revert the x86_32 part of r708. elf shared libraries aren't important enough to be worth the extra lines of code to check for nasm.
2eb91cc mark asm functions as hidden
b21b675 check whether ld supports -Bsymbolic before using it
cda2dea reduce the data type used in some tables. 16KB smaller exe.
4b199a9 faster removal of duplicate mv predictors
f72092d avoid a division in x264_mb_predict_mv_ref16x16. patch by Dark Shikari.
c0b1b1a avoid a division in umh. patch by Dark Shikari.
3c9aac0 fix a memleak in h->mb.mvr
beeedbd fix compilation as a shared library on x86_64 (regression in r696)
ebd03d4 add support for x86_64 on Darwin9.0 (Mac OS X 10.5, aka Leopard) Patch by Antoine Gerschenfeld %gerschen A clipper P ens P fr%
b5c805e cover some more options in fprofile. (esa, bime, cqm, nr, no-dct-decimate, trellis2) previously, esa was slower with fprofile than without, since gcc thought it wasn't important. now esa benefits like anything else.
d4493c3 Add AltiVec implementation of x264_pixel_ssd_8x8, 3x faster than C version Overall speed-up: 0.7% with  --bframes 3 --ref 5 -m 7 --b-rdo Patch by Noboru Asai %noboru P asai A gmail P com%
a2db19e limit mvs to [-512,511.75] instead of [-512,512]
6d60921 avoid memory loads that span the border between two cachelines. on core2 this makes x264_pixel_sad an average of 2x faster. other intel cpus gain various amounts. amd are unaffected. overall speedup: 1-10%, depending on how much time is spent in fullpel motion estimation.
1dddea2 add cache info to cpu_detect. also print sse3.
1cab251 cosmetics: reorder mc_luma/mc_chroma/get_ref arguments for consistency with other functions
4611e5c separate pixel_avg into cases for mc and for bipred
edf2842 add AltiVec implementation of ssim_4x4x2_core, about 4x faster than C version. Overall: 0.1-0.2% faster with default encoding settings Patch by Noboru Asai %noboru P asai A gmail P com%
b9eb911 Add AltiVec implementation ofx264_hpel_filter. Provides a 10-11% overall speed-up with default encoding options Patch by Noboru Asai %noboru P asai A gmail P com%
370e109 cosmetics in dsp function selection
a6ed152 remove sad_pde. it's been unused ever since successive elimination replaced it.
9f6f0b2 cosmetics: use symbolic constants for frame padding radius
5324ae5 move hpel_filter cpu detection to a function pointer like everything else
131603a cosmetics: use separate variables for frame width and stride
a22fe12 Add AltiVec implementation of add4x4_idct, add8x8_idct, add16x16_idct, 3.2x faster on average 1.05x faster overall with default encoding options Patch by Noboru Asai % noboru DD asai AA gmail DD com %
ebf8b1e add AltiVec implementation of dequant_4x4 and dequant_8x8, 2.8x faster than C,  1.01x faster than previous revision with default encoding options Patch by Noboru Asai % noboru DD asai AA gmail DD com %
1d22eba Add AltiVec implementation of quant_2x2_dc, fix Altivec implementation of quant_(4x4|8x8)(|_dc) wrt current C implementation Patch by Noboru Asai % noboru DD asai AA gmail DD com %
0fabcd4 fix a possible nondeterminism with me=umh + threads.
7da80e5 use hex instead of dia for rdo mv refinement. ~0.5% lower bitrate at subme=7. patch by Dark Shikari.
35094be port sad_*_x3_sse2 to x86_64
673ce32 don't overwrite pthread* namespace, because system headers might define those functions even if we don't want them
5c49545 faster 4x4 sad
a6edfd6 fix an arithmetic overflow in trellis at high qp.
4634379 implement multithreaded me=esa
cde5f33 fix some integer overflows. now vbv size can exceed 2 Gbit.
d16a4da allow --vbv-init to take absolute values (in kbit), in addition to the previous fractions of vbv-bufsize.
9849407 remove a bashism
7596205 reorder headers so that largefile support is defined before the first copy of stdio
71af285 regression in r669: broke saving of configure args if make has to re-run configure
393daac regression in r669: --enable-shared should imply --enable-pic on some archs.
1138008 * Add a --host flag to allow overriding config.guess; this is particularly   useful with a 64-bits kernel running a 32-bits userland to build 32-bits   apps. * Normalize any host triplet into a quadruplet via config.sub. * Move option parsing before any use of architecture information.
3d51a5b * Update config.guess.
0ea7d1b mingw doesn't have strtok_r
85f2fc3 move os/compiler specific defines to their own header
a18f3da extend zones to support (some) encoding parameters in addition to ratecontrol.
d5ddf40 cosmetics
ee62378 limit vertical motion vectors to +/-512, since some decoders actually depend on that limit.
3031754 Add vertical and horizontal luma deblocking accelerated with Altivec, based on Graham Booker's code written for FFmpeg with slight modifications to re-use x264's macros
9acd233 cosmetics in cpu detection
80090cc fix compilation without asm on x86_32 (r658 worked only on x86_64).
fedface exempt 1080p from the non-mod16 warning.
17dd119 allow compiling without yasm/nasm on x86 and x86-64 platforms
26bed72 updated MS VC8/VC7 build, patch by Gabriel Bouvigne
a355486 replace alloca with malloc everywhere. per manpage, use of alloca is discouraged. this may have a minor effect on the speed of ssim and esa, but that appears too small to measure.
ffa4e76 require a ratecontrol method to be specified, it no longer defaults to cqp=26.
b5ef788 fix nnz computation in cavlc+8x8dct+deblock. (regression in r607)
08b4f69 fix the computation of bits used for vbv. (regression in r651)
fe85aca c89 compile fix
b3076ae cabac: use bytestream instead of bitstream. 35% faster cabac, 20% faster overall lossless, ~1% faster overall at normal bitrates.
8300d33 remove the restriction on number of threads as a function of resolution (it was wrong anyway in the presence of B-frames), and raise the max number of threads in general (though more will have to be done before it can really scale to lots of cores).
8ecf4b9 tweak ssse3 quant
c266480 change some tables from int to int8_t. 13KB smaller executable.
2f66c11 faster cabac rdo. up to 10% faster at q0, but negligible at normal bitrates.
3e7b136 workaround gcc's inability to align variables on the stack. this crash was introduced in r642, but only because previous versions didn't use sse2 on the stack.
84676d2 32bit version of ssse3 satd. switch default assembler to yasm. it will still fallback to nasm if you don't have yasm.
71c097b simplify trellis
12681ee fix an arithmetic overflow in trellis with QP >= 42
10265a0 2x faster quant. 2% overall. side effects: not bit-identical to the previous algorithm. while the new algorithm covers a wider range of cqms than the previous one did, I couldn't find a good way to fallback to a general version for the extreme cqms. so now it refuses to encode extreme cqms instead of just being slower. lays a framework for custom deadzone matrices, though I didn't add an api.
b37ac36 when encoding with a cqm, probe_skip now also uses the cqm, instead of the flat matrix
e3a07e0 cosmetics in asm macros
71943e8 use only c-style comments in public header (patch by Vincent Torres)
dfb8547 in hpel search, merge two 16x16 mc calls into one 16x17. 15% faster hpel, .3% overall.
e63c392 Compile fix
dd7e21c remove private stuff from public headers. no more need for -D__X264__
87fdea8 adjust bitstream buffer sizes for very large frames
8b37cc6 conflate HAVE_MMXEXT with HAVE_SSE2, since they were never used distinctly.
11ef32f   * Made -DNEED_ALTIVEC unnecessary, thanks to Guillaume Poirier.
37ad237   * check x264_cpu_detect() before calling AltiVec functions.
8aef0e9 ssse3 detection. x86_64 ssse3 satd and quant. requires yasm >= 0.6.0
1980de9   * Use -maltivec when building dependencies, or <altivec.h> cannot be used.   * Do not declare vectors in non-AltiVec files.
e1a4ae9   * common/cpu.c: runtime AltiVec autodetection on Linux.   * configure, Makefile: do not build the whole project with -maltivec because     it generates AltiVec code in weird places.
f81c3ea fix a small memleak. patch by Limin Wang.
62fc8a9 compile fix for GCC-3.3 on OSX, based on a patch by Patrice Bensoussan % patrice P bensoussan A free P fr% Note: regression test still do not pass with GCC-3.3, but they never did as far as I can remember.
8993074 cosmetics in regression test
6e1bbd2 regression testing, run similar to fprofiled: VIDS='vid_720x480.yuv' make test
435b675 add ability to generate doxygen documentation; make dox
dac2be0 oops, scenecut detection failed to activate when using threads and not using B-frames
49d16d4 extras/getopt.c was BSD licensed. replace with a LGPL version (from glibc).
9721725 Fix build issues on Linux. Only gcc-4.x is supported, as on OSX. Cleans up a few inconsistencies in the code too.
c9cd0fc tweak block_residual_write_cavlc. up to 1% faster lossless, no difference at normal bitrates.
4c949c3 don't assume int is exactly 4 bytes
cf9e6c5 make array_non_zero() compatible with -fstrict-aliasing
285f98e Honor CFLAGS and LDFLAGS set by the user
0fe97f4 Check whether 'echo -n' works, otherwise try printf (fixes build on current OS X 10.5)
bbc68be Check version of nasm on OS X / Intel
b630af6 wrong reference frames were used with refs>=14 + pyramid (regression in r607)
01e1db2 enable thread synchronization primitives on linux too
34c6fb3 fix a crash with x264_encoder_headers() + threads
dfe7bb0 don't skip autodection on configure --enable-pthread
ab3b660 more win32threads -> pthreads
cc753d6 cosmetics: rename list operators to be consistent with Perl, and move them to common/
87f1430 win32: use pthreads instead of win32threads. for some reason, pthreads is much faster.
7b4f6a1 New threading method: Encode multiple frames in prallel instead of dividing each frame into slices. Improves speed, and reduces the bitrate penalty of threading.
fa2c1e5   * Do not assume anything about sizeof(cpu_set_t).
167abec   * Add support for kFreeBSD (FreeBSD kernel with GNU userland).
e8cc72c Add Altivec implementations of add8x8_idct8, add16x16_idct8, sa8d_8x8 and sa8d_16x16 Note: doesn't take advantage of some possible aligned memory accesses, so there's still room for improvement
575b238 Force alignment of the fake .rodata on MacIntel
4659f51 don't treat vbv_maxrate as a minrate too if it's higher than target average bitrate.
c494e9c Merges Guillaume Poirier's AltiVec changes:  * Adds optimized quant and sub*dct8 routines  * Faster sub*dct routines ~8% overall speed-up with default settings
41c111b 10% faster deblock mmx functions. ported from ffmpeg.
6eeb78f checkasm: ignore insignificant differences in floating-point ssim
485172d display final ratefactor in abr when a loose vbv is applied. (still disabled in true cbr)
a9d754a fix parsing of --deblock %d,%d  (beta was ignored)
ccac553 compute chroma_qp only once per mb
94a4aed rd refinement of intra chroma direction (enabled in --subme 7) patch by Alex Wright.
e7a4aba fix a crash in avc2avi
41b85c4 skip deblocking and motion interpolation when using only I-frames
197a94a cosmetics
93b54ce allow fractional values of crf
8d1ebe2 prefetch pixels for motion compensation and deblocking.
9fadbd7 fix a crash on interlace + >8 reference frames
4107178 no more decoder. it never worked anyway, and the presence of defunct code was confusing people.
9243c84 compute pskip_mv only once per macroblock, and store it
0a45337 slightly faster chroma_mc_mmx
42bb1b4 missing emms in plane_copy_mmx
43e4162 merge center_filter_mmx with horizontal_filter_mmx
c485e7e 1.5x faster center_filter_mmx (amd64)
299d3ed mmx/prefetch implementation of plane_copy
9f05a7f no more vfw
aabb91c gtk fixes: in Makefile - fix datadir for mingw users - remove the shared lib during the clean rule - use $(ENCODE_BIN) instead of x264_gtk_encode - add some $(DESTDIR) and create some directories when necessary - remove -lintl statfile_length -> statsfile_length fix the "sensitivity" of the widget of update_statfile the logo is now handled correctly on windows added: beginning of multipass support patch by Vincent Torri.
90a9219 accept mencoder's option names as synonyms (api only, not in x264cli)
cb8b5da simplify satd_sse2
04834f5 better error checking in x264_param_parse. add synonyms for a few options.
0cbf0fc fix some strides that weren't a multiple of 16.
58e12b0 tweak motion compensation amd64 asm. 0.3% overall speedup.
6de50f5 strip local symbols from asm .o files, since they confuse oprofile
f9cc941 add an option to control direct_8x8_inference_flag, default to enabled. slightly faster encoding and decoding of p4x4 + B-frames, and is needed for strict Levels compliance.
8f0864a allow custom deadzones for non-trellis quantization. patch by Alex Wright.
a7cd9cf move zigzag scan functions to dsp function pointers. mmx implementation of interlaced zigzag.
faec300 support interlace. uses MBAFF syntax, but is not adaptive yet.
3b78570 allow --zones in cqp encodes
7960eaf cli: fix some typos in vui parameters from r542. patch by Foxy Shadis.
1b93c2a   * Add an "all" rule to the Makefile. Ideally "default" should be renamed,     but I don't want to break existing scripts.
52b8a05 workaround: on some systems, alloca() isn't aligned
7bfc736 missing picpop
460699f fix a buffer overread from r540
55c208e cosmetics (spelling)
8850b6f faster ESA
f8652aa faster ESA
a020d6e   * Use the autotool's config.guess script instead of uname to check the     system and CPU types, to avoid issues when using for instance a 32-bit     userland on top of a 64-bit kernel.
477c5bf   * Add the autotool's config.guess script so that we can use it instead     of uname in the configure script.
4a5a03b 10l in r553
73657d8 ssim broke on amd64 w/ pic.
1808700 MSVC compatibility fix from Haali
f78c224 support changing some more parameters in x264_encoder_reconfig()
7760f1b SSIM computation. (default on, disable by --no-ssim)
127e2fb configure: --enable-debug reduces optimization to -O1
dc5d530 cosmetics
12bd065 gcc -fprofile-generate isn't threadsafe
b3f1591 cli: move some options from --help to --longhelp
64a8b78 cli: don't try to get resolution from filename unless input is rawyuv
de41ef2 r542 broke --visualize
1ff80a2 Nicer OS X x264_cpu_num_processors (thanks David)
3493a54 Support OS X and BeOS in x264_cpu_num_processors
86ec16c Fixes contexts allocation with threads=auto
eeebca2 select initial qp for abr and cbr baased on satd and bitrate, rather than cq24.
9e9a869 --threads=auto to detect number of cpus
0b07708 api addition: x264_param_parse() to set options by name
99b8471 fix a rare NaN in ratecontrol
adc4b4f move quant_mf[] from x264_t to the heap, and merge duplicate entries
75d6edb GTK update. patch by Vincent Torri.   fixed: cleaning of Makefile time elapsed seems broken ('total time' label replaced by 'time remaining') text entries of the status window are now not editable   added: compilation from x264/ (add --enable-gtk option to configure) shared lib creation if --enable-shared is passed to configure x264gtk.pc --b-rdo, --no-dct-decimate
4b2556f new option: --qpfile forces frames types and QPs. (intended for ratecontrol experiments, not for real encodes)
b8692db api change: select ratecontrol method with an enum (param.rc.i_rc_method) instead of a bunch of booleans.
4e7bd4a slightly faster mmx dct
637470c OpenBSD build fixes. patch by Vizeli Pascal (pvizeli at yahoo dot de)
c6213d2 mc_chroma width2 mmx
eff6a5e make libx264.so symlink relative
3608531 GTK update. patch by Vincent Torri.   added: direct=auto no-fast-pskip vbv cqm tooltips (without descriptions yet) translations `make clean` for .exe when file exists, ask for override   fixes: debug level bug bitrate slider bug mixed-refs can be set only if ref>1 i8x8 can be set only if 8x8 transform is enabled # of threads capped at 4 fourcc can't be removed cosmetics
918c7ef vfw installer: tweak nsis compression. patch by Francesco Corriga.
b5d0831 Fixed typo that caused x264_encoder_open to always fail
91bbfb9 check some mallocs' return value
0ac281d make -> $(MAKE)
c9155d3 convert non-fatal errors to message level "warning".
ae4b97a fix a memory alignment. (no effect on x86, but might be needed for other simd)
c832ac1 when using DEBUG_DUMP_FRAME, write decoded pictures in display order. patch by Loic Le Loarer.
361b283 non-referenced B-frames should have the same frame_num as the following ref frame, not the previous. patch by Loic Le Loarer.
1ca108e set the SPS constraint_set[01]_flag based on the profile in use, just in case some decoder cares
de1af4c msvc doesn't like C99 named array initializers
7022fe8 allow sar=1/1. patch by Loic Le Loarer.
0d88274 faster intra search: filter i8x8 edges only once, and reuse for multiple predictions.
3de28cd faster intra search: some prediction modes don't have to compute a full hadamard transform. x86 and amd64 asm.
e63f25b --sps-id, to allow concatenating streams with different settings.
609deaf typo in expand_border_mod16
f5bdc82 typo impaired 2pass bitrate prediction.
f51297f  Let the user choose the compiler with "CC=xxx ./configure"
e714128  More vector types fixes for gcc 3.3
f3323f8 More vector casts to try and make compilers happier
c1f64a5 Use sa8d instead of satd for i8x8 search. +.01 dB, -.5% speed
8aa2943 Before evaluating the RD score of any mode, check satd and abort if it's much worse than some other mode. Also apply more early termination to intra search. speed at -m1:+1%, -m4:+3%, -m6:+8%, -m7:+20%
eb3d83c   * common/ppc/pixel.c: fixed illegal implicit casts of vector types.
17b90bf   * Added %$#@#$! support for #@%$!#@ armv4l CPU.
35a5a4f When evaluating predictors to start fullpel motion search, use subpel positions instead of rounding to fullpel. about +.02 dB, -1.6% speed at subme>=3 patch by Alex Wright.
6b57736 mmx implementation of x264_pixel_sa8d
af751ac 10l in r463 (q0 i16x16 dc was permuted)
2735ae7 typo in r504
656b069 update msvc project files. patch by anonymous.
2f95856 Before, we eliminated dct blocks containing only a small single coefficient. Now that behavior is optional, by --no-dct-decimate. based on a patch by Alex Wright.
9a6815d Enables more agressive optimizations (-fastf -mcpu=G4) on OS X. Adds AltiVec interleaved SAD and SSD16x16. Overall speedup up to 20%.
97ab219 faster cabac_encode_bypass
1927b27 restored AltiVec dct
d0a5565 more AltiVec mc, ~4.5% overall speedup
71f1114 slightly faster loopfilter
d2ab724 3% faster satd_mmx
a23a367 cosmetics in sad/ssd/satd mmx
b3ad52d store quoted configure options. needed e.g. for multiple args under --extra-cflags.
c293b80 fix a yasm-incompatible syntax in x86 asm
ae82d24 yasm noexec stack
283d57e more interleaved SAD. 25% faster halfpel.
0f4c0eb more interleaved SAD. 1% faster umh, 6% faster esa.
8947b51 interleave multiple calls to SAD. 15% faster fullpel motion estimation.
bddf5f0   * Added support for ppc64. I'm really fucking tired of having to do this.
ac4249d use LDFLAGS when linking shared lib
85ab23c * compilation fix for mingw, darwin (off_t was undefined)
540ed9a GTK: support yuv4mpeg input. patch by Vincent Torri.
5fe3e77 GTK: fix avs input patch by Vincent Torri.
a84899e cli: support yuv4mpeg input. patch by anonymous.
e510c09 GTK: compilation fixes
845feff GTK: compilation fixes on mingw, add avs input for the app (if avalaible), add filters for the filechooser, add icon for the main window. patch by Vincent Torri.
fc34d38 GTK-based graphical frontend. patch by Vincent Torri.
50aadeb silence some gcc warnings
5b6c5ef use FDEC_STRIDE instead of a parameter in mmx dct .5% speedup
da9158b   * configure: support for 64 bits MIPS.
7c01353 10l in r473 and stdin
3b66f69 RD subpel motion estimation (--subme 7)
48633d2 cosmetics in cabac_mb_cbf
50f40fd separate --thread-input from --threads
36c25b6 if --threads > 1, then read the input stream in its own thread.
c20906a FreeBSD uses ELF
9c61b0c 10l in r470 on x86_64
fdb6409 some mmxext functions really only required mmx.
abffd18 simplify get_ref and mc_luma
9eaa83d b16x16 wpred analysis used wrong weight
926212b configure: --enable-shared for libx264.so
8f79dcc wrong modulus when delta_qp = +26
78f414d 10l in vbv + 2pass
d8e790c macroblock-level ratecontrol: improved vbv strictness, and improved quality when using vbv.
7938977 keep transposed dct coefs. ~1% overall speedup.
ce9b333 tweak rounding of 8x8dct
9331f05 cosmetics in makefile
058c3be cosmetics: muxers -> muxers.c
a34eec2 no --nr in intra blocks. intra prediction doesn't work well enough for the residual to be indicative of noise.
afbbaf9 10l in direct auto + multiref + 1pass
9773268 --direct auto selects direct mode per frame. works best in 2pass (enable in both passes).
126ccb3 change default direct mode to spatial
39c6d08 remove TODO. most of it is done, and the rest is out of date.
918a791 more amd64 mmx intra prediction
469b4e5 for i8x8 neighbors, don't assume a new slice starts at the edge of the frame
4fe3aff   * common/i386/i386inc.asm: got PIC to work for real on OS X x86.
4139feb   * common/i386/*.asm: don't use the "GLOBAL" reserved word, some versions     NASM complain about it. Replaced it with "GOT_ebx".
059410e   * configure: activate minor nasm optimisations, such as assembling     "add eax, 8" as "add eax, byte 8".
b5fda57   * common/i386: factored the .rodata section declaration into i386inc.asm.
17683d7   * configure common/i386/i386inc.asm: got rid of -DFORMAT_* nasm flags     and use built-in preprocessor tests instead.
3723dee   * common/i386/i386inc.asm: tell the ELF linker about our stack properties     so that it does not assume the stack has to be executable.
70c1403 10l in r443 (p4x4 chroma)
3bd4ade copy current macroblock to a smaller buffer, to improve cache coherency and reduce stride computations. part 3: asm
4ecb5f8 copy current macroblock to a smaller buffer, to improve cache coherency and reduce stride computations. part 2: intra prediction
8f05dff copy current macroblock to a smaller buffer, to improve cache coherency and reduce stride computations. part 1: memory arrangement.
3886582 h->mc.copy()
34cbb91 lowres intra used wrong neighboring pixels
bca81ca trellis=2 slightly affected intra analysis even without subme=6
e5ed306   * encoder/ratecontrol.c: OS X support for exp2f and sqrtf.
14b2639 allow delta_qp > 26
5fbca87 ratecontrol didn't always account for header bits, causing an undersize in multipass with --ratetol inf.
12b778b -q0 --b-rdo wasn't lossless
14f3cc0 cosmetics
476a0f9 allow ',' separator for --filter
8dfd87a VfW: 10l in bime and refs
d53108a more lowres mv clipping fixes
eb32d28 VfW: cosmetics
60e8487 VfW: support trellis, brdo, nr, bime. patch by Dan Nelson (dnelson at allantgroup dot com).
681b394 amd64 mmx for some intra pred functions
e1d852d dequant_mmx made incorrect assumptions about extreme inputs. now uses 32bit in more cases. patch by Christian Heine.
fed2847 lowres can reuse the normal mv cost table
f959a74 r422 broke x264_center_filter_mmxext
7125f91   * configure: define FORMAT_ELF under Linux and FORMAT_AOUTB under *BSD.
5d5c5cc   * common/i386/i386inc.asm: support for ELF, a.out and Mach-O objects.
78d31c2   * configure: added a --enable-pic flag.
dc454ea   * Additional fixes to the PIC versions of assembly routines. They now pass     all checkasm tests and output streams are bit-by-bit identical, which     sounds good.
ac9da5d   * tools/checkasm.c: print the random seed used for the test, to allow for     replays. It looks like dequant_4x4 fails 1 time out of 600, with the     following seeds for instance: 1423 1957 2149 2455 3385 3403 3724 4095.
bb21f3a cosmetics in mc_chroma
80b669b   * Oh, so what I thought was unused code was in fact used. This fixes my     breakage but makes the code rather slow in PIC mode. I will fix it later.
eea8938   * Support for x86 position-independent code (PIC), needed for dynamic libs     on Mac OS X Intel. I tried to make this as little intrusive as possible.
97f0507 msvc: #define isfinite()
19d07af x86 mmx for some intra pred functions
d2dada7 cosmetics: reorganize intra prediction dsp
791495e too many systems don't have off_t; use uint64_t instead.
ce237ab fix order of frame evaluation in pre-me
f116707 update AUTHORS
8b498e4 fix a check for NaN in ratecontrol
e3b1f11 fix mv predictors in pre-me for b-adapt.
6da9fc9 print --nr in sei params. tweak ratecontrol param checking.
be6cce5 I've moved
273dc62 write correct VUI timing info
d125e43 early termination in UMH search
a373f2a split mv_range enforcement from edge-of-frame clipping. fixes an occasional artifact with long mvs.
61b57af cosmetics: suppress warning on unused variables
271c194 cosmetics: simplify #includes
7fb7e61   * configure: NSLU2 platform support (why oh why)
1d82beb  Re-enabled x86 optims on MacIntel, assume Nasm CVS is installed and   -f macho -DPREFIX just seems to do the job
096c4eb  Quick compile fix for OS X / Intel  Optimizations are disabled at the moment. In order to get them to  work, we'd need either nasm to be able to output Mach-O object files,  or we should convert the assembly code to something OS X can handle,  like gas.
743ad59 cli: large file support
0abf15d dct-domain noise reduction (ported from lavc)
6bf39ea early termination within large SADs. ~1% faster UMH, ~4% faster ESA.
73a45ef mkv: increase nalu size size to 4 bytes. patch by Haali.
d3c2f10 less 64bit math: 12% faster trellis
28c0f24 more error checking of input parameters
bf1e4d1 always write sps.vui
7091b47 use some extra packing modes for CQM headers. fix typo in --cqm4p[yc].
a977f76 MSVC compatibility fixes
2fa8f84 joint bidirectional motion refinement (--bime)
684d2d5 fix some overflows in mp4 timestamps. patch by Francesco Corriga.
25b4014 Successive elimination motion search: same as exhaustive search, but 2-3x faster.
a9607af  Fixed cc_check on OS X (gcc -o /dev/null always fails)
b914f80 postpone pskip decision until after p16x16ref0 motion search. reduces the number of erroneous pskips in low-detail regions.
cc33088 configure: autodetect gpac, avis, pthread, vfw
38fcbfb --no-fast-pskip patch by Alex Wright.
5ce628f cosmetics: config.h is now modified only by configure. make now calls configure if you haven't.
f03dbfd MP4: set "track enabled" flag. patch by Robert Swain.
8443f26 faster subpel motion search. patch by Alex Wright.
8f0d66c don't use gnu extensions to grep and sed.
6826cf2 pkg-config: major.minor.patch version
8e44d93 `make fprofiled` to automate gcc -fprofile-generate/use
71b75ef 10l
bdddcf9 param.b_repeat_headers (not yet used)
8c7611c support pkg-config. patch by Caro.
78d2f60 write encoding options to the userdata SEI and to the 2pass statsfile. check for incompatible options in the 2nd pass.
c010ba1 change default level to "5.1"
05e6cf0 skip dequant+idct of decimated blocks.
bc47892 after a 1pass ABR, print the value of --crf which would result in the same bitrate.
528cbd1 subpel search: always check mvp.
429e060 faster b-rdo (skip RD of modes with bad SATD). patch by Alex Wright.
6fe9232 RD mode decision for B-frames (--b-rdo) patch by Alex Wright.
322c42a   * common/amd64/quant-a.asm: added missing GLOBAL flags that prevented PIC     builds, thanks to Anssi Hannula.
ffd008e   * configure: added the Alpha platform.
9187a8f use array_non_zero() when we don't need a full array_non_zero_count()
d18bbd3 mmx dequant. up to 3% speedup w/ RD.
d447c2d allow --level to understand names in addition to idc
87e5994 check (most of) the levels constaints. set default max_mv_range based on level_idc.
1e80b69 if p16x16 RD decides to code a MB as p_skip, then don't check smaller partitions.
5c43fb3 Trellis RD quantization. around +.2 dB
3f1ed7c cosmetics: XCHG macro
662e56b skip a few duplicate candidates in qpel search.
2107a4f skip a few duplicate candidates in fullpel hex&umh search.
01c05a7 cli: arithmetic overflow in bitrate printing
db67b81 cosmetics in x264_cabac_mb_type
89d2c6a X264_ABS => abs
d13a186 amd64 sse2 8x8dct. 1.45x faster than mmx.
08e19ed allow 1pass ratecontrol with keyint=1
9617e25 cli: print estimated time left in --progress
d484bce doc/ratecontrol.txt
5aced82 rm doc/dct.txt
b179e47 in constant QP mode, write that QP in the PPS to save a few bits in each slice header.
108f197 faster decimation
fa01979 cosmetics: fix an erroneous warning from r340.
8d857c56 cosmetics: change literal cabac_block_cat to an enum.
c636f90 cabac: merge i_state with i_mps. bs_write multiple bits at once.
5167ebb remove unused adaptive cabac_idc code
817ef14  Fixed compilation on PPC (spotted by David Wolstencroft)
109ae08 mmx deblocking. 2.5x faster deblocking functions, 1-4% overall.
1666015 If frame count is known at init time (cli & vfw), then abort if the 2nd pass exceeds the length of the 1st pass. If it's not known (mencoder), then report a non-fatal error when we run off the end of the 1st pass stats, and switch to constant QP.
7583201 move checkasm to tools/ delete unused stuff in testing/ `make clean` deletes checkasm and avc2avi
6347263 checkasm: check 8x8dct, mc average, quant, and SSE2.
57900a1 r336 broke amd64 x264_pixel_sad_16x16_sse2 (though it's not being used)
360eb55 Windows 64bit asm. patch by squid_80.
6d96973 delete build/cygwin because it's handled in the main configure/makefile.
0ddc9d5 --crf: 1pass quality-based VBR.
06f1daf  Added --enable-gprof (patch by Johannes Reinhardt)
2ac5fe0 cosmetics: remove #if0'ed code patch by Robert Swain.
1647e6d faster bs_write
b659ca6 during RDO, skip the bitstream writing and just calculate the number of bits that would be used. speedup: cabac +4-8%, cavlc +2-4%.
48c2e93 Use SAD instead of SATD for halfpel motion search. Move multiref termination after halfpel search. Total: 3-7% speedup and +/-.02 dB. patch by Alex Wright.
a8ac858 VfW: mixed refs. patch by celtic_druid.
d69837d allow non-mod16 resolutions
67f2a47 VfW: prevent duplicate free() in compress_end()
0bde6ae cosmetics: remove declarations of nonexistent asm functions
015ac58 cosmetics (whitespace) in VfW
54d413b VfW: some reorganization patch by Francesco Corriga.
a75462e cosmetics: merge some duplicate tables
1c6ccbf remove cabac byte-stuffing code, because it just wastes bits in lossless, and does nothing at all at sane bitrates.
acee2d5 don't allocate lowres planes if they won't be used (i.e. in the 2nd pass).
938c52d cosmetics: move some stuff from macroblock_encode to cache_save
a0012bf new option: --mixed-refs Allows each 8x8 or 16x8 partition to independently select a reference frame, as opposed to only one ref per macroblock. patch mostly by Alex Wright (alexw0885 at hotmail dot com).
6859211 cosmetics in option parsing
4b925a1 expose the rest of the VUI flags. patch by Christian Heine.
aebad79   * common/amd64/mc-a.asm: use RIP-relative addressing in PIC mode.
db80497 temporal predictors for 16x16 motion search.
7e16547 slightly faster/cleaner block_residual_write_cabac
4c8ccfe cosmetics
ce3a422 cli: fix a crash on piped input.
cb88eb7 stats summary: separately report all 5 partition sizes, and add ref usages
bab1d61 disposable frames shouldn't get their own coded_frame_num.
31a36aa typo in ia32 x264_pixel_avg_weight_w8_mmxext
458e63c mmx avg (already existed by not used for bipred) mmx biweighted avg (3x faster than C)
3112619 cosmetics: move avg function ptrs from pixf to mc.
82d5e6f with B-pyramid, forget old refs in POC order instead of coded order. (before, b_skip was unavailable with pyramid and ref=1)
4223e38 typo in r296. patch by lurui.
2a3417b   * common/amd64/*.asm: use RIP-related addressing in PIC mode.
77997bf   * common/amd64/mc-a.asm: removed useless global variables
b2e9af9   * configure: support extra $(ASFLAGS) through --extra-asflags.
1b16298 reorganized VfW UI. patch by Antony Boucher, graphic by Jarod.
35f6417 MP4 output: update to GPAC 0.4 API. patch mostly by Robert Swain.
cfebeac faster mmx quant 15bit, and add 16bit version. total speedup: ~0.3% patch by Christian Heine.
49ac5e2 faster mmx satd. *x16: 20%, *x8: 10%, total: 2-4%. ia32 patch by Christian Heine, amd64 port by me.
76192dc allow i4x4 and i8x8 down-left prediction with emulated top-right samples. based on a patch by Johannes Reinhardt (Johannes dot Reinhardt at uni-konstanz dot de)
690a02b fps patch by Haali
8a5de70   * configure: added support for ia64, mips/mipsel, m68k, arm, s390 and hppa     platforms, as well as linux sparc.
c4ffed4 MMX quantization functions, and optimization of the C versions. about 3x faster quant_8x8, quant_4x4, quant_4x4_dc, and quant_2x2_dc. total speedup: 4-10%. patch by Alexander Izvorski and Christian Heine.
16f423a SSE2 pixel comparison functions P4: SAD 16x*, SSD 16x*, SATD 16x*: 30% faster, SATD 8x8: 15% faster, total: 2-4% faster K8: SSD 16x*: 6% faster, total: not much patch by Alexander Izvorski.
6db6362 10l in rev290: duplicate declaration of x264_pixel_sub_8x8_mmx.
2d05702 mmx 8x8 dct. On a K8: sub16x16_dct8 3806->1461, add16x16_idct8 4852->1297 cycles. total speedup: 1-3%. patch by Christian Heine (sennindemokrit at gmx dot net)
2e5b0b9  VC++ fix (thx fenrir)
2a6e7a6  x264.h: issue an explicit warning when neither stdint.h nor inttypes.h  has be included before x264.h
0403fed VfW: SAR wording. patch by Sharktooth.
48af1d0 cli: workaround to allow "--ratetol inf" on win32.
796da8e fix spatial direct mv prediction with B-pyramid. copied from libavcodec.
1459ac0  * all: Patch by Mike Matsnev :
47673d9  xyuv: bug fixes + autodetect of video size.
d9218cb  Run ranlib after make install (OS X needs that)
2059106 update i_mb_b16x8_cost_table[] for I8x8 mb type (r278 only fixed a symptom).
d945b15  * all: Added matroska writing. Patch by Mike Matsnev.
5552052  * pixel.*:
d271511  analyse: "It correct the size of array i_mb_b16x8_cost_table    from 16 to 17,otherwise,it can result a mismatch of b16x8    mb type cost and can result memory read overflow on it." Patch by lurui.
f52a280  * x264 compilation on NetBSD. Patch by Mike Matsnev.
300e93e  * all: "8x8 SAD written in Sparc Assembly using VIS." Patch by Phil Jensen.
1a0920f 10l: rd score for sub-8x8 partitions used wrong mvs.
0f34713 faster SAD_INC_2x16P for amd64. patch by Josef Zlomek.
86a01ef  Fixed win32 handle leakage (thanks Trax)  Default enabled support of threads on BeOS
da60272  * Add support for UltraSparc (uname -m: sun4u) with Solaris.  Patch by Tuukka Toivonen.
95c4071  * Faster SAD_INC_2x16P. Patch by Alexander Izvorski.
9079335 example quant matrix file
7b1b45e --cqmfile reads quant matrices in a JM-compatible format.
7a77a1e adjust coded buffer size based on input resolution and QP (old default wasn't enough for HD lossless)
ca8ead2 update avc2avi for high profile
1ab01bb custom quant matrices
2c4b31d VfW: workaround a windows unicode bug. patch by Leowai.
3961339 lossless mode enabled at qp=0
2f9a70c VfW: enable RDO. some option dependencies. patch by Francesco Corriga.
15ecd54 rate-distortion optimized MB types in I- and P-frames (--subme 6)
41c37d9 more VfW options. patch mostly by celtic_druid.
a296ffc VFW: 8x8 transform, SAR. patch by celtic_druid.
7832f01 threads option in vfw. patch by celtic_druid.
8c6e664 win32 threads enabled by default
96813e3 vfw installer nsis script. patch by Francesco Corriga.
8025723 print 8x8 transform usage % in stats summary.
26aa962 revert 216, another try at max_dec_frame_buffering. disable adaptive cabac_idc by default; 0 is always best anyway.
c4f5de5 typo in cabac tables
2b5a6b2 cosmetics
916136c fix i8x8 decision with chroma_me
8614594 SATD-based decision for 8x8 transform in inter-MBs. Enable 8x8 intra. CLI options: --8x8dct, --analyse i8x8.
6bf1398  Use win32 native threads (you still have to --enable-pthread to use  them, though)
46a4872 slightly faster 8x8 dct
398a6bf remove unused tables from SPS/PPS. reduces overhead when syncing threads.
1729616 10l (debug stuff in 246)
1ab45c8 8x8 transform and 8x8 intra prediction. (backend only, not yet used by mb analysis)
e46db68 cosmetics
7f98808 fix a bug with cabac + B-frames + mref + slices. call visualization per frame instead of per slice.
b1f4d5b accept the standard --prefix etc. options
c77e709 tweak cflags
e85db92  Fixed multithreading on BeOS (pthread emulation required)
10851d0 multithreading (via slices)
36f6321 move zones parsing to ratecontrol.c; allows passing in zones as a string.
470e1b2 UMHex motion seach (but no early termination yet)
c8b1a47 Zoned ratecontrol.
0072b80 fix rounding of intra dequant when qp<=3
7c02f09 API: x264_encoder_reconfig(). (not yet used by any frontend)
7fef6ef  Makefile: in target "install", first create the directories if they  don't already exist
809c516  Optimized subXxX_dct
f025abc  s/==/=/
04ded39  ppc/: compile fixes for Linux/PPC (courtesy of Rasmus Rohde) and        for gcc < 4
94829ef visualize reference pic numbers. misc cleanups in visualization. patch by Tuukka Toivonen.
4d5c7a0  ppc/*: more tuning on satd (+5%)
e0bd806 CLI option: --seek
036494a CLI option: --visualize Displays the encoded video along with MB types and motion vectors. patch by Tuukka Toivonen.
31c91bd fix an uninitialized value in slicetype_analyse
92ea0c5 port recent MC asm changes to amd64. patch by Josef Zlomek.
d926e41  ppc/*:   + Removed unused code   + Optimized mc chroma 4xH and satd 8x4 and 4x8   + Won a bunch of cycles by not trusting gcc about inlining and     unrolling properly  (about 17% faster globally)
aecc6ab New ratecontrol options: 1pass ABR. VBV constraint for ABR and 2pass. There is no longer a dedicated CBR mode: use ABR+VBV. VfW now uses ABR instead of CQP for 1st of multipass.
540fba7 use a predicted mv as starting point for subpel refinement.
dcb0aeb slight speedup in halfpel interpolation. patch by Mathieu Monnier.
22a567b Cleaner allocation of tmp space in halfpel interpolation; fixes some valgrind/nasm warnings. patch by Mathieu Monnier.
ca4a34d "2pass failed to converge" is no longer considered fatal.
ab2cdf4 Updated MSVC project files. thanks to Bonzi.
e0a6404 cosmetics. silence some gcc warnings. amd64 doesn't need a separate copy of the c/h files, only the asm.
d2ad6a2 10l (214 wrote wrong DPB size in SPS -> B-pyramid broke)
7229a11 CLI (mp4): return to 'capture' output mode, remove useless SetCtsPackMode() (fixed in gpac). Note: requires gpac cvs-20050419 or later. patch by bobo.
9b44391 combined L0 & L1 reference lists are limited to a total of 16 pics.
41f9b81 amd64 asm patch, part2. by Josef Zlomek ( josef dot zlomek at xeris dot cz )
413d8fa amd64 asm patch, part1.
7d35ba6 Allow manual selection of fullpel ME method. New method: Exhaustive search. based on a patch by Tuukka Toivonen.
0c64142 misc makefile changes. propogate --extra-cflags to vfw. 'make clean' removes x264.exe and vfw. tweak dependencies.
1519835 10l (CLI: fflush after progress update)
da4c038 CLI: progress indicator
a61378b VfW: build from main makefile
c6f3d17  [mp4] ftyp & moov boxes at the begining of the file, (thanks to jeanlf  for comments)
74eecd3 CLI: --fps had side-effects. fixed.
78ca42c CLI: cosmetics
e06dfd4 Makefile: strip x264cli. tweak stats summary.
29facf8  * x264.c: Fix ctts box creation. Patch by bobololo from Ateme.
1014aa4  common/ppc: more cleaning, optimized a bit
7740416 CLI: require output file (don't default to stdout). warn if trying to use mp4 or avis when not supported. misc cleanup.
fe90527  configure:   use -falign-loops=16 on OS X  common/ppc/: added AltiVecized mc_chroma + cleaning  checkasm.c:  really fixed MC tests
a1b9531 Configure tweaks. Allow avis-input in mingw. Turn off debug by default.
35d85ca  checkasm.c: fixed MC tests
c0abfd3 CLI: MP4 muxing. patch by bobo from Ateme.
e1b747f  Cygwin fixes
b7c3b44  configure: ooops, restored -g  ratecontrol.c: OS X has exp2f in -lmx  checkasm: quick compile fix
ecbf942 add x86_64 to configure
7d9ac7c  set svn:ignore
6490f43   Added a configure to detect the platform/system/etc so people don't  have to edit the Makefile (will work for Linux/OS X/BeOS/FreeBSD, feel  free to modify for others), and we can now remove the Jamfile which  was broken most of the time anyway.
b12cb05 Makefiles: better dependencies for SEI version number
90a6fd3 Forgot rbsp_trailing_bits in AUD NAL
e103917 Optionally use access unit delimiter NAL units.
d4663a4 VfW: cleaner install on win98. patch by Riccardo Stievano.
990e58b new util: countquant for 2pass statsfiles
b780e71 print svn version number in SEI info and in CLI/VfW.
ea9308c Make reconstructed frame available to caller.
6dcb0e4 make install
11de519 free() -> x264_free()
de97a12 CLI: flush B-frames at the end of the encode
0df24cf convert mc's inline asm to nasm (slight speedup and msvc compatibility). patch by Mathieu Monnier.
48c34d0 buffer overruns in slicetype_decision. patch by Mathieu Monnier.
a1c2c04 tweak usage message
ac93ce1 Simplify inter analysis option names. (psub16x16 -> p8x8) patch by Robert Swain.
0455760 173 broke .depend when debugging was enabled
bf7f679 early termination for intra4x4 analysis
ee5b2be Check/fix range of x264_param_t.rc.i_qp_constant.
94086b8  Cleaned up and fixed Makefile for OS X and BeOS (hopefully FreeBSD too)  It defaults for x86/linux, others: uncomment the lines for your  platform & OS at the beginning of the Makefile
cb6a40f macroblock_analyse: simplify cost comparisons. (cosmetic) CLI: enable cabac by default.
79fa694 Chroma ME (P-frames only).
abbd6c5 SSE optimized chroma MC. patch by Radek Czyz.
553b829 167 broke psnr calculation for non-mod-32 inputs
70da43b  sqrtf requires -lmx on Mac OS X
e72f431 use mmx ssd for psnr calculation.
be2f0e0 revert 164. blame Spyder.
73522c8 SSD comparison function (not yet used). Cosmetics in mmx SAD.
c68f34e VfW: reject YUY2 and RGB input formats
fd527e3 Really fix QP override.
a224564 write VUI bitstream restrictions
29dee22 AVI & Avisynth input (win32 only). patch by bobo from Ateme.
79ebb19 expose option "chroma qp offset"
2fc5299 Fix per-frame QP override broken in rev 137.
99b10e7 Don't include x264.o in the library.
9f97e90 VfW: expose B pyramid and weighted B prediction. patch by Riccardo Stievano.
4fbdc5c 10l
1f735a3 buffer overrun when bframes == X264_BFRAME_MAX
c90534d Adaptive B skipped some POC numbers (slightly reducing b_direct efficiency).
d0bd44f avc2avi: Use POC to determine frame boundaries (frame_num couldn't distinguish consecutive B-frames). Fix keyframe flag to mark IDR only, not all I slices.
f01e3d5 allow 16 refs (instead of 15)
c47bb1f report version number in decimal instead of hex
91536ac New option: "B-frame pyramid" keeps the middle of 2+ consecutive B-frames as a reference, and reorders frame appropriately.
9591b03 smarter parsing of resolution from commandline
4337ee8  ratecontrol.c: fixed exp2f on BeOS so rate control works properly
4b2ba85 Fix a buffer overrun with very long MVs.
ccf61ce wrong stride in lowres image
b04a260 10l (fast1stpass was slower than non-fast)
d05adbc Disable deblocking filter in frames of sufficiently low QP that it would have no effect. (Saves a little CPU time in the decoder.)
d836d8f Simplify x264_frame_expand_border.
067f22c Altivec functions for MC using the cached halfpel planes. Patch by Fredrik Pettersson <fredrik_pettersson at yahoo dot se>.
323b54f Don't use uninitialize MVs in x264_mb_predict_mv_ref16x16.
92f6f36 Implicit weights in B16x16 analysis were swapped. patch by Radek Czyz.
c2b0c8a Cosmetics: Some renaming. Move the rest of slice type decision from encoder.c to slicetype_decision.c
24a6672 Take into account keyint_max in B-frame decision.
68c1353 Preliminary adaptive B-frame decision (not yet tuned). Fix flushing of delayed frames when the encode finishes.
e2efb4b Write x264's version in a SEI message.
3ada9c0 VfW: Enable weighted B prediction when max B-frames > 1. Enforce max reference frames <= 15. patch by Riccardo Stievano.
834eac2 Add: implicit weighted prediction for B-frames. Slightly optimize x264_mb_mc_01xywh. Fix an error in B16x8 cost.
47706e7 Oops, increment API number.
d7443f6 Configurable level. Levels are still not enforced; it's up to the user to select a level compatible with the rest of the encoding options. Patch by Jeff Clagg <snacky at ikaruga dot co dot uk>.
15450db Always use the tempfile and rename method for multipass stats, so that VfW knows whether the previous pass completed.
b1f47ea More tweaks to bitrate prediction. Change error messages when 2pass fails to converge.
0606b3a Improved 2pass bitrate predictor. No real change most of the time, but allows correct ratecontrol on some pathological videos that used to diverge completely. Also improves prediction when 2nd pass bitrate is very different from 1st pass. The new qscale2bits() has no simple inverse, so I also had to change rc_eq to output qscale instead of bits.
3b2116c Some defines needed by MSVC, and convert the DSP files to DOS-style newlines. Patch by Radek Czyz.
d688918 Precalculate lambda*bits for all allowed mvs. 1-2% speedup.
ac411e2 Deblock B-frames. (Not yet used, since B-frames aren't kept as references.)
50a9248 Simplify x264_mb_mc_01xywh()
b2d78b5 Save some memcopies in halfpel ME. Patch by Radek Czyz.
46141bf Cache half-pixel interpolated reference frames, to avoid duplicate motion compensation. 30-50% speedup at subq=5. Patch by Radek Czyz.
d81fa19 In N-pass mode if stat_in and stat_out are the same file, instead save to a temp file and overwrite stat_in only when the encode finishes.
dc270b7 VfW: x264_log now creates a window for error messages
ef4d1fa cosmetics
6f298b9 bs_align_1() didn't actually write all ones. (so encoded streams with cabac were technically invalid, though no decoder cares.) Patch by Tuukka Toivonen.
ca4ae52 VfW: tweak option names
85c92e1 VfW: use separate stats files for each pass of an N-pass encode.
70ce7a4 VfW: Enable multipass by default, increase the configurable range of I and B quant ratios. core: Tweak error messages.
2796ba0 r114 didn't completely fix the problem, trying again.
33140d0 Another MV clipping fix.
9179245 Simplify x264_cabac_mb_type.
7927c9e More accurate clipping rectangle for motion search. (slight compression improvement for high-motion scenes)
5b750c3  encoder/encoder.c: gcc < 3 compile fix
3f098e9 Change default level from 2.1 to 4.0 until I get around to calculating actual levels.
bccb009 Clipping mvs to within picture + emulated border when running motion compensation.
c16119a Fix clipping of mvs in probe_pskip. (Previously it mixed up fullpel with qpel.) This should eliminate the black blocks that sometimes appeared in high motion, low detail scenes.
6558c83 Fix length of strings stored in the registry. Patch by Riccardo Stievano.
084175d registry values for min/max keyint were mixed up
79f73aa VfW: expose option "Nth pass" (i.e. simultaneously read and update the multipass stats file). Patch by Riccardo Stievano.
0292410 add "make NDEBUG=1" to strip library
66ee02b finish subpixel motion refinement for B-frames (up to 6% reduced size of B-frames at subq <= 3)
37c0a24 VfW: expose the 2pass ratecontrol option: qcomp ("bitrate variability"). Some rearranging of the advanced configuration dialogue. Patch by Riccardo Stievano <walkunafraid at tin dot it>.
c80d310 VfW: Support ip_factor and pb_factor, some cleanups. patch by Riccardo Stievano <walkunafraid at tin dot it>
19ed025 Use floats instead of int64 in log messages, since win32 (incl. mingw) doesn't understand %lld. Also display MB statistics in percent instead of number.
4394c4d finished printf -> x264_log conversion.
04bb833 Don't apply keyframe boost to I-frames that are followed by another I.
7b46f42 New VfW option: "fast 1st pass" automatically disables some partitions and reduces ME quality and number of reference frames. Removed option direct_pred=none, since it provides no benefits. Patch by Riccardo Stievano <walkunafraid at tin dot it>.
177e211 vfw: tweak wording and defaults
b80ed70 From Riccardo Stievano <walkunafraid at tin dot it>:
0a70904 My last change of IDR decision broke in 2pass mode. fixed by remembering which frames are IDR. Disable benchmarking, as it was very slow for some people, and we already know that all the time is spent in macroblock analysis.
6483280 Changes the mechanics of max keyframe interval: Now enforces min and max GOP sizes, and allows variable numbers of non-IDR I-frames within a GOP.
5b13c83 MinGW compatible resource.rc by Radek Czyz
8379464 strict QP offset for B-frame vs following P-frame strict QP offset for I-frame vs GOP average
0af83ad r72 broke B-frames without intra4x4. fixed.
5ccb93c updated VfW interface by Radek Czyz
fc2e7ba improved mv prediction: 1-3% better compression of B-frames early termination for B-frame ref search: up to 20% faster with lots of refs.
7fc5f99 allow constant qp on Nth pass (e.g. for forcing frame types)
094266b disable subme=0 (the huge bitrate penalty wasn't worth the speed) renumber direct_pred
3a11b25 oops, last patch had some debug statements
0ad06e6 fix: "x264 -A all" didn't include b8x8 types. add: "make NDEBUG=1" to strip library update TODO with B-frame status
5329572 Reorganize frame type selection: No longer produces consecutive I-frames when B-frames are enabled. Not thoroughly tested, but works for me. Fix scenecut detection when B-frames are present: Can now produce IDR, but is slower since it re-encodes more frames. This might reduce compression ratio in the presence of quick fade-ins. 2pass ratecontrol deals more gracefully with completely skipped frames.
b1d946c remove Makefile.cygwin because build/cygwin/Makefile is more up to date. put correct object file names in .depend
456e8fd reduce default verbosity, add option -v
007c6f7 remove relative include paths, to avoid conflicts with libtool
b42bd74 rename *.asm to avoid conflicts with libtool
dabd095 list default settings in --help
fc1380d replace EPZS diamond with a hexagon search pattern. early termination for multiple reference frame search (up to 1.5x faster).
ab0c769 sps->i_num_ref_frames was set higher than necessary
e33ed4c new option: --fps
d5322b4 various cleanups in macroblock caching. store motion data for each reference frame (but not yet used).
9df283c more accurate cost for psub8x8 modes.
4e5e377 implement macroblock types B_16x8, B_8x16 tweak thresholds for comparing B mb types
efbf4ad simplify x264_mb_predict_mv_direct16x16_temporal
457eaa9 option '--frames' limits number of frames to encode. patch by Tuukka Toivonen <tuukkat at ee.oulu.fi>
dfbbcec simplify calvc mb type
199ff74 implement macroblock types B_SKIP, B_DIRECT, B_8x8
b6954ba rename 'core/' to 'common/', which avoids conflicts with libtool
da49fae cleanup stats reporting report B macroblock types report average QP
bc0a1e9 apply ip_factor and pb_factor in constant quantiser encodes.
25b542c save a little bit of memory
0f65f51 multiple hypothesis mv prediction: 1-3% improved compression, and .5-1% faster
2489b6a * analyse: we can do 4x4 Horizontal Up mode when LEFT is avaible.   Thanks Stephen Henry for the report.
71f820d improved 2pass ratecontrol: ensures that I-frames have comparable quantizer to the following P-frames, and produces more consistent quality in areas of fluctuating complexity.
7972ae1 more informative error message when 2pass fails to converge
30c6a09 #include <stdarg.h>
a0b32b7 cleanup spacing of frame stats with verbose logging.
bdf9b10 typo in x264_cabac_mb_sub_b_partition (see ITU-T H.264 clause 9.3.3.1.2)
e917887  Typo
851989a  + No need to emulate memalign on OS X  + Fixed Makefile for OS X
5755492 Conditionally inits 1pass rc, only if it's enabled. This prevents a couple of irrelevant warnings from appearing in constant QP mode. (Loren Merritt <lorenm at u dot washington dot edu>)
c9a501a Oops, changing those types messed up some vprintf's. fixed. (Loren Merrit <lorenm at u dot washington dot edu>)
46d0385 filesize (bits) in a 32 bit int will overflow after 250MB, screwing up 2pass ratecontrol. (patch by Loren Merritt <lorenm at u dot washington dot edu>)
3f7206d fix compilation on FreeBSD (from Loren Merritt (thanks to Igla))
48937c6  * ratecontrol: Patch by Loren Merritt :
e3ae8a7  * all: Patch by Loren Merritt.
79a2bb7  * ratecontrol: added 'b' flag to fopen.
48e2886  * all: Patches by Loren Merritt: "Improved patch. Now supports subpel ME on all candidate MB types, not just on the winner.
f9bd35a  * x264: added --ipratio --pbratio in help section.
8c6f6fa  * ratecontrol: path by Loren Merritt.
d46df39  * x264: added --quiet and --no-psnr.
cba0cd3  * eval.c: lalala ;)
8a5aa76  * added Loren Merritt.
58b7012  * all: added eval.c (I hope libx264.dsp is correct, I can't test).
9116d30  * all: 2pass patch by Loren Merritt <lorenm AT u.washington DOT edu>
67b6730  * all: first part of the 2pass patch by Loren Merritt  (only the header/textures bits computed for now).
0a7d38c  * all: include stdarg.h (needed for x264_log)
63e5a5c Use x264_log() in ratecontrol.c
f246a87  * encoder/encoder.c: oops. (fixed compilation).
dab6f06  * all: more fprintf -> x264_log.
f53a7ae  * all: added a x264_param_t.analyse.b_psnr
72eced4  * encoder/encoder.c: kb/s with k=1000 (more consistant). Patch by Loren Merritt <lorenm AT u DOT washington DOT edu>
a01315f  * all: introduced a x264_log function. It's not yet used everywhere  but we should start using it :)
5ffe5a9  OS X is missing exp2f()
348de7f Fixed warnings with PPC 64
2885471 Add my svn user name.
ed61d8e Bugfix.
6b20e50 Include timing info in VUI. Change frame rate from float to fraction (sorry for the inconvenience).
2b3cd6c Add TAGS rule.
4446152 Fixes by Loren Merritt (lorenm at u.washington.edu).
78292e0 Get rid of integer overflows that caused the rate control to go haywire in some situations.
374baca  * encoder: correct range for i_idr_pic_id is 0..65535  (Not 0..65534)
07a0494  ratecontrol: patch by Loren Merritt <lorenm AT u DOT washington DOT edu>
249259d  * ratecontrol: patch by Måns Rullgård <mru AT mru DOT ath DOT cx>  "This patch fixes a small bug (divide by 0 possible) in the rate control."
e96703d  * encoder: simpler scene cut detection (seems better but do not check size anymore, so need more testing).
11e1b0c  * all: Change the way PSNR is computed (based on a patch by Loren Merritt <lorenmn AT u DOT washington DOT edu>  Using SQE(DeltaSourceReconstructed) = Sum( delta^2 )        PSNR( SQE, Size ) = -10Ln(SQE / 255^2 / Size )/Ln(10) )        Y+U+V : Union of YUV planes.
9168b24  * x264.h: increased X264_BUILD.
20c19c4  * all: Patch from Måns Rullgård <mru AT mru DOT ath DOT cx>
30a244d  Linux PPC AltiVec fix
b0495a9  BeOS fixes (no stdint.h, no libm)
bf06e99  Attempt to fix build on Linux PPC
86ca490  * encoder.c, analyse.c, macroblock: fixed when using a qp per MB.  (Buggy for pskip and mb with null cbp luma and chroma).  * dct*: fixed order of idct.
55eb54c  * cpu.asm: mmh trashing ebp,esi and edi isn't a good idea I fear ;)
a8703c8  * all: fixed ss2 runtime selection.
02713c2 update & SSE2 support
77bce7d update
c7631fa remove some unused code
8d3d88b support for build checkasm.exe
b2e2e34  * build fix (thx xxcd).
4fb5f9a  * TODO: test.
a511bbe  * vfw/* : oops...
166ed2d  * mc-c.c compilation fix for gcc >= 3.3
602c87d  * all: re-import of CVS.
5dc0aae  * all: re-import of the CVS.
REVERT: 7340f6d Cleanup prev commit, drop gcrypt support
REVERT: eea470f Add support for building with gnutls with nettle as backend
REVERT: 2ad1d5d Fix upper bound check in AMF_GetProp
REVERT: adb77ff Remove extra object end tag in Connect reply
REVERT: 4e06e21 Support decoding AMF_XML_DOC
REVERT: 5d03a4f Fix log messages
REVERT: 45556fb Fix mismatched format string conversions
REVERT: 949da84 Tell gcc about log format strings
REVERT: 83e701e Fix missing log message parameter
REVERT: 30fcf46 Check for malloc failure in prev commit
REVERT: 1c77ff4 Calculate tcUrl length
REVERT: 9df7959 Spell Referer according to RFC1945
REVERT: 90799ef Increase tcUrl buffer size
REVERT: b346706 Fix getting swf hash with https URLs
REVERT: c90c058 Fix bytes-received report
REVERT: 60218d0 fixed undefined behaviour due to union assignment
REVERT: 6230845 PolarSSL support now requires version 1.0.0.
REVERT: c58cfb3 Add RD_NO_CONNECT return code for Connect failures
REVERT: a1114e0 Fix AVreplace for usherToken
REVERT: c528451 Fix <arpa/inet.h> include order
REVERT: 8880d14 Unexpected BW Response Fix
REVERT: f1abda0 Cleanup previous commit
REVERT: 024d201 Justin.TV usherToken detection
REVERT: ec42296 Darwin dylib updates
REVERT: b627335 Plug potential memleak
REVERT: 530d02f Fix MDH_free() for PolarSSL
REVERT: 159a06e Don't try to close an already closed socket
REVERT: 060206d Check the return value from RTMP_SendBytesReceived()
REVERT: 9931c44 Generate and install an import lib for the built DLL
REVERT: 749018b Create the SODIR, too
REVERT: ed99ad0 Remove the generated pkg-config file on make clean
REVERT: a2fb387 Regenerate HTML docs, minor tweaks
REVERT: dc762e4 Squashed commit of the following:
REVERT: c28f1ba v2.4 changes
REVERT: 3121324 Version bump
REVERT: 4028a5a Additional credit for RTMPE 9 keys
REVERT: be0590a Add LIB_RTMP macro
REVERT: d1f14b1 Add RTMPE type 9 handshake signature
REVERT: 0e9b491 Revert "Drop back on the handshake version, avoid rtmpe 9"
REVERT: e09abc0 add -shared to mingw ldflags, fixes compilation error patch by Martin Storsjo
REVERT: 6155179 Use symbolic constants for packet types. From Peter Miller @ opensource.org.au
REVERT: 041cf3f Handle multiple sessions at once (ugly)
REVERT: 495e1e6 Handle Play.PublishNotify like Play.Start
REVERT: ac1843d Fix prev commit
REVERT: aa2825f Drop back on the handshake version, avoid rtmpe 9
REVERT: a1bcab1 Fix rtmpt read hangs
REVERT: 0a219ff Bump up play command buffer sizes
REVERT: 25447a0 Fix typos in prev commit
REVERT: bca1ef0 Add Libs.private to pkgconfig for Windows
REVERT: 8c713f4 Fix FLV timestamps during resume
REVERT: 1379a2c Fix infinite loop on Error/Close
REVERT: 9ca7e22 Timeout fix from Antti Ajanki
REVERT: 8afb368 Log error message for unsupported SWF Verification types
REVERT: 59ca190 Less case-sensitive check for Content-length: header
REVERT: 08bdebe Substitute libdir in pkgconfig file
REVERT: eb80624 More dynlib tweaks
REVERT: 1379826 Fixes for Darwin - use dylib, not bundle for shared lib
REVERT: 2340f0e MacOSX/Darwin shared library flags
REVERT: 5a3d600 Fix install target
REVERT: 24f7e72 Don't link explicitly against static library
REVERT: eef8748 Update XBOX/XBMC support
REVERT: da78eba Remove obsolete XBOX defs
REVERT: f1c4f0e Hide strtime()
REVERT: c41568f Update from prev commit
REVERT: 8a5901c Document the escape coding used for special characters in values
REVERT: 6556b9f Fix typo
REVERT: 272a91d zlib dependency is only when CRYPTO is enabled
REVERT: a8f8ee3 Default to SYS=posix, parent Makefile may not have run
REVERT: 8a9fc25 Also delete shared libs on clean
REVERT: 54ebbe4 2.3 notes about shared library
REVERT: bd22d75 Add mingw DLL install support
REVERT: cccc70e Add -lz and MinGW support
REVERT: c7b9448 Bumping version to 2.3 to highlight shared lib support
REVERT: 32a753b Only send CheckBW request once
REVERT: 602b76c Fix prev commit
REVERT: 842f500 Cleanup prev commit
REVERT: 55d4a10 Fix tcUrl generation, free it on close if needed
REVERT: 8a8590a Skip repeated spaces between URL options
REVERT: ee4217a Check for duplicate invocations
REVERT: 385b644 Notes for 2.2f
REVERT: a0e1f5c Fix bogus switch statement
REVERT: 8ebaf39 Fix skipping extension
REVERT: 44d2feb m_read.buf cannot be freed if we were still searching for the header
REVERT: 885cd3d casting hbuf to unsigned doesn't seem to work, just declare it unsigned
REVERT: 8cab80e Add ping/pong msg, from mybiiter@gmail.com. (Untested. Used with "ustream"?)
REVERT: 8b43afa Simple rules for shared lib, v2.2f
REVERT: a794fff bump libversion to 2.2f
REVERT: a5f08e7 Add RTMP_Socket(), RTMP_Pause(). Addresses the last remaining direct references into RTMP struct from ffmpeg, should be able to write version-independent apps now.
REVERT: 39179f2 Always use .flv extension for output
REVERT: f70f6a7 Regenerate
REVERT: 720a0d4 formatting/typos
REVERT: e103e98 Note librtmp is LGPL
REVERT: 8d9e964 Update FSF address in license notice
REVERT: ffdb775 move TRUE/FALSE defs to public header, just in case
REVERT: 1b3b8cd Kill all use of bool, just use int
REVERT: 20021eb add XLIBS macro
REVERT: aca5cef drop unused MF variable
REVERT: 80b04b7 drop $(MAKEFLAGS), unnecessary
REVERT: 44b1cf4 RTMP_Write buf is const
REVERT: 4464675 Fix RC4 teardown for GnuTLS/gcrypt
REVERT: 7d62819 Note RTMP_EnableWrite
REVERT: 45126f4 Tweak install vars
REVERT: f012c97 Add install targets for tools and docs
REVERT: c579bdf Makefile tweaks, use SYS= macro instead of platform targets
REVERT: 9804899 2.2e notes
REVERT: c3e7022 Bump to version 2.2e
REVERT: 9fd80be Add RTMP_EnableWrite() for publishing instead of reading
REVERT: 9dd9b25 Finally fix the half-assed request/result queue
REVERT: 97ec486 Read buffer fixes: We overallocated the buf by 4 bytes, but the result may not have needed the extra space. Also, don't return without reading at least one packet. (Alternative: return early, but set EAGAIN...)
REVERT: ff2415d Just return 1 packet's worth of data at a time from RTMP_Read()
REVERT: db27d27 Cleanup declaration
REVERT: 9e87a3b Revert unintended commit
REVERT: 2f342f9 Give up dataType search if we run out of buffer
REVERT: 31bb4f3 Use metadata to set dataType, to help finish dataType search earlier
REVERT: 492983a Fix RTMP_Read, return 0 on EOF, not -1
REVERT: cb26e5c Fix swfinfo path on Xbox
REVERT: 72af6c7 Document what we know about Stream BufferEmpty and BufferReady messages
REVERT: e78ec5e Very rudimentary library overview, read rtmp.h for more details
REVERT: a9d8e96 Don't use the BufferEmpty toggle trick by default in librtmp, but set it by default in rtmpdump
REVERT: 9ff3673 Whitespace in prev commit
REVERT: 7a7b6a1 Fix rtmpt clientID was not NUL-terminated
REVERT: 11e5437 More XBOX cleanup, just use _WIN32 which is defined on both
REVERT: 8276e7a Update docs for rtmpts
REVERT: cbba368 Looks like rtmps doesn't tunnel by default, so add rtmpts
REVERT: c9627ba XBOX compatibility patches (Mostly same as WIN32)
REVERT: 0910c5d Add --playlist option
REVERT: e683f32 Updates for 2.2d
REVERT: eff6331 Clarify NO_SSL initialization
REVERT: 5e37ef0 Add -DNO_SSL option for omitting SSL support (just use rtmpe, no rtmps)
REVERT: e4e4b0b Don't strip suffix if prefix was already present
REVERT: 89d0b5c Add support for polarssl, http://www.polarssl.org
REVERT: d05cd7e More explicit OpenSSL check
REVERT: 8eafde1 Check OpenSSL version
REVERT: 19a067f Add support for set_playlist command
REVERT: b2c095c Restructure Link booleans into bitflags
REVERT: 7db96c6 Tweak client version based on encryption status
REVERT: de82259 Fix whitespace
REVERT: 2d8035a Fix: if playpath begins with '?' just use the remainder
REVERT: f02c0e2 Drop unneeded Debug
REVERT: fe8a135 More trivial cleanup
REVERT: db518c0 whitespace cleanup
REVERT: 4091c99 Fix timestamps in FLV packets
REVERT: 5351eb4 Fix digest offset computation, handshake versions
REVERT: f72d388 Tweak pkgconfig libs
REVERT: 5b40c0d Windows - use ws2tcpip.h, drop our bogus socklen_t define
REVERT: cf1b6da Windows GNUTLS needs explicit -lgcrypt
REVERT: dab3784 Use winsock2.h, not winsock.h
REVERT: 554b59c Set CROSS_COMPILE for ar
REVERT: 010d5bd v2.2c stuff. not much user-visible
REVERT: 1127fab More cleanup
REVERT: 5247bfe C89 compatibility
REVERT: 0a92a1e Leave CRYPTO defined by default, use "make CRYPTO=" to turn it off.
REVERT: 7569112 cleanup: dTime -> iTime
REVERT: cb60188 Fix pause debug msg
REVERT: 4ee738a Rename default log handler
REVERT: de86e10 Add missing LogSetCallback
REVERT: 33c4e4c Restructure logging, add log callback
REVERT: eb35c71 Fix prev commit - hashswf must always be present
REVERT: 628f722 Drop #ifdef CRYPTO from rtmp.h; apps have no way to know any more if CRYPTO is defined or not
REVERT: 1ee2272 Move -DCRYPTO to Makefile from rtmp.h
REVERT: 5a26c69 HashSWF depends on CRYPTO
REVERT: 170699a include <stddef.h>
REVERT: a856e26 releaseStream, FCpublish, FCunpublish get no _results
REVERT: 1ffd941 cleanup sendplay log msg, plug m_read memleak
REVERT: 02272ba Make sure install directories exist
REVERT: 21a925c <stdbool.h> isn't as standard as some people claim...
REVERT: 5bafb8f Silence prototype warnings
REVERT: a5d1abe Check length for unescape
REVERT: b24e6c2 Revert prev commit, use \xx for escaping spaces
REVERT: 493fdc3 Can't use URL coding for embedded spaces in SetupURL. Instead use TAB combos
REVERT: c6f0e04 Cleanup tabs, URLdecode options in SetupURL
REVERT: bbaec8b All timestamps are 32 bit ints
REVERT: a430dbc Cleanup prev commit
REVERT: 18f3bf6 Option restructuring, allow most options to be passed along with the RTMP URL, clean up
REVERT: 23fd58d Use AVal for hostname and sockshost, don't allocate hostnames
REVERT: 095b021 Downgrade from FP9 handshake on plain RTMP and non-Adobe server
REVERT: 8f7b11a Fix #undef CRYPTO case
REVERT: c81ee7b Cleanup LogHex, just print 16 bytes per line
REVERT: 679c489 Fix prev commit
REVERT: d7ea780 Cleanup prev
REVERT: 6fbf426 Child process must exit if exec failed. (exec should never fail unless your PATH is messed up)
REVERT: 7173d06 Abort on unrecognized options
REVERT: 178c6ce Fix buffer errors
REVERT: 5a70d4c Timestamp may be absolute or relative when read off the wire, but is always absolute when we return a pkt to caller
REVERT: 3e314e9 delete packet->m_nInfoField1, it's just the timestamp
REVERT: 6eb616c Fix typo
REVERT: 45b8a3f Cleanup prev commit
REVERT: 5fdb88e Workaround $(MAKEFLAGS) bug in gmake 3.81
REVERT: 28b0246 2.2b update
REVERT: a797bea v2.2b
REVERT: ceacf56 Add accessors for debuglevel, libversion, ctrlC, to avoid external programs depending on library internal variables.
REVERT: 33442bc Add Requires: line for crypto lib
REVERT: 3b74e1a Add install target, create pkgconfig for install
REVERT: a79387d Check for valid socket before setting in fdset
REVERT: e95b01f Full debug for server handshake
REVERT: 96be720 (ugly) add FP10 support for server handshake
REVERT: 75cb5cd Export RTMP_SendClientBW()
REVERT: 8e73241 More fixes due to -r369
REVERT: 069f619 Fix init bug from -r369
REVERT: 75f82ca Fix Win32 HOME location again
REVERT: cc5c05e Fix typo for --auth
REVERT: 40e1338 GNU vs BSD make syntax issues
REVERT: 670cb5d Update 2.2a notes
REVERT: 47f1165 Initialization fixes
REVERT: 8ed92c8 Rename AMF_Log -> RTMP_Log, cleanup
REVERT: 4622922 Remainder of gnutls support
REVERT: 6543f28 Cleanup
REVERT: 22836b1 Use GnuTLS/gcrypt for HMAC/RC4
REVERT: 00ae52c Add GnuTLS/Gcrypt support for DH key exchange
REVERT: f54e6dd More cleanups for SendPacket: timestamps, header type, etc.
REVERT: a71c838 More for RTMP_Write, cleanup on Close
REVERT: 66cc854 And more for RTMP_Write
REVERT: 240c5b5 More for RTMP_Write
REVERT: 762d9f5 More for RTMP_Write
REVERT: 88cdd45 More for RTMP_Write
REVERT: a6a41ce Partial RTMP_Write implementation
REVERT: fe1a557 Handle UnpublishNotify for live streams
REVERT: 6fc049a Fix seek timestamp
REVERT: 8b43b3c Declare struct sockaddr
REVERT: 6edb7520 Use HOMEPATH on Windows, not HOME
REVERT: 03be2aa Partial revert of prev commit, not needed
REVERT: 16eea9d Always send tcUrl
REVERT: 9abae82 Rever -r343, app is not required
REVERT: 915ff92 More cleanup
REVERT: 82adc0b Fix status reporting
REVERT: 29e3f7a app is a required parameter
REVERT: 2666f3f Drop redundant CRYPTO #def
REVERT: ca2be25 Private header file
REVERT: afcb1f9 Hide _debug output
REVERT: 5803cf6 Fix pause/seek status
REVERT: b301493 Use explicit AMF_debuglevel
REVERT: ed37047 Consolidate RTMP_READ booleans
REVERT: a94008b Namespace cleanup
REVERT: 0227203 Tweak prev commit
REVERT: 2bad597 Don't #define closesocket if someone else has
REVERT: 390fa99 Initialize port
REVERT: 8c83ec0 Use RTMP_Read()
REVERT: a687f04 Add RTMP_Read() to simplify library usage
REVERT: 80d606b Note FLV header fix
REVERT: 0682bb3 Silence spurious warning
REVERT: b94823a Cache initial packets, don't write header till we know the dataType
REVERT: d54a6f0 Cache initial packets, don't write header till we know the dataType
REVERT: a34e9dc Rework WriteStream arguments
REVERT: 43c799b Notes for 2.2a
REVERT: e6b5309 Document rmtpt support
REVERT: 680c7e3 Drop assert
REVERT: 4275eae More for rtmpt
REVERT: e9037c6 Cleanup whitespace
REVERT: 50d0c37 Fix default ports
REVERT: 69a937e Preliminary rtmpt support - needs work...
REVERT: 7c777f29 Fix ssl close
REVERT: 7a15228 RTMPE is now protocol #2, not #3
REVERT: 8251927 Preliminary support for SSL
REVERT: 430b75f Fix hostname parsing
REVERT: 17ca5ec Default version is <OS> 10,0,32,18
REVERT: 86fd72f Move Default flashVer into library, let SetupStream set the default
REVERT: 7b1290c Cleanup m_sb compat macros
REVERT: e0d90f5 More log.h cleanup
REVERT: 36b7207 Drop log.h from rtmp.h
REVERT: 59af4ae 0 is a valid fd
REVERT: 3ab03df Publish RTMP_SendSeek()
REVERT: 88ee958 Fix license header
REVERT: ce2a5bb C++ compat, move parseurl to librtmp
REVERT: 02f8383 Cleanup ARM example
REVERT: 22eb25e Note where to get OpenSSL DLL for Windows
REVERT: 25dcbb0 Add HTML versions of manpages
REVERT: 5d84fe6 Cleanup
REVERT: 7fe8d4c Cleanup
REVERT: 430f250 Manpage for rtmpgw
REVERT: 82aa402 Add socks option
REVERT: 2731657 More typos
REVERT: 06dd823 Fix typos
REVERT: e9686be streams -> rtmpgw
REVERT: 93aaf72 Move librtmp to separate directory, relicense as LGPL
REVERT: aa2f2bf More typos
REVERT: 9c71c5a Add ENVIRONMENT
REVERT: 04a60be Add Exit Status info
REVERT: ea84cbf Fix AMF_EncodeString to handle Long Strings
REVERT: f494d19 Fix decoding of Long Strings
REVERT: a2e35ec Renamed streams program to rtmpgw
REVERT: a8bb253 Fix Play/Stop responses
REVERT: 8431127 Fix typos
REVERT: 2e87938 Cleanup
REVERT: e359936 Manpage
REVERT: 6970e84 Move rtmp.o, amf.o, log.o, hashswf.o to librtmp.a
REVERT: 9825e4c Cleanup more endian cruft
REVERT: a459d3b More FP10 handshake support.
REVERT: 99d1561 Account for quotes in cmd string
REVERT: 0d2071f Expand public API
REVERT: 2a5135e Fix SEGV when swfUrl is NULL
REVERT: 3afa522 Cleanup iptables / ipfw info
REVERT: 7500406 Portability fixes
REVERT: 409d4ac Partial revert of prev commit
REVERT: 1d61a5d Fix typo
REVERT: aebb535 v2.1d updates
REVERT: 0661070 Notes for v2.1d
REVERT: b5aedcb Spawn rtmpdump directly, don't just print the cmdline
REVERT: 7ced770 Log a final status update when stopping
REVERT: f51f554 Derive output name from playpath. (Code copied from rtmpsuck)
REVERT: cf6b796 Don't advance to next file if playlist has only one file
REVERT: 80f19b1 Fix debug msg
REVERT: be3f4c7 Ignore ctrl 31/32 in live streams
REVERT: 94901a6 Fix r248
REVERT: 180093d More fixes for pause/resume - don't overwrite pauseStamp if already paused
REVERT: ad5b79c Cleanup prev commits
REVERT: 9642d0a From Antti Ajanki: expose http_get()
REVERT: b02b66a Fix audio resume bug
REVERT: 39cc011 Minor fixes from Antti Ajanki
REVERT: 7632b29 Another timestamp fix, same as r202
REVERT: 7b357c2 Fix r239, there are 4 fields per record now
REVERT: 1487ff5 Silence warning
REVERT: 7feb004 Prep for FlashPlayer10 handshake support. (Probably should choose offset based on plaintext vs encrypted...) Only 128 bits are needed for DH key, not 1024.
REVERT: c7d4927 Drop osx-specific rules. Don't mention cygwin or any other platforms. Just override from the command line if you need other settings.
REVERT: aaafa1e Allow zero swfAge to force HTTP check every time
REVERT: edbaec1 Add ctim to ~/.swfinfo, recording the last time we checked on the info for a given SWF. Use Age parameter to control how often we check.
REVERT: 3aa31fb Log BytesReceived reports from client
REVERT: c8621a5 Don't send our own byte counts, the real client will
REVERT: 375de5e Split RTMP_Connect up, add m_bSendCounter flag; proxy doesn't need to send byte counts since the real client/server will.
REVERT: 0ade4af Use __APPLE__ instead of __MACOSX__
REVERT: 9858be6 Note parseurl fix for extensions
REVERT: c1697d7 Handle extensions followed by URL parameters
REVERT: 7f35fd6 Close both connections on cleanup
REVERT: 46be6ab Tweak SendChunk to use a single WriteN call
REVERT: 7b5ba97 Skip leading dot in filenames
REVERT: 62d7697 Cleanup unused field
REVERT: 40706b0 Fix typo in comment
REVERT: e56dffa rtmpdump params should be printed on stdout
REVERT: 1a24034 Fix AMF_Decode() end detection
REVERT: 741be38 Use double quotes instead of single quotes for output
REVERT: 8f26abb Fix typo
REVERT: 301b36e Also support NULL for --conn parameters
REVERT: f267ce2 Notes for connect params
REVERT: f504f0d more for 2.1c, arbitrary AMF data in connect requests
REVERT: d9c75f7 Add --conn|-C option to append arbitrary AMF data to connect request
REVERT: 5cbd51a More 2.1c misc
REVERT: 407f0fe Fallback to Reconnect if ToggleStream didn't work, then give up if both fail
REVERT: acfe741 Changes for 2.1c
REVERT: 25a6211 Format rtmpsrv output as an rtmpdump commandline for copy/paste
REVERT: 261d020 Only flush LogPrintf() if output ends with \n
REVERT: c44b5ee Fixed per-chunk sending
REVERT: a9772a2 Partially revert -r200, per-chunk sending is fragile at the moment
REVERT: a48c69b More cleanup
REVERT: 84587bb Fix timestamp due to amf fixes, fix buf mgmt due to header changes
REVERT: 184e54f Simplify playlist handling
REVERT: e7faab2 Relay data in chunks instead of full packets, to reduce latency. Support multiple outstanding Play requests.
REVERT: 46bf276 Add RTMP_SendChunk() for sending incomplete packets. Add m_header to packet, for a copy of a received packet's raw header
REVERT: 0fbe66d Plug mem leaks
REVERT: 5414cca app is parsed from url
REVERT: b3c41c9 Failing to respond to SWF Verification request is an error, not a warning
REVERT: b6791ed Use unsigned int for timestamps
REVERT: 5839595 Fixes for extended timestamps, bounds checks
REVERT: cb79bec Don't try to close server->socket multiple times
REVERT: 6bd2d8b Fix typo
REVERT: af18cbd Restore 'v' that was dropped from version by mistake
REVERT: c329b39 Fix prev commit
REVERT: 20b1cd9 Add optional packet param to RTMP_Connect(); rtmpsuck will just send the original connect packet instead of generating its own.
REVERT: 316d432 playpath needs to be url-decoded
REVERT: 013740d Updates for 2.1b
REVERT: 36690fe Fix URL matching in file check
REVERT: 7f7a317 Handle getStreamLength
REVERT: f5e71ad More logging cleanup
REVERT: 347c00e Cleanup filename some more, close immediately if client goes away and we don't have an active stream from the server.
REVERT: 885c43d Close the session on close request
REVERT: 21c3fea Add flag for sending objectEncoding even if it's zero
REVERT: 4f5e97c Fix typo
REVERT: f1b9ab7 Fix bufferSize in resume
REVERT: 7f2aeda Always flush log output
REVERT: b4a4d78 revert accidental commit
REVERT: 29371d0 Cleanup CRYPTO dependencies
REVERT: 263e210 Zap colons in playpath
REVERT: d1960da Fix: handle auth parameters in connect request
REVERT: a8f0db5 Fix WIN32 timeout handling
REVERT: 066b686 2.1a updates: copyright year, streams description in README
REVERT: e72de21 More cleanup for prev commit
REVERT: bbae1e0 Cleanup prev commit
REVERT: ee51595 Fix SO_RCVTIMEO for WIN32
REVERT: 8f47964 Need <errno.h> here too
REVERT: 1f9f0ef More thread cleanup
REVERT: e9318d3 Add some messages for failures
REVERT: 398c655 Silence warning
REVERT: 918e607 More for warnings
REVERT: 38669ba comment out unused functions to silence warnings
REVERT: fa70b75 Move thread support to its own files
REVERT: b146d02 More cleanup for mingw
REVERT: 1fa18b9 More cleanup
REVERT: 967488c Cleanup
REVERT: af6c77a Refactor a bit for WIN32 compatibility
REVERT: 2409f84 HashSWF(,ask)
REVERT: d381eae Add 'ask' param back to HashSWF, expose HandlePacket as RTMP_ClientPacket
REVERT: dea45a2 Fix prev commit
REVERT: de607d7 Prep for 2.1; use Referrer in HashSWF
REVERT: 13c4b5b Rename SWFVerify() to RTMP_HashSWF(), rename swfvfy.c to hashswf.c
REVERT: 5c615b6 Strip unused stuff, close output file on Netstream.Play.Stop
REVERT: d0ef699 Notes about rtmpsuck.
REVERT: be12945 Add -z option to enable debug
REVERT: 4ee247a20 Write headers for 0-length packets
REVERT: 8fc0173 More fixes for SendPacket channels
REVERT: 5bc2c62 Use m_outChunkSize
REVERT: 923c4fe Change chunksize as needed, don't talk to HTTP server if we already have cached hash, other packet processing fixes
REVERT: dfc7813 Add "ask" param, don't talk to HTTP server if we already have cached hash
REVERT: 5e2d1a4 Add separate in/out chunk size, fix channels in SendPacket, add packet logging
REVERT: 9df915d Make LogHexString() more usable, add DEBUG2 level
REVERT: 09a0535 Drop libcurl stuff
REVERT: 9cc6688 Check for fopen failing
REVERT: 5391b15 Fix prev commit
REVERT: 6e107c9 Add transparent proxy server, work in progress.
REVERT: 44ab994 Expose RTMP_SendCtrl, tweak RTMPPacket_Alloc to reserve space for header
REVERT: 501159e Strip trailing params from swfurl in saved copy
REVERT: a45cfbe Note that Curl and Zlib are now required
REVERT: 6fbcac4 Add note about automatic SWF verification
REVERT: 675cda0 Automate SWF verification, use -W instead of -s
REVERT: 8a189ac Restore Windows compatibility patches
REVERT: 091881d Add note about rtmpsrv
REVERT: d1c57f8 Ignore zero-length packets during connect
REVERT: 0ca33d5 Add missing notices
REVERT: da9bdeb Cleanup, comments on TEA
REVERT: b325d8e Fix typo in r114
REVERT: b9529ca SecureToken support
REVERT: cfe110a Minor cleanup
REVERT: 210ab4b Fix typo in verifying client signature
REVERT: 3a04cdc Fix typo in retrieving client digestpos
REVERT: a7ed299 Log client's destination IP address, in case it was redirected
REVERT: af67a82 s/server/peer/ now that we support both sides
REVERT: dd1d3a0 Allow AMF3 encoding
REVERT: e0cfc12 Add dummy RTMP server. Doesn't serve any data, just sucks up connection parameters from a client.
REVERT: e6fa7be Change AMF_Encode* APIs to include buffer end checking, restructure...
REVERT: 556bb8b Added server-side handshaking. Will probably split these files later...
REVERT: 7477d30 Silence spurious warning
REVERT: beb301c Restructure, always send 2nd handshake packet before reading 2nd packet
REVERT: 76deb76 Minor cleanup
REVERT: 90dda6c Allow longer URLs for subscribepath
REVERT: 200e921 Always log Invokes, even if we don't exepct a _result
REVERT: 3b9f482 Fix whitespace in debug
REVERT: 0924640 Win32 thread support
REVERT: 9d52f65 Reindent
REVERT: df90d3d More cleanup
REVERT: c3152d5 Convert streams to C
REVERT: d505293 Notes for 2.0
REVERT: e091ec9 More namespace cleanup
REVERT: 024985a More MinGW stuff
REVERT: a486687 MinGW portability fixes
REVERT: 4eff9a7 Plug memory leaks
REVERT: 0fc45ad Hide DH helpers
REVERT: 4539e66 Move bytes.c functions out of main namespace
REVERT: 74b8cdc Drop C++ from Makefile
REVERT: 9abb097 Remove C++ code from trunk
REVERT: a1e75b9 Move new C code to trunk
REVERT: 7d67491 Use trunk for main development
REVERT: e30a95b Split off a tags directory for release tagging

git-subtree-dir: captive/librtmp/csrc/src
git-subtree-split: a3ac64b8b467eea1264c0053022893bc84b2e9a2
Merge commit '5a3a8c847ac50f56f58507876c39707e301e8c1f' into development

librtmp