1. 26 Feb, 2013 1 commit
    • John Koleszar's avatar
      Refactor inter recon functions to support scaling · 6a4f708c
      John Koleszar authored
      Ensure that all inter prediction goes through a common code path
      that takes scaling into account. Removes a bunch of duplicate
      1st/2nd predictor code. Also introduces a 16x8 mode for 8x8
      MVs, similar to the 8x4 trick we were doing before. This has an
      unexpected effect with EIGHTTAP_SMOOTH, so it's disabled in that
      case for now.
      
      Change-Id: Ia053e823a8bc616a988a0af30452e1e75a739cba
      6a4f708c
  2. 25 Feb, 2013 1 commit
    • Jingning Han's avatar
      clean up forward and inverse hybrid transform · 77a3becf
      Jingning Han authored
      Rebased.
      
      Remove the old matrix multiplication transform computation. The 16x16
      ADST/DCT can be switched on/off and evaluated by setting ACTIVE_HT16
      300/0 in vp9/common/vp9_blockd.h.
      
      Change-Id: Icab2dbd18538987e1dc4e88c45abfc4cfc6e133f
      77a3becf
  3. 23 Feb, 2013 2 commits
    • Ronald S. Bultje's avatar
      Split coefficient token tables intra vs. inter. · 0c9e2e9a
      Ronald S. Bultje authored
      Change-Id: I5416455f8f129ca0f450d00e48358d2012605072
      0c9e2e9a
    • Paul Wilkins's avatar
      Further changes to coefficient contexts. · c17672a3
      Paul Wilkins authored
      This patch alters the balance of context between the
      coefficient bands (reflecting the position of coefficients
      within a transform blocks) and the energy of the previous
      token (or tokens) within a block.
      
      In this case the number of coefficient bands is reduced
      but more previous token energy bands are supported.
      
      Some initial rebalancing of the default tables has been
      by running multiple derf clips at multiple data rates using
      the ENTOPY_STATS macro. Further balancing needs to be
      done using larger image formatsd especially in regard to
      the bigger transform sizes which are not as well represented
      in encodings of smaller image formats.
      
      Change-Id: If9736e95c391e711b04aef6393d26f60f36e1f8a
      c17672a3
  4. 22 Feb, 2013 2 commits
    • Paul Wilkins's avatar
      Experimental removal of over quant code · dbf49420
      Paul Wilkins authored
      The over quant code was added in VP8 post
      bitstream freeze to allow compression to lower
      data rates
      
      In VP9 the real qualtizer range has been greatly
      extended anyway.
      
      Change-Id: I5d384fa5e9a83ef75a3df34ee30627bd21901526
      dbf49420
    • Jingning Han's avatar
      Forward butterfly hybrid transform · babbd5d1
      Jingning Han authored
      This patch includes 4x4, 8x8, and 16x16 forward butterfly ADST/DCT
      hybrid transform. The kernel of 4x4 ADST is sin((2k+1)*(n+1)/(2N+1)).
      The kernel of 8x8/16x16 ADST is of the form sin((2k+1)*(2n+1)/4N).
      
      Change-Id: I8f1ab3843ce32eb287ab766f92e0611e1c5cb4c1
      babbd5d1
  5. 21 Feb, 2013 1 commit
    • Deb Mukherjee's avatar
      Refactoring of switchable filter search for speed · 28b1db92
      Deb Mukherjee authored
      Refactors the switchable filter search in the rd loop to
      improve encode speed.
      
      Uses a piecewise approximation to a closed form expression to estimate
      rd cost for a Laplacian source with a given variance and quantization
      step-size.
      
      About 40% encode time reduction is achieved.
      
      Results (on a feb 12 baseline) show a slight drop:
      
      derf: -0.019%
      yt: +0.010%
      std-hd: -0.162%
      hd: -0.050%
      
      Change-Id: Ie861badf5bba1e3b1052e29a0ef1b7e256edbcd0
      28b1db92
  6. 16 Feb, 2013 2 commits
    • Ronald S. Bultje's avatar
      Minor cosmetic cleanups. · aa84c16d
      Ronald S. Bultje authored
      Change-Id: I13d8ae754827368755575dd699a087b3b11f5b16
      aa84c16d
    • Ronald S. Bultje's avatar
      Prevent filling transform size cache with uninitialized values. · ebfdaa0e
      Ronald S. Bultje authored
      The 32x32 value in case of splitmv was uninitialized. this leads to
      all kind of erratic behaviour down the line. Also fill in dummy values
      for superblocks in keyframes (the values are currently unused, but we
      run into integer overflows anyway, which makes detecting bad cases
      harder). Lastly, in case we did not find any RD value at all, don't
      set tx_diff to INT_MIN, but instead set it to zero (since if we couldn't
      find a mode, it's unlikely that any particular transform would have made
      that worse or better; rather, it's likely equally bad for all tx_sizes).
      
      Change-Id: If236fd3aa2037e5b398d03f3b1978fbbc5ce740e
      ebfdaa0e
  7. 15 Feb, 2013 3 commits
  8. 14 Feb, 2013 1 commit
  9. 13 Feb, 2013 6 commits
    • Paul Wilkins's avatar
      Abstract selection of coef band. · 9255ad10
      Paul Wilkins authored
      This patch abstracts the selection of the coefficient band
      context into a function as a precursor to further experiments
      with the coefficient context.
      
      It also removes the large per TX size coefficient band structures
      and uses a single matrix for all block sizes within the test function.
      
      This may have an impact on quality (results to follow) but is only an
      intermediate step in the process of redefining the context. Also the
      quality impact will be larger initially because the default tables will
      be out of step with the new banding.
      
      In particular the 4x4 will in this case only use 7 bands. If needed we
      can add back block size dependency localized within the function, but
      this can follow on after the other changes to the definition of the
      context.
      
      Change-Id: Id7009c2f4f9bb1d02b861af85fd8223d4285bde5
      9255ad10
    • 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
  10. 11 Feb, 2013 1 commit
    • 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
  11. 09 Feb, 2013 2 commits
    • 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
      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
  12. 08 Feb, 2013 2 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
  13. 07 Feb, 2013 2 commits
  14. 06 Feb, 2013 1 commit
    • John Koleszar's avatar
      Eliminate tautology · 31cbe2ed
      John Koleszar authored
            Unreachable code
        that does nothing anyway
            removed forever.
      
      Change-Id: I14105d2dd9dbc9d558f36464055e350dbeb45488
      31cbe2ed
  15. 05 Feb, 2013 3 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
    • 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
    • Paul Wilkins's avatar
      Change definition of NearestMV. · 81043e8d
      Paul Wilkins authored
      This commit makes the NearestMV match the chosen
      best reference MV. It can be a 0,0 or non zero vector
      which means the the compound nearest mv mode can
      combine a 0,0 and a non zero vector.
      
      Change-Id: I2213d09996ae2916e53e6458d7d110350dcffd7a
      81043e8d
  16. 30 Jan, 2013 2 commits
  17. 29 Jan, 2013 1 commit
  18. 28 Jan, 2013 1 commit
    • Paul Wilkins's avatar
      Segment Skip Flag · 0ff9b033
      Paul Wilkins authored
      First step in simplifying the segment mode and
      segment EOB flags into a simpler segment skip
      flag that implies 0,0 mv and EOB at position 0.
      
      Change-Id: Ib750cac31a7a02dc21082580498efd9f7d8d72a5
      0ff9b033
  19. 26 Jan, 2013 1 commit
    • Deb Mukherjee's avatar
      Adding a frame parallel decoding mode · dfd89f2e
      Deb Mukherjee authored
      Adds a flag to disable features that would inhibit frame parallel
      decoding. This includes backward adaptation and MV sorting based
      on search in ref frame buffer.
      
      Also includes some minor clean-ups.
      
      Change-Id: I434846717a47b7bcb244b37ea670c5cdf776f14d
      dfd89f2e
  20. 25 Jan, 2013 1 commit
  21. 24 Jan, 2013 1 commit
    • Deb Mukherjee's avatar
      Adds an error-resilient mode with test · 01cafaab
      Deb Mukherjee authored
      Adds an error-resilient mode where frames can be continued
      to be decoded even when there are errors (due to network losses)
      on a prior frame. Specifically, backward updates are turned off
      and probabilities of various symbols are reset to defaults at
      the beginning of each frame. Further, the last frame's mvs are
      not used for the mv reference list, and the sorting of the
      initial list based on search on previous frames is turned off
      as well.
      
      Also adds a test where an arbitrary set of frames are skipped
      from decoding to simulate errors. The test verifies (1) that if
      the error frames are droppable - i.e. frame buffer updates have
      been turned off - there are no mismatch errors for the remaining
      frames after the error frames; and (2) if the error-frames are non
      droppable, there are not only no decoding errors but the mismatch
      PSNR between the decoder's version of the post-error frames and the
      encoder's version is at least 20 dB.
      
      Change-Id: Ie6e2bcd436b1e8643270356d3a930e8989ff52a5
      01cafaab
  22. 16 Jan, 2013 1 commit
    • John Koleszar's avatar
      Start to anonymize reference frames · da832a80
      John Koleszar authored
      Remove lst_fb_idx, gld_fb_idx, alt_fb_idx, refresh_last_frame,
      refresh_golden_frame, refresh_alt_ref_frame from common. Gold/Alt are
      encode side conventions. From the decoder's perspective, we want to be
      dealing with numbered references.
      
      Updates to active_ref 2 signal mode context switches, vestigial from
      refresh_alt_ref_frame. This needs some clean up to make sense with
      increased numbers of reference frames, as well as reimplementing the
      swapping of alt/golden which was previously done using the
      buffer-to-buffer copy mechanism removed in an earlier commit.
      
      Change-Id: I7334445158b7666f9295d2a2dd22aa03f4485f58
      da832a80
  23. 15 Jan, 2013 1 commit
  24. 14 Jan, 2013 1 commit
    • John Koleszar's avatar
      Use INT64_MAX instead of LLONG_MAX · 24bc1a71
      John Koleszar authored
      These variables have the type int64_t, not long long. long long could
      be a larger type than 64 bits. Emulate INT64_MAX for older versions of
      MSVC, and remove the unreferenced vpx_ports/vpxtypes.h
      
      Change-Id: Ideaca71838fcd3849d816d5ab17aa347c97d03b0
      24bc1a71