1. 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
  2. 16 Apr, 2015 1 commit
    • paulwilkins's avatar
      Limit arf interval for low fpf clips. · effd974b
      paulwilkins authored
      This patch limits  the maximum arf interval length to
      approximately half a second. In some low fps animations in
      particular the existing code was selecting an overly long interval
      which was hurting visual quality. For a sample problem test clip
      (360P animation , 15fps, ~200Kbit/s) this change also improved
      metrics by >0.5 db.
      
      There may be some clips where this hurts metrics a little, but the
      worst case impact visually is likely to be less than having an
      interval that is much too long. On more normal material at 24
      fps or higher, the impact is likely to be nil/minimal.
      
      Change-Id: Id8b57413931a670c861213ea91d7cc596375a297
      effd974b
  3. 11 Mar, 2015 2 commits
  4. 10 Mar, 2015 2 commits
    • Marco's avatar
      Modify update golden reference update under aq-mode=3 mode. · fb31aa09
      Marco authored
      For non-SVC 1 pass CBR: make the GF update interval a multiple of the
      cyclic refresh period, and use encoding stats to prevent GF update at certain times.
      
      Change-Id: I4c44cacc2f70f1d27391a47644837e1eaa065017
      fb31aa09
    • Adrian Grange's avatar
      Fix vp9_compute_qdelta_by_rate loop behavior · 78df7122
      Adrian Grange authored
      The return value from vp9_compute_qdelta_by_rate, which is
      a delta value for the quantizer, could never be 0 if
      (qindex == rc->worst_quality).
      
      This occurs because target_index was setup unconditionally
      in the loop and yet the loop counter stopped at
      (rc->worst_quality - 1).
      
      Change-Id: I6b59cd9b5811ff33357e71cd7d814c5e53d291f2
      78df7122
  5. 09 Mar, 2015 1 commit
    • paulwilkins's avatar
      Allow q adjustment for VPX_CQ and VPX_CBR. · 2cff9c4e
      paulwilkins authored
      Adjustment previously only enabled in VBR mode.
      
      This patch allows adjustment of min and max q for CBR
      and adjustment of max q only for CQ mode.
      
      Change-Id: Id5e583f3d50453cd544fc57249acacd946457482
      2cff9c4e
  6. 13 Feb, 2015 1 commit
    • Yaowu Xu's avatar
      Fix an encoder/decode mismatch bug · 4bc7f482
      Yaowu Xu authored
      This commit prevent the encoder to update last_frame_type when a frame
      is dropped in the encoder. Prior to this fix, if there is a dropped
      frame immediatedly after a key frame, decoder would have the value of
      last_frame_type as key frame, different from encoder as the dropped
      frame in encoder would have updated the value to an inter frame. This
      leads to different probability update in encoder and decoder, thereby
      encoder/decoder mismatch.
      
      This fixes issue #941
      
      Change-Id: I27115224b138bec43ae3916c016574f5740822b0
      4bc7f482
  7. 11 Feb, 2015 1 commit
  8. 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
  9. 28 Jan, 2015 1 commit
  10. 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
  11. 05 Dec, 2014 1 commit
  12. 03 Dec, 2014 1 commit
  13. 02 Dec, 2014 1 commit
  14. 25 Nov, 2014 1 commit
    • Yaowu Xu's avatar
      Separate rate_correction_factor for boosted GFs · e4234b3f
      Yaowu Xu authored
      When the golden frame is boosted, the rate correction factor is not
      correlated well with other inter frames even in CBR mode. This commit
      changes to use GF specific rate_correction_factor when gf_cbr_boost
      is greater than 20%.
      
      Change-Id: I6312c1564387bcacc11f4c5e8a9cfdc781b5c3ab
      e4234b3f
  15. 19 Nov, 2014 1 commit
    • Yaowu Xu's avatar
      Add a reset to rc tracking for dropped frames · 21db24ef
      Yaowu Xu authored
      VP9/DatarateTestVP9Large.ChangingDropFrameThresh/[34] fails post the
      merge of commit#ffa06b37. This commit adds reset of rc tracking info
      when frame is dropped, and fixes the causes of the bad interaction
      between the tests and the previous commit.
      
      Change-Id: I848acfd9fcb336359662274325190f94aac76eae
      21db24ef
  16. 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
  17. 17 Nov, 2014 1 commit
    • Marco's avatar
      Modify active_worst_quality setting for one pass CBR. · b660f723
      Marco authored
      Current setting had active_worst_quality set too high (close to worst_quality)
      for first frame(s) following first key frame. This changes that to be somewhat
      more aggressive in allowing active_worst_quality to be lower following key frame.
      
      Also remove the 4/5 reduction in active_worst for key frame as
      this should be set by the user qp_max setting.
      
      Change-Id: I0530b3ddcc85c00e3eb7568de1b14a31206c4a4c
      b660f723
  18. 13 Nov, 2014 2 commits
    • 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
    • Yaowu Xu's avatar
      adapt the adjustment limit for rate correction factor in RTC mode · 9f79259e
      Yaowu Xu authored
      Rate correction factor is used to correct the estimated rate for any
      given quantizer, and feeds into rate control for quantizer selection.
      We make use of the actual bits used to calculate this rate correction
      factor with an adjustment limit to prevent over-adjustment.
      
      This commit adapts the adjustment limit to the difference between the
      estimated bits and the actual bits, allows the adjustment limit to vary
      between 0.125 (when estimate is close to actual) and 0.625 (when there
      is >10X factor off between estimated and actual bits). By doing this,
      the commit appears to have largely corrected two observed issues:
      1. Adjustment is too slow when the actual bits used is way off from
      estimate due to the small adjustment limit.
      2. Extreme oscillating quantizer choices due to the feedback loop.
      
      Change-Id: I4ee148d2c9d26d173b6c48011313ddb07ce2d7d6
      9f79259e
  19. 11 Nov, 2014 1 commit
    • Yaowu Xu's avatar
      Use normal rate_correction_factor for gf in CBR mode · f2b978e8
      Yaowu Xu authored
      I0c5f010 changed to allow update golden reference buffer in CBR mode,
      this commit changes the use of rate_correction_factor for those frames
      to be aligned with the new usage. This commit attempts to solve two
      issues:
      
      a. Initialization of rate correction factor for Golden Frame
      Prior to this patch, even the regular inter frame has been update
      the rate correction factor based on content and encoding results,
      the first golden frame would still use the ininitialized value
      that can be way off.
      
      b. Allowing rate correction factor update to be slightly faster
      Prior to this patch, when the rate correction factor is off, the
      update to the factor is too slow, the factor could not get close
      to a semi-correct value even after many frames.
      
      The commit helps all clips in psnr/ssim metric, but especially to
      a few clip in RTC set that rate correction was way off. For example
      thaloundeskmtgvga gained about .5dB for both overall/average psnr.
      
      Change-Id: I0be5c41691be57891d824505348b64be87fa3545
      f2b978e8
  20. 28 Oct, 2014 1 commit
    • Yaowu Xu's avatar
      Allow update of golden refernce buffer in CBR mode · e5cd5188
      Yaowu Xu authored
      This commit changes to allow the usage of golden reference frame in
      VP9 CBR mode to improve quality. VP9 supports potentially up to 8
      reference buffers, it has reference buffers available for this
      purpose. This was not possible in VP8 as golden and alt-ref buffers
      were used for temporal scalability purpose in CBR mode in WebRTC.
      
      For frames that update golden frame, there can be a quality boost.
      The amount of allowed bitrate boost can be controlled via parameter
      rc_max_inter_bitrate_pct. The inital value of the boost ratior is
      currently based on over_shoot_pct. Further experiments will work
      out the adaption of this boost value.
      
      Change-Id: I0c5f010c8fd8b7b598f69779c1b30e5b2ac30a4d
      e5cd5188
  21. 24 Oct, 2014 1 commit
  22. 23 Oct, 2014 1 commit
    • Paul Wilkins's avatar
      Enable dual arf with constant q. · 8fc3ab77
      Paul Wilkins authored
      Add second level arf Q adjustment when using dual arfs
      in constant Q mode.
      
      Previously in constant Q mode enabling dual arf hurt by ~5%
      but with this change the average benefit is ~1-1.5% with some
      mid range data points up ~10%.
      
      Note however that it still hurts on some clips including
      some very low motion show content.
      
      Change-Id: I5b7789a2f42a6127d9e801cc010c20a7113bdd9b
      8fc3ab77
  23. 16 Oct, 2014 1 commit
    • Paul Wilkins's avatar
      Change initialization of static_scene_max_gf_interval. · 716ae78c
      Paul Wilkins authored
      This removes an unnecessary restriction that causes
      a problem (noticed by AWG) when the forced key frame
      interval is set to a very small value, such as 10. In this case
      we were being forced to code minimal length GF groups.
      
      Change-Id: I76ef5861a09638ff51f61fea02359554184ada53
      716ae78c
  24. 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
  25. 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
  26. 07 Oct, 2014 1 commit
  27. 06 Oct, 2014 1 commit
    • Paul Wilkins's avatar
      Improve two pass VBR accuracy. · 0e1068a4
      Paul Wilkins authored
      Adjustments to the GF interval choice and minimum boost.
      Adjustment to the calculation of 2 pass worst q.
      Compared to 09/29 head there is metrics hit on derf of
      (-0.123%,-0.191%)
      
      Compared to the September 29 head and a baseline on
      September 18 baseline the accuracy of the VBR rate control
      measured on the derf set is as follows:-
      
      Mean error %  / Mean abs(error %)
      Sept 18 baseline (-7.0% / 14.76%)
      Sept 29 head (-15.7%, 19.8%)
      This check in (-1.5% / 14.4%)
      
      The mean undershoot is reduced slightly but the
      worst case overshoot on e.g. harbour/highway is
      increased. This will be addressed in a later patch.
      
      Change-Id: Iffd9b0ab7432a131c98fbaaa82d1e5b40be72b58
      0e1068a4
  28. 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
  29. 16 Sep, 2014 1 commit
  30. 02 Sep, 2014 1 commit
  31. 19 Aug, 2014 1 commit
  32. 12 Aug, 2014 1 commit
  33. 08 Aug, 2014 2 commits
    • Dmitry Kovalev's avatar
      Moving framerate from VP9EncoderConfig to VP9_COMP. · 5a78c406
      Dmitry Kovalev authored
      Framerate changes over time, VP9EncoderConfig supposed to have static
      read-only data.
      
      Change-Id: I36580a7ee71243c1eabb57691089691731d03e67
      5a78c406
    • Dmitry Kovalev's avatar
      Moving pass from VP9_COMP to VP9EncoderConfig. · 91c2f1e4
      Dmitry Kovalev authored
      We had a very complicated way to initialize cpi->pass from
      cfg->g_pass:
      switch (cfg->g_pass) {
        case VPX_RC_ONE_PASS:
          oxcf->mode = ONE_PASS_GOOD;
          break;
        case VPX_RC_FIRST_PASS:
          oxcf->mode = TWO_PASS_FIRST;
          break;
        case VPX_RC_LAST_PASS:
          oxcf->mode = TWO_PASS_SECOND_BEST;
          break;
      }
      
      cpi->pass = get_pass(oxcf->mode).
      
      Now pass is moved to VP9EncoderConfig and initialization is simple:
      switch (cfg->g_pass) {
        case VPX_RC_ONE_PASS:
          oxcf->pass = 0;
          break;
        case VPX_RC_FIRST_PASS:
          oxcf->pass = 1;
          break;
        case VPX_RC_LAST_PASS:
          oxcf->pass = 2;
          break;
      }
      
      Change-Id: I8f582203a4575f5e39b071598484a8ad2b72e0d9
      91c2f1e4
  34. 06 Aug, 2014 1 commit
  35. 04 Aug, 2014 1 commit