x262.git
9 years agoConvert to a unified "dctcoeff" type for DCT data
Oskar Arvidsson [Wed, 2 Jun 2010 00:08:45 +0000 (02:08 +0200)]
Convert to a unified "dctcoeff" type for DCT data
Necessary for future high bit-depth support.

9 years agoConvert to a unified "pixel" type for pixel data
Oskar Arvidsson [Tue, 1 Jun 2010 23:35:38 +0000 (01:35 +0200)]
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.

9 years agoAdd API tool to apply arbitrary quantizer offsets
Jason Garrett-Glaser [Fri, 28 May 2010 21:27:22 +0000 (14:27 -0700)]
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.

9 years agox86 assembly code for NAL escaping
Jason Garrett-Glaser [Thu, 27 May 2010 21:27:32 +0000 (14:27 -0700)]
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.

9 years agoRe-enable i8x8 merged SATD
Jason Garrett-Glaser [Fri, 28 May 2010 21:30:07 +0000 (14:30 -0700)]
Re-enable i8x8 merged SATD
Accidentally got disabled when intra_sad_x3 was added.

9 years agoSome deblocking-related optimizations
Henrik Gramner [Sun, 30 May 2010 20:45:14 +0000 (22:45 +0200)]
Some deblocking-related optimizations

9 years agoOptimize out some x264_scan8 reads
Henrik Gramner [Thu, 27 May 2010 20:18:38 +0000 (22:18 +0200)]
Optimize out some x264_scan8 reads

9 years agoAdd fast skip in lookahead motion search
Jason Garrett-Glaser [Thu, 27 May 2010 17:42:15 +0000 (10:42 -0700)]
Add fast skip in lookahead motion search
Helps speed very significantly on motionless blocks.

9 years agoMerge some of adaptive quant and weightp
Jason Garrett-Glaser [Wed, 26 May 2010 19:55:35 +0000 (12:55 -0700)]
Merge some of adaptive quant and weightp
Eliminate redundant work; both of them were calculating variance of the frame.

9 years agoFix omission in libx264 tuning documentation
Jason Garrett-Glaser [Thu, 27 May 2010 19:31:41 +0000 (12:31 -0700)]
Fix omission in libx264 tuning documentation

9 years agoFix ultrafast to actually turn off weightb
Jason Garrett-Glaser [Sun, 30 May 2010 16:42:53 +0000 (09:42 -0700)]
Fix ultrafast to actually turn off weightb

9 years agoFix crash with MP4-muxing if zero frames were encoded
Anton Mitrofanov [Mon, 31 May 2010 18:36:50 +0000 (22:36 +0400)]
Fix crash with MP4-muxing if zero frames were encoded

9 years agoFix cavlc+deblock+8x8dct (regression in r1612)
Jason Garrett-Glaser [Mon, 31 May 2010 18:14:22 +0000 (11:14 -0700)]
Fix cavlc+deblock+8x8dct (regression in r1612)
Add cavlc+8x8dct munging to new deblock system.
May have caused minor visual artifacts.

9 years agoFix 10L in r1612
Jason Garrett-Glaser [Wed, 26 May 2010 19:40:31 +0000 (12:40 -0700)]
Fix 10L in r1612
Stats need to be calculated before deblock strength, not after.
Broke ref stats in x264cli (no affect on actual output).

9 years agoOverhaul deblocking again
Jason Garrett-Glaser [Tue, 25 May 2010 19:42:44 +0000 (12:42 -0700)]
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.

9 years agoDetect Atom CPU, enable appropriate asm functions
Jason Garrett-Glaser [Tue, 25 May 2010 23:13:59 +0000 (16:13 -0700)]
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.

Also save some cache on Intel CPUs that don't need the decimate LUT due to having fast bsr/bsf.

9 years agoSlightly faster mbtree asm
Jason Garrett-Glaser [Mon, 24 May 2010 18:13:22 +0000 (11:13 -0700)]
Slightly faster mbtree asm

9 years agoFaster deblock strength asm on conroe/penryn
Jason Garrett-Glaser [Fri, 21 May 2010 22:39:38 +0000 (15:39 -0700)]
Faster deblock strength asm on conroe/penryn

9 years agoAvoid an extra var2 in chroma encoding if possible
Jason Garrett-Glaser [Fri, 21 May 2010 21:32:13 +0000 (14:32 -0700)]
Avoid an extra var2 in chroma encoding if possible
Also remove a redundant if.

