1. 14 Sep, 2017 1 commit
    • Hui Su's avatar
      VP9 level targeting: add a new AUTO mode · c3a6943c
      Hui Su authored
      In the new AUTO mode, restrict the minimum alt-ref interval and max column
      tiles adaptively based on picture size, while not applying any rate control
      constraints.
      
      This mode aims to produce encodings that fit into levels corresponding to
      the source picture size, with minimum compression quality lost. However, the
      bitstream is not guaranteed to be level compatible, e.g., the average bitrate
      may exceed level limit.
      
      BUG=b/64451920
      
      Change-Id: I02080b169cbbef4ab2e08c0df4697ce894aad83c
      c3a6943c
  2. 01 Sep, 2017 1 commit
  3. 23 Jun, 2017 1 commit
    • Marco's avatar
      vp9: Use scene detection for CBR mode. · 18805eee
      Marco authored
      Use the scene detection for CBR mode, and use it to reset the
      rate control if large source sad is detected and rate
      correctioni fact/QP is at minimum state.
      
      Avoids large frame sizes after big content change following
      low content period.
      
      Only affects CBR mode for 1 pass at speeds 5, 6, 7.
      Change-Id: I56dd853478cd5849b32db776e9221e258998d874
      18805eee
  4. 22 Jun, 2017 2 commits
    • paulwilkins's avatar
      Fix int overflow in rate control for high bit rates. · efe1982e
      paulwilkins authored
      Fix misplaced cast that caused an overflow and incorrect rate adaptation
      behavior for high data rates. This in particular will have affected 4k encodes
      but could also have come into play for some higher rate 1080p cases.
      
      In our standard test sets the quality impact is small though several high rate
      clips show improved rate accuracy. This can also impact the number of recode
      loop hits and on one problem 4k  clip the encode time for speeds 0 and 1 was
      reduced by >25%
      
      Change-Id: I108da7ca42f3bc95c5825dd33c9d84583227dac1
      efe1982e
    • James Zern's avatar
      vp9_ratectrl: make adjust_gf_boost_lag_one_pass_vbr static · 07f84787
      James Zern authored
      quiets -Wmissing-prototypes
      
      Change-Id: I72d899c2d8de1ddc52d90ac081f2629374b3a6e9
      07f84787
  5. 22 May, 2017 1 commit
    • Marco's avatar
      vp9: Adjustments to cyclic refresh for high motion. · 2adc0443
      Marco authored
      For aq-mode=3: refactor the condition for turning off
      the refresh. Add some adjustments for high motion content.
      
      No/little change in RTC metrics, only affects high motion case.
      
      Change-Id: I7da8eabfb0e61db014be4562806f72ee5ef4a43b
      2adc0443
  6. 13 Apr, 2017 1 commit
    • Marco's avatar
      vp9: 1 pass VBR: Fix to rate control at low min-q. · 6bff6cb5
      Marco authored
      Fix to avoid getting stuck at very low Q even
      though content is changing, which can happen for --min-q=0.
      
      Fix is to more aggressively increase active_worst_quality
      when detecting significant rate_deviation at very low Q.
      
      Change will only affect 1 pass VBR for --min-q < 4, so no
      change in ytlive metrics for --min-q >= 4.
      
      Change-Id: I4dd77dd7c08a30a4390da0ff2c8bda6fccfa76d7
      6bff6cb5
  7. 04 Apr, 2017 1 commit
  8. 03 Apr, 2017 1 commit
    • Marco's avatar
      vp9: 1 pass CBR: cleanup to cyclic refresh. · 6b3f4bc7
      Marco authored
      Code cleanup: merged two functions that were doing postencode
      update for cylic refresh, remove some unused code and fix comments.
      
      No change in behavior.
      
      Change-Id: I9be0d7e346d34dec29bf4e5bb380a7bf81c8480a
      6b3f4bc7
  9. 27 Mar, 2017 1 commit
    • Marco's avatar
      vp9: 1 pass: Move source sad computation into encodeframe loop. · 66c6b4d6
      Marco authored
      Refactor to split the 1 passs source sad computation into scene
      detection (currently used for VBR and screen-content mode), and
      superblock based source sad computation (used in non-rd CBR mode).
      
      This allows the source sad computation for CBR mode to be
      multi-threaded.
      
      No change in compression.
      
      Change-Id: I112f2918613ccbd37c1771d852606d3af18c1388
      66c6b4d6
  10. 24 Mar, 2017 1 commit
  11. 20 Mar, 2017 1 commit
    • Marco's avatar
      vp9: Use sb content measure to bias against golden. · 06c8713e
      Marco authored
      For each superblock, keep track of how far from current frame
      was the last significant content change, and use that (along
      with GF distance), to turnoff GF search in non-rd pickmode.
      
      Only enabled for speed >= 8.
      
      avgPNSR on RTC/RTC_derf down by ~0.9/1.2.
      Speedup on mac: ~3-5%.
      Speedup on arm: 3.6% for VGA and 4.4% for HD.
      
      Change-Id: Ic3f3d6a2af650aca6ba0064d2b1db8d48c035ac7
      06c8713e
  12. 16 Mar, 2017 1 commit
    • Marco's avatar
      vp9: Fix some issues with denoiser and SVC. · a340c64a
      Marco authored
      Fix the update of the denoiser buffer when the base
      spatial layer is a key frame. And allow for better/lower
      QP on high spatial layers when their base layer is key frame.
      
      Change-Id: I96b2426f1eaa43b8b8d4c31a68b0c6d68c3024a2
      a340c64a
  13. 22 Feb, 2017 1 commit
    • Marco's avatar
      vp9: Incorporate source sum_diff into non-rd partition thresholds. · 7f2daa74
      Marco authored
      Increase the variance partition thresholds for superblocks that
      have low sum-diff (from source analysis prior to encoding frame).
      Use it for now only for speed >= 7 or for denoising on.
      
      Small change on metrics for rtc set: less than ~0.1 avgPNSR decrease
      on RTC set, for both speed 7 and 8.
      
      Change-Id: I38325046ebd5f371f51d6e91233d68ff73561af1
      7f2daa74
  14. 16 Feb, 2017 1 commit
  15. 15 Feb, 2017 1 commit
  16. 13 Feb, 2017 3 commits
    • Yunqing Wang's avatar
      Minor code style refactoring · f0245183
      Yunqing Wang authored
      Change-Id: I20107693d0a87e08a10520bfb573ff3dcef69fdb
      f0245183
    • James Zern's avatar
      cosmetics,vp9_ratectrl: apply clang-format · 3c4ea942
      James Zern authored
      broken since:
      c3f095c8 Merge "Fix to avoid abrupt relaxation of max qindex in recode path"
      5f21aba4 Fix to avoid abrupt relaxation of max qindex in recode path
      
      the original change pre-dated the addition of .clang-format
      
      Change-Id: If5e399d9a805bcad9147360b13b36fbc8c560a7c
      3c4ea942
    • paulwilkins's avatar
      Aggressive VBR method. · ce7b3845
      paulwilkins authored
      VBR method that allows a wider Q range for the first normal frame
      in each ARF group and then centers the min - max range for the rest of
      the arf group on the chosen Q value for that first frame.
      
      This allows for quite rapid adjustment of the active Q range even if the
      initial estimate is poor.
      
      In some cases where the ARF frames themselves are tending to
      undershoot but the normal frames are overshooting this can still give
      net undershoot. This can be corrected by allowing a larger Q delta for
      arf frames but is usually is a sign that the allocation to the arfs was to
      high.
      
      Change-Id: Icec87758925d8f7aeb2dca29aac0ff9496237469
      ce7b3845
  17. 07 Feb, 2017 1 commit
  18. 27 Jan, 2017 1 commit
  19. 24 Jan, 2017 1 commit
  20. 20 Jan, 2017 1 commit
  21. 16 Jan, 2017 1 commit
  22. 13 Jan, 2017 1 commit
  23. 10 Jan, 2017 1 commit
    • Marco's avatar
      vp9: 1 pass cbr: Adjustments to usage of gf_cbr_boost and aq=3 mode. · 91fc730d
      Marco authored
      When aq=3 mode is on and the gf_cbr_boost is set: make sure golden frame
      is always refreshed, and don't incorporate segement cost in qp setting
      on the boosted golden frame.
      
      Better performance on RTC set with gf_cbr_boost on,
      for example with gf_cbr_boost=50, gains from ~0.5-3%.
      
      Change-Id: Ie811f5e4d444ff3320bd6e2c1745b2c4c09a8460
      91fc730d
  24. 09 Jan, 2017 1 commit
  25. 06 Jan, 2017 2 commits
    • Marco's avatar
      vp9: 1 pass cbr mode: increase threshold for gf_cbr_boost_pct usage. · f1909d26
      Marco authored
      Increase the boost threshold below which GOLDEN update will use same
      rate correction factor as INTER_NORMAL.
      
      Improves performance when gf_cbr_boost_pct is set (between 0 and 100)
      in CBR mode.
      
      Change-Id: I9f54cc18664786a100b13a416b7137ae03bd0cab
      f1909d26
    • Jerome Jiang's avatar
      vp9: Compute source sad for every superblock when partition copy is on. · afc8c483
      Jerome Jiang authored
      The source sad could be used to copy the partition without going into
      choose_partitioning function to speed up vp9 encoding. Computing source
      sad takes little time. Speed test on Android and Linux shows little
      encoding time gain (less than 1.4%).
      
      Turned off for now since partition copy is turned off.
      
      Change-Id: I61c9d5b8f22329760cb29a4ee30a7f9c232ce8d3
      afc8c483
  26. 14 Dec, 2016 1 commit
  27. 11 Oct, 2016 2 commits
    • Marco's avatar
      1 pass vbr: Allow for lookahead alt-ref in real-time mode. · 57c6bf29
      Marco authored
      For 1 pass vbr real-time mode:
      Allow for the usage of alt-ref frame when non-zero lag-in-frames is used.
      Use non-filtered alt-ref, and select usage based on fast scene/content
      analysis/detection within the lag of frames.
      
      Positive gains on ytlive set: overall avgPSNR ~3-4%.
      Several clips are up between 5-14%, a few clips are neutral/small change.
      
      Current speed decrease is about ~5-10%.
      
      Use the flag USE_ALTREF_FOR_ONE_PASS to enable this feature
      (off by default for now).
      
      Change-Id: I802d2bf3d44f9cf01f6d15c76be9c90192314769
      57c6bf29
    • Marco's avatar
      vp9: 1 pass vbr: some adjustments to gf interval. · cdbd8919
      Marco authored
      Put limit on gf interval based on lag, and allow
      for the adjustment on next gf group also on key frame.
      
      Small/neutral change on ytlive metrics.
      
      Change only affects 1 pass vbr real-time mode.
      
      Change-Id: I339c8f4398848698b6e10fe9482c52ca661b94a5
      cdbd8919
  28. 15 Sep, 2016 2 commits
    • Marco's avatar
      vp9: Small code cleanup. · 4c1a9fb8
      Marco authored
      Remove the experiment LIMIT_QP_ONEPASS_VBR_LAG, as its
      not currently used and no plan to use in near future.
      
      Change-Id: Ib069f8d7225195be04b765d0ab477510dfba6a3b
      4c1a9fb8
    • clang-format's avatar
      apply clang-format · 5f6d143b
      clang-format authored
      Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
      5f6d143b
  29. 01 Sep, 2016 1 commit
    • paulwilkins's avatar
      Casts to remove some warnings. · 3e9e7700
      paulwilkins authored
      Added casts to remove warnings:
      BUG=webm:1274
      
      In regards to the safety of these casts they are of two types:-
      
      - Normalized bits per (16x16) MB stored in a 32 bit int (This is safe as bits
      per MB even with << 9 normalization cant overflow 32 bits. Even raw 12
      bits hdr source even would only be  29 bits :- (4+4+12+9) and the encoder
      imposes much stricter limits than this on max bit rate.
      
      - Cast as part of variance calculations.  There is an internal cast up to 64 bit
      for the Sum X Sum calculation, but after normalization dividing by the number
      of points the result will always be <= the SSE value.
      
      Change-Id: I4e700236ed83d6b2b1955e92e84c3b1978b9eaa0
      3e9e7700
  30. 31 Aug, 2016 1 commit
    • paulwilkins's avatar
      Modified resize loop constraints. · 6fc07a21
      paulwilkins authored
      Using a tighter resize constraint on undershoot seems to help
      results (especially SSIM) as significant undershoot on a frame
      seems to have more of a damaging impact than overshoot.
      
      This patch has been tuned so that in local testing using the
      derf set it is encode speed neutral for speed  setting 2.
      
      Average quality result for speed 2 (psnr,ssim) were  as follows:-
      
       lowres  0.039,  0.453
       midres  0.249, 0.853
       hdres  0.159, 0.659
       NetFlix -0.241, 0.360
      
      Change-Id: Ie8d3a0d7d6f7ea89d9965d1821be17f8bda85062
      6fc07a21
  31. 04 Aug, 2016 1 commit
  32. 03 Aug, 2016 1 commit
    • Marco's avatar
      vp9 1pass vbr: Adjustment to gf interval. · ff0a87ce
      Marco authored
      Increase the minimum distance.
      Reduces the overshoot somewhat on some clips,
      small gain in avgPSNR (~0.1%) on ytlive set.
      
      Change-Id: Id5ddde20c2907dbdb536e79542eff775019c142b
      ff0a87ce
  33. 02 Aug, 2016 1 commit
  34. 22 Jul, 2016 1 commit