1. 13 Feb, 2013 7 commits
    • Ronald S. Bultje's avatar
      Add support for tile rows. · 89a206ef
      Ronald S. Bultje authored
      These allow sending partial bitstream packets over the network before
      encoding a complete frame is completed, thus lowering end-to-end
      latency. The tile-rows are not independent.
      
      Change-Id: I99986595cbcbff9153e2a14f49b4aa7dee4768e2
      89a206ef
    • Paul Wilkins's avatar
      Fixed encoder decoder mismatch. · 56049d94
      Paul Wilkins authored
      Reverted part of change
      I19981d1ef0b33e4e5732739574f367fe82771a84
      
      That gives rise to an enc/dec mismatch.
      As things stand the memsets are still needed.
      
      Change-Id: I9fa076a703909aa0c4da0059ac6ae19aa530db30
      56049d94
    • Paul Wilkins's avatar
      Abstract the selection of coefficient context. · 0d284ffe
      Paul Wilkins authored
      This is an initial step to facilitate experimentation
      with changes to the prior token context used to code
      coefficients to take better account of the energy of
      preceding tokens.
      
      This patch merely abstracts the selection of context into
      two functions and does not alter the output.
      
      Change-Id: I117fff0b49c61da83aed641e36620442f86def86
      0d284ffe
    • Yaowu Xu's avatar
      enable bitstream lossless support · 17db5d00
      Yaowu Xu authored
      1. Added a bit in frame header to  to indicate if a frame is encoded
      in lossless mode, so decoder does not make the decision based on Q0
      2. Minor changes to make sure that lossy coding works same as when
      the lossless experiment is not enabled.
      3. Renamed function pointers for transforms to be consistent, using
      prefix fwd_txm and inv_txm for forward and inverse respectively
      
      To encode in lossless mode, using "--lossless=1 --min-q=0 --max-q=0"
      with vpxenc.
      
      Change-Id: Ifae53b26d2ffbe378d707e29d96817b8a5e6c068
      17db5d00
    • Yaowu Xu's avatar
      fix the lossless experiment · 16f25f9d
      Yaowu Xu authored
      Change-Id: I95acfc1417634b52d344586ab97f0abaa9a4b256
      16f25f9d
    • Paul Wilkins's avatar
      Remove NEWCOEFCONTEXT experiment. · 6a9f0c61
      Paul Wilkins authored
      Removal of the  NEWCOEFCONTEXT experiment to
      reduce code clutter and make it easier to experiment with
      some other changes to the coefficient coding context.
      
      Change-Id: Icd17b421384c354df6117cc714747647c5eb7e98
      6a9f0c61
    • Paul Wilkins's avatar
      Removal of Hybrid DWT/DCT experiment. · 649be94c
      Paul Wilkins authored
      Removal of experiment to simplify code base for other
      changes.
      
      Change-Id: If0a33952504558511926ad212bc311fc2bffb19a
      649be94c
  2. 12 Feb, 2013 5 commits
  3. 11 Feb, 2013 2 commits
    • Jingning Han's avatar
      butterfly inverse 4x4 ADST · 57e995ff
      Jingning Han authored
      fixed format issues.
      
      Implement the inverse 4x4 ADST using 9 multiplications. For this
      particular dimension, the original ADST transform can be
      factorized into simpler operations, hence is retained.
      
      Change-Id: Ie5d9749942468df299ab74e90d92cd899569e960
      57e995ff
    • Paul Wilkins's avatar
      Change rd thresholds and add speed trade off flags. · aec5bed3
      Paul Wilkins authored
      Experimental tweaks to various thresholds to measure
      quality / speed trade off.
      
      Add flag that allows static segmentation to be turned off
      and disables it unless in the second pass of a two pass
      encode.
      
      Change-Id: I219702ffe858412a83db801cbbbd869924b8c61b
      aec5bed3
  4. 09 Feb, 2013 5 commits
    • Scott LaVarnway's avatar
      Bug fix: ssse3 version of subpixel did not match C code · eda30b41
      Scott LaVarnway authored
      A 16 bit overflow condition occurs when using the EIGHTTAP_SMOOTH filters.
      (vp9_sub_pel_filters_8lp)  Changed the order of the adds to fix this problem.
      Also added ssse3 support for 4x4 subpixel filtering.
      
      Change-Id: I475eaadae920794c2de5e01e9735c059a856518e
      eda30b41
    • John Koleszar's avatar
      Replace as_mv struct with array · 7ca517f7
      John Koleszar authored
      Replace as_mv.{first, second} with a two element array, so that they
      can easily be processed with an index variable.
      
      Change-Id: I1e429155544d2a94a5b72a5b467c53d8b8728190
      7ca517f7
    • Ronald S. Bultje's avatar
      Port sadNxNx4d functions to x86inc.asm. · c0ce2ab3
      Ronald S. Bultje authored
      Change-Id: Ic639f5742f7a007753d7a3fa5c66235172eb31d8
      c0ce2ab3
    • Ronald S. Bultje's avatar
      Add sad64x64 and sad32x32 SSE2 versions. · 02ff360b
      Ronald S. Bultje authored
      Also port the 4x4, 16x16, 8x16 and 16x8 versions to x86inc.asm; this
      makes them all slightly faster, particularly on x86-64. Remove SSE3
      sad16x16 version, since the SSE2 version is now faster.
      
      About 1.5% overall encoding speedup.
      
      Change-Id: Id4011a78cce7839f554b301d0800d5ca021af797
      02ff360b
    • Ronald S. Bultje's avatar
      Make cost_coeffs() more efficient. · 639b863d
      Ronald S. Bultje authored
      Cache the constant offset in one variable to prevent re-loading that
      in each loop iteration, and mark the function as inline so we can use
      the fact that the transform size is always known in the caller.
      
      Almost 1% faster encoding overall.
      
      Change-Id: Id78325a60b025057d8f4ecd9003a74086ccbf85a
      639b863d
  5. 08 Feb, 2013 7 commits
    • John Koleszar's avatar
      Pass macroblock index to pick inter functions · 6125a1ed
      John Koleszar authored
      Pass the current mb row and column around rather than the
      recon_yoffset and recon_uvoffset, since those offsets will
      change from predictor to predictor, based on the reference
      frame selection.
      
      Change-Id: If3f9df059e00f5048ca729d3d083ff428e1859c1
      6125a1ed
    • John Koleszar's avatar
      Initial support for resolution changes on P-frames · 393b4856
      John Koleszar authored
      Allows inter-frames to change resolution. Currently these are
      almost equivalent to keyframes, as only intra prediction modes
      are allowed, but without the other context resets that occur on
      keyframes.
      
      Change-Id: Icd1a2a5af0d9462cc792588427b0a1f5b12e40d3
      393b4856
    • John Koleszar's avatar
      Avoid allocating memory when resizing frames · c03d45de
      John Koleszar authored
      As long as the new frame is smaller than the size that was originally
      allocated, we don't need to free and reallocate the memory allocated.
      Instead, do the allocation on the size of the first frame. We could
      make this passed in from the application instead, if we wanted to
      support external upscaling.
      
      Change-Id: I204d17a130728bbd91155bb4bd863a99bb99b038
      c03d45de
    • John Koleszar's avatar
      Adds a test for the VP8E_SET_SCALEMODE control · 88f99f4e
      John Koleszar authored
      Tests that the external interface to set the internal codec scaling
      works as expected. Also updates the test to pull the height from
      the decoded frame size rather than parsing the keyframe header,
      in anticipation of allowing resolution changes on non-keyframes.
      
      Change-Id: I3ed92117d8e5288fbbd1e7b618f2f233d0fe2c17
      88f99f4e
    • John Koleszar's avatar
      Restore SSSE3 subpixel filters in new convolve framework · 29d47ac8
      John Koleszar authored
      This commit adds the 8 tap SSSE3 subpixel filters back into the code
      underneath the convolve API. The C code is still called for 4x4
      blocks, as well as compound prediction modes. This restores the
      encode performance to be within about 8% of the baseline.
      
      Change-Id: Ife0d81477075ae33c05b53c65003951efdc8b09c
      29d47ac8
    • Yunqing Wang's avatar
      Integerization of dct32x32 · dbccffe2
      Yunqing Wang authored
      Test on derf set showed 0.047% overall psnr change.
      
      Change-Id: Id16c276c251a3943850ac9b95e9b09a56cf42b19
      dbccffe2
    • Paul Wilkins's avatar
      Nearest / Zero Mv default entropy tweak. · bbede82f
      Paul Wilkins authored
      Tweak to default mode context to account for the fact
      that when there are no non zero motion candidates
      Nearest is now the preferred mode for coding a 0,0
      vector.
      
      Also resolve duplicate function name and typos.
      
      Change-Id: I76802788d46c84e3d1c771be216a537ab7b12817
      bbede82f
  6. 07 Feb, 2013 5 commits
    • Yaowu Xu's avatar
      move dct/idct constants to a header file · e6ad9ab0
      Yaowu Xu authored
      also removed some un-unsed functions.
      
      Change-Id: Ie363bcc8d94441d054137d2ef7c4fe59f56027e5
      e6ad9ab0
    • Jingning Han's avatar
      Butterfly ADST based hybrid transform · d15e1da4
      Jingning Han authored
      Refactor the 8x8 inverse hybrid transform. It is now consistent
      with the new inverse DCT. Overall performance loss (due to the
      use of this variant ADST, and the rounding errors in the butterfly
      implementation) for std-hd is -0.02.
      
      Fixed BUILD warning.
      
      Devise a variant of the original ADST, which allows butterfly
      computation structure. This new transform has kernel of the
      form: sin((2k+1)*(2n+1) / (4N)). One of its butterfly structures
      using floating-point multiplications was reported in Z. Wang,
      "Fast algorithms for the discrete W transform and for the discrete
      Fourier transform", IEEE Trans. on ASSP, 1984.
      
      This patch includes the butterfly implementation of the inverse
      ADST/DCT hybrid transform of dimension 8x8.
      
      Change-Id: I3533cb715f749343a80b9087ce34b3e776d1581d
      d15e1da4
    • Paul Wilkins's avatar
      Added skip switches for SB32 and SB64 · 29731308
      Paul Wilkins authored
      Added switches and code to skip/breakout from
      doing SB32 and SB64 tests based on whether
      the 16x16 MB tests used split modes. Also to
      optionally skip 64x64 if 16x16 was chosen over
      32x32.
      
      Impact varies depending on clip from a few %
      up to almost 50% on encode speed. Only the
      split mode breakout is currently enabled.
      
      Change-Id: Ib5836140b064b350ffa3057778ed2cadcc495cf8
      29731308
    • Ronald S. Bultje's avatar
      Use fdct8x4 instead of fdct4x4 where the block size allows it. · 5cfd82bc
      Ronald S. Bultje authored
      This allows for faster SIMD implementations in the future (currently
      there is no speed impact).
      
      Change-Id: I732647e9148b5dcb44e6bc8728138f0141218329
      5cfd82bc
    • Ronald S. Bultje's avatar
      Use configure checks for various inline keywords. · aac73df1
      Ronald S. Bultje authored
      Change-Id: I8508f1a3d3430f998bb9295f849e88e626a52a24
      aac73df1
  7. 06 Feb, 2013 4 commits
  8. 05 Feb, 2013 5 commits
    • Ronald S. Bultje's avatar
      [WIP] Add column-based tiling. · 1407bdc2
      Ronald S. Bultje authored
      This patch adds column-based tiling. The idea is to make each tile
      independently decodable (after reading the common frame header) and
      also independendly encodable (minus within-frame cost adjustments in
      the RD loop) to speed-up hardware & software en/decoders if they used
      multi-threading. Column-based tiling has the added advantage (over
      other tiling methods) that it minimizes realtime use-case latency,
      since all threads can start encoding data as soon as the first SB-row
      worth of data is available to the encoder.
      
      There is some test code that does random tile ordering in the decoder,
      to confirm that each tile is indeed independently decodable from other
      tiles in the same frame. At tile edges, all contexts assume default
      values (i.e. 0, 0 motion vector, no coefficients, DC intra4x4 mode),
      and motion vector search and ordering do not cross tiles in the same
      frame.
      t log
      
      Tile independence is not maintained between frames ATM, i.e. tile 0 of
      frame 1 is free to use motion vectors that point into any tile of frame
      0. We support 1 (i.e. no tiling), 2 or 4 column-tiles.
      
      The loopfilter crosses tile boundaries. I discussed this briefly with Aki
      and he says that's OK. An in-loop loopfilter would need to do some sync
      between tile threads, but that shouldn't be a big issue.
      
      Resuls: with tiling disabled, we go up slightly because of improved edge
      use in the intra4x4 prediction. With 2 tiles, we lose about ~1% on derf,
      ~0.35% on HD and ~0.55% on STD/HD. With 4 tiles, we lose another ~1.5%
      on derf ~0.77% on HD and ~0.85% on STD/HD. Most of this loss is
      concentrated in the low-bitrate end of clips, and most of it is because
      of the loss of edges at tile boundaries and the resulting loss of intra
      predictors.
      
      TODO:
      - more tiles (perhaps allow row-based tiling also, and max. 8 tiles)?
      - maybe optionally (for EC purposes), motion vectors themselves
        should not cross tile edges, or we should emulate such borders as
        if they were off-frame, to limit error propagation to within one
        tile only. This doesn't have to be the default behaviour but could
        be an optional bitstream flag.
      
      Change-Id: I5951c3a0742a767b20bc9fb5af685d9892c2c96f
      1407bdc2
    • Ronald S. Bultje's avatar
      Add SSE3 versions for sad{32x32,64x64}x4d functions. · 58c983d1
      Ronald S. Bultje authored
      Overall encoding about 15% faster.
      
      Change-Id: I176a775c704317509e32eee83739721804120ff2
      58c983d1
    • John Koleszar's avatar
      Convert subpixel filters to use convolve framework · 7a07eea1
      John Koleszar authored
      Update the code to call the new convolution functions to do subpixel
      prediction rather than the existing functions. Remove the old C and
      assembly code, since it is unused. This causes a 50% performance
      reduction on the decoder, but that will be resolved when the asm for
      the new functions is available.
      
      There is no consensus for whether 6-tap or 2-tap predictors will be
      supported in the final codec, so these filters are implemented in
      terms of the 8-tap code, so that quality testing of these modes
      can continue. Implementing the lower complexity algorithms is a
      simple exercise, should it be necessary.
      
      This code produces slightly better results in the EIGHTTAP_SMOOTH
      case, since the filter is now applied in only one direction when
      the subpel motion is only in one direction. Like the previous code,
      the filtering is skipped entirely on full-pel MVs. This combination
      seems to give the best quality gains, but this may be indicative of a
      bug in the encoder's filter selection, since the encoder could
      achieve the result of skipping the filtering on full-pel by selecting
      one of the other filters. This should be revisited.
      
      Quality gains on derf positive on almost all clips. The only clip
      that seemed to be hurt at all datarates was football
      (-0.115% PSNR average, -0.587% min). Overall averages 0.375% PSNR,
      0.347% SSIM.
      
      Change-Id: I7d469716091b1d89b4b08adde5863999319d69ff
      7a07eea1
    • John Koleszar's avatar
      Add 8-tap generic convolver · 5ca6a366
      John Koleszar authored
      This commit introduces a new convolution function which will be used to
      replace the existing subpixel interpolation functions. It is much the
      same as the existing functions, but allows for changing the filter
      kernel on a per-pixel basis, and doesn't bake in knowledge of the
      filter to be applied or the size of the resulting block into the
      function name.
      
      Replacing the existing subpel filters will come in a later commit.
      
      Change-Id: Ic9a5615f2f456cb77f96741856fc650d6d78bb91
      5ca6a366
    • Yaowu Xu's avatar
      rewrite 4x4 idct and fdct · fa36981e
      Yaowu Xu authored
      This commit changes the 4x4 iDCT to use same algorithm & constants as
      other iDCTs. The 4x4 fDCT is also changed to be based on the new iDCT.
      
      Change-Id: Ib1a902693228af903862e1f5a08078c36f2089b0
      fa36981e