9 years agoAvoid a redundant qpel check in lookahead with subme <= 1.
Jason Garrett-Glaser [Fri, 21 May 2010 20:07:12 +0000 (13:07 -0700)]
Avoid a redundant qpel check in lookahead with subme <= 1.

9 years agoFix ABR rate control calculations
Anton Mitrofanov [Tue, 25 May 2010 15:11:42 +0000 (19:11 +0400)]
Fix ABR rate control calculations
Incorrect frame numbers were used, resulting in slightly inaccurate ratecontrol.

9 years agoFix calculation of total bitrate printed after stop by CTRL+C
Anton Mitrofanov [Tue, 25 May 2010 14:45:16 +0000 (18:45 +0400)]
Fix calculation of total bitrate printed after stop by CTRL+C

9 years agoFix typo in fake-interlaced documentation
Kieran Kunhya [Sat, 22 May 2010 13:32:53 +0000 (14:32 +0100)]
Fix typo in fake-interlaced documentation

9 years agoFix CABAC+PCM, regression in r1592
Jason Garrett-Glaser [Wed, 26 May 2010 00:49:07 +0000 (17:49 -0700)]
Fix CABAC+PCM, regression in r1592
Changes to queue in CABAC didn't get propagated to PCM code.

9 years agoFix performance regression in r1582
Henrik Gramner [Fri, 21 May 2010 13:30:26 +0000 (15:30 +0200)]
Fix performance regression in r1582
Set the correct compiler flags.

9 years agoRewrite deblock strength calculation, add asm
Jason Garrett-Glaser [Tue, 18 May 2010 23:48:00 +0000 (16:48 -0700)]
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.

9 years agoFix different output with differing sync-lookahead
Anton Mitrofanov [Fri, 21 May 2010 06:33:45 +0000 (10:33 +0400)]
Fix different output with differing sync-lookahead
Also reduce memory consumption.

9 years agoMark Win32 executable as large address aware
Anton Mitrofanov [Tue, 18 May 2010 18:26:59 +0000 (22:26 +0400)]
Mark Win32 executable as large address aware

9 years agoAdd "Fake interlaced" option
Kieran Kunhya [Thu, 20 May 2010 16:45:16 +0000 (17:45 +0100)]
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.

9 years agoModify version.sh to output to stdout.
Alex Jurkiewicz [Thu, 20 May 2010 07:01:37 +0000 (15:01 +0800)]
Modify version.sh to output to stdout.
Update configure to match.

9 years agoSet correct filesystem permissions for various files
Henrik Gramner [Wed, 19 May 2010 21:09:58 +0000 (23:09 +0200)]
Set correct filesystem permissions for various files

9 years agoFix regression in r1566
Anton Mitrofanov [Wed, 19 May 2010 17:07:03 +0000 (21:07 +0400)]
Fix regression in r1566
Intra stats need to be kept track of for fast intra decision.

9 years agoFix rc-lookahead in encoding options SEI in 2-pass with VBV
Jason Garrett-Glaser [Tue, 18 May 2010 18:53:32 +0000 (11:53 -0700)]
Fix rc-lookahead in encoding options SEI in 2-pass with VBV

9 years agoReduce memory usage in 2-pass with b-adapt 2
Loren Merritt [Mon, 17 May 2010 21:08:37 +0000 (14:08 -0700)]
Reduce memory usage in 2-pass with b-adapt 2

9 years agoOverhaul CABAC: faster, less cache usage
Jason Garrett-Glaser [Sat, 15 May 2010 21:48:58 +0000 (14:48 -0700)]
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.

9 years agoFix typo in pulldown
Kieran Kunhya [Thu, 13 May 2010 18:13:35 +0000 (19:13 +0100)]
Fix typo in pulldown

9 years agoFix bitrate calculation in progress status
Anton Mitrofanov [Wed, 12 May 2010 18:05:34 +0000 (22:05 +0400)]
Fix bitrate calculation in progress status
Was slightly incorrect due to using pts, which is out of order.

9 years agoFix crash with sliced-threads on Phenom
Anton Mitrofanov [Tue, 11 May 2010 21:57:38 +0000 (01:57 +0400)]
Fix crash with sliced-threads on Phenom

9 years agoFix condition for printing rc=cbr in options SEI
Jason Garrett-Glaser [Tue, 11 May 2010 05:59:12 +0000 (22:59 -0700)]
Fix condition for printing rc=cbr in options SEI
Also fix crf-max formatting.

9 years agoShrink even more constant arrays
Henrik Gramner [Mon, 10 May 2010 21:27:36 +0000 (23:27 +0200)]
Shrink even more constant arrays

