1. 03 Apr, 2013 1 commit
    • John Koleszar's avatar
      Remove special case vp9_decode_coefs_4x4 · 1e5f25ec
      John Koleszar authored
      This code was only called in the BPRED case, but had no real special
      case associated with it. Made BPRED behave like all other modes. No
      bitstream change.
      
      Change-Id: I87ba11fe723928b6314d094979011228d5ba006f
      1e5f25ec
  2. 28 Mar, 2013 2 commits
    • Deb Mukherjee's avatar
      Framework changes in nzc to allow more flexibility · fe9b5143
      Deb Mukherjee authored
      The patch adds the flexibility to use standard EOB based coding
      on smaller block sizes and nzc based coding on larger blocksizes.
      The tx-sizes that use nzc based coding and those that use EOB based
      coding are controlled by a function get_nzc_used().
      By default, this function uses nzc based coding for 16x16 and 32x32
      transform blocks, which seem to bridge the performance gap
      substantially.
      
      All sets are now lower by 0.5% to 0.7%, as opposed to ~1.8% before.
      
      Change-Id: I06abed3df57b52d241ea1f51b0d571c71e38fd0b
      fe9b5143
    • Ronald S. Bultje's avatar
      Fix mix-up in pt token indexing. · 9eea9fa2
      Ronald S. Bultje authored
      This fixes uninitialized reads in the trellis, and probably makes the
      trellis do something again.
      
      Change-Id: Ifac8dae9aa77574bde0954a71d4571c5c556df3c
      9eea9fa2
  3. 27 Mar, 2013 1 commit
    • Dmitry Kovalev's avatar
      Tokenization code cleanup. · 063628c8
      Dmitry Kovalev authored
      Moving almost identical code to decode_sb32 and decode_sb64 functions.
      
      Change-Id: Id39377aa5106be85d5b0fc3f83586b3779a6c0da
      063628c8
  4. 26 Mar, 2013 3 commits
    • Ronald S. Bultje's avatar
      Add col/row-based coefficient scanning patterns for 1D 8x8/16x16 ADSTs. · d9094d8f
      Ronald S. Bultje authored
      These are mostly just for experimental purposes. I saw small gains (in
      the 0.1% range) when playing with this on derf.
      
      Change-Id: Ib21eed477bbb46bddcd73b21c5c708a5b46abedc
      d9094d8f
    • Ronald S. Bultje's avatar
      Redo banding for all transforms. · 3120dbdd
      Ronald S. Bultje authored
      Now that the first AC coefficient in both directions use the same DC
      as their context, there no longer is a purpose in letting both have
      their own band. Merging these two bands allows us to split bands for
      some of the very high-frequency AC bands.
      
      In addition, I'm redoing the banding for the 1D-ADST col/row scans. I
      don't think the old banding made any sense at all (it merged the last
      coefficient of the first row/col in the same band as the first two of
      the second row/col), which was clearly an oversight from the band being
      applied in scan-order (rather than in their actual position). Now,
      coefficients at the same position will be in the same band, regardless
      what scan order is used. I think this makes most sense for the purpose
      of banding, which is basically "predict energy for this coefficient
      depending on the energy of context coefficients" (i.e. pt).
      
      After full re-training, together with previous patch, derf gains about
      1.2-1.3%, and hd/stdhd gain about 0.9-1.0%.
      
      Change-Id: I7a0cc12ba724e88b278034113cb4adaaebf87e0c
      3120dbdd
    • Ronald S. Bultje's avatar
      Use above/left (instead of previous in scan-order) as token context. · 790fb132
      Ronald S. Bultje authored
      Pearson correlation for above or left is significantly higher than for
      previous-in-scan-order (absolute values depend on position in scan, but
      in general, we gain about 0.1-0.2 by using either above or left; using
      both basically just makes this even better). For eob branch skipping,
      we continue to use the previous token in scan order.
      
      This helps about 0.9% on derf after re-training on a limited data set.
      Full re-training and results on larger-resolution clips are pending.
      
      Note that this commit breaks trellis, so we can probably get further
      gains out of it by fixing trellis at some later point.
      
      Change-Id: Iead68e296fc3a105cca746b5e3da9555d6010cfe
      790fb132
  5. 07 Mar, 2013 2 commits
    • Ronald S. Bultje's avatar
      Re-add support for ADST in superblocks. · d3724abe
      Ronald S. Bultje authored
      This also changes the RD search to take account of the correct block
      index when searching (this is required for ADST positioning to work
      correctly in combination with tx_select).
      
      Change-Id: Ie50d05b3a024a64ecd0b376887aa38ac5f7b6af6
      d3724abe
    • Deb Mukherjee's avatar
      Coding con-zero count rather than EOB for coeffs · eb6ef241
      Deb Mukherjee authored
      This patch revamps the entropy coding of coefficients to code first
      a non-zero count per coded block and correspondingly remove the EOB
      token from the token set.
      
      STATUS:
      Main encode/decode code achieving encode/decode sync - done.
      Forward and backward probability updates to the nzcs - done.
      Rd costing updates for nzcs - done.
      Note: The dynamic progrmaming apporach used in trellis quantization
      is not exactly compatible with nzcs. A suboptimal approach has been
      used instead where branch costs are updated to account for changes
      in the nzcs.
      
      TODO:
      Training the default probs/counts for nzcs
      
      Change-Id: I951bc1e22f47885077a7453a09b0493daa77883d
      eb6ef241
  6. 05 Mar, 2013 1 commit
    • Ronald S. Bultje's avatar
      Make superblocks independent of macroblock code and data. · 111ca421
      Ronald S. Bultje authored
      Split macroblock and superblock tokenization and detokenization
      functions and coefficient-related data structs so that the bitstream
      layout and related code of superblock coefficients looks less like it's
      a hack to fit macroblocks in superblocks.
      
      In addition, unify chroma transform size selection from luma transform
      size (i.e. always use the same size, as long as it fits the predictor);
      in practice, this means 32x32 and 64x64 superblocks using the 16x16 luma
      transform will now use the 16x16 (instead of the 8x8) chroma transform,
      and 64x64 superblocks using the 32x32 luma transform will now use the
      32x32 (instead of the 16x16) chroma transform.
      
      Lastly, add a trellis optimize function for 32x32 transform blocks.
      
      HD gains about 0.3%, STDHD about 0.15% and derf about 0.1%. There's
      a few negative points here and there that I might want to analyze
      a little closer.
      
      Change-Id: Ibad7c3ddfe1acfc52771dfc27c03e9783e054430
      111ca421
  7. 27 Feb, 2013 1 commit
  8. 26 Feb, 2013 1 commit
  9. 25 Feb, 2013 1 commit
    • Dmitry Kovalev's avatar
      Code cleanup. · ab196b7e
      Dmitry Kovalev authored
      Lower case names of variables. Removing redundant spaces, parentheses,
      casts, and variables.
      
      Change-Id: I55b80c55b7d5adca44c1e8adb40a124c0680f229
      ab196b7e
  10. 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
  11. 21 Feb, 2013 1 commit
  12. 15 Feb, 2013 1 commit
  13. 14 Feb, 2013 1 commit
  14. 13 Feb, 2013 3 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
    • 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
  15. 12 Feb, 2013 1 commit
  16. 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
  17. 10 Jan, 2013 1 commit
  18. 08 Jan, 2013 1 commit
  19. 20 Dec, 2012 1 commit
    • Deb Mukherjee's avatar
      New previous coef context experiment · 08f0c7cc
      Deb Mukherjee authored
      Adds an experiment to derive the previous context of a coefficient
      not just from the previous coefficient in the scan order but from a
      combination of several neighboring coefficients previously encountered
      in scan order.  A precomputed table of neighbors for each location
      for each scan type and block size is used. Currently 5 neighbors are
      used.
      
      Results are about 0.2% positive using a strategy where the max coef
      magnitude from the 5 neigbors is used to derive the context.
      
      Change-Id: Ie708b54d8e1898af742846ce2d1e2b0d89fd4ad5
      08f0c7cc
  20. 19 Dec, 2012 1 commit
    • John Koleszar's avatar
      Use boolcoder API instead of inlining · 05ec800e
      John Koleszar authored
      This patch changes the token packing to call the bool encoder API rather
      than inlining it into the token packing function, and similarly removes
      a special get_signed case from the detokenizer. This allows easier
      experimentation with changing the bool coder as a whole.
      
      Change-Id: I52c3625bbe4960b68cfb873b0e39ade0c82f9e91
      05ec800e
  21. 18 Dec, 2012 3 commits
  22. 17 Dec, 2012 1 commit
  23. 13 Dec, 2012 1 commit
  24. 11 Dec, 2012 1 commit
  25. 08 Dec, 2012 3 commits
    • Yaowu Xu's avatar
      experiment with CONTEXT conversion · ab480ced
      Yaowu Xu authored
      This commit changed the ENTROPY_CONTEXT conversion between MBs that
      have different transform sizes.
      
      In additioin, this commit also did a number of cleanup/bug fix:
      1. removed duplicate function vp9_fix_contexts() and changed to use
      vp8_reset_mb_token_contexts() for both encoder and decoder
      2. fixed a bug in stuff_mb_16x16 where wrong context was used for
      the UV.
      3. changed reset all context to 0 if a MB is skipped to simplify the
      logic.
      
      Change-Id: I7bc57a5fb6dbf1f85eac1543daaeb3a61633275c
      ab480ced
    • Ronald S. Bultje's avatar
      Clean up 4x4 coefficient decoding code. · fbf052df
      Ronald S. Bultje authored
      Don't use vp9_decode_coefs_4x4() for 2nd order DC or luma blocks. The
      code introduces some overhead which is unnecessary for these cases.
      Also, remove variable declarations that are only used once, remove
      magic offsets into the coefficient buffer (use xd->block[i].qcoeff
      instead of xd->qcoeff + magic_offset), and fix a few Google Style
      Guide violations.
      
      Change-Id: I0ae653fd80ca7f1e4bccd87ecef95ddfff8f28b4
      fbf052df
    • Ronald S. Bultje's avatar
      Introduce vp9_coeff_probs/counts/stats/accum types. · 885cf816
      Ronald S. Bultje authored
      Use these, instead of the 4/5-dimensional arrays, to hold statistics,
      counts, accumulations and probabilities for coefficient tokens. This
      commit also re-allows ENTROPY_STATS to compile.
      
      Change-Id: If441ffac936f52a3af91d8f2922ea8a0ceabdaa5
      885cf816
  26. 07 Dec, 2012 1 commit
    • Ronald S. Bultje's avatar
      32x32 transform for superblocks. · c456b35f
      Ronald S. Bultje authored
      This adds Debargha's DCT/DWT hybrid and a regular 32x32 DCT, and adds
      code all over the place to wrap that in the bitstream/encoder/decoder/RD.
      
      Some implementation notes (these probably need careful review):
      - token range is extended by 1 bit, since the value range out of this
        transform is [-16384,16383].
      - the coefficients coming out of the FDCT are manually scaled back by
        1 bit, or else they won't fit in int16_t (they are 17 bits). Because
        of this, the RD error scoring does not right-shift the MSE score by
        two (unlike for 4x4/8x8/16x16).
      - to compensate for this loss in precision, the quantizer is halved
        also. This is currently a little hacky.
      - FDCT and IDCT is double-only right now. Needs a fixed-point impl.
      - There are no default probabilities for the 32x32 transform yet; I'm
        simply using the 16x16 luma ones. A future commit will add newly
        generated probabilities for all transforms.
      - No ADST version. I don't think we'll add one for this level; if an
        ADST is desired, transform-size selection can scale back to 16x16
        or lower, and use an ADST at that level.
      
      Additional notes specific to Debargha's DWT/DCT hybrid:
      - coefficient scale is different for the top/left 16x16 (DCT-over-DWT)
        block than for the rest (DWT pixel differences) of the block. Therefore,
        RD error scoring isn't easily scalable between coefficient and pixel
        domain. Thus, unfortunately, we need to compute the RD distortion in
        the pixel domain until we figure out how to scale these appropriately.
      
      Change-Id: I00386f20f35d7fabb19aba94c8162f8aee64ef2b
      c456b35f
  27. 29 Nov, 2012 2 commits
    • Yaowu Xu's avatar
      minor fix to eob check for setting CONTEXT · 7ab1d3e4
      Yaowu Xu authored
      Previously, the "!=" check is logically incorrect when eob is at 0 and
      effective coefficient starting position is 1. This commit should have
      no effect on bitstream.
      
      Change-Id: I6ce3a847c7e72bfbe4f7c74f88e3310c6b9b6d30
      7ab1d3e4
    • Deb Mukherjee's avatar
      Fixing 8x8/4x4 ADST for intra modes with tx select · 0742b1e4
      Deb Mukherjee authored
      This patch allows use of 8x8 and 4x4 ADST correctly for Intra
      16x16 modes and Intra 8x8 modes when the block size selected
      is smaller than the prediction mode. Also includes some cleanups
      and refactoring.
      
      Rebase.
      
      Change-Id: Ie3257bdf07bdb9c6e9476915e3a80183c8fa005a
      0742b1e4
  28. 28 Nov, 2012 1 commit