1. 30 Jan, 2010 3 commits
  2. 28 Jan, 2010 3 commits
  3. 14 Jan, 2010 5 commits
    • Fiona Glaser's avatar
      Fix free callback, add x264_encoder_parameters function · 398d0eb3
      Fiona Glaser authored
      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.
      
      A new x264_encoder_parameters function is now available in the API.
      This function lets the calling application grab the current state of the encoder's parameters.
      Use this in x264cli to ensure that the param struct used for set_param is updated with whatever changes x264_encoder_open has made to it.
      
      Patch partially by Anton Mitrofanov <BugMaster@narod.ru>.
      398d0eb3
    • Fiona Glaser's avatar
      Faster weightp motion search · fd1cf294
      Fiona Glaser authored
      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%.
      fd1cf294
    • Fiona Glaser's avatar
      Fix some invalid reads caught by valgrind · 5d40e878
      Fiona Glaser authored
      Temporal predictor calculation was misled by invalid reference counts for I-frames.
      5d40e878
    • Fiona Glaser's avatar
      Periodic intra refresh · cde39046
      Fiona Glaser authored
      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.
      
      Accordingly, change the API to add b_keyframe to the parameters present in output pictures.
      Calling applications should check this to see if a frame is seekable, not the frame type.
      
      Also make x264's motion estimation strictly abide by horizontal MV range limits in order for PIR to work.
      Also fix a major bug in sliced-threads VBV handling.
      Also change "auto" threads for sliced threads to "cores" instead of "1.5*cores" after performance testing.
      Also simplify ratecontrol's checking of first pass options.
      Also some minor tweaks to row-based VBV that should improve VBV accuracy on small frames.
      cde39046
    • Kieran Kunhya's avatar
      LAVF/FFMS input support, native VFR timestamp handling · 30d76a5e
      Kieran Kunhya authored
      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.
      
      x264_picture_t now returns the DTS of each frame: the calling app need not calculate it anymore.
      
      Add libavformat and FFMS2 input support: requires libav* and ffms2 libraries respectively.
      FFMS2 is _STRONGLY_ preferred over libavformat: we encourage all distributions to compile with FFMS2 support if at all possible.
      FFMS2 can be found at http://code.google.com/p/ffmpegsource/.
      --index, a new x264cli option, allows the user to store (or load) an FFMS2 index file for future use, to avoid re-indexing in the future.
      
      Overhaul the muxers to pass through timestamps instead of assuming CFR.
      Also overhaul muxers to correctly use b_annexb and b_repeat_headers to simplify the code.
      Remove VFW input support, since it's now pretty much redundant with native AVS support and LAVF support.
      Finally, overhaul a large part of the x264cli internals.
      
      --force-cfr, a new x264cli option, allows the user to force the old method of timestamp handling.  May be useful in case of a source with broken timestamps.
      Avisynth, YUV, and Y4M input are all still CFR.  LAVF or FFMS2 must be used for VFR support.
      
      Do note that this patch does *not* add VFR ratecontrol yet.
      Support for telecined input is also somewhat dubious at the moment.
      
      Large parts of this patch by Mike Gurlitz <mike.gurlitz@gmail.com>, Steven Walters <kemuri9@gmail.com>, and Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>.
      30d76a5e
  4. 15 Dec, 2009 1 commit
  5. 11 Dec, 2009 2 commits
  6. 09 Dec, 2009 3 commits
    • Fiona Glaser's avatar
      Add support for MB-tree + B-pyramid · c186d2ac
      Fiona Glaser authored
      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.
      c186d2ac
    • Fiona Glaser's avatar
      Bring back slice-based threading support · 6f221210
      Fiona Glaser authored
      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.
      6f221210
    • Loren Merritt's avatar
  7. 05 Dec, 2009 1 commit
  8. 30 Nov, 2009 1 commit
    • Steven Walters's avatar
      Enhanced Avisynth input support · 025f01db
      Steven Walters authored
      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.
      025f01db
  9. 27 Nov, 2009 1 commit
    • Fiona Glaser's avatar
      Much faster weightp · 979c14da
      Fiona Glaser authored
      Move sum/ssd calculation out of lookahead and do it only once per frame.
      Also various minor optimizations, cosmetics, and cleanups.
      979c14da
  10. 25 Nov, 2009 1 commit
    • Fiona Glaser's avatar
      Fix weightb with delta_poc_bottom · b02dd712
      Fiona Glaser authored
      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.
      b02dd712
  11. 21 Nov, 2009 2 commits
  12. 16 Nov, 2009 1 commit
    • Dylan Yudaken's avatar
      Fix two issues in weightp · 118dc81e
      Dylan Yudaken authored
      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.
      118dc81e
  13. 12 Nov, 2009 1 commit
    • Dylan Yudaken's avatar
      Various weightp fixes · 45b28315
      Dylan Yudaken authored
      Make weightp results match in threaded vs non-threaded mode.
      Fix two-pass with slow-firstpass.
      45b28315
  14. 09 Nov, 2009 3 commits
    • Dylan Yudaken's avatar
      Weighted P-frame prediction · ccac8546
      Dylan Yudaken authored
      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.
      
      Doesn't add support for interlaced encoding with weightp yet.
      Only adds support for luma weights, not chroma weights.
      Internal code for chroma weights is in, but there's no analysis yet.
      Baseline profile requires that weightp be off.
      All weightp modes may cause minor breakage in non-compliant decoders that take shortcuts in deblocking reference frame checks.
      "Smart" may cause serious breakage in non-compliant decoders that take shortcuts in handling of duplicate reference frames.
      
      Thanks to Google for sponsoring our most successful Summer of Code yet!
      ccac8546
    • Steven Walters's avatar
    • Anton Mitrofanov's avatar
      Fix large file support, broken in r1302 · f3c9e6f3
      Anton Mitrofanov authored
      f3c9e6f3
  15. 25 Oct, 2009 2 commits
  16. 19 Oct, 2009 2 commits
    • Fiona Glaser's avatar
      d9e6b173
    • 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
  17. 18 Oct, 2009 1 commit
  18. 17 Oct, 2009 1 commit
  19. 13 Oct, 2009 1 commit
  20. 12 Oct, 2009 1 commit
  21. 07 Oct, 2009 3 commits
    • Fiona Glaser's avatar
      Reorder reference frames optimally on second pass · c1322c31
      Fiona Glaser authored
      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!
      c1322c31
    • Fiona Glaser's avatar
      Clip log2_max_frame_num · 9dd6842d
      Fiona Glaser authored
      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.
      9dd6842d
    • Anton Mitrofanov's avatar
      Fix some issues with 3-pass statsfile handling · d73b50e8
      Anton Mitrofanov authored
      The value of i_frame during encoder_close was incorrect.
      d73b50e8
  22. 24 Sep, 2009 1 commit
    • Fiona Glaser's avatar
      Fix 10l in API change · e324d60a
      Fiona Glaser authored
      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.
      e324d60a