9 years agoAdd API function to trigger intra refresh
Jason Garrett-Glaser [Sat, 8 May 2010 19:07:13 +0000 (12:07 -0700)]
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.

9 years agoFix intra refresh behavior with I-frames
Jason Garrett-Glaser [Sat, 8 May 2010 18:58:22 +0000 (11:58 -0700)]
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.

9 years agoMore cosmetics
Anton Mitrofanov [Thu, 6 May 2010 17:03:31 +0000 (10:03 -0700)]
More cosmetics

9 years agoFix unresolved symbol in r1573
Jason Garrett-Glaser [Thu, 6 May 2010 07:53:20 +0000 (00:53 -0700)]
Fix unresolved symbol in r1573
gnu ld didn't complain, but some other linkers did.

9 years agoRemove unnecessary --enable options
Steven Walters [Wed, 5 May 2010 23:54:04 +0000 (19:54 -0400)]
Remove unnecessary --enable options
Change --enable-visualize to actually check for X11 support.

9 years agoDon't force row QPs to integer values with VBV
Jason Garrett-Glaser [Tue, 4 May 2010 04:27:16 +0000 (21:27 -0700)]
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.

9 years agoAdd field-order detection to y4m demuxer
James Darnley [Sun, 2 May 2010 23:30:50 +0000 (16:30 -0700)]
Add field-order detection to y4m demuxer

9 years agoFix sliced-threads + interlaced
Jason Garrett-Glaser [Sun, 2 May 2010 18:45:15 +0000 (11:45 -0700)]
Fix sliced-threads + interlaced
Broken in r1546.

9 years agoImprove temporal MV prediction
Jason Garrett-Glaser [Sun, 2 May 2010 18:41:36 +0000 (11:41 -0700)]
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.

9 years agoMore accurate MV prediction on edges in lookahead
Jason Garrett-Glaser [Sun, 2 May 2010 02:34:14 +0000 (19:34 -0700)]
More accurate MV prediction on edges in lookahead

9 years agoError out on invalid input stride
Jason Garrett-Glaser [Sun, 2 May 2010 02:32:01 +0000 (19:32 -0700)]
Error out on invalid input stride
Might catch some crashes due to buggy calling applications.

9 years agoRemove unnecessary debugging assert
Jason Garrett-Glaser [Sat, 1 May 2010 07:18:01 +0000 (00:18 -0700)]
Remove unnecessary debugging assert
Shouldn't have been in r1568 to begin with.

9 years agoShrink some more constant arrays
Jason Garrett-Glaser [Fri, 30 Apr 2010 20:45:50 +0000 (13:45 -0700)]
Shrink some more constant arrays

9 years agoDeduplicate asm constants, automate name prefixing
Jason Garrett-Glaser [Fri, 30 Apr 2010 18:36:19 +0000 (11:36 -0700)]
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).

9 years agoShrink a few x86 asm functions
Jason Garrett-Glaser [Fri, 30 Apr 2010 16:57:55 +0000 (09:57 -0700)]
Shrink a few x86 asm functions
Add a few more instructions to cut down on the use of the 4-byte addressing mode.

9 years agoMake options SEI use weight* instead of wpred*
Jason Garrett-Glaser [Fri, 30 Apr 2010 02:53:59 +0000 (19:53 -0700)]
Make options SEI use weight* instead of wpred*
More intuitive and maps more reasonably to the CLI options.
Breaks statsfile backwards-compatibility.

9 years agor1548 broke subme < 3 + p8x8/b8x8
Loren Merritt [Thu, 29 Apr 2010 17:35:25 +0000 (17:35 +0000)]
r1548 broke subme < 3 + p8x8/b8x8
Caused significantly worse compression.  Preset-wise, only affected veryfast.
Fixed by not modifying mvc in-place.

9 years agoMore write-combining
Henrik Gramner [Mon, 26 Apr 2010 23:44:33 +0000 (01:44 +0200)]
More write-combining

9 years agoReduce lookahead memory usage, cache misses
Jason Garrett-Glaser [Mon, 26 Apr 2010 22:10:11 +0000 (15:10 -0700)]
Reduce lookahead memory usage, cache misses
Merge lowres_types with lowres_costs.

9 years agoFix build on x86 with asm on but SSE off
Jason Garrett-Glaser [Sun, 25 Apr 2010 21:54:29 +0000 (14:54 -0700)]
Fix build on x86 with asm on but SSE off

9 years agoDon't calculate ref/partition stats if not necessary
Jason Garrett-Glaser [Sat, 24 Apr 2010 20:55:51 +0000 (13:55 -0700)]
Don't calculate ref/partition stats if not necessary

