Squashed 'captive/librtmp/csrc/src/' changes from a3ac64b..df6c518

df6c518 Remove a useless leftover comment
f8fcf64 Only use one challenge value in adobe auth
38d3aea Correct the length of base64 digests
3a1e20c Fix b77a7dc719f8b04274db91f6344f4358a78d9c5f
19d3636 PolarSSL 1.2.x compat
feb81c8 Fix gnutls build
e79a07c PolarSSL version fixes
f3e3e6b Look for a fourth slash when splitting the url into app+playpath
9d6dc72 Simplify initializing the TLS server context
1f6c643 More authentication cleanup
e42b5d0 Cleanup authentication code
883c334 Fix dll name to have SO_VERSION
9ecf540 Add support for limelight authentication
630c8db Add adobe authentication support
a928232 Allocate the channel arrays dynamically
0fb1d99 Free skipped packets in RTMP_GetNextMediaPacket
4a08069 Use CRLF newlines consistently for all HTTP POST headers
91921dd Refill if HTTP_read indicated it needs more data
4ded9e0 Don't require 144 bytes to be buffered before proceeding with HTTP_read
895392a Buffer more data before returning successfully from HTTP_read, if needed
8e527f6 Add null termination to buffers before using strstr
002ef6f Support rtmps in rtmpsrv
6df3b1f Add functions for doing server side TLS initialization
f14b6ac Replace hardcoded constants and comments with proper named constants
d70c3f6 Allocate the RTMP struct dynamically
294135e Cleanup prev commit
b77a7dc Handle AMF_ECMA_ARRAY and AMF_STRICT_ARRAY objects
1d07cfa Fix socks support for SetupURL
a312ac7 Fix compat with PolarSSL >= 1.1.0
dc1ddd3 Fix rare infinite loop on EOF
75a6167 Fix bogus optarg refs in prev commit
3fcbcb9 Make rtmpgw handle full RTMP URLs with "-i"
87d47b8 Make rtmpdump handle full RTMP URLs with "-i"
e0056c5 Add option --realtime (-R) to rtmpdump to disable the BUFX hack
603ff20 Add .gitignore to ignore generated files
7340f6d Cleanup prev commit, drop gcrypt support
eea470f Add support for building with gnutls with nettle as backend
2ad1d5d Fix upper bound check in AMF_GetProp
adb77ff Remove extra object end tag in Connect reply
4e06e21 Support decoding AMF_XML_DOC
5d03a4f Fix log messages
45556fb Fix mismatched format string conversions
949da84 Tell gcc about log format strings
83e701e Fix missing log message parameter
30fcf46 Check for malloc failure in prev commit
1c77ff4 Calculate tcUrl length
9df7959 Spell Referer according to RFC1945
90799ef Increase tcUrl buffer size
b346706 Fix getting swf hash with https URLs
c90c058 Fix bytes-received report
60218d0 fixed undefined behaviour due to union assignment
6230845 PolarSSL support now requires version 1.0.0.
c58cfb3 Add RD_NO_CONNECT return code for Connect failures
a1114e0 Fix AVreplace for usherToken
c528451 Fix <arpa/inet.h> include order
8880d14 Unexpected BW Response Fix
f1abda0 Cleanup previous commit
024d201 Justin.TV usherToken detection
ec42296 Darwin dylib updates
b627335 Plug potential memleak
530d02f Fix MDH_free() for PolarSSL
159a06e Don't try to close an already closed socket
060206d Check the return value from RTMP_SendBytesReceived()
9931c44 Generate and install an import lib for the built DLL
749018b Create the SODIR, too
ed99ad0 Remove the generated pkg-config file on make clean
a2fb387 Regenerate HTML docs, minor tweaks
dc762e4 Squashed commit of the following:
c28f1ba v2.4 changes
3121324 Version bump
4028a5a Additional credit for RTMPE 9 keys
be0590a Add LIB_RTMP macro
d1f14b1 Add RTMPE type 9 handshake signature
0e9b491 Revert "Drop back on the handshake version, avoid rtmpe 9"
e09abc0 add -shared to mingw ldflags, fixes compilation error patch by Martin Storsjo
6155179 Use symbolic constants for packet types. From Peter Miller @ opensource.org.au
041cf3f Handle multiple sessions at once (ugly)
495e1e6 Handle Play.PublishNotify like Play.Start
ac1843d Fix prev commit
aa2825f Drop back on the handshake version, avoid rtmpe 9
a1bcab1 Fix rtmpt read hangs
0a219ff Bump up play command buffer sizes
25447a0 Fix typos in prev commit
bca1ef0 Add Libs.private to pkgconfig for Windows
8c713f4 Fix FLV timestamps during resume
1379a2c Fix infinite loop on Error/Close
9ca7e22 Timeout fix from Antti Ajanki
8afb368 Log error message for unsupported SWF Verification types
59ca190 Less case-sensitive check for Content-length: header
08bdebe Substitute libdir in pkgconfig file
eb80624 More dynlib tweaks
1379826 Fixes for Darwin - use dylib, not bundle for shared lib
2340f0e MacOSX/Darwin shared library flags
5a3d600 Fix install target
24f7e72 Don't link explicitly against static library
eef8748 Update XBOX/XBMC support
da78eba Remove obsolete XBOX defs
f1c4f0e Hide strtime()
c41568f Update from prev commit
8a5901c Document the escape coding used for special characters in values
6556b9f Fix typo
272a91d zlib dependency is only when CRYPTO is enabled
a8f8ee3 Default to SYS=posix, parent Makefile may not have run
8a9fc25 Also delete shared libs on clean
54ebbe4 2.3 notes about shared library
bd22d75 Add mingw DLL install support
cccc70e Add -lz and MinGW support
c7b9448 Bumping version to 2.3 to highlight shared lib support
32a753b Only send CheckBW request once
602b76c Fix prev commit
842f500 Cleanup prev commit
55d4a10 Fix tcUrl generation, free it on close if needed
8a8590a Skip repeated spaces between URL options
ee4217a Check for duplicate invocations
385b644 Notes for 2.2f
a0e1f5c Fix bogus switch statement
8ebaf39 Fix skipping extension
44d2feb m_read.buf cannot be freed if we were still searching for the header
885cd3d casting hbuf to unsigned doesn't seem to work, just declare it unsigned
8cab80e Add ping/pong msg, from mybiiter@gmail.com. (Untested. Used with "ustream"?)
8b43afa Simple rules for shared lib, v2.2f
a794fff bump libversion to 2.2f
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.
39179f2 Always use .flv extension for output
f70f6a7 Regenerate
720a0d4 formatting/typos
e103e98 Note librtmp is LGPL
8d9e964 Update FSF address in license notice
ffdb775 move TRUE/FALSE defs to public header, just in case
1b3b8cd Kill all use of bool, just use int
20021eb add XLIBS macro
aca5cef drop unused MF variable
80b04b7 drop $(MAKEFLAGS), unnecessary
44b1cf4 RTMP_Write buf is const
4464675 Fix RC4 teardown for GnuTLS/gcrypt
7d62819 Note RTMP_EnableWrite
45126f4 Tweak install vars
f012c97 Add install targets for tools and docs
c579bdf Makefile tweaks, use SYS= macro instead of platform targets
9804899 2.2e notes
c3e7022 Bump to version 2.2e
9fd80be Add RTMP_EnableWrite() for publishing instead of reading
9dd9b25 Finally fix the half-assed request/result queue
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...)
ff2415d Just return 1 packet's worth of data at a time from RTMP_Read()
db27d27 Cleanup declaration
9e87a3b Revert unintended commit
2f342f9 Give up dataType search if we run out of buffer
31bb4f3 Use metadata to set dataType, to help finish dataType search earlier
492983a Fix RTMP_Read, return 0 on EOF, not -1
cb26e5c Fix swfinfo path on Xbox
72af6c7 Document what we know about Stream BufferEmpty and BufferReady messages
e78ec5e Very rudimentary library overview, read rtmp.h for more details
a9d8e96 Don't use the BufferEmpty toggle trick by default in librtmp, but set it by default in rtmpdump
9ff3673 Whitespace in prev commit
7a7b6a1 Fix rtmpt clientID was not NUL-terminated
11e5437 More XBOX cleanup, just use _WIN32 which is defined on both
8276e7a Update docs for rtmpts
cbba368 Looks like rtmps doesn't tunnel by default, so add rtmpts
c9627ba XBOX compatibility patches (Mostly same as WIN32)
0910c5d Add --playlist option
e683f32 Updates for 2.2d
eff6331 Clarify NO_SSL initialization
5e37ef0 Add -DNO_SSL option for omitting SSL support (just use rtmpe, no rtmps)
e4e4b0b Don't strip suffix if prefix was already present
89d0b5c Add support for polarssl, http://www.polarssl.org
d05cd7e More explicit OpenSSL check
8eafde1 Check OpenSSL version
19a067f Add support for set_playlist command
b2c095c Restructure Link booleans into bitflags
7db96c6 Tweak client version based on encryption status
de82259 Fix whitespace
2d8035a Fix: if playpath begins with '?' just use the remainder
f02c0e2 Drop unneeded Debug
fe8a135 More trivial cleanup
db518c0 whitespace cleanup
4091c99 Fix timestamps in FLV packets
5351eb4 Fix digest offset computation, handshake versions
f72d388 Tweak pkgconfig libs
5b40c0d Windows - use ws2tcpip.h, drop our bogus socklen_t define
cf1b6da Windows GNUTLS needs explicit -lgcrypt
dab3784 Use winsock2.h, not winsock.h
554b59c Set CROSS_COMPILE for ar
010d5bd v2.2c stuff. not much user-visible
1127fab More cleanup
5247bfe C89 compatibility
0a92a1e Leave CRYPTO defined by default, use "make CRYPTO=" to turn it off.
7569112 cleanup: dTime -> iTime
cb60188 Fix pause debug msg
4ee738a Rename default log handler
de86e10 Add missing LogSetCallback
33c4e4c Restructure logging, add log callback
eb35c71 Fix prev commit - hashswf must always be present
628f722 Drop #ifdef CRYPTO from rtmp.h; apps have no way to know any more if CRYPTO is defined or not
1ee2272 Move -DCRYPTO to Makefile from rtmp.h
5a26c69 HashSWF depends on CRYPTO
170699a include <stddef.h>
a856e26 releaseStream, FCpublish, FCunpublish get no _results
1ffd941 cleanup sendplay log msg, plug m_read memleak
02272ba Make sure install directories exist
21a925c <stdbool.h> isn't as standard as some people claim...
5bafb8f Silence prototype warnings
a5d1abe Check length for unescape
b24e6c2 Revert prev commit, use \xx for escaping spaces
493fdc3 Can't use URL coding for embedded spaces in SetupURL. Instead use TAB combos
c6f0e04 Cleanup tabs, URLdecode options in SetupURL
bbaec8b All timestamps are 32 bit ints
a430dbc Cleanup prev commit
18f3bf6 Option restructuring, allow most options to be passed along with the RTMP URL, clean up
23fd58d Use AVal for hostname and sockshost, don't allocate hostnames
095b021 Downgrade from FP9 handshake on plain RTMP and non-Adobe server
8f7b11a Fix #undef CRYPTO case
c81ee7b Cleanup LogHex, just print 16 bytes per line
679c489 Fix prev commit
d7ea780 Cleanup prev
6fbf426 Child process must exit if exec failed. (exec should never fail unless your PATH is messed up)
7173d06 Abort on unrecognized options
178c6ce Fix buffer errors
5a70d4c Timestamp may be absolute or relative when read off the wire, but is always absolute when we return a pkt to caller
3e314e9 delete packet->m_nInfoField1, it's just the timestamp
6eb616c Fix typo
45b8a3f Cleanup prev commit
5fdb88e Workaround $(MAKEFLAGS) bug in gmake 3.81
28b0246 2.2b update
a797bea v2.2b
ceacf56 Add accessors for debuglevel, libversion, ctrlC, to avoid external programs depending on library internal variables.
33442bc Add Requires: line for crypto lib
3b74e1a Add install target, create pkgconfig for install
a79387d Check for valid socket before setting in fdset
e95b01f Full debug for server handshake
96be720 (ugly) add FP10 support for server handshake
75cb5cd Export RTMP_SendClientBW()
8e73241 More fixes due to -r369
069f619 Fix init bug from -r369
75f82ca Fix Win32 HOME location again
cc5c05e Fix typo for --auth
40e1338 GNU vs BSD make syntax issues
670cb5d Update 2.2a notes
47f1165 Initialization fixes
8ed92c8 Rename AMF_Log -> RTMP_Log, cleanup
4622922 Remainder of gnutls support
6543f28 Cleanup
22836b1 Use GnuTLS/gcrypt for HMAC/RC4
00ae52c Add GnuTLS/Gcrypt support for DH key exchange
f54e6dd More cleanups for SendPacket: timestamps, header type, etc.
a71c838 More for RTMP_Write, cleanup on Close
66cc854 And more for RTMP_Write
240c5b5 More for RTMP_Write
762d9f5 More for RTMP_Write
88cdd45 More for RTMP_Write
a6a41ce Partial RTMP_Write implementation
fe1a557 Handle UnpublishNotify for live streams
6fc049a Fix seek timestamp
8b43b3c Declare struct sockaddr
6edb7520 Use HOMEPATH on Windows, not HOME
03be2aa Partial revert of prev commit, not needed
16eea9d Always send tcUrl
9abae82 Rever -r343, app is not required
915ff92 More cleanup
82adc0b Fix status reporting
29e3f7a app is a required parameter
2666f3f Drop redundant CRYPTO #def
ca2be25 Private header file
afcb1f9 Hide _debug output
5803cf6 Fix pause/seek status
b301493 Use explicit AMF_debuglevel
ed37047 Consolidate RTMP_READ booleans
a94008b Namespace cleanup
0227203 Tweak prev commit
2bad597 Don't #define closesocket if someone else has
390fa99 Initialize port
8c83ec0 Use RTMP_Read()
a687f04 Add RTMP_Read() to simplify library usage
80d606b Note FLV header fix
0682bb3 Silence spurious warning
b94823a Cache initial packets, don't write header till we know the dataType
d54a6f0 Cache initial packets, don't write header till we know the dataType
a34e9dc Rework WriteStream arguments
43c799b Notes for 2.2a
e6b5309 Document rmtpt support
680c7e3 Drop assert
4275eae More for rtmpt
e9037c6 Cleanup whitespace
50d0c37 Fix default ports
69a937e Preliminary rtmpt support - needs work...
7c777f29 Fix ssl close
7a15228 RTMPE is now protocol #2, not #3
8251927 Preliminary support for SSL
430b75f Fix hostname parsing
17ca5ec Default version is <OS> 10,0,32,18
86fd72f Move Default flashVer into library, let SetupStream set the default
7b1290c Cleanup m_sb compat macros
e0d90f5 More log.h cleanup
36b7207 Drop log.h from rtmp.h
59af4ae 0 is a valid fd
3ab03df Publish RTMP_SendSeek()
88ee958 Fix license header
ce2a5bb C++ compat, move parseurl to librtmp
02f8383 Cleanup ARM example
22eb25e Note where to get OpenSSL DLL for Windows
25dcbb0 Add HTML versions of manpages
5d84fe6 Cleanup
7fe8d4c Cleanup
430f250 Manpage for rtmpgw
82aa402 Add socks option
2731657 More typos
06dd823 Fix typos
e9686be streams -> rtmpgw
93aaf72 Move librtmp to separate directory, relicense as LGPL
aa2f2bf More typos
9c71c5a Add ENVIRONMENT
04a60be Add Exit Status info
ea84cbf Fix AMF_EncodeString to handle Long Strings
f494d19 Fix decoding of Long Strings
a2e35ec Renamed streams program to rtmpgw
a8bb253 Fix Play/Stop responses
8431127 Fix typos
2e87938 Cleanup
e359936 Manpage
6970e84 Move rtmp.o, amf.o, log.o, hashswf.o to librtmp.a
9825e4c Cleanup more endian cruft
a459d3b More FP10 handshake support.
99d1561 Account for quotes in cmd string
0d2071f Expand public API
2a5135e Fix SEGV when swfUrl is NULL
3afa522 Cleanup iptables / ipfw info
7500406 Portability fixes
409d4ac Partial revert of prev commit
1d61a5d Fix typo
aebb535 v2.1d updates
0661070 Notes for v2.1d
b5aedcb Spawn rtmpdump directly, don't just print the cmdline
7ced770 Log a final status update when stopping
f51f554 Derive output name from playpath. (Code copied from rtmpsuck)
cf6b796 Don't advance to next file if playlist has only one file
80f19b1 Fix debug msg
be3f4c7 Ignore ctrl 31/32 in live streams
94901a6 Fix r248
180093d More fixes for pause/resume - don't overwrite pauseStamp if already paused
ad5b79c Cleanup prev commits
9642d0a From Antti Ajanki: expose http_get()
b02b66a Fix audio resume bug
39cc011 Minor fixes from Antti Ajanki
7632b29 Another timestamp fix, same as r202
7b357c2 Fix r239, there are 4 fields per record now
1487ff5 Silence warning
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.
c7d4927 Drop osx-specific rules. Don't mention cygwin or any other platforms. Just override from the command line if you need other settings.
aaafa1e Allow zero swfAge to force HTTP check every time
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.
3aa31fb Log BytesReceived reports from client
c8621a5 Don't send our own byte counts, the real client will
375de5e Split RTMP_Connect up, add m_bSendCounter flag; proxy doesn't need to send byte counts since the real client/server will.
0ade4af Use __APPLE__ instead of __MACOSX__
9858be6 Note parseurl fix for extensions
c1697d7 Handle extensions followed by URL parameters
7f35fd6 Close both connections on cleanup
46be6ab Tweak SendChunk to use a single WriteN call
7b5ba97 Skip leading dot in filenames
62d7697 Cleanup unused field
40706b0 Fix typo in comment
e56dffa rtmpdump params should be printed on stdout
1a24034 Fix AMF_Decode() end detection
741be38 Use double quotes instead of single quotes for output
8f26abb Fix typo
301b36e Also support NULL for --conn parameters
f267ce2 Notes for connect params
f504f0d more for 2.1c, arbitrary AMF data in connect requests
d9c75f7 Add --conn|-C option to append arbitrary AMF data to connect request
5cbd51a More 2.1c misc
407f0fe Fallback to Reconnect if ToggleStream didn't work, then give up if both fail
acfe741 Changes for 2.1c
25a6211 Format rtmpsrv output as an rtmpdump commandline for copy/paste
261d020 Only flush LogPrintf() if output ends with \n
c44b5ee Fixed per-chunk sending
a9772a2 Partially revert -r200, per-chunk sending is fragile at the moment
a48c69b More cleanup
84587bb Fix timestamp due to amf fixes, fix buf mgmt due to header changes
184e54f Simplify playlist handling
e7faab2 Relay data in chunks instead of full packets, to reduce latency. Support multiple outstanding Play requests.
46bf276 Add RTMP_SendChunk() for sending incomplete packets. Add m_header to packet, for a copy of a received packet's raw header
0fbe66d Plug mem leaks
5414cca app is parsed from url
b3c41c9 Failing to respond to SWF Verification request is an error, not a warning
b6791ed Use unsigned int for timestamps
5839595 Fixes for extended timestamps, bounds checks
cb79bec Don't try to close server->socket multiple times
6bd2d8b Fix typo
af18cbd Restore 'v' that was dropped from version by mistake
c329b39 Fix prev commit
20b1cd9 Add optional packet param to RTMP_Connect(); rtmpsuck will just send the original connect packet instead of generating its own.
316d432 playpath needs to be url-decoded
013740d Updates for 2.1b
36690fe Fix URL matching in file check
7f7a317 Handle getStreamLength
f5e71ad More logging cleanup
347c00e Cleanup filename some more, close immediately if client goes away and we don't have an active stream from the server.
885c43d Close the session on close request
21c3fea Add flag for sending objectEncoding even if it's zero
4f5e97c Fix typo
f1b9ab7 Fix bufferSize in resume
7f2aeda Always flush log output
b4a4d78 revert accidental commit
29371d0 Cleanup CRYPTO dependencies
263e210 Zap colons in playpath
d1960da Fix: handle auth parameters in connect request
a8f0db5 Fix WIN32 timeout handling
066b686 2.1a updates: copyright year, streams description in README
e72de21 More cleanup for prev commit
bbae1e0 Cleanup prev commit
ee51595 Fix SO_RCVTIMEO for WIN32
8f47964 Need <errno.h> here too
1f9f0ef More thread cleanup
e9318d3 Add some messages for failures
398c655 Silence warning
918e607 More for warnings
38669ba comment out unused functions to silence warnings
fa70b75 Move thread support to its own files
b146d02 More cleanup for mingw
1fa18b9 More cleanup
967488c Cleanup
af6c77a Refactor a bit for WIN32 compatibility
2409f84 HashSWF(,ask)
d381eae Add 'ask' param back to HashSWF, expose HandlePacket as RTMP_ClientPacket
dea45a2 Fix prev commit
de607d7 Prep for 2.1; use Referrer in HashSWF
13c4b5b Rename SWFVerify() to RTMP_HashSWF(), rename swfvfy.c to hashswf.c
5c615b6 Strip unused stuff, close output file on Netstream.Play.Stop
d0ef699 Notes about rtmpsuck.
be12945 Add -z option to enable debug
4ee247a20 Write headers for 0-length packets
8fc0173 More fixes for SendPacket channels
5bc2c62 Use m_outChunkSize
923c4fe Change chunksize as needed, don't talk to HTTP server if we already have cached hash, other packet processing fixes
dfc7813 Add "ask" param, don't talk to HTTP server if we already have cached hash
5e2d1a4 Add separate in/out chunk size, fix channels in SendPacket, add packet logging
9df915d Make LogHexString() more usable, add DEBUG2 level
09a0535 Drop libcurl stuff
9cc6688 Check for fopen failing
5391b15 Fix prev commit
6e107c9 Add transparent proxy server, work in progress.
44ab994 Expose RTMP_SendCtrl, tweak RTMPPacket_Alloc to reserve space for header
501159e Strip trailing params from swfurl in saved copy
a45cfbe Note that Curl and Zlib are now required
6fbcac4 Add note about automatic SWF verification
675cda0 Automate SWF verification, use -W instead of -s
8a189ac Restore Windows compatibility patches
091881d Add note about rtmpsrv
d1c57f8 Ignore zero-length packets during connect
0ca33d5 Add missing notices
da9bdeb Cleanup, comments on TEA
b325d8e Fix typo in r114
b9529ca SecureToken support
cfe110a Minor cleanup
210ab4b Fix typo in verifying client signature
3a04cdc Fix typo in retrieving client digestpos
a7ed299 Log client's destination IP address, in case it was redirected
af67a82 s/server/peer/ now that we support both sides
dd1d3a0 Allow AMF3 encoding
e0cfc12 Add dummy RTMP server. Doesn't serve any data, just sucks up connection parameters from a client.
e6fa7be Change AMF_Encode* APIs to include buffer end checking, restructure...
556bb8b Added server-side handshaking. Will probably split these files later...
7477d30 Silence spurious warning
beb301c Restructure, always send 2nd handshake packet before reading 2nd packet
76deb76 Minor cleanup
90dda6c Allow longer URLs for subscribepath
200e921 Always log Invokes, even if we don't exepct a _result
3b9f482 Fix whitespace in debug
0924640 Win32 thread support
9d52f65 Reindent
df90d3d More cleanup
c3152d5 Convert streams to C
d505293 Notes for 2.0
e091ec9 More namespace cleanup
024985a More MinGW stuff
a486687 MinGW portability fixes
4eff9a7 Plug memory leaks
0fc45ad Hide DH helpers
4539e66 Move bytes.c functions out of main namespace
74b8cdc Drop C++ from Makefile
9abb097 Remove C++ code from trunk
a1e75b9 Move new C code to trunk
7d67491 Use trunk for main development
e30a95b Split off a tags directory for release tagging
REVERT: a3ac64b OpenCL support improvement/refactoring
REVERT: c47347c x86: shave a few instructions off AVX deblock
REVERT: b547a4e x86: AVX2 dequant_4x4_dc
REVERT: 907573d x86: AVX2 high bit-depth dequant
REVERT: 442c6a4 x86-64: 64-bit variant of AVX2 hpel_filter
REVERT: 26a6451 x86: AVX2 high bit-depth denoise_dct
REVERT: db95d6a x86: AVX2 high bit-depth quant
REVERT: 327386f x86: AVX2 add16x16_idct_dc
REVERT: c82db4e x86: faster AVX2 quant_4x4x4
REVERT: b79f4a6 x86: AVX2 intra_sad_x3_8x8c
REVERT: 2c0bca3 x86: AVX2 high bit-depth intra_sad_x3_8x8
REVERT: b2c30e1 x86: AVX2 deblock strength
REVERT: 37edf16 x86: Faster high bit-depth intra_sad_x3_4x4
REVERT: a9ed051 x86: faster SSSE3 hpel
REVERT: 9373d5f x86-64: faster SSSE3 trellis
REVERT: 2a71604 x86: 32-byte align the stack if possible
REVERT: eefaff1 x86inc: Utilize the shadow space on 64-bit Windows
REVERT: b4be6e5 x86: Don't use explicitly aligned versions of SAD on AVX CPUs
REVERT: 99f553e x86: Add missing initializations for high bit-depth sad_aligned
REVERT: 42f2f78 x86: add Jaguar CPU detection
REVERT: f12a17f x86inc: Remove .rodata kludges
REVERT: c3b166a checkasm: Use 64-bit cycle counters
REVERT: e943696 checkasm: Fix stack alignment bug
REVERT: b1749e2 Fix invalid memcpy in sliced-threads
REVERT: 76a5c3a Fix two bugs in slice-min-mbs and slices-max
REVERT: 3b1f1f7 x86: SSSE3 LUT-based faster coeff_level_run
REVERT: c05bf54 x86-64: BMI2 cabac_residual functions
REVERT: 437f808 x86: SSSE3 ads_mvs
REVERT: 2ad961f x86: AVX2 pixel_ssd_nv12_core
REVERT: 40406b8 x86: AVX2 high bit-depth pixel_ssd
REVERT: c2852be x86: AVX2 high bit-depth pixel_sad_x3/pixel_sad_x4
REVERT: fa9dcd0 x86: AVX2 high bit-depth vsad
REVERT: 567d036 x86: AVX2 high bit-depth pixel_sad
REVERT: 6cc9f16 x86: AVX2 high_bit_depth pixel_avg2, get_ref, mc_copy_w16, mc_luma
REVERT: c371128 x86: AVX2 nal_escape
REVERT: 255271f x86: AVX memzero_aligned
REVERT: 43632cc x86: AVX2 predict_16x16_dc
REVERT: dcad117 x86: AVX2 predict_8x8c_p/predict_8x16c_p
REVERT: f5bff68 x86: AVX2 predict_16x16_p
REVERT: 92eb201 x86: AVX high bit-depth predict_16x16_v
REVERT: 16f3261 x86: AVX2 high bit-depth predict_4x4_h
REVERT: a38b5fc x86: AVX2 high bit-depth predict_16x16_h
REVERT: 89f8263 x86: AVX2 high bit-depth predict_8x8c_h/predict_8x16c_h
REVERT: 78b8af8 x86util: Support ymm registers in HADD macros
REVERT: d07b421 x86: more AVX2 framework, AVX2 functions, plus some existing asm tweaks
REVERT: e228f65 x86inc: create xm# and ym#, analagous to m#
REVERT: e916dfb x86inc: fix AVX emulation of cmp(p|s)(s|d)
REVERT: 5b01ce1 x86-64: cabac_block_residual assembly
REVERT: 3a5f6c0 OpenCL lookahead
REVERT: e436158 weightp: improve scale/offset search, chroma
REVERT: 389d06e Add slices-max feature
REVERT: f546e98 Add slice-min-mbs feature
REVERT: 1db4621 Disable mbtree asm with cpu-independent option
REVERT: fceb3b1 Show "avs: no" --disable-avs option instead of empty string
REVERT: 68ee80a lavf input: don't use deprecated AVStream fields
REVERT: 5980580 Fix y4m input with C420paldv colorspace
REVERT: 580cc69 x86: correctly check stack alignment for Atom hadamard_ac
REVERT: b3c15fc x86inc: fix some corner cases of SWAP
REVERT: 89aecb4 Fix array overreads that caused miscompilation in gcc 4.8
REVERT: e355b0e Fix undefined behavior in x264_ratecontrol_mb
REVERT: c832fe9 ARM: Fix bug in x264_quant_4x4x4_neon
REVERT: b3065e6 ARM: update NEON mc_chroma to work with NV12 and re-enable it
REVERT: e82cf2c CABAC/CAVLC: use the new bit-iterating macro here too
REVERT: 253e2c3 quant_4x4x4: quant one 8x8 block at a time
REVERT: eaae05e Add AvxSynth support to the AviSynth input module.
REVERT: b2c70f6 Eliminate some branchiness in ME/analysis
REVERT: 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.
REVERT: 9fe40b1 x86: faster AVX satd/sa8d/sa8d_satd/hadamard_ac
REVERT: 4f24bb3 x86: detect Bobcat, improve Atom optimizations, reorganize flags
REVERT: d556d55 x86: combined SA8D/SATD dsp function
REVERT: 5c2ca5d x86: port SSE2+ SATD functions to high bit depth
REVERT: b09bc0c x86: faster high bit depth ssd
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: c63a518 x86: Use SSE instead of SSE2 for copying data
REVERT: 0ce5b43 64-bit cabac optimizations
REVERT: 51a5976 configure: add QNX support
REVERT: 486ff39 Windows: Enable DEP and ASLR
REVERT: 8da42b7 x86inc: Set ELF hidden visibility for global constants
REVERT: 9890192 x86inc: Add cvisible macro for C functions with public prefix
REVERT: 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.
REVERT: a4e7759 x264.h: improve x264_encoder_reconfig documentation
REVERT: ce9efea Cosmetics: stricter definition of parameterless functions
REVERT: e403db4 Update "Install and compile x264" in doc/regression_test.txt
REVERT: c13fbaf Fix possible non-determinism with mbtree + open-gop + sync-lookahead
REVERT: 736d69b x86: don't use the red zone on win64
REVERT: 637005e x86-64: fix trellis asm with interlacing
REVERT: ba5ce76 x86-32: use simple nop codes for <= sse
REVERT: bc13772 Bump dates to 2013
REVERT: 3508f4a x86inc: Drop tzcnt workaround
REVERT: b924133 AVX2/FMA3 version of mbtree_propagate First AVX2 function for testing. Bump yasm version to 1.2.0 for AVX2 support.
REVERT: 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.
REVERT: 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.
REVERT: 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).
REVERT: c69e2d0 Update config.guess and config.sub
REVERT: 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.
REVERT: 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.
REVERT: 55b5162 Fix pthread_join emulation on win32 and BeOS Doesn't actually affect x264, but it's more correct.
REVERT: 0059dcf Fix typo in r2222 Slightly wrong numbers in level table.
REVERT: 28ee1f4 configure: fix gpac detection with -Wp,-D_FORTIFY_SOURCE=2
REVERT: 67a69c0 Solaris: use sysconf to get processor count Solaris responds correctly to the same value as Cygwin, so let's use that.
REVERT: 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.
REVERT: a632fe1 Fix crash when using libx264.dll compiled with ICL for X86_64
REVERT: 1cffe9f Fix possible issues with out-of-spec QP values Fixes a possible regression in r2228.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 28ddb0d Add support for the ffmpeg/vapoursynth high bit depth y4m extensions
REVERT: 64cbe75 x86inc: Rename 3dnow2 to 3dnowext The name "3dnowext" is more common than "3dnow2". Doesn't affect x264.
REVERT: 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.
REVERT: 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.
REVERT: 6889f2c Fix crash with no-scenecut + mbtree
REVERT: 4dbfcd4 Fix reconfiguring to crf=0 Lossless mode can't currently be enabled mid-stream.
REVERT: 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.
REVERT: 2f154ac Fix use of deprecated av_close_input_file call
REVERT: 9fc0065 Fix pkg-config for dynamic vs static linking
REVERT: b22f22f Set libm in the configure script if the OS has libm Prerequisite for another configure patch after this. Idea copied from libpthread.
REVERT: 198a7ea Enhance mb_info: add mb_info_update This feature lets the callee know which decoded macroblocks have changed.
REVERT: f6e9002 Fix mb_info_free with sliced threads x264 would free mb_info before it was completely done using it.
REVERT: de725e9 Enhance nalu_process Add the input frame opaque pointer to the arguments. This makes it easier to use with multiple simultaneous x264 encodes.
REVERT: 174cfac Improve mb_info constant mb optimization Allow fast skipping even if the pskip MV isn't zero.
REVERT: f57e707 Export the average effective CRF of each frame Useful to judge the resulting quality of a frame when VBV is enabled.
REVERT: 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.
REVERT: 8f76448 x86inc: automatically insert vzeroupper for YMM functions Backported from libav.
REVERT: 68dfb7b Free user supplied data when deleting a frame This eliminates a memory leak when calling x264_encoder_close.
REVERT: d9d2288 Revert r2204 People don't seem to like this so I'm just going to get rid of it.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 8b535d9 Print elapsed time in encoding progress indicator
REVERT: 11e32c5 Cap ratecontrol predictor parameters Limits VBV mispredictions after long periods of relatively constant video.
REVERT: 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.
REVERT: 37be552 Fix crash with --fps 0 Fix some integer overflows and check input parameters better. Also fix incorrect type specifiers for demuxer info printing.
REVERT: 999b753 Threaded lookahead
REVERT: ecfbf9d Add support for RGB formats in bit-depth conversion filter
REVERT: 1c97f35 Fix some bugs in mb_info code
REVERT: 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.
REVERT: df6252c Faster chroma weight cost calculation
REVERT: cce88eb Add Level 5.2 support
REVERT: ee30c84 Eradicate all mention of Extended Profile x264 never supported it and never will because nobody uses it.
REVERT: 8ca49cc Fix disabling of mbtree when using 2pass encoding and zones
REVERT: 3691332 configure: force select -mXX gcc option for i386/x86-64 Makes multilib compilation more convenient.
REVERT: e1ccbf9 Update config.guess and config.sub Adds support for a bunch of targets, including: aarch64 (armv8) arm-linux-androideabi
REVERT: f876197 configure: correct use of RC variable and add --extra-rcflags
REVERT: 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.
REVERT: 259a6e5 Fix intra-refresh + hrd
REVERT: e0351cd Fix frame input colorspace check
REVERT: 7392c8c Fix comment in deblock.c The code does, in fact, handle CAVLC+8x8dct correctly already.
REVERT: 6979713 Fix sliced-threads ratecontrol bug Was using qp instead of qscale; could cause NANs (not to mention less accurate results).
REVERT: 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.
REVERT: 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.
REVERT: 6a27a48 Add full-recon API option Fully reconstruct frames even without dump-yuv.
REVERT: 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.
REVERT: 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.
REVERT: ac31c59 Minor asm changes
REVERT: 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.
REVERT: 5a69f8e Abstract bitstream backup/restore functions Required for row re-encoding.
REVERT: 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.
REVERT: de5a0ad Remove explicit run calculation from coeff_level_run Not necessary with the CAVLC lookup table for zero run codes.
REVERT: 9f1ac3b Export PSNR/SSIM in x264 API
REVERT: 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.
REVERT: 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.
REVERT: 01f7a33 Fix possible alignment crash when linking from MSVC x264_cavlc_init needs to be stack-aligned now.
REVERT: b17c247 Fix rare overflow in 10-bit intra_satd_x3_16x16 asm
REVERT: 1446fe7 ICL: fix out of tree building and resource file usage on Windows
REVERT: d3efb00 Add error handling for out-of-tree build
REVERT: ec41b19 Fix RGB colorspace input BGR/BGRA input was correct.
REVERT: 39a4c6f Fix interlaced + extremal slice-max-size Broke if the first macroblock in the slice exceeded the set slice-max-size.
REVERT: 3f72c99 Fix regression in r2141 Broke register preservation in x264_cpu_cpuid and x264_cpu_xgetbv. Did not cause any problems.
REVERT: 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.
REVERT: efef200 x86inc: add TAIL_CALL macro to abstract a common asm idiom
REVERT: a7e6e17 Minor asm optimizations/cleanup
REVERT: 56ba096 Clean up and optimize weightp, plus enable SSSE3 weight on SB/BDZ Also remove unused AVX cruft.
REVERT: 961a278 XOP frame_init_lowres Covers both 8-bit and 16-bit, ~5-10% faster on Bulldozer.
REVERT: c580999 XOP 8x8 zigzags Field: 35(mmx) ->16(xop) cycles Frame: 32(ssse3)->20(xop) cycles
REVERT: 14dc11f AVX 32-bit hpel_filter_h Faster on Sandy Bridge. Also add details on unsuccessful optimizations in these functions.
REVERT: 2fcd044 x86inc: add high halfword register support Might be useful in a few cases.
REVERT: 5c4b848 Change %ifdef directives to %if directives in *.asm files This allows combining multiple conditionals in a single statement.
REVERT: 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.
REVERT: 83c371d Bump dates to 2012
REVERT: a2925c5 Add Windows resource file Displays version info in Windows Explorer.
REVERT: 98ade83 Fix win32 pthread_cond_signal Isn't used by x264 currently, so didn't cause a problem. Fix backported from libav.
REVERT: a3f4407 ARM: align asm functions to 4 bytes. Some linkers apparently fail to correctly align ARM functions when mixing with Thumb code.
REVERT: d3a39c9 Fix normalization of colorspace when input is packed YUV 4:2:2
REVERT: 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.
REVERT: 8a1189a Fix crash in --demuxer y4m with unsupported colorspace
REVERT: 1ab0877 Fix overread/possible crash with intra refresh + VBV
REVERT: bcd41db Fix trellis 2 + subme >= 8 Trellis didn't return a boolean value as it was supposed to. Regression in r2143-5.
REVERT: 748fe16 CABAC trellis opts part 4: x86_64 asm Another 20% faster. 18k->12k codesize.
REVERT: cfdb36e CABAC trellis opts part 3: make some arrays non-static
REVERT: 65bd12a CABAC trellis opts part 2: C optimizations
REVERT: e176619 CABAC trellis opts part 1: minor change in output Due to different tie-break order.
REVERT: 4e87f36 x86inc improvements for 64-bit
REVERT: 84a06e6 High bit depth SSE2/AVX add8x8_idct8 and add16x16_idct8 From Google Code-In.
REVERT: c605e31 MMX/SSE2/AVX predict_8x16_p, high bit depth fdct8 From Google Code-In.
REVERT: 6b06f6d XOP 8-bit fDCT Use integer MAC for one of the SUMSUB passes.  About a dozen cycles faster for 16x16.
REVERT: c4b54c8 High bit depth intra_sad_x3_4x4 From Google Code-In.
REVERT: 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).
REVERT: 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.
REVERT: 6d921c5 MMX 10-bit predict_8x8c_h and predict_8x16c_h From Google Code-In.
REVERT: 47cdaa9 Some MBAFF x86 assembly functions. deblock_chroma_420_mbaff, plus 422/422_intra_mbaff implemented using existing functions. From Google Code-In.
REVERT: 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.
REVERT: 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!
REVERT: 978abe0 SSE2 and SSSE3 versions of sub8x16_dct_dc Also slightly faster sub8x8_dct_dc
REVERT: 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
REVERT: bc6c98c Add out-of-tree build support
REVERT: f33c8cb Limit SSIM to 100db Avoids floating point error for infinite SSIM (lossless).
REVERT: 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.
REVERT: b081d17 Fix crash with sliced threads and input height <= 112
REVERT: 64da5f9 Fix loading custom 8x8 chroma quant matrices in 4:4:4
REVERT: 4c08e42 Fix PCM cost overflow
REVERT: 489a9b2 Fix overflow in 8-bit x86 vsad asm function
REVERT: c291a9d Fix crash in --fullhelp when compiled against recent ffmpeg Don't assume all pixel formats have a description.
REVERT: 0c7dab9 Fix regression in r2118 Broke trellis with i16x16 macroblocks.
REVERT: 0637cd6 Modify MBAFF chroma deblock functions to handle U/V at the same time Allows for more convenient asm implementations.
REVERT: 67f1fdc CABAC trellis optimizations: use SIMD quant Significant speed increase, minor change in output due to rounding.
REVERT: 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).
REVERT: 00df989 Pass through user data
REVERT: 04a0aee Remove unpredictable branch in CABAC dqp
REVERT: 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.
REVERT: cc129ad checkasm: shut up gcc warnings, fix some naming of functions in results
REVERT: 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.
REVERT: d8d8e75 Improve makefile rules Remove the need for "make clean" after most reconfigures.
REVERT: e6d33a9 Mark some local functions as static, cosmetics
REVERT: e0c11dc Fix crash if timecode file opening fails
REVERT: a14db08 Configure: force PIC for shared build on PARISC and MIPS
REVERT: 6a0bd42 Improve yasm version check Previous check allowed certain earlier versions that weren't fully compatible.
REVERT: 07efeb4 Add fenc prefetching to adaptive quant Many fewer cache misses, faster adaptive quant.
REVERT: 81a9984 Split prefetch_fenc between colorspaces Add 4:2:2 version.
REVERT: 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
REVERT: f52aa86 Remove obsolete versions of intra_mbcmp_x3 intra_mbcmp_x3 is unnecessary if x9 exists (SSSE3 and onwards).
REVERT: 2f0384d SSSE3/SSE4/AVX 9-way fully merged i8x8 analysis (sa8d_x9) x86_64 only for now, due to register requirements (like sa8d_x3).
REVERT: 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.
REVERT: 077d453 Merge i4x4 prediction with intra_mbcmp_x9_4x4 Avoids a redundant prediction after analysis.
REVERT: 55a9d38 Inline i4x4/i8x8 encode into intra analysis Larger code size, but faster.
REVERT: afd9bc2 Initial XOP and FMA4 support on AMD Bulldozer ~10% faster Hadamard functions (SATD/SA8D/hadamard_ac) plus other improvements.
REVERT: 8cf5049 ARM: update NEON chroma deblock functions to NV12 pixel format
REVERT: f7e640a Add /usr/lib/{64/}values-xpg6.o to $LDFLAGS on Solaris This is required for POSIX.1-2001 compliance.
REVERT: 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'.
REVERT: 9aa0f65 Add $SOFLAGS to exported SOFLAGS make variable
REVERT: 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.
REVERT: 6eac7c3 Improve profile help List high422/high444 profiles, and don't show non-high-bit-depth profiles in high bit depth builds.
REVERT: 896fff4 Fix infinite loop parsing TDecimate Mode 3 timecode v1 files
REVERT: 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.
REVERT: d259483 Fix pixel_var2 with 4:2:2 encoding Might have caused artifacts or suboptimal chroma compression.
REVERT: 1fe87df Fix chroma intra analysis in 4:4:4 lossless mode
REVERT: c4644d8 Fix use of uninitialized MVs in sub8x8 RDO
REVERT: f8825a4 Fix detection of Alpha CPU arch on alphaev67
REVERT: 8a62835 Optimize x86 asm for Intel macro-op fusion That is, place all loop counter tests right before their conditional jumps.
REVERT: f7cd45b CAVLC: clean up and restructure Somewhat faster CAVLC and RD bit-counting.
REVERT: 4a89c20 CABAC: clean up and restructure Somewhat faster CABAC and RD bit-counting.
REVERT: 62fc472 Some initial 4:2:2 x86 asm
REVERT: bb9216d 4:2:2 encoding support
REVERT: b7fa2ff SSSE3/SSE4 9-way fully merged i4x4 analysis (sad/satd_x9)
REVERT: b1bb23c Faster intra_mbcmp_x3 for versions without dedicated asm Select asm subroutines more intelligently in the wrapper functions.
REVERT: 265cfae Optimize x86 intra_predict_4x4 and 8x8
REVERT: fe5729d Use realistic alignment for intra pred benchmarks in checkasm
REVERT: 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.
REVERT: 03a542a Fix install/uninstall shared libs if SYS is WINDOWS/CYGWIN
REVERT: 2641b9e Add Hurd support to configure
REVERT: dabc19e Optimize x86 intra_satd_x3_* ~7% faster.
REVERT: 419f1bf Optimize x86 intra_sa8d_x3_8x8 ~40% faster. Also some other minor asm cosmetics.
REVERT: b581755 Scale interlaced refs/mvs for mvr predictors Slightly improves compression and fixes a Valgrind error.
REVERT: 0c2ddc1 Optimize predict_8x8_filter and incidentally remove a valgrind false-positive
REVERT: afeb240 Don't override flat SSE2 dequant functions with non-flat AVX ones Slightly faster.
REVERT: d89a7d5 Shut up some valgrind false-positives
REVERT: 6881f24 Avoid some unnecessary allocations with B-frames/CABAC off
REVERT: ddf82cd Fix typo in p8x8 RD analysis Passed wrong idx to trellis.
REVERT: 14de378 Fix invalid memory accesses in x86 lowres_init when width <= 16
REVERT: 8332643 Fix intermediate conversion for YUVJ* pixfmts with 4:4:4 encoding
REVERT: 86c5510 Fix pic_out returned by x264_encoder_encode with 4:4:4
REVERT: b232a9d Fix zeroing of mvr predictors in bskip blocks
REVERT: fd3fb34 Fix: chroma planes for weightp analysis were not initted if U early-terminates and V doesn't.
REVERT: ada894d Expand borders before chroma weightp analysis Prevents mc from using uninitialized source pixels.
REVERT: b21640e Another 4:4:4 chroma weightp bug fix
REVERT: 317d883 Fix typo in help
REVERT: 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.
REVERT: fd681ea asm cosmetics: base-4 constants for shuffles
REVERT: 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.
REVERT: 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.
REVERT: 43f62a2 asm cosmetics: merge all the variants of ABS macros
REVERT: 4b429c6 asm cosmetics part 2 These changes were split out of the cpuflags commit because they change the output executable.
REVERT: c0cda6a asm cosmetics: INIT_MMX/XMM/YMM now support a cpuflags argument
REVERT: 12f12a2 Import x86inc.asm patches from libav
REVERT: b787351 Cosmetics: s/mmxext/mmx2/
REVERT: 59cb2eb Fix two bugs in 4:4:4 chroma weightp analysis Caused slightly worse compression.
REVERT: fafa6a2 Fix "--asm avx" Previously required "--asm sse2fast,fastshuffle,sse4.2,avx".
REVERT: 47f2263 Re-add support for glibc <2.6, which doesn't have CPU_COUNT
REVERT: 9949438 Avoid using deprecated libavformat functions Replace av_find_stream_info with avformat_find_stream_info. Now requires libavformat 53.3.0 or newer.
REVERT: 392e762 Use assembly versions of some deblocking functions in MBAFF
REVERT: 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.
REVERT: 178455c Fix padding bug in x264_expand_border_mbpair
REVERT: 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.
REVERT: 75eb1cd Fix crash with high bitdepth 4:2:0 input
REVERT: 45b6e45 x86 asm cosmetics Use FDEC_STRIDEB where appropriate.
REVERT: c28471e Fix a bug in lossless sub-8x8 RD Caused crashes in rare cases with lossless encoding.  Regression in 4:4:4.
REVERT: 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.
REVERT: 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.
REVERT: 207ca3e Some trivial changes to RD thresholds The output-changing portion of the next patch.
REVERT: 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.
REVERT: 6fa146c Optimize macroblock_deblock_strength, add more early terminations
REVERT: ded542e Function-pointerify MBAFF deblocking functions
REVERT: 68be4f2 Clean up MBAFF deblocking code
REVERT: d4e7faa Optimize frame_deblock_row
REVERT: 2bd11d1 Shrink two arrays
REVERT: c3445f6 Add support for the new (4:4:4) colorspaces to x264_picture_alloc
REVERT: 75c6080 Various cosmetics
REVERT: 419df03 Improve configure help
REVERT: 88f6bbd Use $optarg for some configure options
REVERT: 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."
REVERT: 7fcf1cf Fix spurious "stream properties changed" with --seek option on some inputs
REVERT: 3765dfd Fix use of deprecated libavcodec functions Replace avcodec_open with avcodec_open2. Now requires libavcodec 53.6.0 or newer.
REVERT: f23a615 Fix nalu_process callback with HRD
REVERT: 4bc22b0 Fix incorrect chroma swap for some input pixfmts
REVERT: 9cc407d Fix resize filter crash with YUVJ* input pixfmt
REVERT: ffc4154 RGB encoding support Much less efficient than YUV444, but easy to support using the YUV444 framework.
REVERT: c07df2f 4:4:4 encoding support
REVERT: 2809cb6 Properly weight slice header lambda in chroma weightp analysis
REVERT: 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.
REVERT: 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.
REVERT: 6fce39a Fix SSIM calculation with sliced threads
REVERT: 2e5620d Avoid possible NaNs in B-frame output stats
REVERT: c9ba582 ARM: do not override the toolchain default for FPU ABI
REVERT: 3c78047 Fix link errors with libswscale/libavutil as shared libraries
REVERT: 073f081 Fix deprecation in libavformat usage Replace av_open_input_file with avformat_open_input. Now requires libavformat 53.2.0 or newer.
REVERT: 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.
REVERT: c726805 Fix MBAFF row VBV ratecontrol Reverts most of r1984 and implements a much simpler solution.
REVERT: 5bae8ae Make ratecontrol_mb less slow
REVERT: 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.
REVERT: 1392798 AVX mbtree_propagate Up to ~20-30% faster than SSE2 on Sandy Bridge.
REVERT: 74b19b0 Use -vsync 0 with ffmpeg regression test
REVERT: 0facc4b Inline emms instructions on x86 if possible
REVERT: 48d2185 Make left_index_table const Should allow for some missed compiler optimizations in macroblock_cache_load.
REVERT: cb97de7 Make --profile main/baseline force off CQMfile
REVERT: e2d73a2 Fix VBV bug caused by zero i_row_satd value for first and last row
REVERT: 774555b Fix crash with VBV + forced QP
REVERT: 8ca923e Fix VBV bug with MinCR limit
REVERT: 4e5eaf0 Fix bitstream reallocation with slice-max-size + MBAFF
REVERT: 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.
REVERT: 330e258 Slightly speed up x86 CABAC asm Also make some various cleanups.
REVERT: 160557a Faster pixel_memset ~4x faster. Also inline plane_expand_border for improved constant propagation.
REVERT: 9202f13 Add checkasm tests for memcpy_aligned, memzero_aligned Also make memcpy_aligned support sizes smaller than 64.
REVERT: 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.
REVERT: 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.
REVERT: 3c23f73 MBAFF: Add frame/field MB stats
REVERT: a97285e MBAFF: Template direct spatial
REVERT: d4ef7d3 MBAFF: Template cache_load and cache_load_neighbours
REVERT: 1a4bffb MBAFF: Make interlaced support a compile time option
REVERT: 8bea09d MBAFF: Don't call zigzag_init for every mb
REVERT: 20d9cb8 MBAFF: Modify ratecontrol to update every two rows
REVERT: 87b054d MBAFF: Add support for slice-max-size
REVERT: 3f31da3 MBAFF: Add support for slice-max-mbs
REVERT: 0da9676 MBAFF: Adaptive quantization
REVERT: 115225d MBAFF: Enable adaptive MBAFF with VSAD decision
REVERT: 6ec0022 MBAFF: Create a VSAD DSP function
REVERT: 896014c MBAFF: Direct spatial
REVERT: d26878b MBAFF: Direct temporal
REVERT: f1715be MBAFF: Calculate bipred POCs
REVERT: 7da52fa MBAFF: Use both left macroblocks for ref_idx calculation
REVERT: 8c281d9 MBAFF: First edge deblocking
REVERT: 0a6f865 MBAFF: Implement left edge deblocking functions
REVERT: dce1b21 MBAFF: Add extra data to the deblock strength structure
REVERT: ed158a9 MBAFF: Deblocking support
REVERT: abc1930 MBAFF: Move common code from deblock functions
REVERT: 4fd4559 MBAFF: Add mbaff deblock strength calculation
REVERT: e1a96db MBAFF: Update x264_cabac_mvd_sum_mmxext to work with larger MVDs.
REVERT: 1f07f32 MBAFF: Clamp MVDs to 66 instead of 33
REVERT: e2d4d91 MBAFF: CABAC encoding of skips
REVERT: cf58ce0 MBAFF: Track what interlace decision the decoder is using
REVERT: 7b7632b MBAFF: Fix mvy bounds
REVERT: 3e6c7de MBAFF: Copy deblocked pixels to other plane
REVERT: 31ae5dd MBAFF: Disallow skip where predicted interlace flag would be wrong
REVERT: 44f28de MBAFF: Inter support
REVERT: fbd06b2 MBAFF: Neighbour calculation
REVERT: 353802b MBAFF: Store references to the two left macroblocks
REVERT: 2614f1e MBAFF: Store left references in a table
REVERT: e8f5970 MBAFF: Disable adaptive MBAFF when subme 0 is used
REVERT: 7af7889 MBAFF: Save interlace decision for all macroblocks
REVERT: 06f5fa5 Fix bug in NAL buffer resizing Also properly terminate if NAL buffer resizing fails.
REVERT: 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).
REVERT: 8cb10c1 Use float constants in qp rounding Slight performance improvement and fixes slight difference in output between gcc 3.4 and 4.5.
REVERT: 9a40ee6 Fix bugs with ratecontrol reconfiguration Initialization of some parameters was missed or wasn't synchronized with other threads
REVERT: 5ac5779 More validation of input parameters This fixes a crash with --me umh and insane values of --me-range.
REVERT: a1ac972 Fix bug in --b-adapt 2 with --rc-lookahead >248 Problem caused by buffer overflow in strcpy.
REVERT: d18995e Check for invalid pixfmts in lavf demuxer
REVERT: b56cb86 Fix regression in r1944 Broke sliced-threads + slice-max-size/slice-max-mbs.
REVERT: b5a8ad7 Precalculate CABAC initialization contexts Slightly faster encoding with lots of slices.
REVERT: 896a1fc Avoid redundant log2f calls in mv cost initialization Saves around 100 million clock cycles on x264 init.
REVERT: 4b08350 CABAC residual: cleanup and optimizations Also kill all Hungarian notation while we're at it. Trim an instruction off cabac_encode_bypass.
REVERT: bd00852 Validate input parameters more carefully Get rid of redundant warnings upon encoder_reconfig calls. Also avoid encoder_reconfig turning off psy_rd/trellis.
REVERT: 6e33b51 Fix VFR MB-tree to work as intended Should improve quality with FPSs much larger or smaller than 25.
REVERT: e41a777 Support more recent GPAC versions
REVERT: 02df696 Fix decoder desync with positive --chroma-qp-offset and zones
REVERT: f5db2e4 Use AVMEDIA_TYPE_VIDEO instead of deprecated CODEC_TYPE_VIDEO
REVERT: b250180 Force pic-struct for Blu-ray compat + fake-interlaced
REVERT: f87bc04 Fix open-gop with no-psy
REVERT: aa21558 Fix build with disabled asm
REVERT: 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.
REVERT: 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).
REVERT: f422ec9 Add SSE support to rectangle.h for 16-byte stores Uses GCC vector intrinsics; may be suboptimal on particularly old GCC versions.
REVERT: bdf23fe Do not force Intel Compiler to target pre-mmx architecture for x86 Caused a speed penalty against gcc equivalents.
REVERT: 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.
REVERT: e577efb Remove redundant mbcmp calls in weightp analysis
REVERT: 529bbef Use integer math for filler size calculation
REVERT: 89d92e5 Disable progress for FFMS input with --no-progress
REVERT: 86d1963 Fix bug in intra-refresh ratecontrol Row SATDs were slightly incorrect.
REVERT: 62dfb25 Cosmetics: fix some signedness issues found by -Wsign-compare
REVERT: e9e74e9 Minor fixes Fix a comment typo. Align an array properly. Make x264_scan8 unsigned: saves a bunch of movsxd instructions on x86_64.
REVERT: 4be6702 Improve C99 support checks in configure Fixes configuration with Intel compiler in some cases.
REVERT: 08d04a4 Eliminate the possibility of CAVLC level code overflow Instead, if it happens, just re-encode the MB at higher QPs until it fits.
REVERT: 10d56be x86 SIMD versions of optimize_chroma_dc SSE2/SSSE3/SSE4/AVX implementations. About 3x faster.
REVERT: 13afdfa Add Altivec version of mc_weight
REVERT: 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.
REVERT: 372ba94 Recognize cygwin as itself when not targeting mingw Also fix broken thread detection on cygwin.
REVERT: 9b7b3c7 Patch Intel's CPU dispatcher Reduces Intel Compiler's bias against non-Intel CPUs.
REVERT: b41d182 Intel Compiler support
REVERT: c7e352c Cosmetics: make struct definition braces consistent
REVERT: d5ba9ed Fix restoring of console title on Windows with ffms indexing
REVERT: 17ab74b Fix possible buffer overflow in mp4 muxer
REVERT: ee0245f Remove inline asm syntax not supported by LLVM's assembler Doesn't affect compiled output outside of LLVM.
REVERT: 5fd3dce Fix 10L in r1912 SSSE3 code got used in MMX/SSE2 and vice versa (in hpel).
REVERT: 36385ab Add AVX functions where 3+ arg commands are useful
REVERT: 49fd289 Frame-packing 3D: don't place scenecuts on right views Caused problems for some players.
REVERT: 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.
REVERT: 129d8ca Use bs_write1 wherever possible in header writing
REVERT: 02b0f74 Remove obsolete mvcost init code
REVERT: 429af21 Fix memory leak on encoder close if not all frames are flushed
REVERT: 0926279 Fix signedness bug in CPU detection Luckily didn't affect anything due to C signedness rules.
REVERT: 4835f7c Fix dumb bug caused by stray semicolon Caused noise reduction to run incorrectly in part of RD, but probably had no effect.
REVERT: 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.
REVERT: 9a705ef Fix crash in mp4 muxer after failure of x264_encoder_open
REVERT: c8bf13c Fix shadowed variable warning in ffms.c
REVERT: e5926dc Fix some Intel compiler warnings
REVERT: 60ef1f8 Fix 10L in r1886 Aspect ratio can't be set before SPS is initted.
REVERT: e6738f2 Improve update interval of x264cli progress information Now updates every 0.25s instead of every N frames.
REVERT: 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.
REVERT: 16868ec Allow WEIGHTP_FAKE in interlaced mode It seems to work fine as-is even though real weightp doesn't support interlacing yet.
REVERT: eb16899 Output pic struct information in libx264 API
REVERT: 0494e8e Enable FastShuffle on Penryn and Nehalem CPUs without SSE4
REVERT: 53b229c Minor cosmetics in configure
REVERT: 5681836 Various --help cosmetics
REVERT: 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.
REVERT: dce07ee Bump yasm version requirement to handle AVX
REVERT: 1dae625 Fix rare corruption with subme=10 Also fix dumb bug in VBV emergency AQ scaling.
REVERT: aaa7525 Fix overflow in ARM NEON i16x16 planar pred Patch backported from ffmpeg.
REVERT: ad58211 Fix incorrect frame duration for VFR input for some frames
REVERT: 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.
REVERT: 6dd825d Fix reconfiguration of parameters that modify the SPS For now, this is only aspect ratio.
REVERT: 1e45ed5 Fix possible crash on Phenom with lookahead thread disabled Misalign mask needs to be set for the main thread on entry, too.
REVERT: 7313bb5 Hotfix for some bugs in VBV emergency
REVERT: 9e0b9b7 Fix warnings in cpu.c
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: bb4182d Add --input-fmt option to lavf input Conforms to ffmpeg's `-f` option. Use this when lavf fails to guess the input format.
REVERT: 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.
REVERT: 1a321d7 Add some missing values to the non-extended SAR table
REVERT: 78b4fc4 Bump dates to 2011
REVERT: 62b661a More correctly write frame-packing SEI flags
REVERT: 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).
REVERT: 515d9fb Fix reconfiguration of b_tff Attempting to change field order during encoding could cause slight corruption.
REVERT: 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.
REVERT: 4c92c10 Remove high bit depth mmx quant It was using pmuludq which is sse2, and the function isn't really possible without pmuludq.
REVERT: ef2a080 Fix cacheline check in avg2 w20 cache32 Didn't result in incorrect output, only slightly decreased speed on a few obsolete systems.
REVERT: 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.
REVERT: 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).
REVERT: 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.
REVERT: 29fc527 Cosmetics: fref0/1 -> fref[2] and i_ref0/1 -> i_ref[2] A much-needed refactoring, plus makes the next patch easier.
REVERT: 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.
REVERT: 8c160db SSE2 high bit depth SSIM functions
REVERT: aab8418 SSE2 high bit depth intra_predict_(8x8c|16x16)_p
REVERT: bd54872 MMX high bit depth coeff_last4
REVERT: 658b6ae SSE2 high bit depth zigzag_interleave_cavlc
REVERT: 2b8f973 MMX/SSE2/SSSE3 high bit depth frame_init_lowres functions
REVERT: 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.
REVERT: 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.
REVERT: cf0c82a MMX/SSE2 high bit depth 8x8c intra predict functions
REVERT: 8d96f7d MMX version of high bit depth plane_copy And various cosmetics.
REVERT: 8cf764e Faster x86 predict_8x8c_dc, MMX/SSE2 high bit depth versions
REVERT: e570fc2 SSSE3 high bit depth sad_aligned functions
REVERT: a715df2 MMX/SSE2 high bit depth interleave functions
REVERT: 5e11ab6 MMX/SSE2 high bit depth avg functions
REVERT: 985a8ec MMX/SSE2 high bit depth deinterleave functions
REVERT: b519e0f Shut up some incorrect gcc uninitialized variable warnings
REVERT: 103e796 Write --crop-rect and --frame-packing options to x264 SEI
REVERT: 96e54b2 Add missing space to parameter SEI
REVERT: 0f6a8f7 Fix typo in documentation
REVERT: 131aa22 Fix redundant linebreaks in statsfile with weightp
REVERT: f05aff2 Use cross_prefix for strings in endian test and as test
REVERT: ee59e69 Fix checkasm test for quant in high bit depth Eliminate some spurious failures.
REVERT: 4a7b7e1 Fix broken YV12 handling in the resize filter
REVERT: c500639 Fix bug with negative lookahead mb costs in high bit depth
REVERT: a7ed3c5 Fix overflow in SSIM calculation in 10-bit
REVERT: cb15f76 Fix some possible overflows in VFR ratecontrol with extreme timebases
REVERT: 21a6034 Fix memory leak in lavf demuxer. Leak only occurred with input files that have more than one video stream.
REVERT: a4406c1 Fix satd predictors with high bit depth Resulted in odd CRF-mode results with --no-mbtree, as well as suboptimal VBV handling.
REVERT: 147e8eb Fix compile error with high bit depth and disable-asm
REVERT: 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.
REVERT: a51816a Support for native Windows threads
REVERT: b5e2366 MMX/SSE2 high bit depth weight_cache/offset(sub|add) functions
REVERT: 70271f4 SSE2 high bit depth dequant functions
REVERT: 38ff5d3 SSE2 high bit depth zigzag functions
REVERT: 6d9310e MMX/SSE2 versions of high bit depth store_interleave
REVERT: 3ee357a Add frame-packing SEI support for signalling 3D video
REVERT: 78e3bc9 Allow 8x8dct+cavlc+lossless with subme>=6
REVERT: 8ca6222 Add interlaced/no-interlaced case to regression test script
REVERT: 39a5799 Save more memory with weightp in >8-bit
REVERT: 84d7a95 .gitignore more untracked file types
REVERT: 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).
REVERT: 5fbb9d6 Fix high bit depth intra pred functions And re-enable them accordingly.
REVERT: 22af357 Fix weightp analysis with high bit depth
REVERT: e8ca7be Fix build error in high depth Caused by multiple definitions of x264_add8x8_idct_sse2.
REVERT: fdcf2ae Hotfix for high bit depth Temporary fix for some unaligned access crashes.
REVERT: a2e043d Delete x264_config.h on distclean
REVERT: 0a39e00 Tons of high bit depth intra predict asm
REVERT: 3f2f3f9 SSE2 high bit depth 8x8/16x16 idct/idct_dc
REVERT: 64b7648 Create and install x264_config.h This header can be used to determine the bit-depth and license of libx264.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: e0f5dbe Fix possible overflow in sub4x4_dct in 10-bit builds
REVERT: c2cc8c3 Fix bug in intra-refresh + threads Intra refresh bar quality increase wasn't correctly applied.
REVERT: b2a6aa4 Fix file handle leak in libx264 on error
REVERT: 71cf5fd Fix incompatible csp format issue Problem occurred with unknown pixel formats and non mod2 resolutions in the resize filter.
REVERT: f6482d8 Really fix fittobox resize rounding code
REVERT: fba116f Fix regression in rev1549 Skip auto timebase denominator generation when generated timebase denominator exceeds UINT32_MAX. Also fix double free.
REVERT: 96c4835 Fix --tcfile-in if timecode v2 file starts from nonzero pts
REVERT: 3534560 SPARC/Solaris build fixes
REVERT: e89c4cf Fix typo in r1797
REVERT: 04b5966 Add Python regression test script
REVERT: 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).
REVERT: 61d7203 SSE versions of some high-bit-depth DCT functions Our first Google Code-In patch!
REVERT: 6a8ed0f Clean up weightp analysis function
REVERT: 7226b4e Add API function to return max number of delayed frames
REVERT: 9cae442 Copy field order flag in encoder_reconfig
REVERT: 1bcb63e Cosmetics in configure
REVERT: 372f398 Add some more info to `x264 --version`
REVERT: 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.
REVERT: 2f8ad97 Fix ticks_per_frame check for VFR input
REVERT: 21877a0 Fix configure so that boolean configuration options are 1/0
REVERT: b38fd04 Only build SPARC VIS asm if high bit-depth is disabled
REVERT: ee75acd Fix build on SPARC Solaris 10
REVERT: 8eaf8a6 Fix resize filter rounding code
REVERT: af1a741 Fix regression in chroma weightp Missing cache calls could cause artifacts, encoder/decoder desync.
REVERT: c764e29 Fix some crashes with high bit depth Not all arrays were sufficiently aligned.
REVERT: 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.
REVERT: 2eadb94 Support custom cropping rectangles Supposedly useful for 3D television applications.
REVERT: fc90061 Convert X264_HIGH_BIT_DEPTH to HIGH_BIT_DEPTH Less verbose.
REVERT: 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!
REVERT: 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.
REVERT: faed8d5 x86 asm for high-bit-depth motion compensation ~8x faster qpel MC than C. ~10x faster hpel than C.
REVERT: 38861b9 x86 asm for high-bit-depth quant ~3.1-4.2x faster than C.
REVERT: 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.
REVERT: 2584843 x86 asm for high-bit-depth deblocking ~3.3x faster than C.
REVERT: 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).
REVERT: a9d7826 Use enums instead of magic numbers in x264_mb_partition_pixel_table
REVERT: e19e5f0 Improve configure script logging Now prints the test program that failed in addition to error messages.
REVERT: fb3ef61 Fix constrained intra pred mode selection
REVERT: 2824c3a Various high-bit-depth ratecontrol fixes
REVERT: 8c16b4d Fix a crash in --dump-yuv for odd resolutions
REVERT: c9dad9e Improve flash detection algorithm change in r1765 Now only disables scenecuts only near real end of video, not just prior to forced keyframes.
REVERT: c3c8efa Update ffms2 support for its latest API break.
REVERT: 2f656aa Modify the x264 header accordingly if --disable-gpl is used
REVERT: 8442a65 Save a bit of memory with weightp + high bit depth
REVERT: 39787c8 Fix bugs in qpfile parsing with omitted QPs
REVERT: 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.
REVERT: f9f0035 Fix bug in r1753 Overflow compensation fix broke CRF with --no-mbtree.
REVERT: 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.
REVERT: 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.
REVERT: 666aef8 VFR-aware PSNR/SSIM measurement First step to VFR-aware MB-tree and bit allocation.
REVERT: 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.
REVERT: d70087b Make the ffmpeg -vpre error message more descriptive
REVERT: 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.
REVERT: 490bf93 Update benchmarks in doc/threads.txt
REVERT: 75b0181 Make the #if'd out naive ESA actually match the real implementation
REVERT: 6541afc Move mv/ref prefetch code to the correct location Prefetching of top blocks should be done under if(top), not if(left).
REVERT: 17f54d0 Link x264cli explicitly against lavf Fixes some problems with crappy linkers.
REVERT: 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).
REVERT: 8d7c2d0 Disable overflow compensation in CRF mode Wasn't designed with CRF in mind, and acts really weird with CRF+VBV.
REVERT: 5dfbfc3 Fix stupid bug in B-frame VBV size prediction
REVERT: d6a1303 Fix regression in checkasm in r1666 Buffer is uint16_t* regardless of whether x264 was compiled with high bit depth or not.
REVERT: c85ec3e Fix overflows in satd, sa8d and hadamard_ac with high bit depth
REVERT: 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).
REVERT: 527d196 Fix syntax for some parameterless functions Technically, such functions should be declared with (void), not ().
REVERT: 49e2d55 Fix fps reporting on mingw64 _ftime on mingw64 uses __timeb32 which is broken. Use ftime instead.
REVERT: 7f5771a Fix compilation on PPC with some recent GCCs
REVERT: 1fda37a Fix Altivec SATD with small strides Fixes chroma ME and some of lookahead on PPC.
REVERT: 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.
REVERT: 0a5cc5e Trim a few bytes off some x86 intra pred functions
REVERT: 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.
REVERT: 7a9d518 Use a larger pic_init_qp with high bit depth Modify pic_init_qs for consistency.
REVERT: e16c5f2 Update some of the information in doc/
REVERT: 3a18f20 Update header in depth.c
REVERT: 60748ae Remove some old unused stuff in the build tree Regression test (hasn't been updated since svn). Doxy (was never used).
REVERT: 368f174 Various cosmetics Exorcise some CamelCase.
REVERT: db224e3 Add missing mod4 stack check to sse2_misalign mc_chroma Required for ICC compilation.
REVERT: c68140d Fix 2pass ratecontrol with --nal-hrd cbr
REVERT: 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.
REVERT: be2a065 Fix filter parsing with --extra-cflags="-DNDEBUG"
REVERT: 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).
REVERT: 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
REVERT: 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.
REVERT: 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.
REVERT: e87b7ec Various cosmetics
REVERT: 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.
REVERT: 4e3bf80 Add missing emms for dump-yuv
REVERT: 3d0d9cd Fix CFR ratecontrol with timebase != 1/fps Fixes VBV + DTS compression, among other things.
REVERT: 5f104e9 Fix DTS/bitrate calculation if the first PTS wasn't zero Fix bitrate calculation with DTS compression.
REVERT: b02df7b Fix regression in r1716
REVERT: e757d68 Cosmetics in me.c and frame.c
REVERT: 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.
REVERT: 9e443f2 Add full chroma input flag to swscale Improves quality of colorspace conversions involving RGB(A).
REVERT: 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.
REVERT: 0596dff Update source file headers Update dates, improve file descriptions, make things more consistent. Also add information about commercial licensing.
REVERT: 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.
REVERT: 0974adf Make intra refresh finish one frame faster In some cases, the last frame of intra refresh was redundant. Saves a few bits.
REVERT: 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.
REVERT: 416461a Add configure check for mingw64 prefixing This compensates for the inconsistent prefixing seen in different versions of the compiler.
REVERT: 3e7f374 Update some Altivec function prototypes Silences a lot of warnings.
REVERT: 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.
REVERT: 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.
REVERT: a67e619 Use POC type 2 for streams with no B-frames Saves a few bits per slice header.
REVERT: 6e85307 Faster cabac_encode_ue_bypass Use CLZ + a lut instead of a loop.
REVERT: e344d6e Faster nal_escape asm
REVERT: 44ff90e Allow --demuxer forcing with known extensions
REVERT: 7bb60b1 Minor fixes/cosmeticcs in commandling parsing
REVERT: d55fc72 Fix overflow in stats printing
REVERT: 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.
REVERT: 5b8f407 Don't do deblock-aware RD if deblocking is off
REVERT: 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.
REVERT: 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.
REVERT: c74f9c9 Simplify addressing logic for interlaced-related arrays In progressive mode, just make [0] and [1] point to the same place.
REVERT: 08b1e36 Add missing emms to x264_nal_encode Only matters for applications using the low-latency callback feature.
REVERT: 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).
REVERT: c41b8f0 NV12 version of Altivec chroma MC
REVERT: 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 %).
REVERT: 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.
REVERT: 003a7f2 Fix lavf input with delayed frames
REVERT: dd363d7 Slightly improve the filtering section of x264 --help
REVERT: 12002b9 Fix debug message typo with DTS compression
REVERT: a414ccb Try to guess input length for lavf input Allows printing of progress indicator when using lavf input.
REVERT: 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).
REVERT: 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.
REVERT: 7fc564f Add libavcore check in configure
REVERT: 0b36c6d Improve quantizer distribution with sliced-threads+VBV Should help avoid cases of very uneven quantizer choice between slices.
REVERT: a4cd317 Remove dead code in slicetype.c
REVERT: 3e15334 Fix incorrect duration/framerate/bitrate in flv header
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 757f5c1 Eradicate all mention of SI/SP-frames
REVERT: 84a051f Fix stack alignment with MB-tree Broke 2-pass with MB-tree when calling from compilers with broken stack alignment (e.g. MSVC).
REVERT: 1a6fd47 Avisynth 2.6 colorspace support Use a customized avisynth_c.h to detect the new planar colorspaces.
REVERT: 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.
REVERT: cd8929f Fix stack alignment for adaptive quant Broke calls from compilers with broken stack alignment (e.g. MSVC).
REVERT: 19df41a Fix compilation with shared ffmpeg libs lavf input uses libavutil functions, so it must request flags for libavutil from pkg-config.
REVERT: 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.
REVERT: 2484aa0 Fix regression in r1666 Broke encoding of PCM macroblocks.
REVERT: d846e88 Fix build with bit_depth > 8 Definition of x264_cli_plane_copy was inconsistent with declaration.
REVERT: 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.
REVERT: 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.
REVERT: 04e40ff Eliminate edge cases for MV predictors Saves a few clocks in mv pred.
REVERT: 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.
REVERT: c953140 Fix 8x8dct+slices+no sliced threads+cavlc+deblock Deblocking was done slightly incorrectly. Regression in r1612.
REVERT: d6228ae Fix off-by-one error in slice VBV predictor updates
REVERT: ce136d6 Fix disabling of progress with --log-level
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: ce052b8 Centralize logging within x264cli x264cli messages will now respect the log level they pertain to. Slightly reduces binary size.
REVERT: 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.
REVERT: 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.
REVERT: aa1a843 Simplify pixel_ads
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: ef0c268 SSE4 and SSSE3 versions of some intra_sad functions Primarily Nehalem-optimized.
REVERT: 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.
REVERT: 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.
REVERT: 69e9d85 Fix SIGPIPEs caused by is_regular_file checks Check to see if input file is a pipe without opening it.
REVERT: 4fa7d53 Fix compilation on ARM w/ Apple ABI
REVERT: 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.
REVERT: 4d8d930 Convert the OPT_ defines in x264.c to an enum
REVERT: be94782 Don't allow baseline profile streams with fake-interlaced Indicate use of --fake-interlaced in encoding options SEI.
REVERT: 71502ea Allocate space for null terminator in param_apply_tune
REVERT: 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.
REVERT: 8c69931 Fix crash with --subme 0 + --weightp > 0. Regression in r1535
REVERT: 0cd5d69 Replace some divisions with shifts
REVERT: 02f1bba Warn about shadowed variable declarations Also get rid of a few instances of variable shadowing.
REVERT: 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.
REVERT: 0c94769 Remove double-dereferences for MB width/height data Store it in x264_t instead of going through the SPS.
REVERT: 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.
REVERT: 2e541dd Preprocessing cosmetics Unify input/output defines to HAVE_* format. Define values as 1 to simplify conditionals.
REVERT: 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.
REVERT: 2d2abd8 Display SSIM measurement in db as well
REVERT: c41f0c0 Make version.sh indicate "M" for local commits too
REVERT: 3c92ef9 Add error message for invalid [de]muxer selection
REVERT: 0d0dc6a Deduplicate the ALIGN macro, move it to common.h
REVERT: 2fafcb5 Fix a use of ALIGNED_ARRAY_16 on ARM
REVERT: 5079abd Add missing emms after nal_encode Caused random, bizarre failures with some calling applications.
REVERT: b474d0e Fix crash in fake-interlaced at some resolutions
REVERT: 2e81ce1 Fix no-mbtree + aq-mode=0
REVERT: 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.
REVERT: d0d8751 Fix Avisynth input Regression in r1624.  A more permanent solution to the problem will be committed later.
REVERT: fbe0255 Convert to a unified "dctcoeff" type for DCT data Necessary for future high bit-depth support.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: bdc68d6 Re-enable i8x8 merged SATD Accidentally got disabled when intra_sad_x3 was added.
REVERT: 0c7cf0b Some deblocking-related optimizations
REVERT: 77b568b Optimize out some x264_scan8 reads
REVERT: 794713a Add fast skip in lookahead motion search Helps speed very significantly on motionless blocks.
REVERT: 5832bdf Merge some of adaptive quant and weightp Eliminate redundant work; both of them were calculating variance of the frame.
REVERT: a7f8709 Fix omission in libx264 tuning documentation
REVERT: 8098997 Fix ultrafast to actually turn off weightb
REVERT: d51fde5 Fix crash with MP4-muxing if zero frames were encoded
REVERT: 2bcbac3 Fix cavlc+deblock+8x8dct (regression in r1612) Add cavlc+8x8dct munging to new deblock system. May have caused minor visual artifacts.
REVERT: 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).
REVERT: 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.
REVERT: 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.
REVERT: 7c2fd41 Slightly faster mbtree asm
REVERT: cca28cd Faster deblock strength asm on conroe/penryn
REVERT: 2dd5ce2 Avoid an extra var2 in chroma encoding if possible Also remove a redundant if.
REVERT: 23e92b5 Avoid a redundant qpel check in lookahead with subme <= 1.
REVERT: d202981 Fix ABR rate control calculations Incorrect frame numbers were used, resulting in slightly inaccurate ratecontrol.
REVERT: e627569 Fix calculation of total bitrate printed after stop by CTRL+C
REVERT: bed1323 Fix typo in fake-interlaced documentation
REVERT: cf5769d Fix CABAC+PCM, regression in r1592 Changes to queue in CABAC didn't get propagated to PCM code.
REVERT: 69588a7 Fix performance regression in r1582 Set the correct compiler flags.
REVERT: 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.
REVERT: 9b47cb0 Fix different output with differing sync-lookahead Also reduce memory consumption.
REVERT: dd4972a Mark Win32 executable as large address aware
REVERT: 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.
REVERT: 8ff16c5 Modify version.sh to output to stdout. Update configure to match.
REVERT: 629a56a Set correct filesystem permissions for various files
REVERT: c787658 Fix regression in r1566 Intra stats need to be kept track of for fast intra decision.
REVERT: ff0fede Fix rc-lookahead in encoding options SEI in 2-pass with VBV
REVERT: 86c8fec Reduce memory usage in 2-pass with b-adapt 2
REVERT: 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.
REVERT: 03ff36e Fix typo in pulldown
REVERT: e07cd36 Fix bitrate calculation in progress status Was slightly incorrect due to using pts, which is out of order.
REVERT: 444794d Fix crash with sliced-threads on Phenom
REVERT: cb06143 Fix condition for printing rc=cbr in options SEI Also fix crf-max formatting.
REVERT: 4b4f8eb Shrink even more constant arrays
REVERT: 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.
REVERT: 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.
REVERT: 09b5a94 More cosmetics
REVERT: 7608d73 Fix unresolved symbol in r1573 gnu ld didn't complain, but some other linkers did.
REVERT: 90b6dd0 Remove unnecessary --enable options Change --enable-visualize to actually check for X11 support.
REVERT: 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.
REVERT: 8508412 Add field-order detection to y4m demuxer
REVERT: 44f83cc Fix sliced-threads + interlaced Broken in r1546.
REVERT: 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.
REVERT: c82273d More accurate MV prediction on edges in lookahead
REVERT: ccc03ec Error out on invalid input stride Might catch some crashes due to buggy calling applications.
REVERT: 21c030d Remove unnecessary debugging assert Shouldn't have been in r1568 to begin with.
REVERT: 181fc45 Shrink some more constant arrays
REVERT: 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).
REVERT: 9ec07af Shrink a few x86 asm functions Add a few more instructions to cut down on the use of the 4-byte addressing mode.
REVERT: 9d66767 Make options SEI use weight* instead of wpred* More intuitive and maps more reasonably to the CLI options. Breaks statsfile backwards-compatibility.
REVERT: d9db8b3 r1548 broke subme < 3 + p8x8/b8x8 Caused significantly worse compression.  Preset-wise, only affected veryfast. Fixed by not modifying mvc in-place.
REVERT: bff0df7 More write-combining
REVERT: 41b877e Reduce lookahead memory usage, cache misses Merge lowres_types with lowres_costs.
REVERT: bf49210 Fix build on x86 with asm on but SSE off
REVERT: dffb848 Don't calculate ref/partition stats if not necessary
REVERT: 167d68a Split out MV prediction into mvpred.c Make common/macroblock.c a bit less gigantic.
REVERT: a927654 Fix mv predictor clipping on non-x86 (regression in r1548)
REVERT: fbcc1ec Move getopt.c to x264cli sources from libx264 Only affects builds on systems without getopt.c.
REVERT: 8fae650 Move deblocking code to a separate file Should clean up frame.c a bit.
REVERT: f648d24 fix ffms demuxer to support input timebase values > 2^31
REVERT: 4ce8f12 Fix 10l in cache_load changes Broke constrained intra pred, probably not anything else.
REVERT: f611440 Faster fullpel predictor checking Also shave a few instructions off dia/hex motion estimation loops.
REVERT: f48356d Fix checkasm's generation of deblock inputs (regression in r1517)
REVERT: e37a490 Fix printing of bitrate when timestamps aren't available Doesn't affect x264cli, but was broken in some other apps in CFR mode.
REVERT: 5b1798e Don't check mv0 twice One less SAD in motion estimation. Also rename bmv -> pmv; more accurate naming.
REVERT: 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.
REVERT: d6d63a0 Print intra chroma pred modes in stats
REVERT: 4013f8d Add mv0 special case in pskip chroma MC Significantly faster pskip MC.
REVERT: 156bf75 Fix build scripts to work with non-GNU tools
REVERT: a34ad7c Faster deblock reference frame checks Use a lookup table to simplify logic
REVERT: 5dab1ef Faster chroma CBP handling
REVERT: 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.
REVERT: aaf2194 MMX code for predictor rounding/clipping Faster predictor checking at subme < 3.
REVERT: bc9103c Fix four minor bugs found by Clang
REVERT: 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.
REVERT: a7ec5e2 Prefetch MB data in cache_load Dramatically reduces L1 cache misses. ~10% faster cache_load.
REVERT: 017ade0 Fix a ton of pessimization caused by aliasing in cache_save and cache_load
REVERT: 674926f Add CP128/M128 macros using SSE
REVERT: 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).
REVERT: dabc4b1 Enable --fast-pskip on fast firstpass
REVERT: 2efd119 Make interlaced detection in avisynth only apply to field-based input Fixes improper flagging of progressive sources.
REVERT: 0f92441 Set psy=0 in lossless mode Doesn't actually affect output, just what's written in the SEI.
REVERT: bd72d46 Fix a use of sad_x4 that had non-mod64 stride Minimal speed improvement, but fixes a violation of internal api.
REVERT: 15f5e7e Make keyint_min auto by default Gives more reasonable default settings when using short GOPs.
REVERT: c7c8693 Faster mv predictor checking at subme < 3 Simplify the predicted MV cost check.
REVERT: f21ff8a Special case in qpel refine for subme=1 ~15-20% faster qpel refine with subme=1. Some minor cleanups in refine_supel.
REVERT: 7c9870b Cosmetics: VLC tables
REVERT: 825e3a9 Add faster mv0 special case for macroblock-tree Improves performance on low-motion video.
REVERT: 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.
REVERT: 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).
REVERT: f1320f8 Save a few bits in multislice encoding Set the initial QP for each slice to the last QP of the previous slice.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: fb449c7 Add missing #include to display-x11.c
REVERT: 819d121 Add TFF/BFF detection to all demuxers Fix interlaced Avisynth input, automatically weave field-based input.
REVERT: 058d67e Correctly mark output frames as BREF Simplify pic_out code.
REVERT: 25ca5b0 Fix HRD compliance As usual, the spec is so insanely obfuscated that it's impossible to get things right the first time.
REVERT: f8671ce Better b16x8/8x16 early termination in B-frames A bit slower but up to 1-2% better compression.
REVERT: a1e4e58 Fix 10L in B-skip improvement patch
REVERT: 9d08bf4 Fix printing of SEI header with VBV + ABR SEI header shouldn't say CBR unless bitrate == maxrate.
REVERT: 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.
REVERT: 769adff Faster CABAC state copying for small partitions Save ~25 clocks per i4x4, i8x8, and sub8x8 RD call.
REVERT: 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.
REVERT: 2f432c8 Fix array overread in b8x16 search
REVERT: 385f6e2 Faster direct check with subpartitions off Also simplify the whole function a bit.
REVERT: d8d8e7e Print crf-max with appropriate precision in SEI
REVERT: ffd1cd1 Fix 10l in timecode seeking
REVERT: 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.
REVERT: f9ff003 Don't use 2 L1 refs with pyramid + ref=1 Slightly faster encoding with ref=1.
REVERT: 33d382a Update copyright year in SEI header
REVERT: 5b1fdfa New "superfast" preset, much faster intra analysis
REVERT: a76ac87 Avoid redundant MV prediction in duplicate refs
REVERT: a1edfa6 Cosmetics in mvd handling Use a 2D array instead of doing manual pointer arithmetic.
REVERT: 9904be8 Fix make uninstall on systems with executable suffixes
REVERT: 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.
REVERT: 93b1d5a Pad non-mod16 resolutions using the correct field
REVERT: a882f7a Document slow/fast firstpass in --fullhelp
REVERT: ce6bd49 Fix some misattributions in profiling Cycles spent in load_hadamard and the avg2 w16 ssse3 cacheline split code were misattributed.
REVERT: 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.
REVERT: 6314e08 Fix stack alignment in sliced threads Could cause crashes when called from non-GCC-compiled applications.
REVERT: 8a919f8 Cosmetics: use sizeof() where appropriate
REVERT: ae92e7f Split up analyse_init Save some time by avoiding some unnecessary inits and moving other parts to per-thread init.
REVERT: 5d767b1 Reduce stack usage of b-adapt 2's trellis Also remove some redundant code.
REVERT: 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.
REVERT: 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.
REVERT: 4f42c3c Make a bunch of small functions ALWAYS_INLINE Probably no real effect for now, but needed for the next patch.
REVERT: 6b58509 Two compatibility fixes Add IA64 support in configure.
REVERT: 49eb50c Faster x264_macroblock_encode_pskip GCC is apparently unable to optimize out the calculation of a variable when it isn't used.
REVERT: 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.
REVERT: ec39f7b Reformat profile restrictions in --fullhelp.
REVERT: 632af66 Fix typo in configure
REVERT: ea93d78 Add support for spaces to iPhone GAS preprocessor script
REVERT: d84a1a9 Fix slightly wrong mp4 duration.
REVERT: 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.
REVERT: 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.
REVERT: e19bef2 Shrink some arrays in x264_t Also remove an unnecessary assignment from cache_load.
REVERT: f36b1e4 Use x264_log in more places instead of fprintf
REVERT: 6951964 Fix two nondeterminisms Move noise reduction data into thread-specific data. Use correct reference list for L1 temporal predictors.
REVERT: 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.
REVERT: 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!
REVERT: 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.
REVERT: 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.
REVERT: e5b108a Faster rounding of chroma DC coefficients
REVERT: 8ec5a5e Faster cabac_encode_decision_asm Minimizes instruction count, which also means smaller code. Various other slight changes to allow more instruction level parallelism.
REVERT: 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.
REVERT: 279c9d9 Ignore XYSCSS in y4m if the newer standard C tag is present
REVERT: c8900a2 Fix regression in r1450 I_PCM blocks would cause x264 to crash or generate bad output. Simplify PCM handling.
REVERT: 7d533c5 Fix crash with intra-refresh + aq-mode 0
REVERT: 1144615 Fix regression in r1453 r1453 broke psy-trellis with --trellis 2
REVERT: 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).
REVERT: 3ae44d9 Cut size of MVD arrays by a factor of 2 again Only store the MVDs of the edges of each MB.
REVERT: 6a443d3 Disable Altivec and VIS optimizations when --disable-asm is specified
REVERT: 4091b29 Fix a buffer overread on odd input resolutions
REVERT: 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.
REVERT: 4132e0b Port Mans Rullgard's NEON intra prediction functions from ffmpeg
REVERT: e29c758 Remove unused function Two other minor fixes.
REVERT: f2428d2 Use short startcode in more possible situations Previous patch didn't cover all possible uses according to B.1.2.
REVERT: 7fcffde Fix fastfirstpass Apparently the libx264 preset changes made "fastfirstpass" into "fastsecondpass" inadvertantly.
REVERT: ad64d48 Fix various silly errors in the previous patches
REVERT: 9e35bd0 Actually error out if preset/tune/profile is invalid Got lost somewhere in the move to libx264-based presets.
REVERT: 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.
REVERT: 6823cbc Use short startcodes whenever possible Saves one byte per frame for every slice beyond the first. Only applies to Annex-B output mode.
REVERT: 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.
REVERT: a6c91c9 Abide by the MinCR level limit Some Blu-ray analyzers were complaining about this.
REVERT: 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).
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 10e9e95 Add temporal predictor support to interlaced encoding 0.5-1% better compression in interlaced mode
REVERT: 8b67d5e Keep track of macroblock partitions Allows vastly simpler motion compensation and direct MV calculation.
REVERT: 4574b58 Much faster and simpler direct spatial calculation
REVERT: 1a6d32b SimpleBlock requires Matroska Doctype v2
REVERT: 966fd12 Add GPAC version check
REVERT: 482646a Fix stupid regression in interlaced in r1430 With ref > 8 or b-pyramid, an array over-read could cause slightly incorrect B-frames.
REVERT: f0da961 Fix overread of scratch buffer Could cause crashes on non-mod16 frames.
REVERT: 28e6eb6 Fix integer overflow in chroma SSD check Could cause bad skips at very high quantizers on extreme inputs.
REVERT: 4784723 Fix I and B-frame QPs with threads Rounding errors resulted in slightly wrong QPs with threads enabled.
REVERT: 781d300 Fix compilation on ARM
REVERT: b8485e8 Remove unnecessary PIC support macros yasm has a directive to enable PIC globally
REVERT: 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.
REVERT: 520ba2b iPhone compilation support Also add --sysroot to configure options
REVERT: 2b5a0c6 ARM NEON versions of weightp functions
REVERT: 40dce15 Use #ifdef instead of #if in checkasm
REVERT: 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.
REVERT: dcef20c Mark cli_input/output_t variables as const when possible
REVERT: dffb203 mkv: Write the x264 version into the file header
REVERT: f3de174 mkv: Write SimpleBlock instead of Block for frame headers
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 8463781 Print psy-(rd|trellis) with more precision in userdata SEI
REVERT: 8ab4907 More formatting fixes in x264 help
REVERT: 16a1fdd Faster 2x2 chroma DC dequant
REVERT: ca95449 Write PASP atom in mp4 muxing Adds container-level aspect ratio support for mp4.
REVERT: bb09908 Fix 2-pass ratecontrol continuation in case of missing statsfile Didn't work properly if MB-tree was enabled.
REVERT: 3461651 Smarter QPRD Catch some cases in which RD checks can be avoided; reduces QPRD RD calls by 10-20%.
REVERT: 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.
REVERT: 698bbac Simplify decimate checks in macroblock_encode Also fix a misleading comment.
REVERT: 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).
REVERT: 08d4a99 Slightly faster predictor_difference_mmxext
REVERT: 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.
REVERT: fcf70c2 Fix regression in r1406 Bitrate was printed incorrectly for some input framerates.
REVERT: 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.
REVERT: 63b74d8 Fix abstraction violations in x264.c No calling application--not even x264cli--should ever look inside x264_t.
REVERT: 2d2c861 Move -D CFLAGS to config.h
REVERT: 3838c30 Fix stat with large file support
REVERT: 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.
REVERT: 38cfabe Fix implicit CBR message to only print when in ABR mode Also make it print outside of debug mode.
REVERT: 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.
REVERT: 6169001 Add config.log support Now, if configure fails, you'll be able to see why.
REVERT: f20aace Fix cross-compiling with lavf, add support for ffms2.pc Also update configure script to work with newest ffms.
REVERT: d81c26d Improve DTS generation, move DTS compression into libx264 This change fixes some cases in which PTS could be less than DTS.
REVERT: 3659b81 Various threading-related cosmetics Simplify a lot of code and remove some unnecessary variables.
REVERT: 0f98524 Hardcode the bs_t in cavlc.c; passing it around is a waste
REVERT: 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).
REVERT: 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.
REVERT: 90a249a Merge nnz_backup with scratch buffer Slightly less memory usage.
REVERT: 20fa784 Use cross-prefix properly with pkg-config for cross-compiling
REVERT: 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.
REVERT: bef4e3e Fix crash on new AMD M300 and similar CPUs Apparently these CPUs have SSE4a, but not misaligned SSE.
REVERT: 6cb6086 Fix intra refresh with subme < 6 Also improve the quality of intra masking.
REVERT: 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.
REVERT: 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.
REVERT: 6662db3 More --me tesa optimizations
REVERT: 7ff6867 Fix typo in configure
REVERT: 1d3ab22 Make --fps force CFR mode
REVERT: 3d0f110 Eliminate intentional array overflow in quant matrix handling While it probably never caused problems, it was incredibly ugly and evil.
REVERT: 918ca1e Faster --me tesa
REVERT: d26e79d Fix static pthreads + dynamically linked x264 on win32 Add the necessary static pthread initialization code to a new DLLmain function.
REVERT: eda7bf0 Add getopt_long to the included getopt.c Fixes option handling on OSs that have a nonworking/missing getopt (e.g. Solaris).
REVERT: ecca2f5 Faster psy-trellis init Remove some unncessary zigzags.
REVERT: f6d92e5 Simplfy intra mode availability handling Slightly faster, 1.5kb smaller binary size, less code.
REVERT: 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.
REVERT: 8466942 Fix x264 compilation on Apple GCC Apple's GCC stupidly ignores the ARM ABI and doesn't give any stack alignment beyond 4.
REVERT: 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%.
REVERT: 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.
REVERT: 1b68cbd Fix some invalid reads caught by valgrind Temporal predictor calculation was misled by invalid reference counts for I-frames.
REVERT: 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.
REVERT: 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.
REVERT: 27355a2 More help typo fixes
REVERT: b9823ca Fix x264_clz on inputs > 1<<31 (though x264 never generates such inputs)
REVERT: 3feaec2 Don't do sum/ssd analysis if weightp == 1 Typo fixes in comments and help.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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
REVERT: 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.
REVERT: ec8e586 Add fast pskip to x264 SEI info header
REVERT: 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.
REVERT: 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.
REVERT: ca1112b Use aliasing-avoidance macros in array_non_zero
REVERT: 77fc510 MMX version of 8x8 interlaced zigzag Just as fast as SSSE3 on Nehalem (and faster on Conroe/Penryn), so remove the SSSE3 version.
REVERT: 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.
REVERT: a8f670b Add more detailed help for presets/tunes/profiles Shows what options they represent.
REVERT: e5faf71 qpel RD no longer needs mbcmp_unaligned
REVERT: 733b660 ensure that all boolean options are {0,1} so they print consistently in the options SEI
REVERT: 528c100 Actually do r1356 Somehow commit r1356 got lost in the ether.  I'm not sure how, but now it's fixed.
REVERT: 4951771 Remove some unused code from x264.c
REVERT: 77d0631 SSSE3 version of zigzag_8x8_field Slightly faster interlaced encoding with 8x8dct. Helps most on Nehalem, somewhat disappointing on Conroe/Penryn.
REVERT: 225d1dc Fix crash in interlaced with >8 refs Crash introduced in weightp.
REVERT: 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.
REVERT: 83bda2e Add x264 prefix to functions with ffmpeg equivalents Not important now, but will be when we add libav* input support.
REVERT: 636f98f 10L in r1353 Broke mp4 output.
REVERT: 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.
REVERT: 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.
REVERT: f3cdc6a Fix bugs in fps/timestamp handling in FLV muxer
REVERT: 626affe Fix bug in weightp analysis Weights weren't reset upon early terminations, so old (wrong) weights could stick around. Small compression improvement.
REVERT: a1705b6 Minor deblocking optimization, update comments
REVERT: 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.
REVERT: 5ddd61b Give more meaningful error if 1st/2nd pass resolution differ
REVERT: 0b0f4a3 Fix extremely rare deadlock with sync-lookahead Patch partially by Anton Mitrofanov.
REVERT: ed04677 Only print weightp stats if there were P-frames
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 4f0a545 Allow compilation with non-Apple GCC on OS X
REVERT: 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.
REVERT: 82b80ef 100l in deadlock fix
REVERT: 6f5f8c0 FLV muxing support
REVERT: e76a4ad Fix rare deadlock introduced in weightp
REVERT: 2a35a01 Actually add -Wno-strict-aliasing to configure
REVERT: 0e706cc Various weightp fixes Make weightp results match in threaded vs non-threaded mode. Fix two-pass with slow-firstpass.
REVERT: 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.
REVERT: b28d98b Fix 10l in weightp on ARM
REVERT: 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.
REVERT: c3e72f6 Fix pixel_ssd on win64 Didn't preserve XMM registers, may or may not have caused problems.
REVERT: af612d7 Fix weightp logfile parsing on MinGW
REVERT: 03639d0 cosmetics
REVERT: 2bedf89 Fix weightp on ARM + PPC No ARM or PPC assembly yet though.
REVERT: 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.
REVERT: 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.
REVERT: 02fe6a5 Fix issues relating to input/output files being pipes/FIFOs
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 028b3ff Fix large file support, broken in r1302
REVERT: 96bad1a Dramatically reduce size of pixel_ssd_* asm functions ~10k of code size eliminated.
REVERT: 678a703 fix bottom-right pixel of lowres planes, which was uninitialized. weirdly, valgrind reported this only with --no-asm.
REVERT: fe83a90 Further reduce code size in bime ~7-8 kilobytes saved, ~0.6% faster subme 9.
REVERT: 5c7133b Fix case in which MB-tree didn't propagate all data correctly Should improve quality in all cases. Also some minor cosmetic improvements.
REVERT: 7016c83 Take into account chroma MV offset during interlaced motion search Small improvement in interlaced compression.
REVERT: d4b7db5 Slightly faster ssse3 width4 chroma MC Cacheline-aware in the same fashion as width8, but not conditional.
REVERT: 40a4708 Eliminate some rare cases where MB-tree gave incorrect results in B-frames Also get rid of some unnecessary memcpies.
REVERT: 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.
REVERT: 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.
REVERT: e361348 Minor CAVLC optimizations
REVERT: ec46ace cosmetics
REVERT: 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.
REVERT: c9d2c06 Various minor CABAC optimizations
REVERT: ece74ca Fix bug in b-pyramid strict Bug caused invalid streams in some situations.
REVERT: b1ad8d0 Remove non-mod16 warning Compression only "suffers" by an extremely marginal amount and too many people misinterpret the warning.
REVERT: b89ca04 Fix two warnings + some minor optimizations
REVERT: ec3b5bf Fix a typo in b-pyramid help And an errant space in common/macroblock.c
REVERT: 3679792 A bit more write-combining in macroblock_cache_load
REVERT: 6169a3f split muxers.c into one file per format simplify internal muxer API
REVERT: bcba15d Update fprofile with the latest change to b-pyramid
REVERT: 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.
REVERT: 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
REVERT: 513abc7 Print more accurate error message if dump_yuv fails
REVERT: cdf623f Reduce memory usage of b-adapt 2 trellis Also fix a minor bug where the algorithm ignored the last frame in the trellis.
REVERT: 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).
REVERT: b826fd5 Add missing free for nal_buffer Fixes a memory leak.
REVERT: 813fe72 sync yasm macros to ffmpeg
REVERT: 7ae3ed9 eliminate some divisions
REVERT: e381f6d Fix glitches with slow-firstpass + weightb + multiref + 2pass Bug in r1277
REVERT: 9045fbe Simplify some code in b-adapt 2's trellis
REVERT: 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.
REVERT: 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.
REVERT: a65d361 Fix regression: disable flash detection without B-frames
REVERT: 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.
REVERT: 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.
REVERT: 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).
REVERT: 60c630c Optimize exp2fix8 Slightly faster and more accurate rounding.
REVERT: 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.
REVERT: fc4926a Fix bug where x264 generated non-compliant bitstreams with insane SAR values
REVERT: 39f6499 rm msvc project files and related ifdefs
REVERT: 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.
REVERT: 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.
REVERT: a88f2d7 Slightly improve non-RD p8x8 mode decision Subpartition costs are effectively zero in CABAC if sub-8x8 search is off.
REVERT: 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!
REVERT: 4f3ad6a Fix typo in ratecontrol_summary
REVERT: 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.
REVERT: 83ca0f2 Fix some issues with 3-pass statsfile handling The value of i_frame during encoder_close was incorrect.
REVERT: a4334d4 Fix ctrl-C termation message with few frames encoded
REVERT: 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.
REVERT: 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.
REVERT: 2b4e823 Allow user-set FPS for inputs other than YUV
REVERT: e8b9dfe Improve threaded frame handling Avoid unnecessary cond_wait
REVERT: 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.
REVERT: c62060d Really fix encoder_close crash this time Not-entirely-fixed in r1253.
REVERT: d166e7f Check for 16x16 partitions masquerading as smaller ones Saves a few bits when using qpel-RD.
REVERT: c49e14f Update config.guess/sub; add Snow Leopard support
REVERT: d52d2db Fix integer overflow in 2-pass VBV Bug caused slight undersizing in 2-pass mode in some cases.
REVERT: 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).
REVERT: 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.
REVERT: c91a3c9 Overhaul syntax in muxers.c/matroska.c The inconsistent syntax in these files has finally come to an end.
REVERT: 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).
REVERT: dd026f2 Add missing fclose for mbtree input statsfile on second pass Bug report by VFRmaniac
REVERT: 8cbb85d Improve progress indicator behavior Progress indicator will now indicate based on output frame, not input frame.
REVERT: b5770ea Update yasm configure check lzcnt apparently requires yasm 0.6.2.
REVERT: 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.
REVERT: 4f6a007 Don't print scenecut message multiple times in verbose mode Occurred mostly with b-adapt 2.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 643cef5 Fix RD early-skip Small quality improvement and speedup, was broken by r1214.
REVERT: 83a033e Faster CAVLC mb header writing for B macroblocks
REVERT: e390cbf Compile fixes for pre-ARMv6T2 and/or PIC
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 2cd0054 Faster me=tesa But it still spends all too much time in me_search_ref rather than asm.
REVERT: 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.
REVERT: bfcb4f6 Fix a valgrind warning in b-adapt 2
REVERT: 35627b6 fix asm symbols for oprofile (regression in r1221)
REVERT: 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.
REVERT: d551106 Fix bug in b16x16 qpel RD Incorrect cost was used to initialize the search.
REVERT: 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.
REVERT: 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.
REVERT: 448b138 Fix keyint=1 + VBV + rc-lookahead
REVERT: 0d8efaa Faster x264_exp2fix8 22->13 cycles on Core 2 with mfpmath=sse
REVERT: ee95ca7 compile x86 with fpmath=sse by default
REVERT: 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.
REVERT: 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.
REVERT: 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
REVERT: 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.
REVERT: dcd9ac9 GSOC merge part 6: ARM NEON quant assembly functions (partial) (de)quant 4x4, (de)quant 8x8, (de)quant DC, coeff_last
REVERT: e695eda GSOC merge part 5: ARM NEON dct assembly functions (i)dct4x4dc, (i)dct4x4, (i)dct8x8, (i)dct_dc, zigzag_scan_frame_4x4
REVERT: 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
REVERT: 8a84fd9 GSOC merge part 3: ARM NEON pixel assembly functions SAD, SADX3/X4, SSD, SATD, SA8D, Hadamard_AC, VAR, VAR2, SSIM
REVERT: 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.
REVERT: 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).
REVERT: d0ee6f8 Fix bug in calculation of I-frame costs with AQ.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: d345ab0 Fix MB-tree with keyint<3 Also slightly improve VBV keyint handling.
REVERT: 5e9ae4c Fix bug in VBV lookahead + no MB-tree I-frames need to have VBV lookahead run on them as well.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 42d6b17 new API function x264_encoder_delayed_frames. fix x264cli on streams whose total length is less than the encoder latency.
REVERT: 62df17e Add no-mbtree to fprofile (and fix pyramid in fprofile)
REVERT: 7f8aa6f Don't print a warning about direct=auto in 2pass when B-frames are off
REVERT: 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.
REVERT: 9a54c48 simd part of x264_macroblock_tree_propagate. 1.6x faster on conroe.
REVERT: 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.
REVERT: 3b047a2 Add missing free()s for new data allocated for MB-tree Eliminates a memory leak.
REVERT: 6f4054f Fix keyframe insertion with MB-tree and no B-frames
REVERT: 21a3835 Fix MP4 output (bug in malloc checking patch)
REVERT: 7139b08 Gracefully terminate in the case of a malloc failure Fuzz tests show that all mallocs appear to be checked correctly now.
REVERT: 71506ae Fix a potential infinite loop in QPfile parsing on Windows ftell doesn't seem to work properly on Windows in text mode.
REVERT: cb0b71f Fix delay calculation with multiple threads Delay frames for threading don't actually count as part of lookahead.
REVERT: a1ed468 Add "veryslow" preset Apparently some people are actually *using* placebo, so I've added this preset to bridge the gap.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 97ed270 Update help and cleanup in ratecontrol.c Deal with some out-of-date information.
REVERT: 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
REVERT: 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.
REVERT: d6eed01 Add "fastdecode" tune option It does what it says it does.
REVERT: 43773d2 Fix two bugs in QPRD fprofile settings now actually fprofile QPRD. Don't use i_mbrd before initializing it.
REVERT: 9d0b5e9 Fix 10l in QPRD Trellis used wrong lambda with trellis=1
REVERT: 4074956 Fix a nondeterminism with threads and subme>7 Also add a few more checks to eliminate the need for spel_border.
REVERT: 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.
REVERT: 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.
REVERT: 2956905 shut up valgrind warnings in trellis
REVERT: 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.
REVERT: f21daff Cacheline-split SSSE3 chroma MC ~70% faster chroma MC on 32-bit Conroe Also slightly faster SSSE3 intra_sad_8x8c
REVERT: 6c13403 Improve documentation of qp/crf options
REVERT: 49bf767 Merge array_non_zero into zigzag_sub Faster lossless, cleaner code. SSSE3 version of zigzag_sub_4x4_field, faster lossless interlaced coding.
REVERT: b63f591 Fix bug in reference frame autoadjustment For some types of input file, x264 did the adjustment before width/height were known.
REVERT: 96e2229 Fix fprofile settings to match changes in defaults Also add b-adapt 2 to fprofile.
REVERT: 3f6713d Slightly faster dequant_flat assembly Eliminate some redundant shifts.
REVERT: 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.
REVERT: 72534d4 Update Gabriel's email address in AUTHORS
REVERT: 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.
REVERT: 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.
REVERT: f6d3166 Add subpartition cost for sub-8x8 blocks Improves sub-p8x8 mode decision.
REVERT: b484fe1 Yet more CABAC and CAVLC optimizations Also clean up a lot of pointless code duplication in CAVLC MV coding.
REVERT: 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.
REVERT: 364d7df AltiVec version of frame_init_lowres_core. 22.4x faster than C on PPC7450 and 25x on PPC970MP.
REVERT: ab85c9b MMX CABAC mvd sum calculation Faster CABAC mvd coding.
REVERT: 803c9d9 Faster MV prediction Smaller code size, plus I get to use goto.
REVERT: 6199685 Fix potential crash in checkasm ssim_end4_sse2 requires aligned sums
REVERT: b555e3f SSSE3, faster SSE2/MMX integral_init4v The real reason I wrote this was an excuse to use shufpd.
REVERT: 6841c5e configure check for uclinux
REVERT: a952697 fix a crash on frame width <= 48 pixels
REVERT: 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.
REVERT: f7bfcfa a better way to keep track of mv candidates. 2-4% faster dia, hex, and umh.
REVERT: 8572d51 reorder some motion estimation patterns. this change is useless on its own, but segregates the bitstream-changing part out of my next optimization.
REVERT: 79377d7 Fix VBV warning broken in r915 x264 will now correctly warn about maxrate specified without bufsize even when a level is not set.
REVERT: 3da3f95 configure check for ssse3-capable binutils
REVERT: a2c01c1 Fix 10L in r1155 Broke --me esa/tesa due to forgetting to add handling for x264_cost_mv_fpel.
REVERT: 37241b8 Fix bug where satd was incorrectly used with subme<=1 Faster subme<=1 with i4x4 enabled.
REVERT: be17f03 Remove some pointless error handling code in cabac/cavlc
REVERT: b6470f0 Save some memory on mv cost arrays Have quantizers that use the same lambda share the same cost array.
REVERT: 83d2c12 Various CABAC and CAVLC optimizations Backport CAVLC partial-inlining early termination to CABAC (~2-4% faster CABAC residual coding)
REVERT: 7b6ce6a fix a race condition at the end of thread_input
REVERT: fb4e284 Various trellis speed optimizations
REVERT: e86a173 Make i686 the default arch on x86_32 Disabling asm will default to a generic arch. Also fix configure for gcc 4.4.
REVERT: 0e05066 Faster signed golomb coding 3% faster CAVLC RDO and bitstream writing.
REVERT: 3b80f23 Faster spatial direct MV prediction unroll/tweak col_zero_flag
REVERT: 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.
REVERT: f526f24 Various optimizations in frametype lookahead
REVERT: 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.
REVERT: d2e1e1c fix "incompatible types in initialization" compilation issues with GCC 4.3 (which is stricter than previous compiler version)
REVERT: 4fc8c03 fix conversions between vectors with differing element types or numbers of subparts errors
REVERT: 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.
REVERT: a908c88 Enable asm predict_8x8_filter I'm not entirely sure how this snuck its way out of holger's intra pred patch.
REVERT: c74726e Remove various bits of dead code found by CLANG.
REVERT: 37424f8 Slightly faster SSE4 SA8D, SSE4 Hadamard_AC, SSE2 SSIM shufps is the most underrated SSE instruction on x86.
REVERT: 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.
REVERT: fe11a6f CAVLC optimizations faster bs_write_te, port CABAC context selection optimization to CAVLC.
REVERT: 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.
REVERT: 3f9ba82 Activate intra_sad_x3_8x8c in lookahead
REVERT: 9d0c378 MBAFF interlaced coding is not allowed in baseline profile
REVERT: b8808bf intra_sad_x3_8x8 assembly
REVERT: 8df40a4 intra_sad_x3_4x4 assembly
REVERT: d39f8ae intra_sad_x3_8x8c assembly Also fix intra_sad_x3_16x16's use of "n" as a loop variable (broke SWAP)
REVERT: d3ca464 Shave one instruction off CABAC encode_decision range_lps>>6 ranges from 4-7, so (range_lps>>6)-4 == (range_lps>>6) & 3
REVERT: 8475977 Faster probe_skip Add a second chroma threshold after the DC transform.
REVERT: c109c8e Add missing "static" qualifier to two arrays Should slightly improve performance.
REVERT: 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.
REVERT: 8d82fec Faster integral_init palignr to avoid unaligned loads is worth it in inith, but not initv.
REVERT: 96733ab Faster SSSE3 hpel_filter_v ~10% faster hpel_filter on 64-bit Penryn. 32-bit version by Jason Garrett-Glaser.
REVERT: 10d6ef0 Faster SSE2 pixel_var Optimized using the DEINTB method from r1122.  ~32% faster var_16x16 on Conroe.
REVERT: 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
REVERT: 3d78062 Update some asm copyright headers
REVERT: 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.
REVERT: f387217 Update x264 copyright date
REVERT: 8544346 Remove pre-scenecut from fprofile commands as well Also add psy-trellis to fprofile
REVERT: 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.
REVERT: 1cc16dc Fix scenecut and VBV with videos of width/height <= 32 Also remove an unused variable
REVERT: 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.
REVERT: 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
REVERT: 11863ac Fix regression in r1085 Deblocking was very slightly incorrect with partitions=all. Bug found by BugMaster.
REVERT: a933a3e Optimize neighbor CBP calculation and fix related regression r1105 introduced array overflow in cbp handling
REVERT: cc4f807 Show FPS when importing a raw YUV file
REVERT: f43e22a Windows 64-bit support A "make distclean" is probably required after updating to this revision.
REVERT: d56e13f Minor fixes and cosmetics Suppress a GCC warning, fix a non-problematic array overflow, one REP->REP_RET.
REVERT: 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 )
REVERT: 75b495f Spare a vec_perm and a vec_mergeh though using a LUT of permutation vectors.
REVERT: 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).
REVERT: b5b9728 Fix 10L in intra pred Forgetting a %define resulted in SIGILL on 32-bit systems without SSE (e.g. Athlon XP).
REVERT: 0ee50db Add decimation in i16x16 blocks Up to +0.04db with CAVLC, generally a lot less with CABAC.
REVERT: 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.
REVERT: 3927938 Faster coeff_last64 on 32-bit
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 122a54a0 10l: fix compilation with GCC 4.3+
REVERT: 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.
REVERT: 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.
REVERT: 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
REVERT: 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.
REVERT: 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...
REVERT: c9095eb fix detection of pthread and isfinite on OpenBSD
REVERT: 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
REVERT: 60f4cd8 1.6x faster satd_c (and sa8d and hadamard_ac) with pseudo-simd. 60KB smaller binary.
REVERT: 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.
REVERT: 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.
REVERT: 355c445 add AltiVec implementation of x264_mc_copy_w16_aligned
REVERT: 71ac0a3 add AltiVec implementation of x264_pixel_var_16x16 and x264_pixel_var_8x8
REVERT: 1959672 add AltiVec 16 <-> 32 bits conversions macros
REVERT: 39a2796 Replace 16x16=>32 mul + pack + add by a simple 16x16=>16 multiply-add. Suggested by Loren.
REVERT: 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.
REVERT: a48d1d0 Add AltiVec and CPU numbers detection on OpenBSD.
REVERT: 09e76c9 Add AltiVec implementation of predict_8x8c_p. 2.6x faster than scalar C.
REVERT: 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.
REVERT: 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.
REVERT: 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.)
REVERT: d2b6423 rename vector+array unions to closer match the vector typedefs names.
REVERT: 264e447 Add Altivec implementation of all the remaining 16x16 predict routines.
REVERT: 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
REVERT: 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>.
REVERT: 7c4f829 Remove an IDIV from i8x8 analysis Only one IDIV is left in macroblock level code (transform_rd)
REVERT: 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.
REVERT: 6a4a9be Disable B-frames in lossless mode They hurt compression anyways, and direct auto was bugged with lossless.
REVERT: f586ba5 Factorize in ppccommon.h the conditional inclusion of altivec.h on Linux systems.
REVERT: 87b6d55 Disable __builtin_clz() intrinsic on gcc versions prior to 3.4. The function did not exist before that version.
REVERT: 6f7c9be Small tweaks to coeff asm Factor out a few redundant pxors Related cosmetics
REVERT: ed32ad2 Use the correct strtok under MSVC Also change one malloc -> x264_malloc
REVERT: 390d26a Add stack alignment for lookahead functions Should allow libx264 to be called from non-gcc-compiled applications without adding force_align_arg_pointer.
REVERT: 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.
REVERT: 045ae40 factor mallocs out of hpel, ssim, and esa. there should now be no memory allocation outside of init-time.
REVERT: 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.
REVERT: 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
REVERT: 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.
REVERT: 40ad1b6 VLC table optimizations Slightly reorganize VLC tables for ~2% faster block_residual_write_cavlc. Also a small optimization in p8x8 CAVLC.
REVERT: 839cd8c Fix crash in --me esa/tesa introduced in r1058 Also suppress the last mingw warning message
REVERT: 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)
REVERT: 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
REVERT: a4ec102 faster ESA init reduce memory if using ESA and not p4x4
REVERT: 5f8a149 More macroblock_cache optimizations Patch partially by Loren Merritt
REVERT: e59ee24 Faster macroblock_cache_rect Explicit loop unrolling
REVERT: 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.
REVERT: 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.
REVERT: 9089d21 Add support for FSF GCC version >= 4.3 on OSX. So far, only Apple GCC version was supported.
REVERT: ad2c84f More accurate refcost for p8x8 CAVLC Slightly better quality, especially in non-RD mode, with CAVLC.
REVERT: 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.
REVERT: 877d22e Suppress saveptr warnings on Windows GCC
REVERT: 0fdd040 More small speed tweaks to macroblock.c
REVERT: 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.
REVERT: f773bf0 fix compilation with GCC-4.3+
REVERT: 71d34b4 High Profile allows 25% higher maxbitrate/cpb Correct level detection to take this into account.
REVERT: cc40e30 s/nasm/yasm in VS project file
REVERT: 6c3e025 Cosmetic: update various file headers.
REVERT: 2f031b0 add date and compiler to `x264 --version`
REVERT: 5df2a71 10L in r1041
REVERT: 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.
REVERT: 1591275 dequant_4x4_dc assembly About 3.5x faster DC dequant on Conroe
REVERT: 2338e13 fix an overflow in dct4x4dc_mmx (unlikely to have occurred in any real video)
REVERT: 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.
REVERT: 0fe9b85 Fix rare warning messages in ratecontrol due to r1020
REVERT: adffb7f Fix MSVC compilation and clean up MSVC build file Remove Release64 which never worked anyways.
REVERT: 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.
REVERT: cab23dd fix indentation, whitespace cleanup, more consistent indentation of macro backslashes
REVERT: 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.
REVERT: 8215f79 refactor satd. 20KB smaller binary. refactor sa8d. slightly faster. more checkasm for hadamard.
REVERT: 3a028c8 Fix crash with threads and SSEMisalign on Phenom Misalign mask needed to be set separately for each encoding thread.
REVERT: 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.
REVERT: cb3c213 A few tweaks to decimate asm A little bit faster on both 32-bit and 64-bit
REVERT: 83baa7f Nehalem optimization part 2: SSE2 width-8 SAD Helps a bit on Phenom as well ~25% faster width8 multiSAD on Nehalem
REVERT: aa14719 Add subme=0 (fullpel motion estimation only) Only for experimental purposes and ultra-fast encoding.  Probably not a good idea for firstpass.
REVERT: 745a48b Fix minor memory leak in r1022
REVERT: fdb6114d r1024 borked checkasm Remove idct/dct2x2 from checkasm as they are no longer in dctf
REVERT: 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.
REVERT: 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
REVERT: 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.
REVERT: 852579b Faster CABAC residual encoding 6% faster block_residual_write_cabac in RD mode.
REVERT: 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).
REVERT: 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%.
REVERT: 41b8069 Fix potential infinite loop in VBV under GCC 4.2
REVERT: e4c4568 Encoder_reconfig: esa/tesa can only be enabled if they were on to begin with Bug report by kemuri-_9.
REVERT: dbc5ef0 Fix bug in hadamard_ac SSE assembly Some extreme inputs could cause overflows.
REVERT: 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.
REVERT: 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
REVERT: d7df1a4 Replace "git-command" with "git command" in version.sh for git 1.6 support
REVERT: 990274c Add assembly version of CAVLC 8x8dct interleave Faster CAVLC encoding and RDO with 8x8dct
REVERT: 86a0fe5 Add support for psy-rd/trellis to encoder_reconfig
REVERT: 4c78f09 Fix Darwin speed regression
REVERT: 8ca555e Further improve prediction of bitrate and VBV in threaded mode
REVERT: 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.
REVERT: d0add77 Faster qpel-RD 3-4% faster qpel-RD; avoid re-checking bmv/pmv during the hex search.
REVERT: f451563 Some minor optimizations in RD refinement Don't write b subpartition in CABAC RDO Calculate nonzero count in i4x4 CAVLC RDO
REVERT: 84ede33 Faster deblocking when p4x4 isn't used Most of the MV checks can be skipped, resulting in faster strength calculation
REVERT: ce0b110 Print profile and level information upon starting encode Previously level was only printed as part of autodetect, and only in verbose mode.
REVERT: 296b39d Fix possible crash in trellis at very low QPs
REVERT: f5da811 Add assembly versions of decimate_score 3-7x faster decimation, 1-3% faster overall
REVERT: 6d9ef8a Fix typo in subme8/9 lossless qpel-RD Slightly improves compression.
REVERT: 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.
REVERT: 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.
REVERT: 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.
REVERT: 65b837f Fix minor memory leak accidentally added with the addition of b-adapt 2
REVERT: 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.
REVERT: 2324c70 Fix potential miscompilation of some inline asm Caused problems under some gcc 4.x versions with predictive lossless
REVERT: 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.
REVERT: 37269f4 Fix typo in progress indicator when using piped input
REVERT: e21b11f avg_weight_ssse3
REVERT: 972814a fix bitstream writer on bigendian 64bit (regression in r903)
REVERT: 7265a21 remove authors whose code no longer exists
REVERT: 4873401 more diagnostics when configure finds an unsuitable assembler
REVERT: 41c9e22 Make x264 progress indicator more concise Now the % indicator should be readable on the header of a minimized window on Windows systems.
REVERT: 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.
REVERT: 24961b0 Resolve possible crash in bime, improve the fix in r985
REVERT: e256ea1 Fix rare crash issue in b-adapt Regression *probably* in r979
REVERT: 36223ea Merging Holger's GSOC branch part 1: hpel_filter speedups
REVERT: b4b6483 r980 borked weighted bime
REVERT: 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.
REVERT: 9e319ff Merge avg and avg_weight avg_weight no longer has to be special-cased in the code; faster weightb
REVERT: 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
REVERT: 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.
REVERT: dcb123f Add missing free() for f_qp_offset in frame.c
REVERT: 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.
REVERT: 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.
REVERT: 90220ef Use correct format specifier for uint64_t
REVERT: 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.
REVERT: f473669 Fix regression in b-adapt patch: encoder_open failed for multipass encodes without bframes.
REVERT: cbdaeb0 Stop SAR in y4m input from overriding --sar on commandline
REVERT: 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
REVERT: 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.
REVERT: 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).
REVERT: 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!
REVERT: 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.
REVERT: 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.
REVERT: 3d2983d Revert part of r963 In some rare (but significant) cases, the optimized nal_encode algorithm gave incorrect results.
REVERT: e48a952 Predict 4x4_DC asm Also remove 5-year-old unnecessary #define that reduced speed unnecessarily under MSVC-compiled builds
REVERT: d21665d Faster NAL unit encoding and remove unused nal_decode Small speedup at very high bitrates
REVERT: e0d7f9e CAVLC cleanup and optimizations Also move some small functions in macroblock.c to a .h file so they can be inlined.
REVERT: 954117a Faster avg_weight assembly Unrolling the loop a bit improves performance
REVERT: 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.
REVERT: b0c599b Add merged SAD for i16x16 analysis Roughly 30% faster i16x16 analysis under subme=1
REVERT: 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.
REVERT: 7ce0f2c Improve progress indicator Show average bitrate so far during encoding Decrease update interval for longer encodes (max of 10 frames encoded between updates)
REVERT: 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.
REVERT: d4265bb zigzag asm
REVERT: 6b33ca9 fix SOFLAGS used when building gtk frontend patch by Markus Kanet %darkvision A gmx P eu%
REVERT: 3727f2b remove the distinction between itex and ptex (changes 2pass statsfile format)
REVERT: 0886318 hardcode the ratecontrol equation, and remove the rceq option
REVERT: 445d87e Fix some uses of uninitialized row_satd values in VBV Resolves some issues with QP51 in I-frames with scenecut
REVERT: 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.
REVERT: 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.
REVERT: 9d4d168 improve generation of Darwin libraries Patch by vmrsss %vmrsss A gmail P com%
REVERT: 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.
REVERT: e3a0622 shut up various gcc warnings
REVERT: 82efeea fix a crash with invalid args and --thread-input (introduced in r921)
REVERT: 36caec4 drop support for x86_32 PIC.
REVERT: bff4dba use permute macros in satd move some more shared macros to x264util.asm
REVERT: fd5cc6d cosmetics
REVERT: ae8da3e r940 broke threads
REVERT: 2cdc944 Cleanups in macroblock_cache_save/load A bit more loop unrolling, and moving some constant code to the global init function
REVERT: bae10fe Deblocking code cleanup and cosmetics Convert the style of the deblocking code to the standard x264 style Eliminate some trailing whitespace
REVERT: 9881ffd 4% faster deblock: special-case macroblock edges Along with a bit of related code reorganization and macroification
REVERT: d994e0b Add dedicated variance function instead of using SAD+SSD Faster variance calculation
REVERT: 7c35ae4 6% faster deblock: remove some clips, earlier termiantion on low qps.
REVERT: c6456de Faster deblocking Early termination for bS=0, alpha=0, beta=0 Refactoring, various other optimizations About 30% faster deblocking overall.
REVERT: fd1de69 asm cosmetics
REVERT: 4b24e98 yet another posix-emulating define on solaris
REVERT: ad47d25 update msvc projectfile
REVERT: 26600fe drop support for msvc6
REVERT: 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.
REVERT: 245833c Improve subme7 at low QPs and add subme7 support in lossless mode
REVERT: 4816918 cosmetics: merge x86inc*.asm
REVERT: d1fe093 Add missing x264util.asm
REVERT: e5eeedc Basic sanity checking of qpmax/qpmin options
REVERT: 9e864aa Fix regression in r922 set the chroma DC coefficients to zero for residual coding in qpel-rd fix C99ism
REVERT: c51c761 Refactor asm macros part 2: DCT
REVERT: 90b30e6 Refactor asm macros part 1: DCT
REVERT: 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
REVERT: c761eb0 Fix a few more minor memleaks
REVERT: 8c8acae stats summary: print distribution of numbers of consecutive B-frames
REVERT: cf466eb add interlacing to the list of stuff checked by x264_validate_levels
REVERT: 91fe97b Fix C99-ism in r907
REVERT: 244f9be Faster temporal predictor calculation Split into a separate commit because this changes rounding, and thus changes output slightly.
REVERT: aa0e627 Align lowres planes for improved cacheline split performance
REVERT: 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.
REVERT: fee2f2c fix bs_write_ue_big for values >= 0x10000. (no immediate effect, since nothing writes such values yet)
REVERT: 64848ff Fix lossless mode borked in r901
REVERT: 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.
REVERT: 8a440db Limit MVrange correctly in interlaced mode Bug report by Sigma Designs, Inc.
REVERT: 0976ead Fix bug with PCM and adaptive quantization In rare cases CABAC desync could occur, causing bitstream corruption
REVERT: 21ee122 Fix memory leak upon x264 closing Doesn't affect the CLI, but potentially important for programs which call x264 as a shared library.
REVERT: 8cd5d60 Fix compilation on PPC systems (borked in r903) Bigendian systems didn't have endian_fix32 defined
REVERT: 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.
REVERT: 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.
REVERT: ca9c628 de-duplicate vlc tables
REVERT: 3d2b000 faster ue/se/te write
REVERT: 8951797 faster bs_write
REVERT: 58ffd4e cosmetics in ssd asm
REVERT: 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
REVERT: 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.
REVERT: f8428ed Update my email address
REVERT: 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
REVERT: 79bd599 denoise_dct asm
REVERT: 65df9eb cosmetics in permutation macros SWAP can now take mmregs directly, rather than just their numbers
REVERT: 16b8f79 Fix bug in adaptive quantization In some cases adaptive quantization did not correctly calculate the variance. Bug reported by MasterNobody
REVERT: 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.
REVERT: 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.
REVERT: ad1d7a4 some asm functions require aligned stack. disable these when compiling with msvc/icc.
REVERT: 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.
REVERT: 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
REVERT: 2c59717 mc_chroma_sse2/ssse3
REVERT: cb29306 checkasm --bench=function_name
REVERT: 22d3c04 interleave psnr/ssim computation with reference frame filtering, to improve cache coherency
REVERT: 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.
REVERT: 63657b5 Use aligned memcpy for x264_me_t struct and cosmetics
REVERT: 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.
REVERT: cfaac5c Fix regression in 64-bit in r882 i_mvc needs to be 64-bit when used with a 64-bit memory pointer
REVERT: 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.
REVERT: 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.
REVERT: 2389de2 Fix regression in r850 Bug resulted in rare incorrect chroma encoding
REVERT: 3464b0e Cosmetics in VBV handling
REVERT: a95ecfd Tweaks and cosmetics in me.c Use write-combining for predictor checking and other tweaks.
REVERT: c74a8e2 Partially inline trellis quantization Inlining trellis into the 4x4/8x8 trellis wrappers increases trellis speed by about 5-10% through constant propagation.
REVERT: 82ea3a4 Various cosmetic changes.
REVERT: 8a74b3f avg_weight_sse2
REVERT: 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).
REVERT: 2998b17 enable ssse3 phadd satd on Penryn.
REVERT: 0591b7a benchmark most of the asm functions (checkasm --bench).
REVERT: 100d067 Cosmetic: fix C99-ism
REVERT: 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.
REVERT: ea2648b cosmetics
REVERT: 601b46e nasm compatible NX stack
REVERT: c4c85ba CQP is incompatible with AQ
REVERT: ba3ac82 memzero_aligned_mmx
REVERT: 02a04f2 binmode stdin on mingw, not just msvc
REVERT: f88d094 omit redundant mc after non-rdo dct size decision, and in b-direct rdo
REVERT: 9a9d39a allow fractional CRF values with AQ.
REVERT: 26088fc fix some uninitialized partitions in rdo
REVERT: 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.
REVERT: 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).
REVERT: ce13bb6 fix a crash on win32 with threads. r852 introduced an assumption in deblock that the stack is aligned.
REVERT: 0903472 remove nasm version check. a feature check is all that's needed. silence stderr in yasm version check.
REVERT: d86d4bd cosmetics in cabac
REVERT: bd6ce40 faster residual_write_cabac
REVERT: 5c25793 change DEBUG_DUMP_FRAME to run-time --dump-yuv
REVERT: a50d364 x264_median_mv_mmxext this is the first non-runtime-detected use of mmxext, but it has to be inlined
REVERT: 6f74cfa factor duplicated code out of deblock chroma mmx
REVERT: 1451b12 deblock_luma_intra_mmx
REVERT: e11ef38 write aspect ratio in mp4
REVERT: 18a1d7e omit delta_quant in i16x16 blocks with no residual (all other block types were already covered, but i16x16 cbp is special)
REVERT: 911904c explicit write combining, because gcc fails at optimizing consecutive memory accesses
REVERT: b907329 force unroll macroblock_load_pic_pointers and a few other minor optimizations
REVERT: 76c9f3d quant_2x2_dc_ssse3
REVERT: fcee08a r836 borked lossless cabac nnz
REVERT: 9386865 use elf instead of a.out on netbsd
REVERT: ee0c7dc fix x264_realloc when not using libc realloc.
REVERT: 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.
REVERT: 97fc930 cosmetics: replace last instances of parm# asm macros with r#
REVERT: 1b75bd4 remove DEBUG_BENCHMARK
REVERT: b55625d faster probe_skip
REVERT: 27c3071 drop support for pre-SSE3 assemblers
REVERT: 8ce08be s/x264_cpu_restore/x264_emms/ no point in giving it a generic name when it's not generic
REVERT: 45cc42c faster cabac_mb_cbp_luma ported from ffmpeg
REVERT: 5dae513 remove some redundant nnz counts move some nnz counts from macroblock_encode to cavlc if cabac doesn't need them
REVERT: a9057b5 compute missing nnz count in subme7 cavlc
REVERT: 5a562eb remove a division in macroblock-level bookkeeping
REVERT: 2b3d65e omit P/B-skip mc from macroblock_encode if the pixels haven't been overwritten since probe_skip
REVERT: 2f75bcc earlier termination in SEA if mvcost exceeds residual
REVERT: 971301a remove void* arithmetic from r821
REVERT: 5ca01b3 Fix define of illegal function identifiers (as defined in section "7.1.3 Reserved identiers" of C99 spec)
REVERT: 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
REVERT: ee95c7f more consistent include name (in line with other PPC includes)
REVERT: 29ae7d1 fix illegal identifiers in multiple inclusion guards patch by Diego Biurrun % diego A biurrun P de %
REVERT: 138601d AQ now treats perfectly flat blocks as low energy, rather than retaining previous block's QP. fixes occasional blocking in fades.
REVERT: 15f3190 checkasm cabac
REVERT: f892ee1 s/movdqa/movaps/g
REVERT: d940f6e --asm to allow testing of different versions of asm without recompile
REVERT: 9b52ed5 copy left neighbor pixels directly from previous mb instead of main plane
REVERT: 44361e9 cacheline split workaround for mc_luma
REVERT: 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 %
REVERT: 0414d78 more hpel fixes
REVERT: d4b7d2b update msvc projectfile
REVERT: 6917276 r810 borked hpel_filter_sse2 on unaligned buffers
REVERT: 761630d threads=auto on multicore now implies thread input, just like explicit thread numbers already did
REVERT: c9a928b dct4 sse2
REVERT: b32dacb faster x86_32 dct8
REVERT: a7eec58 macros to deal with macros that permute their arguments
REVERT: 0feb9f1 mmx cachesplit sad of non-square sizes checked height instead of width
REVERT: 9f0db01 sfence after nontemporal stores
REVERT: 2487cdf simplify hpel filter asm (move control flow to C) and add sse2, ssse3 versions
REVERT: 5cc926a more mmx/xmm macros (mova, movu, movh)
REVERT: 6cf65da improve handling of cavlc dct coef overflows support large coefs in high profile, and clip to allowed range in baseline/main
REVERT: 08b5132 fix shared libs on MacOSX based on a patch by İsmail Dönmez
REVERT: 457ce6a typo in r803
REVERT: decfd7b fix a crash on mp4 muxing with invalid params
REVERT: dc4f40c variance-based psy adaptive quantization new options: --aq-mode --aq-strength AQ is enabled by default
REVERT: ae3d8b1 fix naming of .dll on mingw
REVERT: a09f8f5 don't distinguish between mingw and cygwin
REVERT: 73cfc9e remove a memset
REVERT: 3239082 typo. don't evaluate rd pskip when p16x16 found ref>0.
REVERT: bd0d9a5 r784 borked lossless dc zigzag
REVERT: 17e5dac fix an arithmetic overflow that disabled SEA threshold after finding a mv with SAD < mvcost.
REVERT: 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 %
REVERT: 5e0e058 faster residual
REVERT: 261873e nasm doesn't like align(nop) in structs
REVERT: 4b18012 reduce the size of some cabac arrays
REVERT: e403fe9 use cabac context transition table from trellis in normal residual coding too
REVERT: 6ae3355 rearrange cabac struct to reduce code size
REVERT: 7255f68 higher precision RD lambda improves quality at QP<=12.
REVERT: 1035c63 faster cabac_encode_ue_bypass
REVERT: bf9bf7a cabac asm. mostly because gcc refuses to use cmov. 28% faster than c on core2, 11% on k8, 6% on p4.
REVERT: 3687987 cosmetics in cabac
REVERT: d4f9f60 inline cabac_size_decision
REVERT: aa5391a cosmetics in DECLARE_ALIGNED
REVERT: 192768d don't distinguish between luma4x4 and luma4x4ac
REVERT: 36fe32a faster lossless zigzag
REVERT: 170f57b more alignment
REVERT: 9bdc256 add tesa and lossless to fprofile
REVERT: 5a66f30 cosmetics in residual_write
REVERT: 571dda6 remove unused bitstream reader
REVERT: 5d47436 cosmetics in quant asm
REVERT: afba69a special case dequant for flat matrix
REVERT: 02e6102 faster dequant
REVERT: e8448ff simplify hpel_filter_c
REVERT: 32fb497 use x264_mc_copy_w16_sse2 in mc.copy, it was previously only in mc_luma
REVERT: adfab36 new ssd_8x*_sse2 align ssd_16x*_sse2 unroll ssd_4x*_mmx
REVERT: e1d815e update altivec zigzags
REVERT: 2be14de r768 borked cavlc
REVERT: b6a966a cosmetics in intra predict
REVERT: 67a130f faster intra predict 8x8 hu/hd
REVERT: 3f48ce7 reduce zigzag arrays from int to int16_t
REVERT: 84452e5 reduce the size of some arrays
REVERT: 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
REVERT: 123f29a cosmetics in asm
REVERT: 1df5f84 satd_4x4_ssse3
REVERT: dcf2604 get_ref_sse2
REVERT: 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.
REVERT: 1fc702f remove remaining reference to clip1.h
REVERT: 4c02055 fix name mangling again. apparently it's not just a convention, dll build fails if you try to export a non-prefixed name.
REVERT: 5774122 update msvc projectfile
REVERT: 018a6e0 missing #ifdef HAVE_SSE3
REVERT: 205d011 don't define offsetof since it's standard
REVERT: 4d9499b shut up gcc warning in offsetof
REVERT: 2c8600e increase alignment of mv arrays
REVERT: 91991ba memcpy_aligned_sse2
REVERT: ede2a6e checkasm check whether callee-saved regs are correctly saved x86_32 only for now since x86_64 varargs are annoying
REVERT: 357ab33 fix x86_32 ads which failed to preserve a register
REVERT: 5862a17 fix some name mangling issues introduced by the merge
REVERT: dafc72c remove x264_mc_clip1. it's wrong for sufficiently perverse inputs, and clip_uint8 is faster anyway.
REVERT: c4680ac merge x86_32 and x86_64 asm, with macros to abstract calling convention and register names
REVERT: 096b390 git compatible version script
REVERT: 397d1bf check for broken versions of yasm
REVERT: 6e55e8a increase the alignment of the i8x8 edge cache, needed for sse2 intra prediction. patch by Alexander Strange.
REVERT: 233a760 .gitignore
REVERT: 1cce7bb pic macros now keep track of which register holds the GOT, so variable access doesn't have to care
REVERT: 01d7b8a remove x86_64 predict_8x8_ddl_mmxext because sse2 is faster even on amd
REVERT: bce7d0f cosmetics in dsp init
REVERT: e4059f8 sse2 16x16 intra pred. port the remaining intra pred functions from x86_64 to x86_32. patch by Dark Shikari.
REVERT: 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.
REVERT: 9da2fac faster array_non_zero
REVERT: c32cac2 x86_32 sse2 idct8 ported from ffmpeg by Dark Shikari
REVERT: 8f32196 checkasm: relax the threshold for floating-point ssim
REVERT: 56fca1c checkasm: test idct with the range of coefficients what can really be encountered, as opposed to random numbers which might overflow.
REVERT: 641416d intra_rd_refine in B-frames
REVERT: d4d76b9 print average of macroblock QPs instead of frame's nominal QP
REVERT: ebdc49f update date
REVERT: efeb097 remove colorspace conversion support, because it has no business in any codec
REVERT: c1940b9 misc fixes in checkasm
REVERT: ea9eaa7 remove a useless bit of me=umh (originally copied from JM, where it was used for something)
REVERT: a93d7bf fix a memleak in cqm
REVERT: 6f9cb0d fix a memleak in mkv muxer patch by saintdev
REVERT: fa58b84 satd exhaustive motion search (--me tesa)
REVERT: 2c437ce fix cabac context for nonzero delta_qp of the 2nd mb of a frame in interlaced mode
REVERT: c111a8e fix mapping of mvs to partitions in p4x4_chroma patch by Noboru Asai
REVERT: 3ef36bc fix mvp for b16x8 and b8x16 L1 search patch by Wei-Yin Chen
REVERT: 47ea39d shave a couple cycles off cabac functions
REVERT: 6cbea64 faster and smaller x264_macroblock_cache_mv etc
REVERT: 573314c configure test for endianness
REVERT: 41d021e change the meaning of --ref: it now selects DPB size (including B-frames), rather than L0 size (which B-frames are added to)
REVERT: 5d3a62a add / fix support for FreeBSD, based on a patch by Igor Mozolevsky % igor A hybrid-lab P co P uk %
REVERT: 85d88a4 shut up some valgrind warnings
REVERT: 810c096 slightly wrong memory allocation in r717, fixes a potential crash with merange>32
REVERT: 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.)
REVERT: 9f38e60 round esa range to a multiple of 4
REVERT: 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)
REVERT: 96a5959 tweak x264_pixel_sad_x4_16x16_sse2 horizontal sum. 168 -> 166 cycles on core2.
REVERT: 22fbdf3 fix a nondeterminism involving 8x8dct, rdo, and threads.
REVERT: 0d0bbed also test arch-specific x264_zigzag_* implementations in checkasm.c patch by Patch by Noboru Asai % noboru P asai A gmail P com%
REVERT: 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%
REVERT: 795c3c1 adds AliVec implementation of predict_16x16_p() over 4x faster than C version
REVERT: 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.
REVERT: 2eb91cc mark asm functions as hidden
REVERT: b21b675 check whether ld supports -Bsymbolic before using it
REVERT: cda2dea reduce the data type used in some tables. 16KB smaller exe.
REVERT: 4b199a9 faster removal of duplicate mv predictors
REVERT: f72092d avoid a division in x264_mb_predict_mv_ref16x16. patch by Dark Shikari.
REVERT: c0b1b1a avoid a division in umh. patch by Dark Shikari.
REVERT: 3c9aac0 fix a memleak in h->mb.mvr
REVERT: beeedbd fix compilation as a shared library on x86_64 (regression in r696)
REVERT: 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%
REVERT: 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.
REVERT: 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%
REVERT: a2db19e limit mvs to [-512,511.75] instead of [-512,512]
REVERT: 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.
REVERT: 1dddea2 add cache info to cpu_detect. also print sse3.
REVERT: 1cab251 cosmetics: reorder mc_luma/mc_chroma/get_ref arguments for consistency with other functions
REVERT: 4611e5c separate pixel_avg into cases for mc and for bipred
REVERT: 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%
REVERT: 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%
REVERT: 370e109 cosmetics in dsp function selection
REVERT: a6ed152 remove sad_pde. it's been unused ever since successive elimination replaced it.
REVERT: 9f6f0b2 cosmetics: use symbolic constants for frame padding radius
REVERT: 5324ae5 move hpel_filter cpu detection to a function pointer like everything else
REVERT: 131603a cosmetics: use separate variables for frame width and stride
REVERT: 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 %
REVERT: 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 %
REVERT: 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 %
REVERT: 0fabcd4 fix a possible nondeterminism with me=umh + threads.
REVERT: 7da80e5 use hex instead of dia for rdo mv refinement. ~0.5% lower bitrate at subme=7. patch by Dark Shikari.
REVERT: 35094be port sad_*_x3_sse2 to x86_64
REVERT: 673ce32 don't overwrite pthread* namespace, because system headers might define those functions even if we don't want them
REVERT: 5c49545 faster 4x4 sad
REVERT: a6edfd6 fix an arithmetic overflow in trellis at high qp.
REVERT: 4634379 implement multithreaded me=esa
REVERT: cde5f33 fix some integer overflows. now vbv size can exceed 2 Gbit.
REVERT: d16a4da allow --vbv-init to take absolute values (in kbit), in addition to the previous fractions of vbv-bufsize.
REVERT: 9849407 remove a bashism
REVERT: 7596205 reorder headers so that largefile support is defined before the first copy of stdio
REVERT: 71af285 regression in r669: broke saving of configure args if make has to re-run configure
REVERT: 393daac regression in r669: --enable-shared should imply --enable-pic on some archs.
REVERT: 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.
REVERT: 3d51a5b * Update config.guess.
REVERT: 0ea7d1b mingw doesn't have strtok_r
REVERT: 85f2fc3 move os/compiler specific defines to their own header
REVERT: a18f3da extend zones to support (some) encoding parameters in addition to ratecontrol.
REVERT: d5ddf40 cosmetics
REVERT: ee62378 limit vertical motion vectors to +/-512, since some decoders actually depend on that limit.
REVERT: 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
REVERT: 9acd233 cosmetics in cpu detection
REVERT: 80090cc fix compilation without asm on x86_32 (r658 worked only on x86_64).
REVERT: fedface exempt 1080p from the non-mod16 warning.
REVERT: 17dd119 allow compiling without yasm/nasm on x86 and x86-64 platforms
REVERT: 26bed72 updated MS VC8/VC7 build, patch by Gabriel Bouvigne
REVERT: 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.
REVERT: ffa4e76 require a ratecontrol method to be specified, it no longer defaults to cqp=26.
REVERT: b5ef788 fix nnz computation in cavlc+8x8dct+deblock. (regression in r607)
REVERT: 08b4f69 fix the computation of bits used for vbv. (regression in r651)
REVERT: fe85aca c89 compile fix
REVERT: b3076ae cabac: use bytestream instead of bitstream. 35% faster cabac, 20% faster overall lossless, ~1% faster overall at normal bitrates.
REVERT: 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).
REVERT: 8ecf4b9 tweak ssse3 quant
REVERT: c266480 change some tables from int to int8_t. 13KB smaller executable.
REVERT: 2f66c11 faster cabac rdo. up to 10% faster at q0, but negligible at normal bitrates.
REVERT: 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.
REVERT: 84676d2 32bit version of ssse3 satd. switch default assembler to yasm. it will still fallback to nasm if you don't have yasm.
REVERT: 71c097b simplify trellis
REVERT: 12681ee fix an arithmetic overflow in trellis with QP >= 42
REVERT: 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.
REVERT: b37ac36 when encoding with a cqm, probe_skip now also uses the cqm, instead of the flat matrix
REVERT: e3a07e0 cosmetics in asm macros
REVERT: 71943e8 use only c-style comments in public header (patch by Vincent Torres)
REVERT: dfb8547 in hpel search, merge two 16x16 mc calls into one 16x17. 15% faster hpel, .3% overall.
REVERT: e63c392 Compile fix
REVERT: dd7e21c remove private stuff from public headers. no more need for -D__X264__
REVERT: 87fdea8 adjust bitstream buffer sizes for very large frames
REVERT: 8b37cc6 conflate HAVE_MMXEXT with HAVE_SSE2, since they were never used distinctly.
REVERT: 11ef32f   * Made -DNEED_ALTIVEC unnecessary, thanks to Guillaume Poirier.
REVERT: 37ad237   * check x264_cpu_detect() before calling AltiVec functions.
REVERT: 8aef0e9 ssse3 detection. x86_64 ssse3 satd and quant. requires yasm >= 0.6.0
REVERT: 1980de9   * Use -maltivec when building dependencies, or <altivec.h> cannot be used.   * Do not declare vectors in non-AltiVec files.
REVERT: 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.
REVERT: f81c3ea fix a small memleak. patch by Limin Wang.
REVERT: 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.
REVERT: 8993074 cosmetics in regression test
REVERT: 6e1bbd2 regression testing, run similar to fprofiled: VIDS='vid_720x480.yuv' make test
REVERT: 435b675 add ability to generate doxygen documentation; make dox
REVERT: dac2be0 oops, scenecut detection failed to activate when using threads and not using B-frames
REVERT: 49d16d4 extras/getopt.c was BSD licensed. replace with a LGPL version (from glibc).
REVERT: 9721725 Fix build issues on Linux. Only gcc-4.x is supported, as on OSX. Cleans up a few inconsistencies in the code too.
REVERT: c9cd0fc tweak block_residual_write_cavlc. up to 1% faster lossless, no difference at normal bitrates.
REVERT: 4c949c3 don't assume int is exactly 4 bytes
REVERT: cf9e6c5 make array_non_zero() compatible with -fstrict-aliasing
REVERT: 285f98e Honor CFLAGS and LDFLAGS set by the user
REVERT: 0fe97f4 Check whether 'echo -n' works, otherwise try printf (fixes build on current OS X 10.5)
REVERT: bbc68be Check version of nasm on OS X / Intel
REVERT: b630af6 wrong reference frames were used with refs>=14 + pyramid (regression in r607)
REVERT: 01e1db2 enable thread synchronization primitives on linux too
REVERT: 34c6fb3 fix a crash with x264_encoder_headers() + threads
REVERT: dfe7bb0 don't skip autodection on configure --enable-pthread
REVERT: ab3b660 more win32threads -> pthreads
REVERT: cc753d6 cosmetics: rename list operators to be consistent with Perl, and move them to common/
REVERT: 87f1430 win32: use pthreads instead of win32threads. for some reason, pthreads is much faster.
REVERT: 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.
REVERT: fa2c1e5   * Do not assume anything about sizeof(cpu_set_t).
REVERT: 167abec   * Add support for kFreeBSD (FreeBSD kernel with GNU userland).
REVERT: 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
REVERT: 575b238 Force alignment of the fake .rodata on MacIntel
REVERT: 4659f51 don't treat vbv_maxrate as a minrate too if it's higher than target average bitrate.
REVERT: 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
REVERT: 41c111b 10% faster deblock mmx functions. ported from ffmpeg.
REVERT: 6eeb78f checkasm: ignore insignificant differences in floating-point ssim
REVERT: 485172d display final ratefactor in abr when a loose vbv is applied. (still disabled in true cbr)
REVERT: a9d754a fix parsing of --deblock %d,%d  (beta was ignored)
REVERT: ccac553 compute chroma_qp only once per mb
REVERT: 94a4aed rd refinement of intra chroma direction (enabled in --subme 7) patch by Alex Wright.
REVERT: e7a4aba fix a crash in avc2avi
REVERT: 41b85c4 skip deblocking and motion interpolation when using only I-frames
REVERT: 197a94a cosmetics
REVERT: 93b54ce allow fractional values of crf
REVERT: 8d1ebe2 prefetch pixels for motion compensation and deblocking.
REVERT: 9fadbd7 fix a crash on interlace + >8 reference frames
REVERT: 4107178 no more decoder. it never worked anyway, and the presence of defunct code was confusing people.
REVERT: 9243c84 compute pskip_mv only once per macroblock, and store it
REVERT: 0a45337 slightly faster chroma_mc_mmx
REVERT: 42bb1b4 missing emms in plane_copy_mmx
REVERT: 43e4162 merge center_filter_mmx with horizontal_filter_mmx
REVERT: c485e7e 1.5x faster center_filter_mmx (amd64)
REVERT: 299d3ed mmx/prefetch implementation of plane_copy
REVERT: 9f05a7f no more vfw
REVERT: 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.
REVERT: 90a9219 accept mencoder's option names as synonyms (api only, not in x264cli)
REVERT: cb8b5da simplify satd_sse2
REVERT: 04834f5 better error checking in x264_param_parse. add synonyms for a few options.
REVERT: 0cbf0fc fix some strides that weren't a multiple of 16.
REVERT: 58e12b0 tweak motion compensation amd64 asm. 0.3% overall speedup.
REVERT: 6de50f5 strip local symbols from asm .o files, since they confuse oprofile
REVERT: 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.
REVERT: 8f0864a allow custom deadzones for non-trellis quantization. patch by Alex Wright.
REVERT: a7cd9cf move zigzag scan functions to dsp function pointers. mmx implementation of interlaced zigzag.
REVERT: faec300 support interlace. uses MBAFF syntax, but is not adaptive yet.
REVERT: 3b78570 allow --zones in cqp encodes
REVERT: 7960eaf cli: fix some typos in vui parameters from r542. patch by Foxy Shadis.
REVERT: 1b93c2a   * Add an "all" rule to the Makefile. Ideally "default" should be renamed,     but I don't want to break existing scripts.
REVERT: 52b8a05 workaround: on some systems, alloca() isn't aligned
REVERT: 7bfc736 missing picpop
REVERT: 460699f fix a buffer overread from r540
REVERT: 55c208e cosmetics (spelling)
REVERT: 8850b6f faster ESA
REVERT: f8652aa faster ESA
REVERT: 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.
REVERT: 477c5bf   * Add the autotool's config.guess script so that we can use it instead     of uname in the configure script.
REVERT: 4a5a03b 10l in r553
REVERT: 73657d8 ssim broke on amd64 w/ pic.
REVERT: 1808700 MSVC compatibility fix from Haali
REVERT: f78c224 support changing some more parameters in x264_encoder_reconfig()
REVERT: 7760f1b SSIM computation. (default on, disable by --no-ssim)
REVERT: 127e2fb configure: --enable-debug reduces optimization to -O1
REVERT: dc5d530 cosmetics
REVERT: 12bd065 gcc -fprofile-generate isn't threadsafe
REVERT: b3f1591 cli: move some options from --help to --longhelp
REVERT: 64a8b78 cli: don't try to get resolution from filename unless input is rawyuv
REVERT: de41ef2 r542 broke --visualize
REVERT: 1ff80a2 Nicer OS X x264_cpu_num_processors (thanks David)
REVERT: 3493a54 Support OS X and BeOS in x264_cpu_num_processors
REVERT: 86ec16c Fixes contexts allocation with threads=auto
REVERT: eeebca2 select initial qp for abr and cbr baased on satd and bitrate, rather than cq24.
REVERT: 9e9a869 --threads=auto to detect number of cpus
REVERT: 0b07708 api addition: x264_param_parse() to set options by name
REVERT: 99b8471 fix a rare NaN in ratecontrol
REVERT: adc4b4f move quant_mf[] from x264_t to the heap, and merge duplicate entries
REVERT: 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
REVERT: 4b2556f new option: --qpfile forces frames types and QPs. (intended for ratecontrol experiments, not for real encodes)
REVERT: b8692db api change: select ratecontrol method with an enum (param.rc.i_rc_method) instead of a bunch of booleans.
REVERT: 4e7bd4a slightly faster mmx dct
REVERT: 637470c OpenBSD build fixes. patch by Vizeli Pascal (pvizeli at yahoo dot de)
REVERT: c6213d2 mc_chroma width2 mmx
REVERT: eff6a5e make libx264.so symlink relative
REVERT: 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
REVERT: 918c7ef vfw installer: tweak nsis compression. patch by Francesco Corriga.
REVERT: b5d0831 Fixed typo that caused x264_encoder_open to always fail
REVERT: 91bbfb9 check some mallocs' return value
REVERT: 0ac281d make -> $(MAKE)
REVERT: c9155d3 convert non-fatal errors to message level "warning".
REVERT: ae4b97a fix a memory alignment. (no effect on x86, but might be needed for other simd)
REVERT: c832ac1 when using DEBUG_DUMP_FRAME, write decoded pictures in display order. patch by Loic Le Loarer.
REVERT: 361b283 non-referenced B-frames should have the same frame_num as the following ref frame, not the previous. patch by Loic Le Loarer.
REVERT: 1ca108e set the SPS constraint_set[01]_flag based on the profile in use, just in case some decoder cares
REVERT: de1af4c msvc doesn't like C99 named array initializers
REVERT: 7022fe8 allow sar=1/1. patch by Loic Le Loarer.
REVERT: 0d88274 faster intra search: filter i8x8 edges only once, and reuse for multiple predictions.
REVERT: 3de28cd faster intra search: some prediction modes don't have to compute a full hadamard transform. x86 and amd64 asm.
REVERT: e63f25b --sps-id, to allow concatenating streams with different settings.
REVERT: 609deaf typo in expand_border_mod16
REVERT: f5bdc82 typo impaired 2pass bitrate prediction.
REVERT: f51297f  Let the user choose the compiler with "CC=xxx ./configure"
REVERT: e714128  More vector types fixes for gcc 3.3
REVERT: f3323f8 More vector casts to try and make compilers happier
REVERT: c1f64a5 Use sa8d instead of satd for i8x8 search. +.01 dB, -.5% speed
REVERT: 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%
REVERT: eb3d83c   * common/ppc/pixel.c: fixed illegal implicit casts of vector types.
REVERT: 17b90bf   * Added %$#@#$! support for #@%$!#@ armv4l CPU.
REVERT: 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.
REVERT: 6b57736 mmx implementation of x264_pixel_sa8d
REVERT: af751ac 10l in r463 (q0 i16x16 dc was permuted)
REVERT: 2735ae7 typo in r504
REVERT: 656b069 update msvc project files. patch by anonymous.
REVERT: 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.
REVERT: 9a6815d Enables more agressive optimizations (-fastf -mcpu=G4) on OS X. Adds AltiVec interleaved SAD and SSD16x16. Overall speedup up to 20%.
REVERT: 97ab219 faster cabac_encode_bypass
REVERT: 1927b27 restored AltiVec dct
REVERT: d0a5565 more AltiVec mc, ~4.5% overall speedup
REVERT: 71f1114 slightly faster loopfilter
REVERT: d2ab724 3% faster satd_mmx
REVERT: a23a367 cosmetics in sad/ssd/satd mmx
REVERT: b3ad52d store quoted configure options. needed e.g. for multiple args under --extra-cflags.
REVERT: c293b80 fix a yasm-incompatible syntax in x86 asm
REVERT: ae82d24 yasm noexec stack
REVERT: 283d57e more interleaved SAD. 25% faster halfpel.
REVERT: 0f4c0eb more interleaved SAD. 1% faster umh, 6% faster esa.
REVERT: 8947b51 interleave multiple calls to SAD. 15% faster fullpel motion estimation.
REVERT: bddf5f0   * Added support for ppc64. I'm really fucking tired of having to do this.
REVERT: ac4249d use LDFLAGS when linking shared lib
REVERT: 85ab23c * compilation fix for mingw, darwin (off_t was undefined)
REVERT: 540ed9a GTK: support yuv4mpeg input. patch by Vincent Torri.
REVERT: 5fe3e77 GTK: fix avs input patch by Vincent Torri.
REVERT: a84899e cli: support yuv4mpeg input. patch by anonymous.
REVERT: e510c09 GTK: compilation fixes
REVERT: 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.
REVERT: fc34d38 GTK-based graphical frontend. patch by Vincent Torri.
REVERT: 50aadeb silence some gcc warnings
REVERT: 5b6c5ef use FDEC_STRIDE instead of a parameter in mmx dct .5% speedup
REVERT: da9158b   * configure: support for 64 bits MIPS.
REVERT: 7c01353 10l in r473 and stdin
REVERT: 3b66f69 RD subpel motion estimation (--subme 7)
REVERT: 48633d2 cosmetics in cabac_mb_cbf
REVERT: 50f40fd separate --thread-input from --threads
REVERT: 36c25b6 if --threads > 1, then read the input stream in its own thread.
REVERT: c20906a FreeBSD uses ELF
REVERT: 9c61b0c 10l in r470 on x86_64
REVERT: fdb6409 some mmxext functions really only required mmx.
REVERT: abffd18 simplify get_ref and mc_luma
REVERT: 9eaa83d b16x16 wpred analysis used wrong weight
REVERT: 926212b configure: --enable-shared for libx264.so
REVERT: 8f79dcc wrong modulus when delta_qp = +26
REVERT: 78f414d 10l in vbv + 2pass
REVERT: d8e790c macroblock-level ratecontrol: improved vbv strictness, and improved quality when using vbv.
REVERT: 7938977 keep transposed dct coefs. ~1% overall speedup.
REVERT: ce9b333 tweak rounding of 8x8dct
REVERT: 9331f05 cosmetics in makefile
REVERT: 058c3be cosmetics: muxers -> muxers.c
REVERT: a34eec2 no --nr in intra blocks. intra prediction doesn't work well enough for the residual to be indicative of noise.
REVERT: afbbaf9 10l in direct auto + multiref + 1pass
REVERT: 9773268 --direct auto selects direct mode per frame. works best in 2pass (enable in both passes).
REVERT: 126ccb3 change default direct mode to spatial
REVERT: 39c6d08 remove TODO. most of it is done, and the rest is out of date.
REVERT: 918a791 more amd64 mmx intra prediction
REVERT: 469b4e5 for i8x8 neighbors, don't assume a new slice starts at the edge of the frame
REVERT: 4fe3aff   * common/i386/i386inc.asm: got PIC to work for real on OS X x86.
REVERT: 4139feb   * common/i386/*.asm: don't use the "GLOBAL" reserved word, some versions     NASM complain about it. Replaced it with "GOT_ebx".
REVERT: 059410e   * configure: activate minor nasm optimisations, such as assembling     "add eax, 8" as "add eax, byte 8".
REVERT: b5fda57   * common/i386: factored the .rodata section declaration into i386inc.asm.
REVERT: 17683d7   * configure common/i386/i386inc.asm: got rid of -DFORMAT_* nasm flags     and use built-in preprocessor tests instead.
REVERT: 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.
REVERT: 70c1403 10l in r443 (p4x4 chroma)
REVERT: 3bd4ade copy current macroblock to a smaller buffer, to improve cache coherency and reduce stride computations. part 3: asm
REVERT: 4ecb5f8 copy current macroblock to a smaller buffer, to improve cache coherency and reduce stride computations. part 2: intra prediction
REVERT: 8f05dff copy current macroblock to a smaller buffer, to improve cache coherency and reduce stride computations. part 1: memory arrangement.
REVERT: 3886582 h->mc.copy()
REVERT: 34cbb91 lowres intra used wrong neighboring pixels
REVERT: bca81ca trellis=2 slightly affected intra analysis even without subme=6
REVERT: e5ed306   * encoder/ratecontrol.c: OS X support for exp2f and sqrtf.
REVERT: 14b2639 allow delta_qp > 26
REVERT: 5fbca87 ratecontrol didn't always account for header bits, causing an undersize in multipass with --ratetol inf.
REVERT: 12b778b -q0 --b-rdo wasn't lossless
REVERT: 14f3cc0 cosmetics
REVERT: 476a0f9 allow ',' separator for --filter
REVERT: 8dfd87a VfW: 10l in bime and refs
REVERT: d53108a more lowres mv clipping fixes
REVERT: eb32d28 VfW: cosmetics
REVERT: 60e8487 VfW: support trellis, brdo, nr, bime. patch by Dan Nelson (dnelson at allantgroup dot com).
REVERT: 681b394 amd64 mmx for some intra pred functions
REVERT: e1d852d dequant_mmx made incorrect assumptions about extreme inputs. now uses 32bit in more cases. patch by Christian Heine.
REVERT: fed2847 lowres can reuse the normal mv cost table
REVERT: f959a74 r422 broke x264_center_filter_mmxext
REVERT: 7125f91   * configure: define FORMAT_ELF under Linux and FORMAT_AOUTB under *BSD.
REVERT: 5d5c5cc   * common/i386/i386inc.asm: support for ELF, a.out and Mach-O objects.
REVERT: 78d31c2   * configure: added a --enable-pic flag.
REVERT: 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.
REVERT: 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.
REVERT: bb21f3a cosmetics in mc_chroma
REVERT: 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.
REVERT: 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.
REVERT: 97f0507 msvc: #define isfinite()
REVERT: 19d07af x86 mmx for some intra pred functions
REVERT: d2dada7 cosmetics: reorganize intra prediction dsp
REVERT: 791495e too many systems don't have off_t; use uint64_t instead.
REVERT: ce237ab fix order of frame evaluation in pre-me
REVERT: f116707 update AUTHORS
REVERT: 8b498e4 fix a check for NaN in ratecontrol
REVERT: e3b1f11 fix mv predictors in pre-me for b-adapt.
REVERT: 6da9fc9 print --nr in sei params. tweak ratecontrol param checking.
REVERT: be6cce5 I've moved
REVERT: 273dc62 write correct VUI timing info
REVERT: d125e43 early termination in UMH search
REVERT: a373f2a split mv_range enforcement from edge-of-frame clipping. fixes an occasional artifact with long mvs.
REVERT: 61b57af cosmetics: suppress warning on unused variables
REVERT: 271c194 cosmetics: simplify #includes
REVERT: 7fb7e61   * configure: NSLU2 platform support (why oh why)
REVERT: 1d82beb  Re-enabled x86 optims on MacIntel, assume Nasm CVS is installed and   -f macho -DPREFIX just seems to do the job
REVERT: 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.
REVERT: 743ad59 cli: large file support
REVERT: 0abf15d dct-domain noise reduction (ported from lavc)
REVERT: 6bf39ea early termination within large SADs. ~1% faster UMH, ~4% faster ESA.
REVERT: 73a45ef mkv: increase nalu size size to 4 bytes. patch by Haali.
REVERT: d3c2f10 less 64bit math: 12% faster trellis
REVERT: 28c0f24 more error checking of input parameters
REVERT: bf1e4d1 always write sps.vui
REVERT: 7091b47 use some extra packing modes for CQM headers. fix typo in --cqm4p[yc].
REVERT: a977f76 MSVC compatibility fixes
REVERT: 2fa8f84 joint bidirectional motion refinement (--bime)
REVERT: 684d2d5 fix some overflows in mp4 timestamps. patch by Francesco Corriga.
REVERT: 25b4014 Successive elimination motion search: same as exhaustive search, but 2-3x faster.
REVERT: a9607af  Fixed cc_check on OS X (gcc -o /dev/null always fails)
REVERT: b914f80 postpone pskip decision until after p16x16ref0 motion search. reduces the number of erroneous pskips in low-detail regions.
REVERT: cc33088 configure: autodetect gpac, avis, pthread, vfw
REVERT: 38fcbfb --no-fast-pskip patch by Alex Wright.
REVERT: 5ce628f cosmetics: config.h is now modified only by configure. make now calls configure if you haven't.
REVERT: f03dbfd MP4: set "track enabled" flag. patch by Robert Swain.
REVERT: 8443f26 faster subpel motion search. patch by Alex Wright.
REVERT: 8f0d66c don't use gnu extensions to grep and sed.
REVERT: 6826cf2 pkg-config: major.minor.patch version
REVERT: 8e44d93 `make fprofiled` to automate gcc -fprofile-generate/use
REVERT: 71b75ef 10l
REVERT: bdddcf9 param.b_repeat_headers (not yet used)
REVERT: 8c7611c support pkg-config. patch by Caro.
REVERT: 78d2f60 write encoding options to the userdata SEI and to the 2pass statsfile. check for incompatible options in the 2nd pass.
REVERT: c010ba1 change default level to "5.1"
REVERT: 05e6cf0 skip dequant+idct of decimated blocks.
REVERT: bc47892 after a 1pass ABR, print the value of --crf which would result in the same bitrate.
REVERT: 528cbd1 subpel search: always check mvp.
REVERT: 429e060 faster b-rdo (skip RD of modes with bad SATD). patch by Alex Wright.
REVERT: 6fe9232 RD mode decision for B-frames (--b-rdo) patch by Alex Wright.
REVERT: 322c42a   * common/amd64/quant-a.asm: added missing GLOBAL flags that prevented PIC     builds, thanks to Anssi Hannula.
REVERT: ffd008e   * configure: added the Alpha platform.
REVERT: 9187a8f use array_non_zero() when we don't need a full array_non_zero_count()
REVERT: d18bbd3 mmx dequant. up to 3% speedup w/ RD.
REVERT: d447c2d allow --level to understand names in addition to idc
REVERT: 87e5994 check (most of) the levels constaints. set default max_mv_range based on level_idc.
REVERT: 1e80b69 if p16x16 RD decides to code a MB as p_skip, then don't check smaller partitions.
REVERT: 5c43fb3 Trellis RD quantization. around +.2 dB
REVERT: 3f1ed7c cosmetics: XCHG macro
REVERT: 662e56b skip a few duplicate candidates in qpel search.
REVERT: 2107a4f skip a few duplicate candidates in fullpel hex&umh search.
REVERT: 01c05a7 cli: arithmetic overflow in bitrate printing
REVERT: db67b81 cosmetics in x264_cabac_mb_type
REVERT: 89d2c6a X264_ABS => abs
REVERT: d13a186 amd64 sse2 8x8dct. 1.45x faster than mmx.
REVERT: 08e19ed allow 1pass ratecontrol with keyint=1
REVERT: 9617e25 cli: print estimated time left in --progress
REVERT: d484bce doc/ratecontrol.txt
REVERT: 5aced82 rm doc/dct.txt
REVERT: b179e47 in constant QP mode, write that QP in the PPS to save a few bits in each slice header.
REVERT: 108f197 faster decimation
REVERT: fa01979 cosmetics: fix an erroneous warning from r340.
REVERT: 8d857c56 cosmetics: change literal cabac_block_cat to an enum.
REVERT: c636f90 cabac: merge i_state with i_mps. bs_write multiple bits at once.
REVERT: 5167ebb remove unused adaptive cabac_idc code
REVERT: 817ef14  Fixed compilation on PPC (spotted by David Wolstencroft)
REVERT: 109ae08 mmx deblocking. 2.5x faster deblocking functions, 1-4% overall.
REVERT: 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.
REVERT: 7583201 move checkasm to tools/ delete unused stuff in testing/ `make clean` deletes checkasm and avc2avi
REVERT: 6347263 checkasm: check 8x8dct, mc average, quant, and SSE2.
REVERT: 57900a1 r336 broke amd64 x264_pixel_sad_16x16_sse2 (though it's not being used)
REVERT: 360eb55 Windows 64bit asm. patch by squid_80.
REVERT: 6d96973 delete build/cygwin because it's handled in the main configure/makefile.
REVERT: 0ddc9d5 --crf: 1pass quality-based VBR.
REVERT: 06f1daf  Added --enable-gprof (patch by Johannes Reinhardt)
REVERT: 2ac5fe0 cosmetics: remove #if0'ed code patch by Robert Swain.
REVERT: 1647e6d faster bs_write
REVERT: 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%.
REVERT: 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.
REVERT: a8ac858 VfW: mixed refs. patch by celtic_druid.
REVERT: d69837d allow non-mod16 resolutions
REVERT: 67f2a47 VfW: prevent duplicate free() in compress_end()
REVERT: 0bde6ae cosmetics: remove declarations of nonexistent asm functions
REVERT: 015ac58 cosmetics (whitespace) in VfW
REVERT: 54d413b VfW: some reorganization patch by Francesco Corriga.
REVERT: a75462e cosmetics: merge some duplicate tables
REVERT: 1c6ccbf remove cabac byte-stuffing code, because it just wastes bits in lossless, and does nothing at all at sane bitrates.
REVERT: acee2d5 don't allocate lowres planes if they won't be used (i.e. in the 2nd pass).
REVERT: 938c52d cosmetics: move some stuff from macroblock_encode to cache_save
REVERT: 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).
REVERT: 6859211 cosmetics in option parsing
REVERT: 4b925a1 expose the rest of the VUI flags. patch by Christian Heine.
REVERT: aebad79   * common/amd64/mc-a.asm: use RIP-relative addressing in PIC mode.
REVERT: db80497 temporal predictors for 16x16 motion search.
REVERT: 7e16547 slightly faster/cleaner block_residual_write_cabac
REVERT: 4c8ccfe cosmetics
REVERT: ce3a422 cli: fix a crash on piped input.
REVERT: cb88eb7 stats summary: separately report all 5 partition sizes, and add ref usages
REVERT: bab1d61 disposable frames shouldn't get their own coded_frame_num.
REVERT: 31a36aa typo in ia32 x264_pixel_avg_weight_w8_mmxext
REVERT: 458e63c mmx avg (already existed by not used for bipred) mmx biweighted avg (3x faster than C)
REVERT: 3112619 cosmetics: move avg function ptrs from pixf to mc.
REVERT: 82d5e6f with B-pyramid, forget old refs in POC order instead of coded order. (before, b_skip was unavailable with pyramid and ref=1)
REVERT: 4223e38 typo in r296. patch by lurui.
REVERT: 2a3417b   * common/amd64/*.asm: use RIP-related addressing in PIC mode.
REVERT: 77997bf   * common/amd64/mc-a.asm: removed useless global variables
REVERT: b2e9af9   * configure: support extra $(ASFLAGS) through --extra-asflags.
REVERT: 1b16298 reorganized VfW UI. patch by Antony Boucher, graphic by Jarod.
REVERT: 35f6417 MP4 output: update to GPAC 0.4 API. patch mostly by Robert Swain.
REVERT: cfebeac faster mmx quant 15bit, and add 16bit version. total speedup: ~0.3% patch by Christian Heine.
REVERT: 49ac5e2 faster mmx satd. *x16: 20%, *x8: 10%, total: 2-4%. ia32 patch by Christian Heine, amd64 port by me.
REVERT: 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)
REVERT: 690a02b fps patch by Haali
REVERT: 8a5de70   * configure: added support for ia64, mips/mipsel, m68k, arm, s390 and hppa     platforms, as well as linux sparc.
REVERT: 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.
REVERT: 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.
REVERT: 6db6362 10l in rev290: duplicate declaration of x264_pixel_sub_8x8_mmx.
REVERT: 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)
REVERT: 2e5b0b9  VC++ fix (thx fenrir)
REVERT: 2a6e7a6  x264.h: issue an explicit warning when neither stdint.h nor inttypes.h  has be included before x264.h
REVERT: 0403fed VfW: SAR wording. patch by Sharktooth.
REVERT: 48af1d0 cli: workaround to allow "--ratetol inf" on win32.
REVERT: 796da8e fix spatial direct mv prediction with B-pyramid. copied from libavcodec.
REVERT: 1459ac0  * all: Patch by Mike Matsnev :
REVERT: 47673d9  xyuv: bug fixes + autodetect of video size.
REVERT: d9218cb  Run ranlib after make install (OS X needs that)
REVERT: 2059106 update i_mb_b16x8_cost_table[] for I8x8 mb type (r278 only fixed a symptom).
REVERT: d945b15  * all: Added matroska writing. Patch by Mike Matsnev.
REVERT: 5552052  * pixel.*:
REVERT: 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.
REVERT: f52a280  * x264 compilation on NetBSD. Patch by Mike Matsnev.
REVERT: 300e93e  * all: "8x8 SAD written in Sparc Assembly using VIS." Patch by Phil Jensen.
REVERT: 1a0920f 10l: rd score for sub-8x8 partitions used wrong mvs.
REVERT: 0f34713 faster SAD_INC_2x16P for amd64. patch by Josef Zlomek.
REVERT: 86a01ef  Fixed win32 handle leakage (thanks Trax)  Default enabled support of threads on BeOS
REVERT: da60272  * Add support for UltraSparc (uname -m: sun4u) with Solaris.  Patch by Tuukka Toivonen.
REVERT: 95c4071  * Faster SAD_INC_2x16P. Patch by Alexander Izvorski.
REVERT: 9079335 example quant matrix file
REVERT: 7b1b45e --cqmfile reads quant matrices in a JM-compatible format.
REVERT: 7a77a1e adjust coded buffer size based on input resolution and QP (old default wasn't enough for HD lossless)
REVERT: ca8ead2 update avc2avi for high profile
REVERT: 1ab01bb custom quant matrices
REVERT: 2c4b31d VfW: workaround a windows unicode bug. patch by Leowai.
REVERT: 3961339 lossless mode enabled at qp=0
REVERT: 2f9a70c VfW: enable RDO. some option dependencies. patch by Francesco Corriga.
REVERT: 15ecd54 rate-distortion optimized MB types in I- and P-frames (--subme 6)
REVERT: 41c37d9 more VfW options. patch mostly by celtic_druid.
REVERT: a296ffc VFW: 8x8 transform, SAR. patch by celtic_druid.
REVERT: 7832f01 threads option in vfw. patch by celtic_druid.
REVERT: 8c6e664 win32 threads enabled by default
REVERT: 96813e3 vfw installer nsis script. patch by Francesco Corriga.
REVERT: 8025723 print 8x8 transform usage % in stats summary.
REVERT: 26aa962 revert 216, another try at max_dec_frame_buffering. disable adaptive cabac_idc by default; 0 is always best anyway.
REVERT: c4f5de5 typo in cabac tables
REVERT: 2b5a6b2 cosmetics
REVERT: 916136c fix i8x8 decision with chroma_me
REVERT: 8614594 SATD-based decision for 8x8 transform in inter-MBs. Enable 8x8 intra. CLI options: --8x8dct, --analyse i8x8.
REVERT: 6bf1398  Use win32 native threads (you still have to --enable-pthread to use  them, though)
REVERT: 46a4872 slightly faster 8x8 dct
REVERT: 398a6bf remove unused tables from SPS/PPS. reduces overhead when syncing threads.
REVERT: 1729616 10l (debug stuff in 246)
REVERT: 1ab45c8 8x8 transform and 8x8 intra prediction. (backend only, not yet used by mb analysis)
REVERT: e46db68 cosmetics
REVERT: 7f98808 fix a bug with cabac + B-frames + mref + slices. call visualization per frame instead of per slice.
REVERT: b1f4d5b accept the standard --prefix etc. options
REVERT: c77e709 tweak cflags
REVERT: e85db92  Fixed multithreading on BeOS (pthread emulation required)
REVERT: 10851d0 multithreading (via slices)
REVERT: 36f6321 move zones parsing to ratecontrol.c; allows passing in zones as a string.
REVERT: 470e1b2 UMHex motion seach (but no early termination yet)
REVERT: c8b1a47 Zoned ratecontrol.
REVERT: 0072b80 fix rounding of intra dequant when qp<=3
REVERT: 7c02f09 API: x264_encoder_reconfig(). (not yet used by any frontend)
REVERT: 7fef6ef  Makefile: in target "install", first create the directories if they  don't already exist
REVERT: 809c516  Optimized subXxX_dct
REVERT: f025abc  s/==/=/
REVERT: 04ded39  ppc/: compile fixes for Linux/PPC (courtesy of Rasmus Rohde) and        for gcc < 4
REVERT: 94829ef visualize reference pic numbers. misc cleanups in visualization. patch by Tuukka Toivonen.
REVERT: 4d5c7a0  ppc/*: more tuning on satd (+5%)
REVERT: e0bd806 CLI option: --seek
REVERT: 036494a CLI option: --visualize Displays the encoded video along with MB types and motion vectors. patch by Tuukka Toivonen.
REVERT: 31c91bd fix an uninitialized value in slicetype_analyse
REVERT: 92ea0c5 port recent MC asm changes to amd64. patch by Josef Zlomek.
REVERT: 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)
REVERT: 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.
REVERT: 540fba7 use a predicted mv as starting point for subpel refinement.
REVERT: dcb0aeb slight speedup in halfpel interpolation. patch by Mathieu Monnier.
REVERT: 22a567b Cleaner allocation of tmp space in halfpel interpolation; fixes some valgrind/nasm warnings. patch by Mathieu Monnier.
REVERT: ca4a34d "2pass failed to converge" is no longer considered fatal.
REVERT: ab2cdf4 Updated MSVC project files. thanks to Bonzi.
REVERT: e0a6404 cosmetics. silence some gcc warnings. amd64 doesn't need a separate copy of the c/h files, only the asm.
REVERT: d2ad6a2 10l (214 wrote wrong DPB size in SPS -> B-pyramid broke)
REVERT: 7229a11 CLI (mp4): return to 'capture' output mode, remove useless SetCtsPackMode() (fixed in gpac). Note: requires gpac cvs-20050419 or later. patch by bobo.
REVERT: 9b44391 combined L0 & L1 reference lists are limited to a total of 16 pics.
REVERT: 41f9b81 amd64 asm patch, part2. by Josef Zlomek ( josef dot zlomek at xeris dot cz )
REVERT: 413d8fa amd64 asm patch, part1.
REVERT: 7d35ba6 Allow manual selection of fullpel ME method. New method: Exhaustive search. based on a patch by Tuukka Toivonen.
REVERT: 0c64142 misc makefile changes. propogate --extra-cflags to vfw. 'make clean' removes x264.exe and vfw. tweak dependencies.
REVERT: 1519835 10l (CLI: fflush after progress update)
REVERT: da4c038 CLI: progress indicator
REVERT: a61378b VfW: build from main makefile
REVERT: c6f3d17  [mp4] ftyp & moov boxes at the begining of the file, (thanks to jeanlf  for comments)
REVERT: 74eecd3 CLI: --fps had side-effects. fixed.
REVERT: 78ca42c CLI: cosmetics
REVERT: e06dfd4 Makefile: strip x264cli. tweak stats summary.
REVERT: 29facf8  * x264.c: Fix ctts box creation. Patch by bobololo from Ateme.
REVERT: 1014aa4  common/ppc: more cleaning, optimized a bit
REVERT: 7740416 CLI: require output file (don't default to stdout). warn if trying to use mp4 or avis when not supported. misc cleanup.
REVERT: fe90527  configure:   use -falign-loops=16 on OS X  common/ppc/: added AltiVecized mc_chroma + cleaning  checkasm.c:  really fixed MC tests
REVERT: a1b9531 Configure tweaks. Allow avis-input in mingw. Turn off debug by default.
REVERT: 35d85ca  checkasm.c: fixed MC tests
REVERT: c0abfd3 CLI: MP4 muxing. patch by bobo from Ateme.
REVERT: e1b747f  Cygwin fixes
REVERT: b7c3b44  configure: ooops, restored -g  ratecontrol.c: OS X has exp2f in -lmx  checkasm: quick compile fix
REVERT: ecbf942 add x86_64 to configure
REVERT: 7d9ac7c  set svn:ignore
REVERT: 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.
REVERT: b12cb05 Makefiles: better dependencies for SEI version number
REVERT: 90a6fd3 Forgot rbsp_trailing_bits in AUD NAL
REVERT: e103917 Optionally use access unit delimiter NAL units.
REVERT: d4663a4 VfW: cleaner install on win98. patch by Riccardo Stievano.
REVERT: 990e58b new util: countquant for 2pass statsfiles
REVERT: b780e71 print svn version number in SEI info and in CLI/VfW.
REVERT: ea9308c Make reconstructed frame available to caller.
REVERT: 6dcb0e4 make install
REVERT: 11de519 free() -> x264_free()
REVERT: de97a12 CLI: flush B-frames at the end of the encode
REVERT: 0df24cf convert mc's inline asm to nasm (slight speedup and msvc compatibility). patch by Mathieu Monnier.
REVERT: 48c34d0 buffer overruns in slicetype_decision. patch by Mathieu Monnier.
REVERT: a1c2c04 tweak usage message
REVERT: ac93ce1 Simplify inter analysis option names. (psub16x16 -> p8x8) patch by Robert Swain.
REVERT: 0455760 173 broke .depend when debugging was enabled
REVERT: bf7f679 early termination for intra4x4 analysis
REVERT: ee5b2be Check/fix range of x264_param_t.rc.i_qp_constant.
REVERT: 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
REVERT: cb6a40f macroblock_analyse: simplify cost comparisons. (cosmetic) CLI: enable cabac by default.
REVERT: 79fa694 Chroma ME (P-frames only).
REVERT: abbd6c5 SSE optimized chroma MC. patch by Radek Czyz.
REVERT: 553b829 167 broke psnr calculation for non-mod-32 inputs
REVERT: 70da43b  sqrtf requires -lmx on Mac OS X
REVERT: e72f431 use mmx ssd for psnr calculation.
REVERT: be2f0e0 revert 164. blame Spyder.
REVERT: 73522c8 SSD comparison function (not yet used). Cosmetics in mmx SAD.
REVERT: c68f34e VfW: reject YUY2 and RGB input formats
REVERT: fd527e3 Really fix QP override.
REVERT: a224564 write VUI bitstream restrictions
REVERT: 29dee22 AVI & Avisynth input (win32 only). patch by bobo from Ateme.
REVERT: 79ebb19 expose option "chroma qp offset"
REVERT: 2fc5299 Fix per-frame QP override broken in rev 137.
REVERT: 99b10e7 Don't include x264.o in the library.
REVERT: 9f97e90 VfW: expose B pyramid and weighted B prediction. patch by Riccardo Stievano.
REVERT: 4fbdc5c 10l
REVERT: 1f735a3 buffer overrun when bframes == X264_BFRAME_MAX
REVERT: c90534d Adaptive B skipped some POC numbers (slightly reducing b_direct efficiency).
REVERT: 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.
REVERT: f01e3d5 allow 16 refs (instead of 15)
REVERT: c47bb1f report version number in decimal instead of hex
REVERT: 91536ac New option: "B-frame pyramid" keeps the middle of 2+ consecutive B-frames as a reference, and reorders frame appropriately.
REVERT: 9591b03 smarter parsing of resolution from commandline
REVERT: 4337ee8  ratecontrol.c: fixed exp2f on BeOS so rate control works properly
REVERT: 4b2ba85 Fix a buffer overrun with very long MVs.
REVERT: ccf61ce wrong stride in lowres image
REVERT: b04a260 10l (fast1stpass was slower than non-fast)
REVERT: d05adbc Disable deblocking filter in frames of sufficiently low QP that it would have no effect. (Saves a little CPU time in the decoder.)
REVERT: d836d8f Simplify x264_frame_expand_border.
REVERT: 067f22c Altivec functions for MC using the cached halfpel planes. Patch by Fredrik Pettersson <fredrik_pettersson at yahoo dot se>.
REVERT: 323b54f Don't use uninitialize MVs in x264_mb_predict_mv_ref16x16.
REVERT: 92f6f36 Implicit weights in B16x16 analysis were swapped. patch by Radek Czyz.
REVERT: c2b0c8a Cosmetics: Some renaming. Move the rest of slice type decision from encoder.c to slicetype_decision.c
REVERT: 24a6672 Take into account keyint_max in B-frame decision.
REVERT: 68c1353 Preliminary adaptive B-frame decision (not yet tuned). Fix flushing of delayed frames when the encode finishes.
REVERT: e2efb4b Write x264's version in a SEI message.
REVERT: 3ada9c0 VfW: Enable weighted B prediction when max B-frames > 1. Enforce max reference frames <= 15. patch by Riccardo Stievano.
REVERT: 834eac2 Add: implicit weighted prediction for B-frames. Slightly optimize x264_mb_mc_01xywh. Fix an error in B16x8 cost.
REVERT: 47706e7 Oops, increment API number.
REVERT: 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>.
REVERT: 15450db Always use the tempfile and rename method for multipass stats, so that VfW knows whether the previous pass completed.
REVERT: b1f47ea More tweaks to bitrate prediction. Change error messages when 2pass fails to converge.
REVERT: 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.
REVERT: 3b2116c Some defines needed by MSVC, and convert the DSP files to DOS-style newlines. Patch by Radek Czyz.
REVERT: d688918 Precalculate lambda*bits for all allowed mvs. 1-2% speedup.
REVERT: ac411e2 Deblock B-frames. (Not yet used, since B-frames aren't kept as references.)
REVERT: 50a9248 Simplify x264_mb_mc_01xywh()
REVERT: b2d78b5 Save some memcopies in halfpel ME. Patch by Radek Czyz.
REVERT: 46141bf Cache half-pixel interpolated reference frames, to avoid duplicate motion compensation. 30-50% speedup at subq=5. Patch by Radek Czyz.
REVERT: 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.
REVERT: dc270b7 VfW: x264_log now creates a window for error messages
REVERT: ef4d1fa cosmetics
REVERT: 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.
REVERT: ca4ae52 VfW: tweak option names
REVERT: 85c92e1 VfW: use separate stats files for each pass of an N-pass encode.
REVERT: 70ce7a4 VfW: Enable multipass by default, increase the configurable range of I and B quant ratios. core: Tweak error messages.
REVERT: 2796ba0 r114 didn't completely fix the problem, trying again.
REVERT: 33140d0 Another MV clipping fix.
REVERT: 9179245 Simplify x264_cabac_mb_type.
REVERT: 7927c9e More accurate clipping rectangle for motion search. (slight compression improvement for high-motion scenes)
REVERT: 5b750c3  encoder/encoder.c: gcc < 3 compile fix
REVERT: 3f098e9 Change default level from 2.1 to 4.0 until I get around to calculating actual levels.
REVERT: bccb009 Clipping mvs to within picture + emulated border when running motion compensation.
REVERT: 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.
REVERT: 6558c83 Fix length of strings stored in the registry. Patch by Riccardo Stievano.
REVERT: 084175d registry values for min/max keyint were mixed up
REVERT: 79f73aa VfW: expose option "Nth pass" (i.e. simultaneously read and update the multipass stats file). Patch by Riccardo Stievano.
REVERT: 0292410 add "make NDEBUG=1" to strip library
REVERT: 66ee02b finish subpixel motion refinement for B-frames (up to 6% reduced size of B-frames at subq <= 3)
REVERT: 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>.
REVERT: c80d310 VfW: Support ip_factor and pb_factor, some cleanups. patch by Riccardo Stievano <walkunafraid at tin dot it>
REVERT: 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.
REVERT: 4394c4d finished printf -> x264_log conversion.
REVERT: 04bb833 Don't apply keyframe boost to I-frames that are followed by another I.
REVERT: 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>.
REVERT: 177e211 vfw: tweak wording and defaults
REVERT: b80ed70 From Riccardo Stievano <walkunafraid at tin dot it>:
REVERT: 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.
REVERT: 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.
REVERT: 5b13c83 MinGW compatible resource.rc by Radek Czyz
REVERT: 8379464 strict QP offset for B-frame vs following P-frame strict QP offset for I-frame vs GOP average
REVERT: 0af83ad r72 broke B-frames without intra4x4. fixed.
REVERT: 5ccb93c updated VfW interface by Radek Czyz
REVERT: 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.
REVERT: 7fc5f99 allow constant qp on Nth pass (e.g. for forcing frame types)
REVERT: 094266b disable subme=0 (the huge bitrate penalty wasn't worth the speed) renumber direct_pred
REVERT: 3a11b25 oops, last patch had some debug statements
REVERT: 0ad06e6 fix: "x264 -A all" didn't include b8x8 types. add: "make NDEBUG=1" to strip library update TODO with B-frame status
REVERT: 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.
REVERT: b1d946c remove Makefile.cygwin because build/cygwin/Makefile is more up to date. put correct object file names in .depend
REVERT: 456e8fd reduce default verbosity, add option -v
REVERT: 007c6f7 remove relative include paths, to avoid conflicts with libtool
REVERT: b42bd74 rename *.asm to avoid conflicts with libtool
REVERT: dabd095 list default settings in --help
REVERT: fc1380d replace EPZS diamond with a hexagon search pattern. early termination for multiple reference frame search (up to 1.5x faster).
REVERT: ab0c769 sps->i_num_ref_frames was set higher than necessary
REVERT: e33ed4c new option: --fps
REVERT: d5322b4 various cleanups in macroblock caching. store motion data for each reference frame (but not yet used).
REVERT: 9df283c more accurate cost for psub8x8 modes.
REVERT: 4e5e377 implement macroblock types B_16x8, B_8x16 tweak thresholds for comparing B mb types
REVERT: efbf4ad simplify x264_mb_predict_mv_direct16x16_temporal
REVERT: 457eaa9 option '--frames' limits number of frames to encode. patch by Tuukka Toivonen <tuukkat at ee.oulu.fi>
REVERT: dfbbcec simplify calvc mb type
REVERT: 199ff74 implement macroblock types B_SKIP, B_DIRECT, B_8x8
REVERT: b6954ba rename 'core/' to 'common/', which avoids conflicts with libtool
REVERT: da49fae cleanup stats reporting report B macroblock types report average QP
REVERT: bc0a1e9 apply ip_factor and pb_factor in constant quantiser encodes.
REVERT: 25b542c save a little bit of memory
REVERT: 0f65f51 multiple hypothesis mv prediction: 1-3% improved compression, and .5-1% faster
REVERT: 2489b6a * analyse: we can do 4x4 Horizontal Up mode when LEFT is avaible.   Thanks Stephen Henry for the report.
REVERT: 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.
REVERT: 7972ae1 more informative error message when 2pass fails to converge
REVERT: 30c6a09 #include <stdarg.h>
REVERT: a0b32b7 cleanup spacing of frame stats with verbose logging.
REVERT: bdf9b10 typo in x264_cabac_mb_sub_b_partition (see ITU-T H.264 clause 9.3.3.1.2)
REVERT: e917887  Typo
REVERT: 851989a  + No need to emulate memalign on OS X  + Fixed Makefile for OS X
REVERT: 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>)
REVERT: c9a501a Oops, changing those types messed up some vprintf's. fixed. (Loren Merrit <lorenm at u dot washington dot edu>)
REVERT: 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>)
REVERT: 3f7206d fix compilation on FreeBSD (from Loren Merritt (thanks to Igla))
REVERT: 48937c6  * ratecontrol: Patch by Loren Merritt :
REVERT: e3ae8a7  * all: Patch by Loren Merritt.
REVERT: 79a2bb7  * ratecontrol: added 'b' flag to fopen.
REVERT: 48e2886  * all: Patches by Loren Merritt: "Improved patch. Now supports subpel ME on all candidate MB types, not just on the winner.
REVERT: f9bd35a  * x264: added --ipratio --pbratio in help section.
REVERT: 8c6f6fa  * ratecontrol: path by Loren Merritt.
REVERT: d46df39  * x264: added --quiet and --no-psnr.
REVERT: cba0cd3  * eval.c: lalala ;)
REVERT: 8a5aa76  * added Loren Merritt.
REVERT: 58b7012  * all: added eval.c (I hope libx264.dsp is correct, I can't test).
REVERT: 9116d30  * all: 2pass patch by Loren Merritt <lorenm AT u.washington DOT edu>
REVERT: 67b6730  * all: first part of the 2pass patch by Loren Merritt  (only the header/textures bits computed for now).
REVERT: 0a7d38c  * all: include stdarg.h (needed for x264_log)
REVERT: 63e5a5c Use x264_log() in ratecontrol.c
REVERT: f246a87  * encoder/encoder.c: oops. (fixed compilation).
REVERT: dab6f06  * all: more fprintf -> x264_log.
REVERT: f53a7ae  * all: added a x264_param_t.analyse.b_psnr
REVERT: 72eced4  * encoder/encoder.c: kb/s with k=1000 (more consistant). Patch by Loren Merritt <lorenm AT u DOT washington DOT edu>
REVERT: a01315f  * all: introduced a x264_log function. It's not yet used everywhere  but we should start using it :)
REVERT: 5ffe5a9  OS X is missing exp2f()
REVERT: 348de7f Fixed warnings with PPC 64
REVERT: 2885471 Add my svn user name.
REVERT: ed61d8e Bugfix.
REVERT: 6b20e50 Include timing info in VUI. Change frame rate from float to fraction (sorry for the inconvenience).
REVERT: 2b3cd6c Add TAGS rule.
REVERT: 4446152 Fixes by Loren Merritt (lorenm at u.washington.edu).
REVERT: 78292e0 Get rid of integer overflows that caused the rate control to go haywire in some situations.
REVERT: 374baca  * encoder: correct range for i_idr_pic_id is 0..65535  (Not 0..65534)
REVERT: 07a0494  ratecontrol: patch by Loren Merritt <lorenm AT u DOT washington DOT edu>
REVERT: 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."
REVERT: e96703d  * encoder: simpler scene cut detection (seems better but do not check size anymore, so need more testing).
REVERT: 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.
REVERT: 9168b24  * x264.h: increased X264_BUILD.
REVERT: 20c19c4  * all: Patch from Måns Rullgård <mru AT mru DOT ath DOT cx>
REVERT: 30a244d  Linux PPC AltiVec fix
REVERT: b0495a9  BeOS fixes (no stdint.h, no libm)
REVERT: bf06e99  Attempt to fix build on Linux PPC
REVERT: 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.
REVERT: 55eb54c  * cpu.asm: mmh trashing ebp,esi and edi isn't a good idea I fear ;)
REVERT: a8703c8  * all: fixed ss2 runtime selection.
REVERT: 02713c2 update & SSE2 support
REVERT: 77bce7d update
REVERT: c7631fa remove some unused code
REVERT: 8d3d88b support for build checkasm.exe
REVERT: b2e2e34  * build fix (thx xxcd).
REVERT: 4fb5f9a  * TODO: test.
REVERT: a511bbe  * vfw/* : oops...
REVERT: 166ed2d  * mc-c.c compilation fix for gcc >= 3.3
REVERT: 602c87d  * all: re-import of CVS.
REVERT: 5dc0aae  * all: re-import of the CVS.

git-subtree-dir: captive/librtmp/csrc/src
git-subtree-split: df6c51884243ef2bd12931e6c617b2be7520ca26
Merge commit 'a6e89acea4f3c0a4c6b6da987d01956c7b93e1d3' into development
librtmp