1. 14 Jan, 2010 2 commits
    • 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
    • Loren Merritt's avatar
      Fix x264_clz on inputs > 1<<31 · 65f988b7
      Loren Merritt authored
      (though x264 never generates such inputs)
      65f988b7
  2. 11 Dec, 2009 2 commits
  3. 09 Dec, 2009 4 commits
  4. 05 Dec, 2009 2 commits
  5. 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
  6. 25 Nov, 2009 2 commits
  7. 17 Nov, 2009 1 commit
    • Fiona Glaser's avatar
      Faster weightp analysis · 63f71477
      Fiona Glaser authored
      Modify pixel_var slightly to return the necessary information and use it for weight analysis instead of sad/ssd.
      Various minor cosmetics.
      63f71477
  8. 15 Nov, 2009 2 commits
  9. 12 Nov, 2009 2 commits
    • 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
    • Fiona Glaser's avatar
      Fix all aliasing violations · 03cb8c09
      Fiona Glaser authored
      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.
      03cb8c09
  10. 09 Nov, 2009 10 commits
    • Fiona Glaser's avatar
      Fix pixel_ssd on win64 · 4ed2a8e3
      Fiona Glaser authored
      Didn't preserve XMM registers, may or may not have caused problems.
      4ed2a8e3
    • Loren Merritt's avatar
      cosmetics · df732ec7
      Loren Merritt authored
      df732ec7
    • David Conrad's avatar
      Fix weightp on ARM + PPC · 09411091
      David Conrad authored
      No ARM or PPC assembly yet though.
      09411091
    • 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
    • David Conrad's avatar
      Various ARM-related fixes · 53a5772a
      David Conrad authored
      Fix comment for mc_copy_neon.
      Fix memzero_aligned_neon prototype.
      Update NEON (i)dct_dc prototypes.
      Duplicate x86 behavior for global+hidden functions.
      53a5772a
    • Fiona Glaser's avatar
      Fix miscompilation with gcc 4.3 on ARM · 30b3825e
      Fiona Glaser authored
      Aliasing violation in spatial prediction caused nasty artifacts.
      Shut up two other GCC warnings while we're at it.
      30b3825e
    • Anton Mitrofanov's avatar
      Fix large file support, broken in r1302 · f3c9e6f3
      Anton Mitrofanov authored
      f3c9e6f3
    • Fiona Glaser's avatar
      Dramatically reduce size of pixel_ssd_* asm functions · 99cf5bf6
      Fiona Glaser authored
      ~10k of code size eliminated.
      99cf5bf6
    • Loren Merritt's avatar
      fix bottom-right pixel of lowres planes, which was uninitialized. · 3ddc66cc
      Loren Merritt authored
      weirdly, valgrind reported this only with --no-asm.
      3ddc66cc
  11. 29 Oct, 2009 2 commits
  12. 25 Oct, 2009 5 commits
  13. 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
  14. 18 Oct, 2009 1 commit
  15. 12 Oct, 2009 3 commits
    • Loren Merritt's avatar
      change all dct arrays to 1d. · 1fbba0ca
      Loren Merritt authored
      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.
      1fbba0ca
    • Anton Mitrofanov's avatar
      Optimize exp2fix8 · 1a1b9c6f
      Anton Mitrofanov authored
      Slightly faster and more accurate rounding.
      1a1b9c6f
    • 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