9 years agoSplit out MV prediction into mvpred.c
Jason Garrett-Glaser [Sat, 24 Apr 2010 20:07:18 +0000 (13:07 -0700)]
Split out MV prediction into mvpred.c
Make common/macroblock.c a bit less gigantic.

9 years agoFix mv predictor clipping on non-x86 (regression in r1548)
Loren Merritt [Sat, 24 Apr 2010 16:22:14 +0000 (16:22 +0000)]
Fix mv predictor clipping on non-x86 (regression in r1548)

9 years agoMove getopt.c to x264cli sources from libx264
Anton Mitrofanov [Fri, 23 Apr 2010 20:26:13 +0000 (00:26 +0400)]
Move getopt.c to x264cli sources from libx264
Only affects builds on systems without getopt.c.

9 years agoMove deblocking code to a separate file
Jason Garrett-Glaser [Thu, 22 Apr 2010 19:53:07 +0000 (12:53 -0700)]
Move deblocking code to a separate file
Should clean up frame.c a bit.

9 years agofix ffms demuxer to support input timebase values > 2^31
Steven Walters [Tue, 20 Apr 2010 23:48:02 +0000 (19:48 -0400)]
fix ffms demuxer to support input timebase values > 2^31

9 years agoFix 10l in cache_load changes
Jason Garrett-Glaser [Tue, 20 Apr 2010 23:53:06 +0000 (16:53 -0700)]
Fix 10l in cache_load changes
Broke constrained intra pred, probably not anything else.

9 years agoFaster fullpel predictor checking
Jason Garrett-Glaser [Tue, 20 Apr 2010 23:50:13 +0000 (16:50 -0700)]
Faster fullpel predictor checking
Also shave a few instructions off dia/hex motion estimation loops.

9 years agoFix checkasm's generation of deblock inputs (regression in r1517)
Loren Merritt [Tue, 20 Apr 2010 09:40:49 +0000 (09:40 +0000)]
Fix checkasm's generation of deblock inputs (regression in r1517)

9 years agoFix printing of bitrate when timestamps aren't available
Loren Merritt [Tue, 20 Apr 2010 09:17:18 +0000 (09:17 +0000)]
Fix printing of bitrate when timestamps aren't available
Doesn't affect x264cli, but was broken in some other apps in CFR mode.

9 years agoDon't check mv0 twice
Jason Garrett-Glaser [Tue, 20 Apr 2010 07:46:29 +0000 (00:46 -0700)]
Don't check mv0 twice
One less SAD in motion estimation.
Also rename bmv -> pmv; more accurate naming.

9 years agoRemove reordering restrictions from weightp
Jason Garrett-Glaser [Mon, 19 Apr 2010 18:02:27 +0000 (11:02 -0700)]
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.

9 years agoPrint intra chroma pred modes in stats
Jason Garrett-Glaser [Tue, 20 Apr 2010 06:34:03 +0000 (23:34 -0700)]
Print intra chroma pred modes in stats

9 years agoAdd mv0 special case in pskip chroma MC
Jason Garrett-Glaser [Mon, 19 Apr 2010 05:54:48 +0000 (22:54 -0700)]
Add mv0 special case in pskip chroma MC
Significantly faster pskip MC.

9 years agoFix build scripts to work with non-GNU tools
Francois Cartegnie [Sun, 18 Apr 2010 20:04:59 +0000 (13:04 -0700)]
Fix build scripts to work with non-GNU tools

9 years agoFaster deblock reference frame checks
Jason Garrett-Glaser [Sat, 17 Apr 2010 03:04:13 +0000 (20:04 -0700)]
Faster deblock reference frame checks
Use a lookup table to simplify logic

9 years agoFaster chroma CBP handling
Henrik Gramner [Fri, 16 Apr 2010 20:39:45 +0000 (22:39 +0200)]
Faster chroma CBP handling

9 years agoFix issues with extremely large timebases
Jason Garrett-Glaser [Fri, 16 Apr 2010 18:36:43 +0000 (11:36 -0700)]
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.

9 years agoMMX code for predictor rounding/clipping
Jason Garrett-Glaser [Fri, 16 Apr 2010 19:06:07 +0000 (12:06 -0700)]
MMX code for predictor rounding/clipping
Faster predictor checking at subme < 3.

9 years agoFix four minor bugs found by Clang
Jason Garrett-Glaser [Fri, 16 Apr 2010 10:06:46 +0000 (03:06 -0700)]
Fix four minor bugs found by Clang

