1. 19 Apr, 2013 1 commit
    • Paul Wilkins's avatar
      Adjustments to key frame sizing. · 21ff7bdc
      Paul Wilkins authored
      Adjustments take heavier account of the frame near a kf
      in deciding boost and limit the total number that can contribute.
      Also adjusted the minq calculations such that in most cases we
      generate a smaller key frame.
      Modified the code that accounts for how static the sequence is and
      added some adjustment based on image size. This is still very
      crude but smaller images tend to behave better with a larger
      delta between KF Q and other frames than larger image formats.
      Changes give sizable gains in overall PSNR  on all the test sets but the
      biggest gains (~3%) were on the std-hd set.
      The gains were smaller for SSIM but still significant.
      Average PSNR results are mixed because this metric can very easily
      be altered by having a very good / lossless coding of one or two frames.
      Some of the YT and YT-HD clips in particular have blank lead ins and
      allowing lossless coding of these appears to make a big difference to
      average PSNR but it reality does not help much at all.
      
      Change-Id: I6bfe485a1d330b47c783832f1717c95c535464ec
      21ff7bdc
  2. 17 Apr, 2013 1 commit
    • Jingning Han's avatar
      Recursive partition syntax coding · 90a91cc6
      Jingning Han authored
      Enable recursive partition information coding from SB64X64 down to
      MB16X16. The bit-stream syntax is now supporting rectangular block
      sizes. It starts from SB64X64 and recursively describes the partition
      type of the current block. If the partition type is PARTITION_NONE,
      the block is coded as a single unit; if it is PARTITION_HORZ or
      PARTITION_VERT, the block is segmented into two independently coded
      rectangular units, with no further partition needed; otherwise, the
      block is segmented into 4 square blocks. i.e., PARTITION_SPLIT case,
      each can be potentially further partitioned.
      
      Forward adaptive probability modeling is used for the partition
      information coding, conditioned on the current block size.
      
      Change-Id: I499365fb547839d555498e3bcc0387d8a3587d87
      90a91cc6
  3. 16 Apr, 2013 2 commits
    • Adrian Grange's avatar
      Move configure_arnr_filter function · 9b84d113
      Adrian Grange authored
      This function is now called from configures the ARNR
      filter so it belongs with the other temporal filter
      functions.
      
      Change-Id: I64211875918364b5b8edfb97743e573c6def1663
      9b84d113
    • John Koleszar's avatar
      Remove the mb_no_coeff_skip flag · e3cfe4e8
      John Koleszar authored
      This flag was added to VP8 to allow a mode where MB-level skipping
      was not allowed, saving a bit per mb. It was never used in practice,
      and hasn't been tested in VP9, so remove it.
      
      Change-Id: Id450ec6904c6d06c1919508e7efc52d05cde5631
      e3cfe4e8
  4. 15 Apr, 2013 3 commits
    • Dmitry Kovalev's avatar
      Removing TRUE and FALSE macro definitions. · a0d9309e
      Dmitry Kovalev authored
      Using regular 0 and 1 constants now.
      
      Change-Id: Ie763503cbb727847cc8f1d6506cd6f2ee607f056
      a0d9309e
    • Jingning Han's avatar
      Add rectangular block size variance/sad functions. · aaf33d7d
      Jingning Han authored
      With this, the RD loop properly supports rectangular blocks.
      
      Change-Id: Iece79048fb4e84741ee1ada982da129a7bf00470
      aaf33d7d
    • Adrian Grange's avatar
      Initial addition of multiple ARF frames · c2876cf0
      Adrian Grange authored
      This is work-in-progress, it implements multiple ARF
      encoding behind an experimental flag.
      
      It adds the ability to insert multiple ARF frames into a
      single ARF group. This patch implements the reordering
      of the coded frames, and implements a fixed-length coding
      pattern. It applies a fixed quantizer strategy based on
      where the frame is in the coding sequence.
      
      Further work to modify the rate control strategy is
      ongoing and will be submitted via a set of future patches.
      
      In this first step, each ARF group is recursively
      bisected and an ARF frame added at that position in the
      sequence. The recursion continues until ARF frames are
      within MIN_GF_INTERVAL frames.
      
      The code sits behind the "multiple-arf" experimental
      flag ("CONFIG_MULTIPLE_ARF"). The experimental flag
      "oneshotq" ("CONFIG_ONESHOTQ") also needs to be enabled
      for this patch to work correctly.
      
      Change-Id: Ie473b05ebb43ac473c0cfb659b2b8042823085e2
      c2876cf0
  5. 12 Apr, 2013 1 commit
  6. 11 Apr, 2013 2 commits
  7. 10 Apr, 2013 1 commit
    • Yaowu Xu's avatar
      Remove obselete code · 2da90fdd
      Yaowu Xu authored
      The strategy to run fast loop filter picking for encoder speed-up
      should be revisited at a later stage.
      
      Change-Id: I3b75e06d767cff41be952a42e63b3292f4eab996
      2da90fdd
  8. 05 Apr, 2013 1 commit
  9. 04 Apr, 2013 1 commit
    • Paul Wilkins's avatar
      Fixed incorrect use of compute_qdelta() · 9b9136f8
      Paul Wilkins authored
      This function expects real Q values as inputs
      not index values.
      
      The use-age her impacts the Q chosen for force key
      frames. Though this is a bug fix I have not yet verified
      whether following the bug fix the q multiplier value used is
      correct.
      
      Change-Id: I49f6da894d90baeb1e86c820c335f02dc80d3b66
      9b9136f8
  10. 03 Apr, 2013 2 commits
    • Yunqing Wang's avatar
      Modify vp9_setup_interp_filters function · 4ca882f3
      Yunqing Wang authored
      Took vp9_setup_scale_factors_for_frame() out from
      vp9_setup_interp_filters(), so that it is only called once per
      frame instead of per macroblock. Decoder tests showed a 1.5%
      performance gain.
      
      Change-Id: I770cb09eb2140ab85132f82aed388ac0bdd3a0aa
      4ca882f3
    • Dmitry Kovalev's avatar
      Renaming sb32_coded and sb64_coded fields. · dca8ad17
      Dmitry Kovalev authored
      Renaming sb32_coded to prob_sb32_coded and sb64_coded to prob_sb64_coded.
      
      Change-Id: I6de5cad00a57c3e066d53467f8c38cb6073dce11
      dca8ad17
  11. 02 Apr, 2013 2 commits
    • Dmitry Kovalev's avatar
      Code cleanup in vp9_onyx_if.c. · 6f53eee5
      Dmitry Kovalev authored
      Using clamp and MIN/MAX functions instead of plain C code. Lower case
      variable names. Removing redundant parenthesis.
      
      Change-Id: Ibf7cc5fbe4fbdb5029049a599af71534176e6f42
      6f53eee5
    • Dmitry Kovalev's avatar
      Code cleanup. · 50e54c11
      Dmitry Kovalev authored
      Adding multiple16 function, removing redundant code, better formatting.
      
      Change-Id: I50195b78ac8ab803e3d05c8fb05a7ca134fab386
      50e54c11
  12. 01 Apr, 2013 1 commit
    • Ronald S. Bultje's avatar
      Calculate SSIM over both reconstruction as well as postproc buffer. · 6dd6ffb0
      Ronald S. Bultje authored
      We used to calculate SSIM only over the postproc buffer, whereas we
      calculate PSNR for both. Compared to postproc-SSIM, this is about 0.3%
      higher for derf, 1.4% lower for hd and 0.5% lower for stdhd, although
      it is highly variable on a per-clip basis.
      
      Change-Id: I8dd491f0f5b4201dedfb15d288c854d5d4caa10f
      6dd6ffb0
  13. 27 Mar, 2013 1 commit
    • Dmitry Kovalev's avatar
      General code cleanup. · 180cd5fa
      Dmitry Kovalev authored
      Removing redundant code, lower case variable names, better indentation,
      better parameter names, adding const to readonly parameters.
      
      Change-Id: Ibfdee00f60316fdc5b3f024028c7aaa76a627483
      180cd5fa
  14. 26 Mar, 2013 2 commits
    • John Koleszar's avatar
      Add an in-loop deringing experiment · 441e2eab
      John Koleszar authored
      Adds a per-frame, strength adjustable, in loop deringing filter. Uses
      the existing vp9_post_proc_down_and_across 5 tap thresholded blur
      code, with a brute force search for the threshold.
      
      Results almost strictly positive on the YT HD set, either having no
      effect or helping PSNR in the range of 1-3% (overall average 0.8%).
      Results more mixed for the CIF set, (-0.5 min, 1.4 max, 0.1 avg).
      This has an almost strictly negative impact to SSIM, so examining a
      different filter or a more balanced search heuristic is in order.
      
      Other test set results pending.
      
      Change-Id: I5ca6ee8fe292dfa3f2eab7f65332423fa1710b58
      441e2eab
    • Deb Mukherjee's avatar
      Modeling default coef probs with distribution · fd18d5df
      Deb Mukherjee authored
      Replaces the default tables for single coefficient magnitudes with
      those obtained from an appropriate distribution. The EOB node
      is left unchanged. The model is represeted as a 256-size codebook
      where the index corresponds to the probability of the Zero or the
      One node. Two variations are implemented corresponding to whether
      the Zero node or the One-node is used as the peg. The main advantage
      is that the default prob tables will become considerably smaller and
      manageable. Besides there is substantially less risk of over-fitting
      for a training set.
      
      Various distributions are tried and the one that gives the best
      results is the family of Generalized Gaussian distributions with
      shape parameter 0.75. The results are within about 0.2% of fully
      trained tables for the Zero peg variant, and within 0.1% of the
      One peg variant.
      
      The forward updates are optionally (controlled by a macro)
      model-based, i.e. restricted to only convey probabilities from the
      codebook. Backward updates can also be optionally (controlled by
      another macro) model-based, but is turned off by default. Currently
      model-based forward updates work about the same as unconstrained
      updates, but there is a drop in performance with backward-updates
      being model based.
      
      The model based approach also allows the probabilities for the key
      frames to be adjusted from the defaults based on the base_qindex of
      the frame. Currently the adjustment function is a placeholder that
      adjusts the prob of EOB and Zero node from the nominal one at higher
      quality (lower qindex) or lower quality (higher qindex) ends of the
      range. The rest of the probabilities are then derived based on the
      model from the adjusted prob of zero.
      
      Change-Id: Iae050f3cbcc6d8b3f204e8dc395ae47b3b2192c9
      fd18d5df
  15. 22 Mar, 2013 2 commits
    • Paul Wilkins's avatar
      Disable zero bin mode boost. · ec080fa9
      Paul Wilkins authored
      As things stand the zero bin mode boost is hurting somewhat.
      In part this seems to be because the boost applied as is
      interferes with the rd mode selection loop.
      
      Average gains (derf 0.072, yt 0.243, ythd 0.179 std-hd 0.212%)
      
      Change-Id: Icaecea3908d9a7352370e49b8fa822f2c2c49dc1
      ec080fa9
    • Paul Wilkins's avatar
      Minor code clean up · 815734e5
      Paul Wilkins authored
      Change-Id: Ifa864e0acb253b238b03cdeed0fe5d6ee30a45d8
      815734e5
  16. 20 Mar, 2013 1 commit
  17. 18 Mar, 2013 2 commits
    • John Koleszar's avatar
      Replace scaling byte with explicit display size · 8a3f55f2
      John Koleszar authored
      If the intended display size is different than the size the frame is
      coded at, then send that size explicitly in the bitstream. Adds a new
      bit to the frame header to indicate whether the extra size fields
      are present.
      
      Change-Id: I525c66f22d207efaf1e5f903c6a2a91b80245854
      8a3f55f2
    • Paul Wilkins's avatar
      Adapt ARNR filter length and strength. · cdb322dd
      Paul Wilkins authored
      Adjust the filter length and strength for each
      ARF group based on a measure of difficulty (the boost)
      and the active q range.
      
      Remove lower limit on RDMULT value.
      
      Average gains on the different sets in range 0.4%-0.9%.
      However the ARNR changes give a very big boost on a
      few clips.
      
      Eg. Soccer ~5%, in derf set and Cyclist ~ 10% in the std-hd set
      
      Change-Id: I2078d78798e27ad2bcc2b32d703ea37b67412ec4
      cdb322dd
  18. 14 Mar, 2013 2 commits
    • John Koleszar's avatar
      Fix pulsing issue with scaling · 9b7be888
      John Koleszar authored
      Updates the YV12_BUFFER_CONFIG structure to be crop-aware. The
      exiting width/height parameters are left unchanged, storing the
      width and height algined to a 16 byte boundary. The cropped
      dimensions are added as new fields.
      
      This fixes a nasty visual pulse when switching between scaled and
      unscaled frame dimensions due to a mismatch between the scaling
      ratio and the 16-byte aligned sizes.
      
      Change-Id: Id4a3f6aea6b9b9ae38bdfa1b87b7eb2cfcdd57b6
      9b7be888
    • John Koleszar's avatar
      Add VP9_GET_REFERENCE control · b3c350a1
      John Koleszar authored
      This is like VP8_COPY_REFERENCE, but returns a pointer to the reference
      frame rather than a copy of it. This is useful when the application
      doesn't know what the size of the reference is, as is the case when
      scaling is in effect.
      
      Change-Id: I63667109f65510364d0e397ebe56217140772085
      b3c350a1
  19. 13 Mar, 2013 1 commit
    • Yaowu Xu's avatar
      removed reference to "LLM" and "x8" · 00555263
      Yaowu Xu authored
      The commit changed the name of files and function to remove obselete
      reference to LLM and x8.
      
      Change-Id: I973b20fc1a55149ed68b5408b3874768e6f88516
      00555263
  20. 12 Mar, 2013 1 commit
    • Paul Wilkins's avatar
      Change buffer update rules on ARF overlay. · 8be3056c
      Paul Wilkins authored
      When coding the frame that corresponds to the midpoint frame
      defining an ARF, do not update the last reference frame buffer.
      Previously this buffer was updated meaning that when coding the next
      ARF all the reference buffers were the same (or nearly so).
      Turning the update off means that the frame before is still available
      as an alternative predictor and for use in compound prediction.
      
      Also fixed inconsistency in test for mismatch (patch from JK).
      
      Net average gains (derf 0.049, yt 0.163, yt-hd 0.207, std-hd 0.286)
      
      Change-Id: Ifee21da21ccbb1648ac2eafe890d3ce60562c7bc
      8be3056c
  21. 11 Mar, 2013 1 commit
    • Paul Wilkins's avatar
      Changes to maximum gf/arf interval. · 08d2c382
      Paul Wilkins authored
      This patch puts in an adjustment to the maximum gf/arf
      interval based on the active q range.  It sets a fixed
      baseline maximum of 16 but can drop this down to 12 at
      lower q. This required some re-ordering in the first pass
      code to insure we have a Q range estimate before defining
      the first gf sequence.
      
      The main gains seed are int he STD hd set on 50fps clips
      where previously the interval could rise as high as 25.
      On the std hd clip the gains are around 2.8% with limit set
      to 300 frames.
      
      When combined with the one shot rate control flags we get
      combined of:
      
      derf 1.55% (limit300), yt 7.25%, hd 5.17% std-hd 5.84% (limit300)
      
      Change-Id: Ib380d51354511f2ff0f171a8df4e74291c0421f9
      08d2c382
  22. 09 Mar, 2013 1 commit
    • Deb Mukherjee's avatar
      Continued experiment with nonzero count · a28139c8
      Deb Mukherjee authored
      Adds probability updates for extra bits for the nzcs, code for
      getting nzc stats, plus some minor cleanups and fixes.
      
      Change-Id: If2814e7f04fb52f5025ad9f400f3e6c50a00b543
      a28139c8
  23. 07 Mar, 2013 1 commit
    • 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
  24. 06 Mar, 2013 1 commit
    • Paul Wilkins's avatar
      Added stricter Q control flag. · db6ad013
      Paul Wilkins authored
      Added a variant of the one shot maxQ flag
      for two pass that forces a fixed Q for the
      normal inter frames. Disabled by default.
      Also small adjustment to the Bits per MB
      estimation.
      Change-Id: I87efdfb2d094fe1340ca9ddae37470d7b278c8b8
      db6ad013
  25. 05 Mar, 2013 2 commits
    • John Koleszar's avatar
      Add 'superframe' index · 522d4bf8
      John Koleszar authored
      A 'superframe' is a group of frames that share the same PTS, but have a
      defined decoding order. This commit adds the ability to append an index
      to such a group of frames, allowing for random access to the constituent
      frames. This could be useful for frame-level parallelism or partial
      decoding in a multilayer scenario.
      
      Decoding the stream serially without such an index should work as a
      fallback, and VP9/TestSuperframeIndexIsOptional verifies that.
      
      Change-Id: Idff83b7560e1a7077d8fb067bfbc45b567e78b1c
      522d4bf8
    • John Koleszar's avatar
      Reinitialize motion search tables on frame size change · daa9b29e
      John Koleszar authored
      Make sure the motion search is done with the offsets calculated from
      the correct stride.
      
      Change-Id: Ifbcc0f742eda3399c255bfcfa1cdee9a4bb4b4e7
      daa9b29e
  26. 04 Mar, 2013 1 commit
    • Jingning Han's avatar
      Support 16K sequence coding · 5957b2b5
      Jingning Han authored
      Fixed a couple of variable/function definitions, as well as header
      handling to support 16K sequence coding at high bit-rates.
      
      The width and height are each specified by two bytes in the header.
      Use an extra byte to explicitly indicate the scaling factors in
      both directions, each ranging from 0 to 15.
      
      Tested coding up to 16400x16400 dimension.
      
      Change-Id: Ibc2225c6036620270f2c0cf5172d1760aaec10ec
      5957b2b5
  27. 01 Mar, 2013 1 commit
    • Yaowu Xu's avatar
      Adjust the max_gf_interval initialization · cea8cd08
      Yaowu Xu authored
      to be a fixed value of 15.
      
      Test results:
      cif:  .124%, .068%, .081%
      std-hd: 2.809%, 3.174%, 2.705%
      
      Change-Id: I380c8152c973506094da15eab59e3aa22b75a983
      cea8cd08
  28. 28 Feb, 2013 2 commits
    • Dmitry Kovalev's avatar
      Code cleanup. · 0d9cc0a9
      Dmitry Kovalev authored
      Removing redundant 'extern' keyword, better formatting, code
      simplification.
      
      Change-Id: I132fea14f08c706ee9ea147d19464d03f833f25b
      0d9cc0a9
    • John Koleszar's avatar
      Fix incorrect comparison of frame size · b6a3062d
      John Koleszar authored
      The width and height stored in the reference frames are padded out to
      a multiple of 16. The Width and Height variables in common are the
      displayed size, which may be smaller. The incorrect comparison was
      causing scaling related code to be called when it shouldn't have
      been. A notable case where this happens is 1080p, since 1088 != 1080.
      
      Change-Id: I55f743eeeeaefbf2e777e193bc9a77ff726e16b5
      b6a3062d