1. 16 Aug, 2017 1 commit
    • paulwilkins's avatar
      Fix for encoder slowdown (for speeds >= 3) · e15be302
      paulwilkins authored
      Some clips in nightly unit test exhibiting significant encoder slowdown which
      appears to bisect to Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a.
      The above change allowed for emergency iterations of the recode loop and
      adjustment of the Q range if there is a large rate miss.
      This patch disables the above adaptation for cases of cpu_speed >= 3 or more
      specifically where cpi->sf.recode_loop >= ALLOW_RECODE_KFARFGF.
      For speeds >= 3 the code does not currently run a dummy bit pack operation
      inside the recode loop. Without this dummy pack operation there is no up to
      date estimate of the current frame's size to use as a basis for assessing the
      requirement for a recode. In practice it was using the previous frames size (or 0
      for the first frame) which could cause odd behavior.
      If we require the emergency rate correction added in  Change-Id: I6923.. for
      the higher speed settings it will be necessary to enable the dummy pack
      which will in turn hurt encode speed.
      Change-Id: I4fb3c6062ca9508325a6f31582f8e80f1a9b126f
  2. 02 Aug, 2017 1 commit
    • Yunqing Wang's avatar
      Force the bit exactness in the first pass · bfd0f41f
      Yunqing Wang authored
      Originally, for the purpose of keeping a fast first pass, the first-pass
      stats between row_mt_mode = 0 and row_mt_mode = 1 are not bit exact, but
      that difference is very small that doesn't cause a mismatch between the
      final bitstreams. However, if the encoder changes, this minor difference
      may cause a mismatch. Thus, this patch always forces the first pass to
      be bit exact.
      Change-Id: I2b67cf529dee81f660f9d9e7fe9a60ea3c7b12b8
  3. 01 Aug, 2017 1 commit
  4. 31 Jul, 2017 2 commits
  5. 29 Jul, 2017 3 commits
    • James Zern's avatar
      Revert "vp9: Speed feature to adapt partition based on source_sad." · c9266b85
      James Zern authored
      This reverts commit 064fc570.
      This causes an assertion failure in vp9_mcomp.c when running
      `mv->col >= -((1 << (11 + 1 + 2)) - 1) && mv->col < ((1 << (11 + 1 + 2))
      - 1)'
      Change-Id: I449e777bf18b661cb3f1d82253610c55c51687f6
    • Jerome Jiang's avatar
      vp9: Adjust logic in source sad for screen content. · ac211fe2
      Jerome Jiang authored
      Change-Id: I917d106f4c95ea44e413e23881f6303982e1a6a3
    • Marco's avatar
      vp9: Speed feature to adapt partition based on source_sad. · 064fc570
      Marco authored
      Move the source_sad feature to speed 6 (from speed 7), and
      add speed feature to switch from the variance-based partition
      to reference_partition (which uses nonrd-pickmode for bsize selection)
      if source_sad is high.
      Currently used only for speed 6 for resoln <= 360p.
      About 4-5% improvement on 360p in RTC set.
      Some speed slowdown, but still ~30% faster than speed 5.
      Change-Id: Ib0330ee5fe9fdd2608aed91359a2a339d967491c
  6. 28 Jul, 2017 1 commit
  7. 22 Jul, 2017 1 commit
  8. 18 Jul, 2017 4 commits
  9. 17 Jul, 2017 2 commits
    • Marco's avatar
      vp9: Fix to setting content_state for real-time mode. · ad563713
      Marco authored
      When content_state_sb is set to LowVarHighSumdiff, don't reset
      it to VeryHighSad. Visually better on clips with strong lighting changes.
      Small/negligible change in RTC metrics and speed.
      Change-Id: I20c383e3c4cf8d1149de5f9260449c0b7cf7c6aa
    • Marco's avatar
      vp9: Reuse motion from choose_partitioning in NEWMV search. · 0c9e2f4c
      Marco authored
      When int_pro_motion_estimation is done for superblock in
      choose_partitioning, use it to avoid the full_pixel_search
      for NEWMV mode, if bsize is >= 32X32.
      For speed > 7.
      Small/neutral change on RTC metrics.
      ~1-2% speedup on arm on high motion clip.
      Change-Id: I3cfe6833ff4bf75d4afa83eaf058ad45729de85b
  10. 14 Jul, 2017 2 commits
  11. 11 Jul, 2017 5 commits
  12. 10 Jul, 2017 2 commits
    • Johann's avatar
      remove vp9_full_sad_search · 109faffe
      Johann authored
      This code is unused in vp9. Only vp8 still contains references to
      vpx_sad_NxMx[3|8] and only for sizes 16x16, 16x8, 8x16, 8x8 and 4x4.
      Remove the remaining sizes and all the highbitdepth versions.
      Change-Id: If6a253977c8e0c04599e25cbeb45f71a94f563e8
    • Jerome Jiang's avatar
      vp9: Remove alt-ref from denoiser. · 2ac7c549
      Jerome Jiang authored
      Denoiser is used in real-time mode which does not use alt-ref.
      Reduce memory usage when denoiser is enabled.
      Change-Id: I54ba3bcaeeb1818bbdf718ef90e97d4897ff793d
  13. 07 Jul, 2017 1 commit
  14. 06 Jul, 2017 1 commit
    • Marco's avatar
      vp9: Nonrd mode: use content_state_sb for high motion. · 8c3f18ef
      Marco authored
      In the content_state for a superblock is set to HighSad,
      use that to bias some decisions in variance partition and
      nonrd pickmde: use int_pro_motion for sad computation in
      choose_partitioning, and set large_block in pickmode based
      on the content_state_sb.
      Only affects speed >= 7.
      Immprovement for high motion content.
      Small gain (~1%) in RTC metrics.
      Speedup of ~5 for high motion clip on android (speed 8, 1 thread).
      Change-Id: I5774c4854f012b89c8e969f6129b60988c2ce11c
  15. 05 Jul, 2017 3 commits
    • paulwilkins's avatar
      Respond more rapidly to excessive local overshoot. · 5b44ef0c
      paulwilkins authored
      This patch attempts to address a bug reported for 4K video.
      In this instance a perfect storm of a moderate complexity section
      followed by a much easier section where a CGI overlay helped to
      suppress film grain noise, followed by a much harder and very grainy
      section at the end, cause a massive local rate spike that pushed a chunk
      over the upper allowed rate limit.
      This patch detects cases where the rate for a frame is much higher than
      expected and allows, in this special case, for rapid adjustment of the active
      Q range.
      For the example chunk in the bug report the target rate was 18Mb/s and the
      observed rate was over 37 Mb/s with a surge for the last few frames to over
      100Mb/s. This patch brings the overall chunk rate right back down to ~18.2 Mbit/s
      and  almost completely eliminates the rate spike at the end. (See graphs appended
      to bug report)
      Also see  I108da7ca42f3bc95c5825dd33c9d84583227dac1 which fixes a bug
      unearthed during testing of this patch and also has a bearing on high rate
      encodes such as 4K.
      This patch does have a negative impact on some metrics. Most notably there are
      clips in our standard test set where it hurts global psnr (though in many cases it
      conversely helps SSIM, FAST SSIM and PSNR-HVS). It is also worth noting that
      the clips (and data rates) where there is a big metric impact, are almost all cases
      where there is currently a significant overshoot vs the target rate and overall rate
      accuracy is greatly improved.
      Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a
    • paulwilkins's avatar
      Further refactoring of mod error calculation. · a1af335f
      paulwilkins authored
      Further refactoring to support alternative error distributions.
      Change-Id: I0f7fa3fd6f3baa4b0a1e53c6aa3be63966e97b82
    • paulwilkins's avatar
      Fix incorrect index test in GF group rate assignment. · b0459ec8
      paulwilkins authored
      Correct test for middle frame in the group.
      Change-Id: I1ee49fa33968eb3c4a01d6a27a60bb1409e3e68c
  16. 30 Jun, 2017 1 commit
    • Marco's avatar
      vp9: Adjust condition for checking intra mode. · 2290898a
      Marco authored
      For nonrd_pickmode: add condition for checking
      intra mode if the sb content state is VeryHighSad.
      Reduces artifacts when sudden change in content.
      Metrics on RTC/RTC_derf neutral (small gain).
      No speed loss observed.
      Change-Id: I07006d28fd2dc06c1d06b07630102b0fece50c40
  17. 29 Jun, 2017 2 commits
  18. 28 Jun, 2017 1 commit
    • Marco's avatar
      vp9: Speed >= 8: Remove logic on reducing subpel. · 88d11f47
      Marco authored
      Existing logic was only affecting resolutions above 720p.
      Needs more testing for reducing subpel for speed >= 8.
      No change on RTC metrics.
      Change-Id: I2f4bf9f25891614aafa9a86aa5a5063a3ccfce4d
  19. 27 Jun, 2017 1 commit
  20. 24 Jun, 2017 1 commit
  21. 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
  22. 22 Jun, 2017 3 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
    • Marco's avatar
      vp9: Add high source sad to content state. · d7515b11
      Marco authored
      Use it to limit NEWMV early exit in nonrd pickmode
      Small change in RTC metrics, has some improvement
      for high motion clips.
      Change-Id: I1d89fd955e1b3486d5fb07f4472eeeecd553f67f
    • James Zern's avatar
      vp[89],vpx_dsp: add missing includes · 44418c65
      James Zern authored
      quiets -Wmissing-prototypes
      Change-Id: I841cfc019d592f2bc6b3fec5818051a31f4c53b5