1. 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
  2. 27 Mar, 2017 1 commit
    • Marco's avatar
      vp9: 1 pass: Move source sad computation into encodeframe loop. · 66c6b4d6
      Marco authored
      Refactor to split the 1 passs source sad computation into scene
      detection (currently used for VBR and screen-content mode), and
      superblock based source sad computation (used in non-rd CBR mode).
      
      This allows the source sad computation for CBR mode to be
      multi-threaded.
      
      No change in compression.
      
      Change-Id: I112f2918613ccbd37c1771d852606d3af18c1388
      66c6b4d6
  3. 16 Feb, 2017 1 commit
  4. 13 Feb, 2017 1 commit
    • paulwilkins's avatar
      Aggressive VBR method. · ce7b3845
      paulwilkins authored
      VBR method that allows a wider Q range for the first normal frame
      in each ARF group and then centers the min - max range for the rest of
      the arf group on the chosen Q value for that first frame.
      
      This allows for quite rapid adjustment of the active Q range even if the
      initial estimate is poor.
      
      In some cases where the ARF frames themselves are tending to
      undershoot but the normal frames are overshooting this can still give
      net undershoot. This can be corrected by allowing a larger Q delta for
      arf frames but is usually is a sign that the allocation to the arfs was to
      high.
      
      Change-Id: Icec87758925d8f7aeb2dca29aac0ff9496237469
      ce7b3845
  5. 16 Jan, 2017 1 commit
  6. 11 Oct, 2016 1 commit
    • Marco's avatar
      1 pass vbr: Allow for lookahead alt-ref in real-time mode. · 57c6bf29
      Marco authored
      For 1 pass vbr real-time mode:
      Allow for the usage of alt-ref frame when non-zero lag-in-frames is used.
      Use non-filtered alt-ref, and select usage based on fast scene/content
      analysis/detection within the lag of frames.
      
      Positive gains on ytlive set: overall avgPSNR ~3-4%.
      Several clips are up between 5-14%, a few clips are neutral/small change.
      
      Current speed decrease is about ~5-10%.
      
      Use the flag USE_ALTREF_FOR_ONE_PASS to enable this feature
      (off by default for now).
      
      Change-Id: I802d2bf3d44f9cf01f6d15c76be9c90192314769
      57c6bf29
  7. 02 Aug, 2016 1 commit
  8. 18 Jul, 2016 1 commit
    • Marco's avatar
      vp9: Allow usage of lookahead for real-time, 1 pass vbr. · 05fe0f20
      Marco authored
      Allow usage of lookahead for VBR in real-time mode, for 1 pass vbr.
      
      Current usage is for fast checking of future scene cuts/changes,
      and adjusting rate control (gf interval and active_worst/target size).
      
      Added unittests (datarate) for 1 pass vbr mode, with non-zero lag.
      
      Added an experimental option to limit QP based on lookahead.
      
      Overall positive gain in metrics on ytlive set:
      avgPNSR/SSIM up on average ~1-3%; several clips up by 5, 7%.
      
      Change-Id: I960d57dfc89de121c4824b9a9bf88d2814e74b56
      05fe0f20
  9. 07 Jul, 2016 1 commit
    • Marco's avatar
      vp9: Adjustment of gfu_boost and af_ratio for 1 pass vbr. · cc431ad5
      Marco authored
      Modify the gfu_boost and af_ratio setting based on the
      average frame motion level.
      
      Change only affects 1 pass vbr.
      
      Metrics overall positive on ytlive set.
      On average up by ~1%, several clips up by 2-4%.
      
      Change-Id: Ic18c49eb2df74cb4986b63cdb11be36d86ab5e8d
      cc431ad5
  10. 07 Jun, 2016 1 commit
    • Marco's avatar
      vp9: Replace the avg_size_inter metric, for 1 pass vbr. · f0b08aa4
      Marco authored
      Code cleaup, use existing rolling_actual/target metrics instead,
      set threshold to get same/similar effect.
      
      Little/no change in metrics on ytlive set.
      
      Change-Id: I74f3c3d0a143a9cf20dc9c3dee54c0f7e6a97a51
      f0b08aa4
  11. 13 May, 2016 1 commit
  12. 25 Apr, 2016 1 commit
  13. 20 Apr, 2016 1 commit
    • Marco's avatar
      vp9: Adjust gf period for high average Q and overshoot. · 9ca6b46c
      Marco authored
      For 1 pass vbr mode.
      Increase the gf interval for case where average Q is close to
      max and high overshoot is detected.
      
      Small increase in overall avg_psnr/sssim metrics (~0.2/0.1%) for ytlive,
      but improves the low-end (low bitrate) for several clips (less overshoot).
      
      Change-Id: Ifba40f25b4861b2e0d9832c82d5359a6a3dce9f2
      9ca6b46c
  14. 13 Apr, 2016 1 commit
    • Marco's avatar
      vp9: Adjustment to scene-cut detection. · 24db57f0
      Marco authored
      Change recursive weight for average_source_sad and
      put some constraint on spacing between detected scene-cuts.
      
      Change only affects 1 pass real-time mode.
      
      Change-Id: I1917e748d845e244812d11aec2a9d755372ec182
      24db57f0
  15. 15 Dec, 2015 1 commit
    • paulwilkins's avatar
      Fixed interval, fixed Q 1 pass test patch. · fc50d95b
      paulwilkins authored
      For testing implemented a fixed pattern and delta, 1 pass,
      fixed Q, low delay mode.
      
      This has not in any way been tuned or optimized.
      
      Change-Id: Idf5ee179b277fa15d07a97f14f2ce5bbaae80a04
      fc50d95b
  16. 02 Oct, 2015 2 commits
  17. 18 Aug, 2015 1 commit
    • Marco's avatar
      Allow for re-encoding frame if high overshoot. · 42b67917
      Marco authored
      For 1 pass CBR mode under screen content mode:
      if pre-analysis (source temporal-sad) indicates significant
      change in content, then check the projected frame size after
      encode_frame(), and if size is above threshold, force re-encode
      of that frame at max QP.
      
      Change-Id: I91e66d9f3167aff2ffcc6f16f47f19f1c21dc688
      42b67917
  18. 06 Jul, 2015 1 commit
    • Debargha Mukherjee's avatar
      Expose params min-gf-interval/max-gf-interval · 98526433
      Debargha Mukherjee authored
      Adds two new vp9 parameters --min-gf-interval and --max-gf-interval
      to enable testing based on frequency of alt-ref frames.
      
      Also adds a unit-test to test enforcement of min-gf-interval.
      
      For both these parameters the default value is 0, which indicates
      they are picked by the encoder, based on resolution and framerate
      considerations. If they are greater than zero, the specified
      parameter is honored.
      
      (Additional note by paulwilkins)
      Note that there is a slight oddity in that key frames are also GFs and
      considered part of  GF only group. However they are treated as not
      being part of an arf group because for arf groups the previous GF is
      assumed to be the terminal or overlay frame for the previous group.
      
      (end note)
      
      Change-Id: Ibf0c30b72074b3f71918ab278ccccc02a95a70a0
      98526433
  19. 19 Jun, 2015 1 commit
    • Marco's avatar
      Add dynamic resize logic for 1 pass CBR. · d77f51ba
      Marco authored
      Decision to scale down/up is based on buffer state and average QP
      over previous time window. Limit the total amount of down-scaling
      to be at most one scale down for now.
      
      Reset certain quantities after resize (buffer level, cyclic refresh,
      rate correction factor).
      
      Feature is enable via the setting rc_resize_allowed = 1.
      
      Change-Id: I9b1a53024e1e1e953fb8a1e1f75d21d160280dc7
      d77f51ba
  20. 20 May, 2015 1 commit
    • paulwilkins's avatar
      Fast feedback of bits on undershoot. · 883fdd45
      paulwilkins authored
      This patch provides a partial rapid feedback of bits
      resulting from extreme undershoot.
      
      Some  improvement on some problem animated material
      but in its current form only a small impact on the metrics results
      of our standard test sets.
      
      Change-Id: Ie03036ea8123bc2553437cb8c8c9e7a9fc5dac5d
      883fdd45
  21. 15 May, 2015 1 commit
  22. 01 May, 2015 1 commit
    • paulwilkins's avatar
      Adjust ARF min and max interval. · e0786c28
      paulwilkins authored
      Previously limit on max interval  set to 0.5 seconds.
      Though this helped some low frame rate material it
      appears to be a bit too aggressive for some 24 and 25 fps
      content. This patch relaxes the limit to 0.75 seconds.
      
      The patch also adds a new minimum interval variable
      to replace the current hard wired value. This allows us
      to impose a limit on the maximum number of primary
      arfs per second for high frame rate (e.g. 50 & 60fps)
      content. This is to address concerns regarding playback
      performance on some platforms if there is a high base
      frame rate and very frequent arfs.
      
      Change-Id: I373e8b6b2a8ef522eced6c6d2cceb234ff763fcf
      e0786c28
  23. 10 Feb, 2015 1 commit
    • Adrian Grange's avatar
      Auto-adaptive encoder frame resizing logic · 23ebacdb
      Adrian Grange authored
      Note: This feature is still in development.
      
      Add an option for the encoder to decide the resolution
      at which to encode each frame.
      
      Each KF/GF/ARF goup is tested to see if it would be
      better encoded at a lower resolution. At present, each
      KF/GF/ARF is coded first at full-size and if the coded
      size exceeds a threshold (twice target data rate) at
      the maximum active Q then the entire group is encoded
      at lower resolution.
      
      This feature is enabled in vpxenc by setting:
        --resize-allowed=1
      
      In addition, if the vpxenc command line also specifies
      valid frame dimensions using:
        --resize-width=XXXX & --resize_height=YYYY
      then *all* frames will be encoded at this resolution.
      
      Change-Id: I13f341e0a82512f9e84e144e0f3b5aed8a65402b
      23ebacdb
  24. 28 Jan, 2015 1 commit
  25. 21 Jan, 2015 1 commit
    • Paul Wilkins's avatar
      Bug when last group before forced key frame is short. · 0bff1efc
      Paul Wilkins authored
      Just before a forced key frame we often get a foreshortened
      arf/gf group. In such a case, we do not want to update
      rc->last_boosted_qindex, which is used to define the Q range
      for the forced key frame itself.
      
      This gives a small average metrics gain for the YT and YT-HD sets
      (eg. YT SSIM +0.141%).
      
      Change-Id: Ie06698bc4f249e87183b8f8fb27ff8f3fde216d9
      0bff1efc
  26. 02 Dec, 2014 1 commit
  27. 18 Nov, 2014 1 commit
    • Yaowu Xu's avatar
      Prevent severe rate control errors in CBR mode · ffa06b37
      Yaowu Xu authored
      In rare cases, the interaction between rate correction factor and Q
      choices may cause severe oscillating frame sizes that are way off
      target bandwidth. This commit adds tracking of rate control results
      for last two frames, and use the information to prevent oscillating
      Q choices.
      
      Change-Id: I9a6d125a15652b9bcac0e1fec6d7a1aedc4ed97e
      ffa06b37
  28. 13 Nov, 2014 1 commit
    • Adrian Grange's avatar
      Prepare for dynamic frame resizing in the recode loop · 0d085ebc
      Adrian Grange authored
      Prepare for the introduction of frame-size change
      logic into the recode loop.
      
      Separated the speed dependent features into
      separate static and dynamic parts, the latter being
      those features that are dependent on the frame size.
      
      Change-Id: Ia693e28c5cf069a1a7bf12e49ecf83e440e1d313
      0d085ebc
  29. 13 Oct, 2014 1 commit
    • Paul Wilkins's avatar
      Add adaptation option for VBR. · f7f0eaa5
      Paul Wilkins authored
      Allow min and maxQ to creep when the undershoot
      or overshoot exceeds thresholds controlled by the
      command line under_shoot_pct and over_shoot_pct
      values.
      
      Default is 100%,100% which ~disables adaptation.
      
      Derf results for example undershoot% / overshoot%:-
      
      Head:- Mean abs (%rate error) = 14.4%
      
      This check in:-
      25%/25% - Mean abs (%rate error) = 6.7%
                        PSNR hit -1% SSIM -0.1%
      
      5% / 5%  - Mean abs (%rate error) = 2.2%
                       PSNR hit -3.3% SSIM - 1.1%
      
      Most of the remaining error and most of the quality hit is
      at extreme data rates. The adaptation code still has an
      exception for material that is in effect static so that we
      don't over adjust and over spend on YT slide show type
      content.
      
      (Rebase of If25a2449a415449c150acff23df713e9598d64c9
      to resolve a auto-merge error)
      
      Change-Id: Iec4e1613ef0d067454751d8220edb7058dfbd816
      f7f0eaa5
  30. 10 Oct, 2014 2 commits
    • Alex Converse's avatar
      Revert "Add adaptation option for VBR." · a90255c3
      Alex Converse authored
      This reverts commit 869d4ca5.
      
      This breaks the build via conflict with
      e18edd5e.
      
      Change-Id: If544b99e367a449452834eb8cce600f58c34ec0d
      a90255c3
    • Paul Wilkins's avatar
      Add adaptation option for VBR. · 869d4ca5
      Paul Wilkins authored
      Allow min and maxQ to creep when the undershoot
      or overshoot exceeds thresholds controlled by the
      command line under_shoot_pct and over_shoot_pct
      values.
      
      Default is 100%,100% which ~disables adaptation.
      
      Derf results for example undershoot% / overshoot%:-
      
      Head:- Mean abs (%rate error) = 14.4%
      
      This check in:-
      25%/25% - Mean abs (%rate error) = 6.7%
                        PSNR hit -1% SSIM -0.1%
      
      5% / 5%  - Mean abs (%rate error) = 2.2%
                       PSNR hit -3.3% SSIM - 1.1%
      
      Most of the remaining error and most of the quality hit is
      at extreme data rates. The adaptation code still has an
      exception for material that is in effect static so that we
      don't over adjust and over spend on YT slide show type
      content.
      
      Change-Id: If25a2449a415449c150acff23df713e9598d64c9
      869d4ca5
  31. 18 Sep, 2014 1 commit
    • Paul Wilkins's avatar
      Substantial reworking of code for arf and kf groups. · c389b37b
      Paul Wilkins authored
      Substantial restructuring of the way we estimate
      the rate of decay in prediction quality and determine
      the arf interval and amount of boost used.
      
      Also other changes to support moving to a lower first pass
      Q which exposes some new features and allows us to better
      distinguish genuinely static blocks from low motion or noisy
      blocks.
      
      Net gains now visible on all the test sets with std-hd PSNR up
      1.87%. There are still some bad outlier cases but most of these
      are low motion or slide show type content where the metrics
      are already high at any given rate. The best + case is up by
      more than 10%.
      
      Change-Id: I18e25170053bdf3188f493ff8062f48a74515815
      c389b37b
  32. 16 Sep, 2014 1 commit
  33. 14 Jul, 2014 1 commit
    • Minghai Shang's avatar
      [spatial svc]Implement alt reference frames · e899859c
      Minghai Shang authored
      All changes are for spatial svc only.
      1. Enable encoding hidden frames in each layer and use alt reference idex to reference the hidden frame in each layer
      2. Use golden reference idx for spatial reference
      3. For those layers that don't have hidden frames (caused by lack of frame buffers), reference a hidden frame in lower layers
      4. Add "auto-alt-refs" in svc options
      Change-Id: Idf27d1fd2fb5f3ffd9e86d2119235e3dad36c178
      e899859c
  34. 24 Jun, 2014 1 commit
    • Paul Wilkins's avatar
      Experiment for mid group second arf. · 2e430cba
      Paul Wilkins authored
      This patch implements a mechanism for inserting a second
      arf at the mid position of arf groups.
      
      It is currently disabled by default using the flag multi_arf_enabled.
      
      Results are currently down somewhat in initial testing if
      multi-arf is enabled. Most of the loss is attributable to the
      fact that code to preserve the previous golden frame
      (in the arf buffer) in cases where we are coding an overlay
      frame, is currently disabled in the multi-arf case.
      
      Change-Id: I1d777318ca09f147db2e8c86d7315fe86168c865
      2e430cba
  35. 04 Jun, 2014 1 commit
  36. 03 Jun, 2014 1 commit
  37. 28 May, 2014 2 commits