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.
      
      BUG=webm:1454
      
      Change-Id: I4fb3c6062ca9508325a6f31582f8e80f1a9b126f
      e15be302
  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.
      
      BUG=webm:1453
      
      Change-Id: I2b67cf529dee81f660f9d9e7fe9a60ea3c7b12b8
      bfd0f41f
  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
      gtest_filter=VP9/MotionVectorTestLarge.OverallTest/41:
      `mv->col >= -((1 << (11 + 1 + 2)) - 1) && mv->col < ((1 << (11 + 1 + 2))
      - 1)'
      
      Change-Id: I449e777bf18b661cb3f1d82253610c55c51687f6
      c9266b85
    • Jerome Jiang's avatar
      vp9: Adjust logic in source sad for screen content. · ac211fe2
      Jerome Jiang authored
      Change-Id: I917d106f4c95ea44e413e23881f6303982e1a6a3
      ac211fe2
    • 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
      064fc570
  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
      ad563713
    • 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
      0c9e2f4c
  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.
      
      BUG=webm:1425
      
      Change-Id: If6a253977c8e0c04599e25cbeb45f71a94f563e8
      109faffe
    • 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
      2ac7c549
  13. 07 Jul, 2017 1 commit
  14. 06 Jul, 2017 3 commits
    • 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
      8c3f18ef
    • James Zern's avatar
      vp9: remove FrameWorkerData & vp9_dthread.h · 5227b820
      James Zern authored
      the file was empty after the struct removal. the only remaining use was
      within vp9_dx_iface, but the wrapper became unnecessary after the
      removal of frame_parallel_decode.
      
      BUG=webm:1395
      
      Change-Id: I515ab585d701e77d388d12b2802d844c424f9bcd
      5227b820
    • James Zern's avatar
      vp9: remove (un)lock_buffer_pool · 48c4a038
      James Zern authored
      there is no threaded access to this pool after the removal of
      frame_parallel_decode
      
      BUG=webm:1395
      
      Change-Id: I710769b87102edc898c59eb9a2e7a91d8c49107f
      48c4a038
  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.
      https://b.corp.google.com/issues/62215394
      
      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
      5b44ef0c
    • paulwilkins's avatar
      Further refactoring of mod error calculation. · a1af335f
      paulwilkins authored
      Further refactoring to support alternative error distributions.
      
      Change-Id: I0f7fa3fd6f3baa4b0a1e53c6aa3be63966e97b82
      a1af335f
    • 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
      b0459ec8
  16. 30 Jun, 2017 7 commits
    • 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
      2290898a
    • James Zern's avatar
      vp9_onyxc_int,RefCntBuffer: rm unused members · 303cb310
      James Zern authored
      the last frame_worker_owner, row and col references were removed in:
      131bd06e6 remove vp9_dthread.c
      
      BUG=webm:1395
      
      Change-Id: Ia7fb2e8782b12a58d2a2263849d20a8abf06aef6
      303cb310
    • James Zern's avatar
      VP9_COMMON: rm frame_parallel_decode · bc837b22
      James Zern authored
      this has been 0 since the removal of frame_parallel_decode in
      vp9_dx_iface.
      
      BUG=webm:1395
      
      Change-Id: I3a562b2c6b82050064d2b2ccb18a3e77c700b2da
      bc837b22
    • James Zern's avatar
      remove vp9_dthread.c · 78fe5ca3
      James Zern authored
      and the related prototypes in vp9_dthread.h. the last references were
      removed in:
      09dabc58d VP9_COMMON: rm frame_parallel_decode
      
      vp9_dx_iface.c still uses FrameWorkerData
      
      BUG=webm:1395
      
      Change-Id: Ica8e98ae776fc0105f1fbbed9e0a729808980810
      78fe5ca3
    • James Zern's avatar
      VP9Decoder: rm frame_parallel_decode · ba76b662
      James Zern authored
      this has been 0 since the removal of frame_parallel_decode in
      vp9_dx_iface.
      
      BUG=webm:1395
      
      Change-Id: I3f579766ecfa4777395b99686738e1c5610f86ef
      ba76b662
    • James Zern's avatar
      vp9: reduce FRAME_BUFFERS by 3 · fb134e75
      James Zern authored
      the additional buffers are unneeded with the removal of
      frame_parallel_decode
      
      BUG=webm:1395
      
      Change-Id: Id9ec4cb6462af5d07a0d3cf939bd216db27d9d9e
      fb134e75
    • James Zern's avatar
      vp9_dx: rm worker thread creation · 86d51dfb
      James Zern authored
      creating a thread associated with the sole worker isn't necessary when
      only execute() is being used after the removal of frame_parallel_decode.
      
      BUG=webm:1395
      
      Change-Id: I2255ce72607321e5708bc82a632dc6825d4eff5c
      86d51dfb
  17. 29 Jun, 2017 1 commit