1. 11 Dec, 2017 1 commit
    • Jerome Jiang's avatar
      vp9 svc: Allow denoising next to highest resolution. · c1e511fd
      Jerome Jiang authored
      Denoise 2 spatial layes at most.
      
      Add noise sensitivity level 2 for vp9 such that applications can control
      whether to denoise the second highest spatial layer.
      
      Add tests to cover this case.
      
      Change-Id: Ic327d14b29adeba3f0dae547629f43b98d22997f
      c1e511fd
  2. 02 Dec, 2017 1 commit
  3. 29 Nov, 2017 1 commit
  4. 15 Nov, 2017 1 commit
    • Marco's avatar
      vp9-svc: Fix flag for usage of reuse-lowres partition · b3c93d60
      Marco authored
      Fix/cleaup the conditioning for usage of the reuse-lowres
      partition feature.
      
      Replace the non-reference condition with the top temporal
      layer, and put this condition in the speed feature.
      
      This prevents doing update_partition_svc() on every
      VGA frame, instead it will now only do update for VGA in
      the top temporal layer frames.
      
      Also this makes it easier to test/enable this feature
      for lower layer temporal frames.
      
      Change-Id: Ia897afbc6fe5c84c5693e310bcaa6a87ce017be5
      b3c93d60
  5. 09 Nov, 2017 1 commit
    • Jerome Jiang's avatar
      vp9: SVC feature to use partition from lower resolution. · fdb054a0
      Jerome Jiang authored
      For SVC with 3 spatial layers:
      Add feature to copy/upscale partition from middle spatial layer
      to the upper/highest resolution, when superblock sad is not high.
      
      Enabled for speed >= 7 and only for non-reference frames.
      
      Speedup ~3-4%, small loss in avgPNSR/SSIM of ~1%.
      
      Change-Id: I7f0a2716c0fde28bade0f86159d11b7e31d6ab8d
      fdb054a0
  6. 08 Nov, 2017 1 commit
    • paulwilkins's avatar
      CVBR command line option. · 93e83fd7
      paulwilkins authored
      Added command line control of Corpus VBR.
      
      The new corpus vbr mode is a variant of standard
      VBR (end-usage=0) where the complexity distribution
      mid point is passed in rather than calculated for a specific
      clip or chunk.
      
      The new variant is enabled by setting a new command line
      parameter --corpus-complexity to a zero value. Omitting
      this parameter or setting it to 0 will cause the codec to use
      standard vbr mode.
      
      The correct value for a given corpus needs to be derived
      experimentally using a training set such that the average
      rate for the corpus is close to the target value.
      
      For example our using our low res test set with upper and lower
      vbr limits of 50%-150% and a corpus complexity value of 650
      gives a similar average data rate across the set to using standard
      vbr. However, with the corpus mode easier clips will be allocated
      fewer bits and harder clips more bits rather than having the same
      rate target for all.
      
      Change-Id: I03f0fc8c6fb0ee32dc03720fea6a3f1949118589
      93e83fd7
  7. 13 Oct, 2017 1 commit
  8. 03 Oct, 2017 1 commit
    • Marco's avatar
      Use adapt_partition for ARF in 1 pass. · c8678fb7
      Marco authored
      For speed 6 real-time mode: use adapt_partition
      on ARF frame instead of REFERENCE_PARTITION (which is slower).
      This requires enabling compute_source_sad_onepass for no-show_frames.
      
      Speedup of ~3-5% on some clips that heavily use ARF,
      small loss (~0.2%) in quality on ytlive set.
      
      Change-Id: Ib50acc97df06458244a6ac55d2bd882c30012536
      c8678fb7
  9. 28 Sep, 2017 2 commits
    • Marco's avatar
      Set rc->high_source_sad = 0 before scene detection. · a2ef180d
      Marco authored
      Only has effect when sf->use_altref_onepass is enabled,
      as in that case scene detection is skipped for non-show frame
      and so high_source_sad does not get reset to 0.
      
      No change in metrics or speed.
      
      Change-Id: I421f066d239341449c18826089e1810b9fc5967f
      a2ef180d
    • Marco's avatar
      vp9: Modification to adapt the ARF usage for 1 pass vbr · 03e8f133
      Marco authored
      Add stats for past ARF usage, and use it to disable
      ARF usage based on some conditions.
      
      Overall improvement on ytlive set, reduces the regression
      on the problem clips for this feature.
      
      Only affects when sf->use_altref_onepass is enabled
      (currently off by default).
      
      Change-Id: I66267f227ea132dc86acb730e9882f85bead2cdb
      03e8f133
  10. 27 Sep, 2017 3 commits
    • Marco's avatar
      Add use_svc condition to the scene detection in 1 pass. · c493ea1a
      Marco authored
      Scene detection is not currently used in SVC 1 pass code.
      Speedup of ~0.4%.
      
      Change-Id: I0ab769300919de710cd2da1402014fa3f22a1f86
      c493ea1a
    • Marco Paniconi's avatar
      Revert "Remove the speed condition on scene detection in 1 pass code." · 8d438dc3
      Marco Paniconi authored
      This reverts commit 535b7b91.
      
      This is actually used in CBR to reset the rate control if high source sad is detected.
      
      Original change's description:
      > Remove the speed condition on scene detection in 1 pass code.
      > 
      > Scene detection is used for VBR mode and for screen_content mode.
      > 
      > It was also enabled for CBR mode via the speed condition,
      > but currently the analysis in the scene detection is not used
      > in CRB mode (similar computations are done locally at superblock level
      > when the source_sad feature is enabled).
      > 
      > For 1 pass code.
      > No change in behavior. Small speed gain, ~0.5%.
      > 
      > Change-Id: I59991d7ef2af320bea7af4b907596e057affa42f
      
      TBR=marpan@google.com,builds@webmproject.org,jianj@google.com
      
      Change-Id: Ib4e6b02047f75632503e7b0fc870af97fa9291c3
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      8d438dc3
    • Marco's avatar
      Remove the speed condition on scene detection in 1 pass code. · 535b7b91
      Marco authored
      Scene detection is used for VBR mode and for screen_content mode.
      
      It was also enabled for CBR mode via the speed condition,
      but currently the analysis in the scene detection is not used
      in CRB mode (similar computations are done locally at superblock level
      when the source_sad feature is enabled).
      
      For 1 pass code.
      No change in behavior. Small speed gain, ~0.5%.
      
      Change-Id: I59991d7ef2af320bea7af4b907596e057affa42f
      535b7b91
  11. 26 Sep, 2017 1 commit
  12. 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
  13. 13 Sep, 2017 1 commit
  14. 05 Sep, 2017 1 commit
  15. 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
  16. 15 Aug, 2017 1 commit
    • Jerome Jiang's avatar
      Clean up writing YUV files for debug purpose. · a153080b
      Jerome Jiang authored
      Change legacy vp8/9_write_yuv_frame to vpx_write_yuv_files.
      Delete some flags that can be enabled during build.
      
      To enable writing denoised YUV, use the following command line:
      CFLAGS='-DOUTPUT_YUV_DENOISED' ./configure
      --enable-vp9-temporal-denoising
      
      For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP'
      
      Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528
      a153080b
  17. 14 Aug, 2017 1 commit
  18. 11 Aug, 2017 1 commit
  19. 10 Aug, 2017 1 commit
    • Jerome Jiang's avatar
      vp9 SVC: Fix the denoiser frame buffer management. · 0f8ebdde
      Jerome Jiang authored
      Change the denoiser frame buffer management for SVC to more generally
      handle the layer patterns in SVC (where last is not always refreshed).
      
      This change is only for SVC with denoising and is bitexact.
      
      Change-Id: Ic2b146a924cdf6e7114609158afa3d4880fe3fae
      0f8ebdde
  20. 03 Aug, 2017 1 commit
  21. 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
  22. 18 Jul, 2017 1 commit
  23. 11 Jul, 2017 3 commits
  24. 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
  25. 07 Jul, 2017 1 commit
  26. 05 Jul, 2017 1 commit
    • 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
  27. 29 Jun, 2017 2 commits
  28. 27 Jun, 2017 1 commit
  29. 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
  30. 10 Jun, 2017 1 commit
  31. 08 Jun, 2017 1 commit
  32. 01 Jun, 2017 1 commit
  33. 26 May, 2017 1 commit
    • Jerome Jiang's avatar
      Fix vp8 race when build --enable-vp9-highbitdepth. · 0afa2dad
      Jerome Jiang authored
      Split vp8/vp9 implementations on yv12_copy_frame_c.
      Remove high-bitdepth codes from vp8_yv12_extend_frame_borders_c.
      Clean up vp8 codes usage in vp9.
      
      BUG=webm:1435
      
      Change-Id: Ic68e79e9d71e1b20ddfc451fb8dcf2447861236d
      0afa2dad