1. 12 Oct, 2017 1 commit
  2. 10 Oct, 2017 2 commits
    • paulwilkins's avatar
      Further Corpus VBR change. · 06d231c9
      paulwilkins authored
      Change to the bit allocation within a GF/ARF group.
      
      Normal VBR and CQ mode allocate bits to a GF/ARF group based of the mean
      complexity score of the frames in that group but then share bits evenly between
      the "normal" frames in that group regardless of the individual frame complexity
      scores (with the exception of the middle and last frames).
      
      This patch alters the behavior for the experimental "Corpus VBR" mode such that
      the allocation is always based on the individual complexity scores.
      
      Change-Id: I5045a143eadeb452302886cc5ccffd0906b75708
      06d231c9
    • paulwilkins's avatar
      Corpus Wide VBR test implementation. · 741bd6df
      paulwilkins authored
      This patch makes further changes to support an experimental
      corpus wide VBR mode that uses a corpus complexity
      number as the midpoint of the distribution used to allocate bits
      within a clip, rather than some average error score derived from the
      clip itself.
      
      At the moment the midpoint number is hard wired for testing and
      the mode is enabled or disabled through a #ifdef.  Ultimately this
      would need to be controlled by command line parameters.
      
      Change-Id: I9383b76ac9fc646eb35a5d2c5b7d8bc645bfa873
      741bd6df
  3. 01 Sep, 2017 1 commit
  4. 09 Aug, 2017 1 commit
    • paulwilkins's avatar
      Patch relating to Issue 1456. · db8fa86a
      paulwilkins authored
      Testing of 4k videos encoded with a fixed arbitrary chunking interval
      uncovered a bug where by if a chunk ends 1 frame before a real scene cut,
      the next chunk may be encoded with two consecutive key frames at the start
      with the first being assigned 0 bits.
      
      This fix insures that where there is a key frame group of length 1 it is
      at least assigned 1 frames worth of bits not 0.
      
      See also patch Change-Id: I692311a709ccdb6003e705103de9d05b59bf840a
      which by virtue of allowing fast adaptation  of Q made this bug more visible.
      
      BUG=webm:1456
      
      Change-Id: Ic9e016cb66d489b829412052273238975dc6f6ab
      db8fa86a
  5. 11 Jul, 2017 1 commit
  6. 05 Jul, 2017 2 commits
  7. 18 May, 2017 1 commit
    • paulwilkins's avatar
      Changes to modified error. · 5680b451
      paulwilkins authored
      The modified error was a derivative of the "coded_error"
      that was used to allocate bits between different frames on the
      assumption that the allocation should be linear in terms of this
      modified error.  I.e. a frame with double the modified error score
      should all things being equal get double the number of bits. The
      code also included upper and lower caps derived from input
      VBR parameters.
      
      This patch improves the initial calculation of the clip mean error
      (now called "mean_mod_score" as it is no longer a prediction error)
      used as the midpoint for the rate distribution function and normalizes
      the output "modified scores" scores such that 1.0 indicates a frame
      in the middle of the distribution.  The VBR upper and lower caps are
      then applied directly to a  frame's normalized score.
      
      This refactoring is intended to make it easier to drop in alternative
      distribution functions or to base the rate allocation on a corpus wide
      midpoint (rather than the clip mean).
      
      Change-Id: I4fb09de637e93566bfc4e022b2e7d04660817195
      5680b451
  8. 17 May, 2017 1 commit
    • paulwilkins's avatar
      Experiment. Store first pass errors as per MB values. · 42e5073f
      paulwilkins authored
      Most existing first pass stats are stored in a form normalized to a
      macro-block scale. However the error scores for intra / inter etc were
      stored as frame level values but mainly used as MB level values.
      
      This change  fixes that. Normalized per MB values make comparisons
      between different formats easier and in any case this is usually what is
      wanted.
      
      An change in results should be limited to slight differences in rounding.
      
      *** Change after patch 8 +2 requiring new approval.
      
      Final pre-submit testing showed  one 4K clip with above expected change.
      Investigation showed this was due to a value used to test for ultra low intra
      complexity in key frame detection. This was a per frame not per MB value but
      also did not scale with frame size. Replacement with a small per MB value
      (based on original per frame value and cif frame size) resolved the KF detection
      problem.
      
      Also converted kf_group_error_left to a double in line with other error values
      to reduce rounding problems in KF group bit allocation
      
      All clips and sets now show nominal (or 0) change as expected.
      
      Change-Id: Ic2d57980398c99ade2b7380e3e6ca6b32186901f
      42e5073f
  9. 11 May, 2017 1 commit
  10. 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
      4e23998f
  11. 26 Apr, 2017 1 commit
    • hui su's avatar
      Adjust alt-ref selection in define_gf_group() · 8069f310
      hui su authored
      107de196 changes the encoder alt-ref selection behavior. Assuming
      min_gf_interval = max_gf_interval = 4, the frame order would be
      frm_1  arf_1  frm_2  frm_3  frm_4  frm_5  arf_2 before 107de196;
      frm_1  arf_1  frm_2  frm_3  frm_4  arf_2  frm_5 after 107de196.
      
      This patch reverts such alt-ref placement change.
      
      Change-Id: I93a4a65036575151286f004d455d4fcea88a1550
      8069f310
  12. 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
      10a497bd
  13. 18 Apr, 2017 1 commit
    • Marco's avatar
      vp9: Add phase to get averaging filter for 1:2 downsampling. · 348bdc01
      Marco authored
      The scaling filter with zero shift will give sub-sampling for
      2x downsampling. Allow for a phase shift to get an averaging filter.
      
      Usage is for source scaling in 1 pass SVC mode for 1:2 downscale.
      Reduces aliasing in downsampled image.
      
      Keep the phase to 0/off for now.
      
      Change-Id: Ic547ea0748d151b675f877527e656407fcf4d51e
      348bdc01
  14. 31 Mar, 2017 1 commit
    • Yunqing Wang's avatar
      Enhance the row mt sync read to accept the sync_range greater than 1 · f1600db3
      Yunqing Wang authored
      The row mt sync read uses sync_range = 1, and wouldn't work if we want
      to use a sync_range that is greater than 1. To make it work, this sync
      read code is modified. Pass in col instead of col - 1 to make it
      consistent with other row mt code in VP9, and then add 1 in "while"
      codition.
      
      Change-Id: I4a0e487190ac5d47b8216368da12d80fec779c1a
      f1600db3
  15. 01 Mar, 2017 1 commit
  16. 27 Feb, 2017 1 commit
    • Vignesh Venkatasubramanian's avatar
      vp9: Rename new_mt to row_mt · 58816014
      Vignesh Venkatasubramanian authored
      new_mt is a very generic name that will get obsolete soon enough.
      Since this is exposed as a codec control, renaming it to row_mt to
      signify row level paralellism. Also renaming the ETHREAD_BIT_MATCH
      codec control to ROW_MT_BIT_EXACT.
      
      Change-Id: Ic7872d78bb3b12fb4cf92ba028ec8e08eb3a9558
      58816014
  17. 20 Feb, 2017 1 commit
  18. 17 Feb, 2017 1 commit
    • paulwilkins's avatar
      Change to prediction decay calculation. · a63adac6
      paulwilkins authored
      This change subtracts out low complexity intra regions that are also low
      error in the inter domain, in the calculation of the frame prediction decay.
      The rationale here his that low complexity regions (such as sky) do not imply
      high prediction decay in the same way as high error intra or neutral blocks.
      
      The effect of this is small in most clips but in a few clips it can be > 10%.
      (E.g. In to tree)
      
      Change-Id: If67ac23d17fca14285cad2defa464c61c9ea861c
      a63adac6
  19. 16 Feb, 2017 1 commit
  20. 15 Feb, 2017 4 commits
    • paulwilkins's avatar
      Disconnect ARF breakout from frame boost. · cfc79a35
      paulwilkins authored
      This small change replaces the frame boost check in the arf group
      length break out clause with a test against a prediction decay value.
      
      The boost value is in fact partly dependent on the decay value but
      this change means that the per frame boost calculation can be adjusted
      without influencing the group length calculation.
      
      The value chosen gives a close match on all the test sets with the previous
      code (on average) but it was noted that a lower threshold was slightly better
      for 1080P and up and a slightly higher value for small image sizes.
      
      Change-Id: I4d5b9f67d5b17b0d99ea3f796d3d6202fd61ee0c
      cfc79a35
    • paulwilkins's avatar
      Remove unnecessary factor. · b89ba05a
      paulwilkins authored
      Removed unnecessary scaling factor to simplify.
      
      Change-Id: I3fc9c5975a2597e72f1324e09dd586dea1facfa7
      b89ba05a
    • paulwilkins's avatar
      Bug in scale_sse_threshold() · 76550dfd
      paulwilkins authored
      The function scale_sse_threshold() returns a threshold scaled
      if necessary for use with 10 and 12 bit from an 8 bit baseline.
      
      SSE error values would be expected to rise for the 10 and 12
      bit cases where there are more bits of precision.
      
      Hence the threshold used for the test should also be scaled up.
      
      Change-Id: I4009c98b6eecd1bf64c3c38aaa56598e0136b03d
      76550dfd
    • paulwilkins's avatar
      Additional first pass stats. · 945ccfee
      paulwilkins authored
      Added counts that split the intra coded blocks into low and high variance.
      
      Change-Id: Ic540144b34d5141659081bb22f7ee16fd6861f14
      945ccfee
  21. 14 Feb, 2017 1 commit
  22. 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
  23. 24 Jan, 2017 1 commit
  24. 03 Jan, 2017 1 commit
  25. 07 Dec, 2016 1 commit
    • Yunqing Wang's avatar
      Remove an unused first pass statistic · 39402038
      Yunqing Wang authored
      One of the first pass stats "new_mv_count" is no longer used in VP9,
      and is removed. This also makes it easy to implement a multi-threaded
      first pass. This change doesn't affect the coding performance, which
      has been verified by borg tests.
      
      Change-Id: I4c7c7bf9465fda838eb230814ef0c631c068c903
      39402038
  26. 28 Oct, 2016 1 commit
    • Paul Wilkins's avatar
      Change to KF boost calculation. · 715c6591
      Paul Wilkins authored
      This  change is a step in a larger change to the way boost and interval are
      determined for ARF and Key frames.
      
      This patch contains some pluming for the general case but focuses on the
      key frame boost calculation. This now relies more heavily on the rate at
      which the error score increases between the primary and secondary reference
      frame. This seems to be less fragile when dealing with different frame sizes.
      For example larger image formats tend in the first pass to see a higher
      % of intra coded blocks and the use of this number in calculating the frame
      decay factor was leading to much lower boost numbers for 4K, for example,
      than the same clip coded at 2K.
      
      This change does give overall gains but they are MUCH larger for the 4K Netflix
      set. For the 4K Netflix set the average gain is around 3% with some clips > 20%
      whereas for the same set at 2K the average gain is 0.5-1%.
      
      In general for small image formats the boost is most often reduced a little whereas
      4K clips the boost is increased. There are some -ve cases such as Akiyo at 352x288
      where the reduced boost hurts the metrics, especially for SSIM, even while
      the set as a whole improves. This is most notable at very low Q and may be the
      subject of a future patch.
      
      Some common code for KF and ARF was separated in this patch for the purposes of
      tuning but may later be re-merged if appropriate.
      
      Change-Id: Iaa15ac5a58d2be89181100d95cef6a8dc4b12d0d
      715c6591
  27. 26 Oct, 2016 2 commits
  28. 29 Sep, 2016 1 commit
  29. 26 Sep, 2016 1 commit
    • paulwilkins's avatar
      Limit max arf boost and scale motion breakout for image size. · 0421d8e3
      paulwilkins authored
      Added a cap on the maximum boost for an arf based on interval length.
      Fixed bug where by the image size was not accounted for in determining
      two of the motion breakout thresholds.
      
      Overall small gains of 0.2-0.4% psnr but on large image format clips with
      slow zooms the gain may be as much as 20% or more (e.g. in_to_tree
      at 1080P)
      
      Change-Id: Id0a47391203026742daa9c97afac5705fd8c4dfb
      0421d8e3
  30. 01 Sep, 2016 1 commit
    • paulwilkins's avatar
      Casts to remove some warnings. · 3e9e7700
      paulwilkins authored
      Added casts to remove warnings:
      BUG=webm:1274
      
      In regards to the safety of these casts they are of two types:-
      
      - Normalized bits per (16x16) MB stored in a 32 bit int (This is safe as bits
      per MB even with << 9 normalization cant overflow 32 bits. Even raw 12
      bits hdr source even would only be  29 bits :- (4+4+12+9) and the encoder
      imposes much stricter limits than this on max bit rate.
      
      - Cast as part of variance calculations.  There is an internal cast up to 64 bit
      for the Sum X Sum calculation, but after normalization dividing by the number
      of points the result will always be <= the SSE value.
      
      Change-Id: I4e700236ed83d6b2b1955e92e84c3b1978b9eaa0
      3e9e7700
  31. 17 Aug, 2016 1 commit
    • paulwilkins's avatar
      Add casting to fix warning. · af3b0de7
      paulwilkins authored
      Frame bits can safely be stored int but group bits
      (kf or arf) use 64bit.
      
      Change-Id: I0800f2a28070f8749110a95721c116fc56987885
      af3b0de7
  32. 10 Aug, 2016 1 commit
  33. 08 Aug, 2016 1 commit
  34. 02 Aug, 2016 1 commit