1. 21 Dec, 2017 1 commit
  2. 19 Dec, 2017 1 commit
    • Marco's avatar
      vp9: Reset buffer level on large bitrate changes. · a2127236
      Marco authored
      For a large change in the target avg_frame_bandwidth,
      via the update in change_config()), reset the buffer_level
      to optimal_level.
      
      This fix prevents possible frame drops, where for example,
      encoder suddenly goes from lower to higher bitrate.
      
      Change-Id: I2f844c41d04c01240e85f574e59d2b9075c7eb6d
      a2127236
  3. 14 Dec, 2017 2 commits
    • Johann's avatar
      add copyright to rtcd files · e4b3f03c
      Johann authored
      Allows them to pass the license check in chromium.
      
      BUG=chromium:98319
      
      Change-Id: Iefc1706152a549d8c4ae774c917596bf1c9492d8
      e4b3f03c
    • Johann's avatar
      fix typo in boilerplate · 6746ba6d
      Johann authored
      The extra 'e' was causing the chromium license check to flag this file.
      
      BUG=chromium:98319
      
      Change-Id: Ic875ba66370298bf998438d14ff5f7e760293706
      6746ba6d
  4. 13 Dec, 2017 2 commits
    • Marco's avatar
      vp9: Cleanup/remove TODO comment. · e9ad5d2a
      Marco authored
      Change-Id: I2bd43e996909ad688b7e00b81ee19a5fc4df460b
      e9ad5d2a
    • Marco's avatar
      vp9: Reset rc flags on some configuration changes. · a40fa1f9
      Marco authored
      For large dynamic changes in target avg_frame_bandwidth, or
      a change in resolution, via the update in change_config()),
      reset the under/overshoot flags (rc_1_frame, rc_2_frame)
      to prevent constraining the QP for the first few frames
      following the change.
      
      For SVC use the spatial stream avg_frame_bandwidth in
      reset condition.
      
      For the avg_frame_bandwidth condition, use fairly large
      threshold (~50%) for now in reset.
      
      This allows for better/faster QP response if, for example,
      application dynamically changes bitrate by large amount.
      
      Change-Id: Ib6e3761732d956949d79c9247e50dba744a535c0
      a40fa1f9
  5. 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
  6. 08 Dec, 2017 1 commit
    • paulwilkins's avatar
      Bug fix for second reference stats. · f1ce050f
      paulwilkins authored
      Immediately following a key frame the trailing second reference
      error in the first pass stats will be based on a reference frame from
      the prior key frame group and will thus usually be much larger.
      
      This fix eliminates that effect (which typically triggers a short arf
      group immediately after a key frame). It also changes the accounting
      for the first frame in each new arf group.
      
      This change gives large gains on a couple of clips that contain mid
      sequence key frames (e.g. 6% on 1080P tennis). Overall there was
      a net gain in PSNR and PSNR-HVS ~(0.05- 0.4%) and mixed results for
      SSIM (+/- 0.2%).
      
      Change-Id: I8e00538ac2c0b5c2e7e637903cac329ce5c2a375
      f1ce050f
  7. 06 Dec, 2017 4 commits
    • Jerome Jiang's avatar
      Add frame width & height to frame pkt. Add test. · bd1d995c
      Jerome Jiang authored
      Used to return correct frame width and height when dynamic resizing happens.
      
      BUG=webm:1474
      
      Change-Id: Ia2043f7e1635b3821848a67b9b134f47f14b0f3a
      bd1d995c
    • Marco's avatar
      vp9-svc: Set downsampling filter for VGA layer. · 3562d6b0
      Marco authored
      Downsampling filter for SVC was set to subsample (phase 0)
      for HD -> VGA, and bilinear averaging (phase 8) for VGA -> QVGA.
      This change makes it bilinear averaging for HD -> VGA.
      
      Given the recent commit 9f9d4f8d, quality is improved with
      this change: avgPSNR/SSIM up ~1-3% on HD clips in RTC set.
      Speed decrease of ~1% for 3 layer SVC.
      
      Change-Id: If834a320e372b8b922a6bf7cab4227703b1beae6
      3562d6b0
    • Marco's avatar
      vp9: Nonrd-pickmode: move some early exits up. · 33953f31
      Marco authored
      Move the early exit checks on usable_ref_frame and
      skip_ref_find_pref up before the check on flag_svc_subpel.
      The code under flag_svc_subpel requires frame_mv to be set
      for the golden/spatial reference, which is only set if the
      both those exits don't pass.
      
      No change in behavior.
      
      Change-Id: Id304276c745eeb389ff85fa2dcf510d5976bc413
      33953f31
    • Marco's avatar
      vp9-svc: Allow for nonzero motion on spatial reference. · 9f9d4f8d
      Marco authored
      For nonrd pickmode on a given spatial layer, the spatial
      (golden) reference was always only using zeromv for prediction.
      In this patch if the downsampling filter used for generating
      the lower spatial layer is an averaging filter (nonzero phase),
      we allow for subpel motion on the spatial (golden) reference to
      compensate for the shift. This is done by forcing the testing of
      nonzero motion mode to compensate for spatial downsampling shift.
      
      Improvement for cases where the downsampling is averaging filter.
      In the current code this is only done for generating
      resolutions <= QVGA.
      
      Improvement for avgPSNR/SSIM on RTC set for speed 7: ~1.2%.
      Gain is larger (~2-3%) for VGA clips with 2 spatial layers.
      ~1% speed slowdown for 3 layer SVC on mac.
      
      Change-Id: I9ec4fa20a38947934fc650594596c25280c3b289
      9f9d4f8d
  8. 02 Dec, 2017 1 commit
  9. 01 Dec, 2017 2 commits
  10. 30 Nov, 2017 3 commits
    • Marco's avatar
      Nonrd-pickmode: avoid duplicate computation of UV predictor. · 2e701f7c
      Marco authored
      Avoids duplicate computation of UV predictor.
      
      Bit-exact when static_threshold is zero.
      Small/neutral difference on RTC set with nonzero static_threshold
      (since UV predictor won't be skipped with this change).
      
      Small speed gain, ~1-2%, at speed 8.
      
      Change-Id: Iba8d22a307768b391e29d63c9826aac5a4d9c285
      2e701f7c
    • James Zern's avatar
      decouple spatial-svc from encoder abi · 5044779e
      James Zern authored
      this is only meant for testing. along with --enable-experimental
      --enable-spatial-svc require VPX_TEST_SPATIAL_SVC to be defined rather
      than bumping the encoder ABI.
      
      Change-Id: I7f34d9f60300fa31ccf22e1a4aa619392c391b2e
      5044779e
    • Marco's avatar
      Fix to copy partition. · b409863c
      Marco authored
      Update the prev_partition on early exits in
      choose_partitioning().
      
      Change-Id: I382ffcab8e647c00b14283d15c3dd11bb0ac6f50
      b409863c
  11. 29 Nov, 2017 5 commits
  12. 27 Nov, 2017 1 commit
    • Marco's avatar
      vp9-svc: Fix to the layer buffer settings. · cbe62b9c
      Marco authored
      For the case when the number of temporal layers > 1,
      the buffer levels (starting/optimal_buffer_level,
      and maximum_buffer_size) were not scaled properly.
      
      In vp9_update_layer_context_change_config():
      when setting the layer-buffer levels, fix is to scale
      the layer-target_bandwidth by the target_bandwidth
      (which is the full stream bandwidth) instead of the
      spatial_layer_target.
      
      This is needed because prior to the call
      vp9_update_layer_context_change_config(), set_rc_buffer_sizes()
      is called which sets the buffer levels based on target bandwidth
      (which is the full bandwidth for the SVC stream).
      
      This fix properly sets the layer-buffer levels based on the
      layer-bandwidth, and leads to better rate targeting.
      
      Small/neutral change in avgPSNR/SSIM metrics on RTC set.
      
      Change-Id: Ic0f4f7f3487c37b9a9adb4781ae5edfed7140a57
      cbe62b9c
  13. 21 Nov, 2017 1 commit
  14. 17 Nov, 2017 1 commit
    • Marco's avatar
      vp9-svc: Enbale scale partition reference frames. · 559166ac
      Marco authored
      For reference frames: enable scale partition for
      superblocks with low source sad or if bsize on lower-resoln
      is at least 32x32.
      
      Keep feature disabled for base temporal layer.
      
      Small regression in avgPNSR/SSIM metrics, ~0.5-1%.
      Speedup ~2-3% on mac for SVC (3 spatial/3 temporal layers) at speed 7.
      
      Change-Id: I5987eb7763845b680059128b538bb5188be0cca5
      559166ac
  15. 16 Nov, 2017 2 commits
    • paulwilkins's avatar
      Disable allow_partition_search_skip for speed 2. · 44473e7e
      paulwilkins authored
      When allow_partition_search_skip  is set the two pass code
      can optionally skip the partition search in the rd loop if the image
      appears static (based on selection of 0,0 motion).
      
      Unfortunately 0,0 motion does not necessarily mean that there are
      no meaningful changes or that motion or intra modes will not be selected
      in the second pass.
      
      Disabling "allow_partition_search_skip" may hurt the encode speed a little
      for a small number of clips but can have a big impact on compression.
      The most notable example of this in our test sets is "bridge_close_cif"
      where this change gives a gains of 18%, 12% and 16% in opsnr, ssim and
      psnr-hvs.
      
      Change-Id: I765e288b5c0cd82bce00a148e7653a21e9203024
      44473e7e
    • Jerome Jiang's avatar
      vp9 svc: Rework/fix scale partitioning on boundary. · 1aea1675
      Jerome Jiang authored
      Enable partition copy on boundary and scale blocks along the boundary.
      Rename copy_partition_svc to scale_partition_svc.
      
      Do not copy if the block crosses the boundary.
      
      Change-Id: I37a04d48f11b15c4ea67facd7631193ec2f62150
      1aea1675
  16. 15 Nov, 2017 4 commits
    • paulwilkins's avatar
      Code cleanup. · 05302360
      paulwilkins authored
      Removal of parameters to and code in calc_frame_boost() that is no
      longer required.
      
      No change to results from previous patch.
      
      Change-Id: Ic92da35613fdc247d22fddf24d09679fc5329017
      05302360
    • paulwilkins's avatar
      Remove decay_accumulator clause from alt ref breakout. · 03c1a827
      paulwilkins authored
      The decay accumulator clause covers similar ground to the
      new clause that tests the accumulated second reference error
      so it has been removed to reduce complexity.
      
      Change-Id: I4ec1cce32d72bd4ee463ad7def2831a68447d525
      03c1a827
    • paulwilkins's avatar
      Add clause to alt ref group breakout. · 607e45f4
      paulwilkins authored
      Add a clause to the breakout test for alt ref groups that
      examines the size of the accumulated second reference
      frame error compared to the cost of intra coding.
      
      This clause causes a reduction in the average group length for many
      clips. Alongside the change to the group length the minimum
      boost is increased.
      
      On balance the results are positive for psnr and psnr-hvs
      but is negative for ssim/fast ssim for the smaller image formats.
      
      Strong gains on some harder clips (eg ducks take off (midres) ~20%,
      husky (lowres) 6-17%. Most of the negative cases are lower motion
      clips. Subsequent patch hopefully will help with those.
      
      Change-Id: Ic1f5dbb9153d5089e58b1540470e799f91a65dc4
      607e45f4
    • 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
  17. 13 Nov, 2017 3 commits
    • Jerome Jiang's avatar
      vp9 svc: Change conditions on VPX_ENCODER_ABI_VERSION. · 0d2555bd
      Jerome Jiang authored
      VPX_ENCODER_ABI_VERSION was bumped up in 93e83f.
      
      Change-Id: Id5707f9f9db56fa96549bc8f54e1cfa04e7fa4cd
      0d2555bd
    • paulwilkins's avatar
      New content type to improve grain retention. · a73cee28
      paulwilkins authored
      For new VP9 only content type adjust  the rate distortion and ARF
      filter based on the relative spatial variance of the source and
      reconstruction.
      
      In regards to the RD loop the method favors modes where the
      reconstruction variance is similar to the source variance. However it
      is currently only applied to regions where the source variance is quite
      low.
      
      For very low variance blocks it applies a further bias against intra
      coding and large prediction block sizes (the later in particular limit
      the usefulness of the loop filter).
      
      The final part of this change is to lower the strength of the ARF
      filter for blocks where the source has very low spatial variance, to
      encourage some low amplitude texture or noise to pass through
      the filter.
      
      This change improves the retention of film grain and fine noise /
      texture in spatially flat regions, but as expected causes a significant
      drop in PSNR on many clips. This is to be expected because similar
      but misaligned noise or texture will give a lower PSNR than a flat
      noise free reconstruction. However, it is worth noting that most clips
      show a strong gain in FAST SSIM.
      
      The features are enabled on the vpxenc command line by setting
      --tune-content=film.
      
      VPX_ENCODER_ABI_VERSION bumped for this change and cvbr.
      
      Change-Id: I26a4e4edfa3dc5cacead82fa701fe7a9118ccd0a
      a73cee28
    • paulwilkins's avatar
      Small parameter clean up. · 55fc4d95
      paulwilkins authored
      Removed three parameters that are no longer needed in calls
      to calc_arf_boost() and associated minor changes.
      
      No impact on encode results.
      
      Change-Id: Ieaf31d0d2e1990b99cf69647170145a1bbfbb9fb
      55fc4d95
  18. 10 Nov, 2017 1 commit
    • Marco's avatar
      vp9-svc: Avoid minmax variance for non-reference frames. · 6c0011a2
      Marco authored
      For choose_partitioning (speed >= 6): avoid computation
      of minmax variance for non-reference frames in SVC.
      
      Existing condition only avoided this for speed >= 8.
      Combine that existing logic with non-reference condition.
      
      Small speedup (~0.5-1%) for 3 layer SVC,
      neutral change on avgPSNR/SSIM metrics.
      
      Change-Id: I3e9f3a1af0647b15e475cf170d9402908d672ee5
      6c0011a2
  19. 09 Nov, 2017 4 commits
    • Jerome Jiang's avatar
      vp9: Fix mem rel for non-ref for external buffer. · 6246d8aa
      Jerome Jiang authored
      Release frame buffers for non-ref when the decoder is destroyed.
      
      Enable the non ref test.
      
      BUG=b/68819248
      
      Change-Id: Id87ef3b0a62318f9812e927cd957c05c859047fa
      6246d8aa
    • 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
    • Scott LaVarnway's avatar
      vpx: [x86] add vp9_block_error_fp_avx2() · 62ab5e99
      Scott LaVarnway authored
      SSE2 asm vs AVX2 intrinsics speed gains:
      blocksize   16: ~1.00
      blocksize   64: ~1.17
      blocksize  256: ~1.67
      blocksize 1024: ~1.81
      
      Change-Id: I2a86db239cf57e3ff617890ccb2d236aba83ad5e
      62ab5e99
    • paulwilkins's avatar
      Fix to frames considered in arf boost calculation. · d6e29868
      paulwilkins authored
      For a chosen interval "i" the existing arf boost calculation examined frames
      +/- (i-1) frames from the current location in the second pass.
      
      This change checks to make sure that the forward search does not extend
      beyond the next key frame in the event that the distance to the next key
      frame is < (i - 1).
      
      Small metrics gains on all our  test sets but these are localized to a few clips
      (e.g. midres set psnr-hvs sintel -2.59% but overall average was only -0.185%)
      
      Change-Id: I26fc9ce582b6d58fa1113a238395e12ad3123cf6
      d6e29868