1. 14 Sep, 2009 1 commit
    • Fiona Glaser's avatar
      Make MV costs global instead of static · b1eac265
      Fiona Glaser authored
      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.
      b1eac265
  2. 02 Sep, 2009 2 commits
    • Steven Walters's avatar
      Threaded lookahead · 6940dcae
      Steven Walters authored
      Move lookahead into a separate thread, set to higher priority than the other threads, for optimal performance.
      Reduces the amount that lookahead bottlenecks encoding, greatly increasing performance with lookahead-intensive settings (e.g. b-adapt 2) on many-core CPUs.
      Buffer size can be controlled with --sync-lookahead, which defaults to auto (threads+bframes buffer size).
      Note that this buffer is separate from the rc-lookahead value.
      Note also that this does not split lookahead itself into multiple threads yet; this may be added in the future.
      Additionally, split frames into "fdec" and "fenc" frame types and keep the two separate.
      This split greatly reduces memory usage, which helps compensate for the larger lookahead size.
      Extremely special thanks to Michael Kazmier and Alex Giladi of Avail Media, the original authors of this patch.
      6940dcae
    • Fiona Glaser's avatar
      Force a link error in case of incompatible API · 7df6f5d6
      Fiona Glaser authored
      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.
      7df6f5d6
  3. 31 Aug, 2009 1 commit
    • Fiona Glaser's avatar
      Multi-slice encoding support · 4ccbb199
      Fiona Glaser authored
      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.
      4ccbb199
  4. 28 Aug, 2009 1 commit
  5. 27 Aug, 2009 2 commits
  6. 21 Aug, 2009 1 commit
  7. 19 Aug, 2009 2 commits
    • Fiona Glaser's avatar
      Fix MB-tree with keyint<3 · 4e824bbc
      Fiona Glaser authored
      Also slightly improve VBV keyint handling.
      4e824bbc
    • Fiona Glaser's avatar
      Add support for frame-accurate parameter changes · c83699f1
      Fiona Glaser authored
      Parameter structs can now be passed with individual frames.
      The previous method would only change the parameter of what was currently being encoded, which due to delay might be very far from an intended exact frame.
      Also add support for changing aspect ratio.  Only works in a stream with repeating headers and requires the caller to force an IDR to ensure instant effect.
      c83699f1
  8. 18 Aug, 2009 1 commit
  9. 17 Aug, 2009 1 commit
    • Fiona Glaser's avatar
      Lookahead VBV · 30a82c75
      Fiona Glaser authored
      Use the large-scale lookahead capability introduced in MB-tree for ratecontrol purposes.
      (Does not require MB-tree, however.)
      Greatly improved quality and compliance in 1-pass VBV mode, especially in CBR; +2db OPSNR or more in some cases.
      Fix some other bugs in VBV, which should improve non-lookahead mode as well.
      Change the tolerance algorithm in row VBV to allow for more significant mispredictions when buffer is nearly full.
      Note that due to the fixing of an extremely long-standing bug (>1 year), bitrates may change by nontrivial amounts in CRF without MB-tree.
      30a82c75
  10. 13 Aug, 2009 2 commits
  11. 09 Aug, 2009 1 commit
  12. 08 Aug, 2009 1 commit
  13. 07 Aug, 2009 2 commits
    • Fiona Glaser's avatar
      Fix delay calculation with multiple threads · 3667fbf9
      Fiona Glaser authored
      Delay frames for threading don't actually count as part of lookahead.
      3667fbf9
    • Fiona Glaser's avatar
      Macroblock-tree ratecontrol · 835ccc3c
      Fiona Glaser authored
      On by default; can be turned off with --no-mbtree.
      Uses a large lookahead to track temporal propagation of data and weight quality accordingly.
      Requires a very large separate statsfile (2 bytes per macroblock) in multi-pass mode.
      Doesn't work with b-pyramid yet.
      Note that MB-tree inherently measures quality different from the standard qcomp method, so bitrates produced by CRF may change somewhat.
      This makes the "medium" preset a bit slower.  Accordingly, make "fast" slower as well, and introduce a new preset "faster" between "fast" and "veryfast".
      All presets "fast" and above will have MB-tree on.
      Add a new option, --rc-lookahead, to control the distance MB tree looks ahead to perform propagation analysis.
      Default is 40; larger values will be slower and require more memory but give more accurate results.
      This value will be used in the future to control ratecontrol lookahead (VBV).
      Add a new option, --no-psy, to disable all psy optimizations that don't improve PSNR or SSIM.
      This disables psy-RD/trellis, but also other more subtle internal psy optimizations that can't be controlled directly via external parameters.
      Quality improvement from MB-tree is about 2-70% depending on content.
      Strength of MB-tree adjustments can be tweaked using qcompress; higher values mean lower MB-tree strength.
      Note that MB-tree may perform slightly suboptimally on fades; this will be fixed by weighted prediction, which is coming soon.
      835ccc3c
  14. 26 Jul, 2009 1 commit
    • Fiona Glaser's avatar
      Add QPRD support as subme=10 · 4304c427
      Fiona Glaser authored
      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.
      4304c427
  15. 20 Jul, 2009 1 commit
    • Anton Mitrofanov's avatar
      New AQ algorithm option · 2e1db1f6
      Anton Mitrofanov authored
      "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.
      2e1db1f6
  16. 07 Jul, 2009 1 commit
    • Fiona Glaser's avatar
      Totally new preset system for x264.c (not libx264), new defaults · 71b9d885
      Fiona Glaser authored
      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.
      71b9d885
  17. 27 May, 2009 1 commit
  18. 10 May, 2009 1 commit
    • Fiona Glaser's avatar
      Some cosmetics/cleanup · 1f572510
      Fiona Glaser authored
      Move some macros to x86util.asm that should have been there to begin with.
      Fix a typo that didn't cause any issues.
      1f572510
  19. 18 Apr, 2009 1 commit
    • Fiona Glaser's avatar
      Add "coded blocks" stat to output information. · 448ea688
      Fiona Glaser authored
      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.
      448ea688
  20. 17 Apr, 2009 1 commit
  21. 30 Mar, 2009 2 commits
  22. 04 Mar, 2009 1 commit
    • Fiona Glaser's avatar
      Remove non-pre scenecut · 42f27d04
      Fiona Glaser authored
      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.
      42f27d04
  23. 11 Feb, 2009 1 commit
  24. 04 Feb, 2009 1 commit
  25. 20 Jan, 2009 1 commit
    • Fiona Glaser's avatar
      Eliminate support for direct_8x8_inference=0 · 1f0e78d8
      Fiona Glaser authored
      The benefit in the most extreme contrived situation was at most 0.001db PSNR, at the cost of slower decoding.
      As this option was basically useless, it was a waste of code and prevented some other useful optimizations.
      Remove some unused mc code related to sub-8x8 partitions.
      Small deblocking speedup when p4x4 is used.
      Also remove unused x264_nal_decode prototype from x264.h.
      1f0e78d8
  26. 08 Jan, 2009 1 commit
    • Fiona Glaser's avatar
      Fix regression in r1066 · d7d1d37f
      Fiona Glaser authored
      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.
      d7d1d37f
  27. 06 Jan, 2009 1 commit
  28. 31 Dec, 2008 2 commits
  29. 23 Dec, 2008 1 commit
  30. 22 Dec, 2008 1 commit
  31. 11 Dec, 2008 1 commit
    • Fiona Glaser's avatar
      Much faster CAVLC residual coding · 99448f6c
      Fiona Glaser authored
      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.
      99448f6c
  32. 29 Nov, 2008 1 commit
  33. 25 Nov, 2008 1 commit