1. 19 Oct, 2009 1 commit
    • Lamont Alston's avatar
      Make B-pyramid spec-compliant · cf5ba813
      Lamont Alston authored
      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).
      cf5ba813
  2. 12 Oct, 2009 1 commit
    • Fiona Glaser's avatar
      Avoid scenecuts in flashes and similar situations · c695f524
      Fiona Glaser authored
      "Flashes" are defined as any scene which lasts a very short period before a previous scene returns.
      A common example of this is of course a camera flash.
      Accordingly, look ahead during scenecut analysis and rule out the possibility of certain frames being scenecuts.
      Also handles cases of tons of short scenes in sequence and avoids making those scenecuts as well.
      Can only catch flashes of 1 frame in length with b-adapt 1.
      With b-adapt 2, can catch flashes of length --bframes.
      Speed cost should be negligible.
      c695f524
  3. 23 Sep, 2009 1 commit
  4. 02 Sep, 2009 1 commit
    • 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
  5. 27 Aug, 2009 1 commit
  6. 19 Aug, 2009 1 commit
    • 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
  7. 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
  8. 09 Aug, 2009 1 commit
    • Loren Merritt's avatar
      MB-tree fixes: · 5599c478
      Loren Merritt authored
      AQ was applied inconsistently, with some AQed costs compared to other non-AQed costs. Strangely enough, fixing this increases SSIM on some sources but decreases it on others. More investigation needed.
      Account for weighted bipred.
      Reduce memory, increase precision, simplify, and early terminate.
      5599c478
  9. 07 Aug, 2009 1 commit
    • 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
  10. 09 Nov, 2008 1 commit
    • Fiona Glaser's avatar
      Faster b-adapt + adaptive quantization · 0c841de6
      Fiona Glaser authored
      Factor out pow to be only called once per macroblock.  Speeds up b-adapt, especially b-adapt 2, considerably.
      Speed boost is as high as 24% with b-adapt 2 + b-frames 16.
      0c841de6
  11. 16 Sep, 2008 1 commit
    • Fiona Glaser's avatar
      Cache motion vectors in lowres lookahead · c299b7d8
      Fiona Glaser authored
      This vastly speeds up b-adapt 2, especially at large bframes values.
      This changes output because now MV prediction in lookahead only uses L0/L1 MVs, not bidir.  This isn't a problem, since the bidir prediction wasn't really correct to begin with, so the change in output is neither positive nor negative.
      This also allowed the removal of some unnecessary memsets, which should also give a small speed boost.
      Finally, this allows the use of the lowres motion vectors for predictors in some future patch.
      c299b7d8
  12. 15 Sep, 2008 1 commit
    • Fiona Glaser's avatar
      Add optional more optimal B-frame decision method · 95ed2720
      Fiona Glaser authored
      This method (--b-adapt 2) uses a Viterbi algorithm somewhat similar to that used in trellis quantization.
      Note that it is not fully optimized and is very slow with large --bframes values.
      It also takes into account weightb, which should improve fade detection.
      Additionally, changes were made to cache lowres intra results for each frame to avoid recalculating them.  This should improve performance in both B-frame decision methods.
      This can also be done for motion vectors, which will dramatically improve b-adapt 2 performance when it is complete.
      This patch also reads b_adapt and scenecut settings from the first pass so that the x264 header information in the output file will have correct information (since frametype decision is only done on the first pass).
      95ed2720
  13. 14 Sep, 2008 1 commit
    • Fiona Glaser's avatar
      Move adaptive quantization to before ratecontrol, eliminate qcomp bias · 80458ffc
      Fiona Glaser authored
      This change improves VBV accuracy and improves bit distribution in CRF and 2pass.
      Instead of being applied after ratecontrol, AQ becomes part of the complexity measure that ratecontrol uses.
      This allows for modularity for changes to AQ; a new AQ algorithm can be introduced simply by introducing a new aq_mode and a corresponding if in adaptive_quant_frame.
      This also allows quantizer field smoothing, since quantizers are calculated beofrehand rather during encoding.
      Since there is no more reason for it, aq_mode 1 is removed.  The new mode 1 is in a sense a merger of the old modes 1 and 2.
      WARNING: This change redefines CRF when using AQ, so output bitrate for a given CRF may be significantly different from before this change!
      80458ffc
  14. 21 Aug, 2008 1 commit
  15. 24 Jul, 2008 1 commit
  16. 04 Jul, 2008 1 commit
    • Fiona Glaser's avatar
      Update file headers throughout x264 · bdbd4fe7
      Fiona Glaser authored
      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
      bdbd4fe7
  17. 11 Jun, 2008 1 commit
  18. 02 Jun, 2008 1 commit
    • Gabriel Bouvigne's avatar
      2-pass VBV support and improved VBV handling · 56f2bc89
      Gabriel Bouvigne authored
      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 Fiona Glaser.
      56f2bc89
  19. 24 Apr, 2008 1 commit
  20. 17 Apr, 2008 1 commit
  21. 27 Jan, 2008 2 commits
  22. 01 Dec, 2007 1 commit
  23. 16 Nov, 2007 1 commit
  24. 15 Nov, 2007 1 commit
  25. 24 Sep, 2007 1 commit
  26. 19 Dec, 2006 1 commit
  27. 15 Dec, 2006 3 commits
  28. 01 Oct, 2006 1 commit
  29. 20 Apr, 2006 1 commit
  30. 09 Mar, 2006 1 commit
  31. 20 Dec, 2005 1 commit
  32. 26 Oct, 2005 1 commit
  33. 10 Oct, 2005 1 commit
  34. 04 Mar, 2005 1 commit
  35. 23 Feb, 2005 1 commit
  36. 13 Feb, 2005 1 commit
  37. 29 Dec, 2004 1 commit