1. 27 Sep, 2017 2 commits
    • 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
      Change-Id: Ib4e6b02047f75632503e7b0fc870af97fa9291c3
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
    • 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
  2. 26 Sep, 2017 1 commit
  3. 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
      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.
      Change-Id: I02080b169cbbef4ab2e08c0df4697ce894aad83c
  4. 13 Sep, 2017 1 commit
  5. 05 Sep, 2017 1 commit
  6. 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
  7. 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
      For skinmap, use CFLAGS='-DOUTPUT_YUV_SKINMAP'
      Change-Id: I236974ac8b3cf279d20c4dc7f6162d8b480b6528
  8. 14 Aug, 2017 1 commit
  9. 11 Aug, 2017 1 commit
  10. 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
  11. 03 Aug, 2017 1 commit
  12. 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
  13. 18 Jul, 2017 1 commit
  14. 11 Jul, 2017 3 commits
  15. 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
  16. 07 Jul, 2017 1 commit
  17. 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.
      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
  18. 29 Jun, 2017 2 commits
  19. 27 Jun, 2017 1 commit
  20. 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
  21. 10 Jun, 2017 1 commit
  22. 08 Jun, 2017 1 commit
  23. 01 Jun, 2017 1 commit
  24. 26 May, 2017 2 commits
    • 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.
      Change-Id: Ic68e79e9d71e1b20ddfc451fb8dcf2447861236d
    • Marco's avatar
      vp9: SVC: Fix to condiiton on using source_sad. · 146005a9
      Marco authored
      Fix the condition on usage of source_sad for temporal layers.
      FIx allows it to be used for the case of 1 temporal layer.
      Change-Id: I02b1b0ade67a7889d1b93cee66d27c0951131fc3
  25. 25 May, 2017 1 commit
  26. 12 May, 2017 1 commit
  27. 11 May, 2017 1 commit
    • Cheng Chen's avatar
      Speed up encoding by skipping altref recode · 76567d84
      Cheng Chen authored
      Speed up for speed 0.
      Reduce 10+% of encoding time for hdres in speed 0,
      with less than 0.1% PSNR loss.
      Compute total difference of previous and current frame context probability
      model. If the diff is less than the threshold, skip recoding the frame.
      Borg test (positive number means performance loss):
      		lowres    midres    hdres
      PSNR:		0.030     0.032     0.065
      Local speed test: bitrate set at 1200
      		blue_sky  pedestrian  rush_hour
      Encoding time:	 -10.0%     -16.5%      -16.5%
      Change-Id: I4e2d200ea3115d48b2c3e890143596b31b8ef9e9
  28. 10 May, 2017 1 commit
    • Marco's avatar
      vp9: SVC: Add option to set downsampling filter type. · 4e23998f
      Marco authored
      Add option in SVC to set the filter type and phase for
      the frame level downsampling filters.
      For 3 spatial layers: set downsampling filter type to bilinear
      and set phase to 8, for lowest spatial layer.
      Change-Id: Id81f4b1ba93db19c1cd37b6a46d1281a2c61bc43
  29. 26 Apr, 2017 1 commit
  30. 25 Apr, 2017 1 commit
  31. 24 Apr, 2017 1 commit
    • Yunqing Wang's avatar
      Make the row based multi-threaded encoder deterministic · 10a497bd
      Yunqing Wang authored
      This patch followed allow_exhaustive_searches feature modification and
      continued to modify the encoder to achieve the determinism in the row
      based multi-threaded encoding. While row-mt = 1 and using multiple
      threads, the adaptive feature in encoder was disabled, which gave
      BDRate gain(at speed 1, -0.6% ~ -0.7%; at speed 2, -0.46% ~ -0.59%),
      but some encoder speed losses(7% ~ 10% at speed 1 and 3% ~ 6% at
      speed 2). These speed losses were acceptable considering the speed
      gains obtained from row-mt.
      Change-Id: I60d87a25346ebc487a864b57d559f560b7e398bb
  32. 20 Apr, 2017 2 commits
  33. 19 Apr, 2017 1 commit
    • Linfeng Zhang's avatar
      Clean CONVERT_TO_BYTEPTR/SHORTPTR in convolve · bf8a49ab
      Linfeng Zhang authored
      The rule is: if a short ptr is casted to a byte ptr, any offset
      operation on the byte ptr must be doubled. We do this by casting to
      short ptr first, adding offset, then casting back to byte ptr.
      Change-Id: I9e18a73ba45ddae58fc9dae470c0ff34951fe248