9 years agoMove deblocking/hpel into sliced threads
Jason Garrett-Glaser [Thu, 15 Apr 2010 23:32:31 +0000 (16:32 -0700)]
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.

9 years agoPrefetch MB data in cache_load
Jason Garrett-Glaser [Wed, 14 Apr 2010 21:43:25 +0000 (14:43 -0700)]
Prefetch MB data in cache_load
Dramatically reduces L1 cache misses.
~10% faster cache_load.

9 years agoFix a ton of pessimization caused by aliasing in cache_save and cache_load
Jason Garrett-Glaser [Fri, 23 Apr 2010 19:09:37 +0000 (19:09 +0000)]
Fix a ton of pessimization caused by aliasing in cache_save and cache_load

9 years agoAdd CP128/M128 macros using SSE
Jason Garrett-Glaser [Fri, 23 Apr 2010 19:09:18 +0000 (19:09 +0000)]
Add CP128/M128 macros using SSE

9 years agoFix various early terminations with slices
Jason Garrett-Glaser [Sun, 11 Apr 2010 20:36:50 +0000 (13:36 -0700)]
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).

9 years agoEnable --fast-pskip on fast firstpass
Anton Mitrofanov [Tue, 13 Apr 2010 17:25:42 +0000 (21:25 +0400)]
Enable --fast-pskip on fast firstpass

9 years agoMake interlaced detection in avisynth only apply to field-based input
Steven Walters [Tue, 13 Apr 2010 12:44:37 +0000 (08:44 -0400)]
Make interlaced detection in avisynth only apply to field-based input
Fixes improper flagging of progressive sources.

9 years agoSet psy=0 in lossless mode
Anton Mitrofanov [Tue, 13 Apr 2010 15:55:12 +0000 (19:55 +0400)]
Set psy=0 in lossless mode
Doesn't actually affect output, just what's written in the SEI.

9 years agoFix a use of sad_x4 that had non-mod64 stride
Loren Merritt [Sun, 11 Apr 2010 04:20:04 +0000 (04:20 +0000)]
Fix a use of sad_x4 that had non-mod64 stride
Minimal speed improvement, but fixes a violation of internal api.

9 years agoMake keyint_min auto by default
Jason Garrett-Glaser [Sat, 10 Apr 2010 20:15:30 +0000 (13:15 -0700)]
Make keyint_min auto by default
Gives more reasonable default settings when using short GOPs.

9 years agoFaster mv predictor checking at subme < 3
Jason Garrett-Glaser [Sat, 10 Apr 2010 07:49:19 +0000 (00:49 -0700)]
Faster mv predictor checking at subme < 3
Simplify the predicted MV cost check.

9 years agoSpecial case in qpel refine for subme=1
Jason Garrett-Glaser [Sat, 10 Apr 2010 07:35:50 +0000 (00:35 -0700)]
Special case in qpel refine for subme=1
~15-20% faster qpel refine with subme=1.
Some minor cleanups in refine_supel.

9 years agoCosmetics: VLC tables
Henrik Gramner [Sat, 10 Apr 2010 00:21:01 +0000 (02:21 +0200)]
Cosmetics: VLC tables

9 years agoAdd faster mv0 special case for macroblock-tree
Jason Garrett-Glaser [Sat, 10 Apr 2010 01:13:22 +0000 (18:13 -0700)]
Add faster mv0 special case for macroblock-tree
Improves performance on low-motion video.

9 years agoAdd miscompilation check for x264_clz
Jason Garrett-Glaser [Fri, 9 Apr 2010 08:49:55 +0000 (01:49 -0700)]
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.

9 years agoFixing floating-point exception in level-checking
Anton Mitrofanov [Wed, 7 Apr 2010 09:17:20 +0000 (12:17 +0300)]
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).

9 years agoSave a few bits in multislice encoding
Jason Garrett-Glaser [Fri, 9 Apr 2010 01:44:16 +0000 (18:44 -0700)]
Save a few bits in multislice encoding
Set the initial QP for each slice to the last QP of the previous slice.

9 years agoEarly termination in 16x8/8x16 search
Alex Wright [Wed, 7 Apr 2010 15:25:55 +0000 (01:25 +1000)]
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.

9 years agoMake MV prediction work across slice boundaries
Jason Garrett-Glaser [Wed, 7 Apr 2010 14:45:00 +0000 (07:45 -0700)]
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.

9 years agoCleanup and simplification of macroblock_load
Jason Garrett-Glaser [Wed, 7 Apr 2010 14:43:46 +0000 (07:43 -0700)]
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.