1. 09 Jun, 2016 1 commit
    • paulwilkins's avatar
      Small re-arrangement. · fba94b8c
      paulwilkins authored
      Move initialization of a some new "twopass" values
      to the function vp9_init_second_pass() and some other
      small  changes.
      Remove #if GROUP_ADAPTIVE_MAXQ as this is always
      enabled now.
      Change-Id: I1dbec2fd7c419779848aa987c4cd7824d4df8456
  2. 03 Jun, 2016 5 commits
    • paulwilkins's avatar
      Slightly more damped VBR adjustment. · 45a26dd9
      paulwilkins authored
      Increase in the damping used in adjusting the active Q range.
      This does hurt rate accuracy a little in a few extreme cases
      especially if the clip is very short*, but helps metrics.
      * Note that the adjustment is applied at the GF/ARF group level based
      on what happened in the last group.  Hence for very short clips where
      the length of a single group may be a significant % of the clip length
      there is still scope for some drift that cannot be accommodated.
      In practice most data points in our test sets are now much closer to target
      than was previously the case with default settings and in some cases are
      better even than they were with the command line undershoot and overshoot
      parameter was set very low (e.g. 2%). For example in bridge_close at high rates
      the old mechanism was unable to adapt enough to prevent extreme overshoot.
      Change-Id: I634f8f0e015b5ee64a9f0ccaa2bcfdbc1d360489
    • paulwilkins's avatar
      Change to get_twopass_worst_quality() · 552fd02c
      paulwilkins authored
      Change to the calculation of the error divisor used in
      get_twopass_worst_quality(). This follows on from other
      changes to the rate control that impact the output of this
      Change-Id: I414fa9aa1e6a68a64dccea17c3712f44b8a0c10c
    • paulwilkins's avatar
      Removed unused data structure. · f9865d17
      paulwilkins authored
      Removed unused element from TWOPASS data structure.
      Change-Id: I9b662fd8eea727a7978055bc14f7c7328f048a5e
    • paulwilkins's avatar
      Adjustment calculation of active worst quality. · cd700e1a
      paulwilkins authored
      Added a factor based on the bit spend in the last arf group vs the
      target to adjust the choice of the active worst quality in subsequent
      Helps clips where previously there was a big overshoot or undershoot
      to adapt and get closer to the target rate.
      Change-Id: I67034b801679b99024409489a2273ea6fe23b8e6
    • paulwilkins's avatar
      Remove gf_zeromotion_pct. · 4328b085
      paulwilkins authored
      The use of this value is preventing rate adjustment on clips
      or sections that have very little motion but high noise and
      this can give rise to some sections with massive overshoot.
      Change-Id: I9a65c7c1148dc5d3a7d8b23e50fc1733f3661621
  3. 11 May, 2016 1 commit
    • paulwilkins's avatar
      Fixed 8K two pass encoder crash. · 65732c36
      paulwilkins authored
      Bug found by Yunqing relating to the correction for size at 8K and
      above in get_twopass_worst_quality().
      The basis for the correction was changed to the linear size relative to
      1080P as a baseline and the adjustment has been clamped to prevent
      problems at extreme images sizes.
      For 1080P the results on our test sets were neutral but the low res and
      mid res sets saw a small gain (0.1%-0.2% average).
      I would also expect some gains on 4k and larger content where the
      previous correction was overly aggressive.
      Change-Id: I30b026b5f4535e9601e3178d738066459d19c8fb
  4. 26 Apr, 2016 1 commit
  5. 25 Apr, 2016 2 commits
    • paulwilkins's avatar
      Resolve a couple of TODOs in firstpass.c · 015c43f0
      paulwilkins authored
      Resolved two TODO items.
      Force a minimum value of 1.0 for frame duration as per section duration.
      Column inactive zone is currently set to 0 as most of the serious issues
      relating to inactive regions relate to letter boxing.
      Change-Id: Ifbab3acf2c089d7305620a7ff7ed7c3536cc9235
    • paulwilkins's avatar
      Experiment to adapt for net AQ offset. · 4b590058
      paulwilkins authored
      In Aq mode 1 the segment and AQ delta for each block is based
      on spatial variance. There may be a net imbalance between blocks
      that have lower Q than the baseline value and those that have higher Q.
      This patch monitors that imbalance and extends the allowed baseline
      Q range for the frame to accommodate adjustment of that baseline value
      to compensate.
      Change-Id: Iae8a48c7c01fe2af94a141e149d03acf467237ca
  6. 11 Apr, 2016 1 commit
    • Paul Wilkins's avatar
      Adjustment to prediction decay. · 1c187c4b
      Paul Wilkins authored
      Adjustment to stop excessive prediction decay triggered by blocks
      or frames with extremely low spatial complexity which rendered the
      comparison of intra and inter coded errors meaningless.
      This was causing much shorter than expected groups on some 4k
      test content.
      Change-Id: I3f2c64200ef6dcef4721fc9f2ec09e480056ffc2
  7. 09 Apr, 2016 1 commit
    • Debargha Mukherjee's avatar
      Step towards making the 2-pass cq mode perceptual · c47c460f
      Debargha Mukherjee authored
      Uses a metric on fraction of smooth blocks derived from first pass
      stats in a frame to adjust down the cq_level modestly in the cq mode.
      The current implementation does not add much complexity, and is
      fairly light in the adaptation.
      Change-Id: Ic484e810d5bd51b7bb6b8945f378c7c3d9d27053
  8. 08 Apr, 2016 1 commit
    • paulwilkins's avatar
      Adjust motion component of prediction decay. · 81d1e7bf
      paulwilkins authored
      Adjust the motion decay component to account for image size.
      This has very little impact for smaller image sizes.
      Average bdrate results for our HD test sets:-
      Hdres set:  opsnr +0,92%,  Fast SSIM +1.6%
      Netflix hd set:  opsnr + 1.5%, Fast SSIM +3.1%
      There are a couple of notable -ve clips such as cyclist and sunflower
      which seem to be better with a shorter interval but also a few very big
      wins such as Jets >12% psnr 22% Fast SSIM and from the Netflix
      Netflix set PierSeaside 9.7% psnr and 18.2% Fast SSIM.
      Change-Id: Ie43aaedaa74331ed83d624a13548094ac64fed9e
  9. 07 Apr, 2016 1 commit
    • paulwilkins's avatar
      Trap very short arf group just before a kf. · 107de196
      paulwilkins authored
      Trap the case where we end up with a very short arf group just before
      a key frame. Such a group often has poor quality and may cause pulsing.
      For example if the KF is 17 frames away we are better doing two mid-size
      groups of 9 and 8 than a group of 15 followed by a group of 2.
      This becomes more and more important when coding with a short forced
      kf interval though it may not impact our standard tests much.
      Change-Id: I29d83d6637b203eac69be320dd35a7401a4678c1
  10. 30 Mar, 2016 1 commit
  11. 22 Mar, 2016 1 commit
    • Paul Wilkins's avatar
      Fix some HBD scaling bugs. · ee35f4de
      Paul Wilkins authored
      Fixed a bug for HBD in stats output and scaling of a threshold
      within the first pass code.
      Change-Id: Icd0463d78cc9ce4661b027b0612c55c0628d212f
  12. 04 Feb, 2016 1 commit
    • Zoe Liu's avatar
      Define a macro to replace hardcoded values · 0f7dd403
      Zoe Liu authored
      The definition is for the number of frames to check to determine the
      recent decay rate, further to determine the next key frame in the
      first pass of the encoder.
      Change-Id: Ic696d6eb518a86fa296842273cf8767ef0b0e27a
  13. 29 Jan, 2016 1 commit
  14. 25 Jan, 2016 1 commit
  15. 22 Jan, 2016 1 commit
  16. 20 Jan, 2016 1 commit
  17. 23 Oct, 2015 1 commit
    • Paul Wilkins's avatar
      Bug in clamping of base_frame_target. · 762c0f22
      Paul Wilkins authored
      Bug relating to issue:- http://b/25090786
      base_frame_target is supposed to track the idealized bit
      allocation based on error score and not the actual bits
      allocated to each frame.
      The clamping of this value based on the VBR min and max pct values
      was causing a bug where in some cases the loop that adjusts the
      active max quantizer for each GF group was running out of bits at
      the end of a KF group. This caused a spike in Q and some ugly artifacts.
      A second change makes sure that the calculation of the active
      Q range for a group DOES, however, take account of clamping.
      Change-Id: I31035e97d18853530b0874b433c1da7703f607d1
  18. 21 Oct, 2015 1 commit
  19. 14 Sep, 2015 1 commit
  20. 31 Aug, 2015 1 commit
  21. 29 Aug, 2015 1 commit
  22. 27 Aug, 2015 1 commit
  23. 14 Aug, 2015 1 commit
  24. 10 Aug, 2015 1 commit
  25. 06 Aug, 2015 1 commit
  26. 14 Jul, 2015 1 commit
    • Debargha Mukherjee's avatar
      Fixes part of merge regression from adding arf parameters. · 3c524488
      Debargha Mukherjee authored
      From Change  Ibf0c30b72074b3f71918ab278ccccc02a95a70a0
      There is still an issue relating to one animated test clip with repeat
      patterns where this change effectively increase the default  maximum
      arf interval by +1. This can be examined seperately.
      Change-Id: Idd01d5480fc45202d8a059a0c3afc0997cc5bdd1
  27. 08 Jul, 2015 1 commit
    • paulwilkins's avatar
      Change speed and rd features for formatting bars. · a126b6ce
      paulwilkins authored
      Change speed features / behavior for split mode when there
      is an internal active edge (e.g. formatting bars).
      Remove some threshold constraints in rd code near the active
      edge of the image.
      Add some plumbing for left and right active edge detection.
      Patch set 5. Limit rd pass through for sub 8x8 to internal active edges.
      This takes away any speed penalty for most clips but keeps the enhanced
      edge coding for the more critical case of internal image edges
      Change-Id: If644e4762874de4fe9cbb0a66211953fa74c13a5
  28. 07 Jul, 2015 1 commit
  29. 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
  30. 02 Jul, 2015 2 commits
    • paulwilkins's avatar
      Error score recalibration for inactive regions. · dc19f352
      paulwilkins authored
      Apply a correction to the frame error scores for frames
      with inactive regions.
      Change-Id: I217840f2efe7eafed3f5b8ddc7c468f1ca3d923c
    • paulwilkins's avatar
      ARF Boost correction for inactive regions. · e4702dee
      paulwilkins authored
      Correct the ARF boost calculations to partly discount
      inactive or very low energy regions of the image.
      Examples (formatting bars and 0 energy areas of animated clips).
      Change-Id: I241af058d10aba8c67a4deca36deb913047d4561
  31. 26 Jun, 2015 1 commit
    • Yaowu Xu's avatar
      Fixed a variance calculation · 9f14bbfd
      Yaowu Xu authored
      This commit fixed a mistake in variance calculation.
      Thanks to Xintong for spotting the error.
      Change-Id: Ia285fc0128c00f0234a73b0a7eba6adc88b8a7de
  32. 09 Jun, 2015 2 commits
    • Paul Wilkins's avatar
      Changes to active maxq calculation in two pass. · faf8c63b
      Paul Wilkins authored
      Some initial experiments into discounting dead zone
      formating bars and intra skip blocks (common in some
      types of animation and graphics) in the calculation of
      the active max Q for each ARF/GF group.
      TODO: check for vertical formating bars and validate the
      horizontal bar at the bottom edge of the image.
      As expected, this change as it stands, does not make much
      difference for the natural videos in the std-hd and derf sets.
      However, for the yt and yt hd set there is a significant rise
      in the average PSNR with overall PSNR and SSIM remaining
      The mean rise for the YT-HD test set was > 6%. This is mainly
      because the change allows Q to drop further on titles and
      other graphics sections where spending a small number of
      extra bits gives a sharp rise in PSNR.
      Change-Id: I3f878ae91fc1854312d7ecf9fa792c17bc1aa6b7
    • Paul Wilkins's avatar
      Enable more split modes for animated content. · 4a28da58
      Paul Wilkins authored
      For content that is identified as likely to contain some
      animation or graphics content, increase the availability
      of split modes for good quality speeds 1-3.
      On a problem test animation clip this improves metrics
      results by about 0.25 db and makes a noticeable difference
      visually. It also causes a small drop in file size (~0.5%) but
      a rise in encode time of about 5-6% at speed  2.
      For more normal content it should have no effect.
      Change-Id: Ic4cd9a8de065af9f9402f4477a17442aebf0e439
  33. 04 Jun, 2015 1 commit
    • Paul Wilkins's avatar
      Animation and dead zone detection. · 668e8045
      Paul Wilkins authored
      Adds code to detect dead zone bars at the top and bottom
      of reformatted letterbox video (note that the code only
      looks at the top of the image and assumes any dead zone
      is symmetrical).  Use of this to adapt rate control etc.
      will follow in a subsequent patch.
      Also counts other blocks (excluding the dead zone) that
      have no intra signal. The presence of a significant
      number of such blocks can be used as a identify that the frame
      may be artificial (e.g.  animation, screen capture, graphics).
      This patch contains plumbing only and does not use
      the signal.
      Change-Id: I59bc93529cd4065416cef773e405fda3ae006a20