1. Jun 07, 2013
    • Jingning Han's avatar
      Fix mv range border in pixels · c0167cbb
      Jingning Han authored
      WIP: trying to resolve the mismatch issue in extending frame
      dimension into multiples of 8.
      
      Change-Id: I24e7638ab3c50e21e6969c1eeed4f607d6f11f65
      c0167cbb
    • Ronald S. Bultje's avatar
      Change ref frame coding. · 6ef805eb
      Ronald S. Bultje authored
      Code intra/inter, then comp/single, then the ref frame selection.
      Use contextualization for all steps. Don't code two past frames
      in comp pred mode.
      
      Change-Id: I4639a78cd5cccb283023265dbcc07898c3e7cf95
      6ef805eb
  2. May 31, 2013
  3. May 30, 2013
    • Ronald S. Bultje's avatar
      Remove i4x4_pred. · 1efa79d3
      Ronald S. Bultje authored
      It remains as a local define in rdopt.c so we can distinguish between
      split and non-split modes in the RD loop, but disappears outside that
      scope in the codec.
      
      Change-Id: I98c18fe5ab7e4fbd1d6620ec5695e2ea20513ce9
      1efa79d3
  4. May 16, 2013
    • John Koleszar's avatar
      Remove vp9_extend_mb_row() · 16ac5a5c
      John Koleszar authored
      This code is no longer needed for correct intra prediction.
      
      Change-Id: I822d1a8b0ad0a00e7c4c6e7b2931790c39d1267d
      16ac5a5c
    • John Koleszar's avatar
      Add vp9_extend_frame_borders · 418564e7
      John Koleszar authored
      Adds a subsampling aware border extension function. This may be reworked
      soon to support more than 3 planes.
      
      Change-Id: I76b81901ad10bb1e678dd4f0d22740ca6c76c43b
      418564e7
  5. May 15, 2013
    • Jingning Han's avatar
      Fix first-pass encoding test · 9e49ba05
      Jingning Han authored
      Always initialize the mode_info with sb_type of BLOCK_SIZE_MB16X16
      for the first-pass encoding test.
      
      Change-Id: Ic86393eeef981bdd523a5b44cfac3f0b24c068b7
      9e49ba05
  6. May 10, 2013
    • John Koleszar's avatar
      Subsampling aware allocs and bitstream · da58436f
      John Koleszar authored
      Make framebuffer allocations according to the chroma subsamping
      factors in use. A bit is placed in the raw part of the frame header for
      each of the two subsampling factors. This will be moved in a future
      commit to make them part of the TBD feature set bits, probably only set
      on keyframes, etc.
      
      Change-Id: I59ed38d3a3c0d4af3c7c277617de28d04a001853
      da58436f
  7. May 09, 2013
    • John Koleszar's avatar
      Make firstpass encode Y-only · 236ec08c
      John Koleszar authored
      The chroma planes are not used during the first pass encode,
      but the vp9_encode_sb() function was operating on them anyway.
      This was causing the use of uninitialized memory.
      
      Change-Id: I5ebafcd3d5e34ed91a8336dad159b573995a939f
      236ec08c
    • Dmitry Kovalev's avatar
      Code cleanup inside vp9_firstpass.c. · dc541805
      Dmitry Kovalev authored
      Change-Id: Ia2814402e3c2ec97c24c536c05f0f526fe1a431c
      dc541805
  8. May 07, 2013
  9. May 06, 2013
    • John Koleszar's avatar
      Remove heap alloc of FIRSTPASS_STATS · 6462eebb
      John Koleszar authored
      There is only one instance of these structures, no need for them
      to be allocated separately on the heap.
      
      Change-Id: I1333cc92d06bbe21be643c2b2f0e3936f0264cac
      6462eebb
    • Scott LaVarnway's avatar
      Removed vp9_setup_intra_recon() · cb7955d8
      Scott LaVarnway authored
      This setup is now handled by vp9_build_intra_predictors()
      when left_available and/or up_available is zero.
      
      Change-Id: I59cec0ab95f8be69ce885fd20727510e4deef8a0
      cb7955d8
  10. May 02, 2013
    • John Koleszar's avatar
      Create common vp9_encode_sb{,y} · 3f4e8063
      John Koleszar authored
      Creates a common encode (subtract, transform, quantize, optimize,
      inverse transform, reconstruct) function for all sb sizes, including
      the old 16x16 path.
      
      Change-Id: I964dff1ea7a0a5c378046a069ad83495f54df007
      3f4e8063
  11. Apr 26, 2013
  12. Apr 25, 2013
    • John Koleszar's avatar
      Remove predictor pointers from BLOCKD · a99e1aa8
      John Koleszar authored
      Access these members from MACROBLOCKD instead.
      
      Change-Id: I2574622e577bb9feede47f6b7ccbb11f3e928ca8
      a99e1aa8
    • John Koleszar's avatar
      Remove BLOCK structure · 4bd0f4f6
      John Koleszar authored
      All members can be referenced from their per-plane counterparts, and
      removes assumptions about 24 blocks per macroblock.
      
      Change-Id: I593fb0715e74cd84b48facd1c9b18c3ae1185d4b
      4bd0f4f6
  13. Apr 24, 2013
    • Yaowu Xu's avatar
      Merge two similar functions into one · bcf82cf5
      Yaowu Xu authored
      Function set_mb_row() and set_mb_col() do similar work and are always
      called together, this commit merged them into a single function for
      clarity and easy maintainence.  This was a TODO item.
      
      Change-Id: I956bd9ed6afb8b2b0469b20fd8bc893b26f8a0f3
      bcf82cf5
  14. Apr 23, 2013
    • John Koleszar's avatar
      Remove coeff from BLOCK · 48f3e66e
      John Koleszar authored
      Lookup the data per-plane from the MACROBLOCK struct.
      
      Change-Id: I9253c4d3cf886aa9ab4aeab23a2156bfcf994ede
      48f3e66e
  15. Apr 22, 2013
  16. Apr 19, 2013
    • John Koleszar's avatar
      Move dst to per-plane MACROBLOCKD data · d12376aa
      John Koleszar authored
      First in a series of commits moving the framebuffers pointers to
      per-plane data, so that they can be indexed numerically rather than
      by name.
      
      Change-Id: I6e0d60fd4d51e6375c384eb7321776564df21775
      d12376aa
    • Paul Wilkins's avatar
      Adjustments to key frame sizing. · 21ff7bdc
      Paul Wilkins authored
      Adjustments take heavier account of the frame near a kf
      in deciding boost and limit the total number that can contribute.
      Also adjusted the minq calculations such that in most cases we
      generate a smaller key frame.
      Modified the code that accounts for how static the sequence is and
      added some adjustment based on image size. This is still very
      crude but smaller images tend to behave better with a larger
      delta between KF Q and other frames than larger image formats.
      Changes give sizable gains in overall PSNR  on all the test sets but the
      biggest gains (~3%) were on the std-hd set.
      The gains were smaller for SSIM but still significant.
      Average PSNR results are mixed because this metric can very easily
      be altered by having a very good / lossless coding of one or two frames.
      Some of the YT and YT-HD clips in particular have blank lead ins and
      allowing lossless coding of these appears to make a big difference to
      average PSNR but it reality does not help much at all.
      
      Change-Id: I6bfe485a1d330b47c783832f1717c95c535464ec
      21ff7bdc
    • John Koleszar's avatar
      make buid_inter_predictors block size agnostic (luma) · 4924934d
      John Koleszar authored
      This commit converts the luma versions of vp9_build_inter_predictors_sb
      to use a common function. Update the convolution functions to support
      block sizes larger than 16x16, and add a foreach_predicted_block walker.
      
      Next step will be to calculate the UV motion vector and implement SBUV,
      then fold in vp9_build_inter16x16_predictors_mb and SPLITMV.
      
      At the 16x16, 32x32, and 64x64 levels implemented in this commit, each
      plane is predicted with only a single call to vp9_build_inter_predictor.
      This is not yet called for SPLITMV. If the notion of SPLITMV/I8X8/I4X4
      goes away, then the prediction block walker can go away, since we'll
      always predict the whole bsize in a single step. Implemented using a
      block walker at this stage for SPLITMV, as a 4x4 "prediction block size"
      within the BLOCK_SIZE_MB16X16 macroblock. It would also support other
      rectangular sizes too, if the blocks smaller than 16x16 remain
      implemented as a SPLITMV-like thing. Just using 4x4 for now.
      
      There's also a potential to combine with the foreach_transformed_block
      walker if the logic for calculating the size of the subsampled
      transform is made more straightforward, perhaps as a consequence of
      supporing smaller macroblocks than 16x16. Will watch what happens there.
      
      Change-Id: Iddd9973398542216601b630c628b9b7fdee33fe2
      4924934d
  17. Apr 17, 2013
  18. Apr 16, 2013
  19. Apr 15, 2013
    • Dmitry Kovalev's avatar
      Removing TRUE and FALSE macro definitions. · a0d9309e
      Dmitry Kovalev authored
      Using regular 0 and 1 constants now.
      
      Change-Id: Ie763503cbb727847cc8f1d6506cd6f2ee607f056
      a0d9309e
    • Adrian Grange's avatar
      Initial addition of multiple ARF frames · c2876cf0
      Adrian Grange authored
      This is work-in-progress, it implements multiple ARF
      encoding behind an experimental flag.
      
      It adds the ability to insert multiple ARF frames into a
      single ARF group. This patch implements the reordering
      of the coded frames, and implements a fixed-length coding
      pattern. It applies a fixed quantizer strategy based on
      where the frame is in the coding sequence.
      
      Further work to modify the rate control strategy is
      ongoing and will be submitted via a set of future patches.
      
      In this first step, each ARF group is recursively
      bisected and an ARF frame added at that position in the
      sequence. The recursion continues until ARF frames are
      within MIN_GF_INTERVAL frames.
      
      The code sits behind the "multiple-arf" experimental
      flag ("CONFIG_MULTIPLE_ARF"). The experimental flag
      "oneshotq" ("CONFIG_ONESHOTQ") also needs to be enabled
      for this patch to work correctly.
      
      Change-Id: Ie473b05ebb43ac473c0cfb659b2b8042823085e2
      c2876cf0
  20. Mar 28, 2013
    • Paul Wilkins's avatar
      Adjust mv_ratio_accumulator threshold. · 17ef6a8d
      Paul Wilkins authored
      This threshold effectively limits the amount of motion
      from one end of a GF/ARF group to the other.
      This patch makes the threshold depend on image size.
      
      Change-Id: Id45d1d7bced815f86ddd037be53164894b00b82f
      17ef6a8d
  21. Mar 20, 2013
  22. Mar 18, 2013
    • Paul Wilkins's avatar
      Adapt ARNR filter length and strength. · cdb322dd
      Paul Wilkins authored
      Adjust the filter length and strength for each
      ARF group based on a measure of difficulty (the boost)
      and the active q range.
      
      Remove lower limit on RDMULT value.
      
      Average gains on the different sets in range 0.4%-0.9%.
      However the ARNR changes give a very big boost on a
      few clips.
      
      Eg. Soccer ~5%, in derf set and Cyclist ~ 10% in the std-hd set
      
      Change-Id: I2078d78798e27ad2bcc2b32d703ea37b67412ec4
      cdb322dd
  23. Mar 16, 2013
    • John Koleszar's avatar
      Fix use of NaN in firstpass · db5f2cb5
      John Koleszar authored
      If the second reference is better than the first in the long term,
      it was possible to try to take the fractional exponent of a
      negative number, giving an undefined result.
      
      Change-Id: I1dd08286747ceae960eb03bb5d98a383cc9d253b
      db5f2cb5
  24. Mar 11, 2013
    • Paul Wilkins's avatar
      Changes to maximum gf/arf interval. · 08d2c382
      Paul Wilkins authored
      This patch puts in an adjustment to the maximum gf/arf
      interval based on the active q range.  It sets a fixed
      baseline maximum of 16 but can drop this down to 12 at
      lower q. This required some re-ordering in the first pass
      code to insure we have a Q range estimate before defining
      the first gf sequence.
      
      The main gains seed are int he STD hd set on 50fps clips
      where previously the interval could rise as high as 25.
      On the std hd clip the gains are around 2.8% with limit set
      to 300 frames.
      
      When combined with the one shot rate control flags we get
      combined of:
      
      derf 1.55% (limit300), yt 7.25%, hd 5.17% std-hd 5.84% (limit300)
      
      Change-Id: Ib380d51354511f2ff0f171a8df4e74291c0421f9
      08d2c382
  25. Mar 08, 2013
    • Jingning Han's avatar
      Extend diff MV limit from +/-256 to +/-1024 · 2a5278bd
      Jingning Han authored
      Increase the motion search range by 4x. Change MV_CLASS tree of the
      entropy coding to allow two additional mv classes to cover the
      extended motion vector limit. The codec determines the effective
      motion search range conditioned on the actual frame dimension.
      
      It provides coding gains:
      
      stdhd 0.39%
      yt    0.56%
      hd    0.47%
      
      Major coding performance gains are packed in several sequences with
      intense motion activities, e.g., ped_1080p gains 7% at high bit-rates,
      and on average 3%.
      
      TODO: Need to further tune the rate control and motion search units.
      
      Change-Id: Ib842540a6796fbee5a797809433ef6a477c6d78d
      2a5278bd
  26. Feb 28, 2013
  27. Feb 27, 2013
    • John Koleszar's avatar
      Use ref_frame_map vice active_ref_idx on the encoder · 800ad0b8
      John Koleszar authored
      This patch makes the encoder's use of ref_frame_map and active_ref_idx
      consistent with the decoder. ref_frame_map[] maps a reference buffer
      index to its actual location in the yv12_fb array, since many
      references may share an underlying buffer. active_ref_idx[] mirrors
      cpi->{lst,gld,alt}_fb_idx, holding the active references in each
      slot.
      
      This also fixes a bug in setup_buffer_inter() where the incorrect
      reference was used to populate the scaling factors.
      
      Change-Id: Id3728f6d77cffcd27c248903bf51f9c3e594287e
      800ad0b8
    • John Koleszar's avatar
      Spatial resamping of ZEROMV predictors · eb939f45
      John Koleszar authored
      This patch allows coding frames using references of different
      resolution, in ZEROMV mode. For compound prediction, either
      reference may be scaled.
      
      To test, I use the resize_test and enable WRITE_RECON_BUFFER
      in vp9_onyxd_if.c. It's also useful to apply this patch to
      test/i420_video_source.h:
      
        --- a/test/i420_video_source.h
        +++ b/test/i420_video_source.h
        @@ -93,6 +93,7 @@ class I420VideoSource : public VideoSource {
      
           virtual void FillFrame() {
             // Read a frame from input_file.
        +    if (frame_ != 3)
             if (fread(img_->img_data, raw_sz_, 1, input_file_) == 0) {
               limit_ = frame_;
             }
      
      This forces the frame that the resolution changes on to be coded
      with no motion, only scaling, and improves the quality of the
      result.
      
      Change-Id: I1ee75d19a437ff801192f767fd02a36bcbd1d496
      eb939f45