1. 18 Oct, 2013 1 commit
    • Jingning Han's avatar
      Make memory alloc in pick_mode_context bsize aware · 72033fcf
      Jingning Han authored
      This commit makes the buffer allocation of zcoeff_blk array in
      pick_mode_context block size aware. It calculates the number of
      4x4 blocks in the partition and assigns the memory space accordingly.
      This process (and the uninitialization) is done once for each encoding
      pass. It allows memory copy of smaller buffer when possible.
      
      For football at 600kbps, the runtimes improve by about 1%:
      speed 1, 45961ms -> 45472ms
      speed 2, 23863ms -> 23598ms
      
      Change-Id: Id2ca24906fa89f46fa5fe742ec4b8efc2a61f877
      72033fcf
  2. 17 Oct, 2013 1 commit
  3. 16 Oct, 2013 5 commits
  4. 15 Oct, 2013 3 commits
    • Alexander Voronov's avatar
      Updated encoder to handle intra-only frames · d6a59fb1
      Alexander Voronov authored
      Updated the encoder to handle frames that are coded
      intra-only. Intra-only frames must be non-showable,
      that is, the "show frame" flag must be set to 0 in
      the frame header.
      
      Tested by forcing the ARF frames to be coded intra-
      only.
      
      Note: The rate control code will need to be modified
      to account for intra-only frames better than they
      are currently handled.
      
      Change-Id: I6a9dd5337deddcecc599d3a44a7431909ed21079
      d6a59fb1
    • Jingning Han's avatar
      Make vp9_zero use cases of consistent format · c8e48f4b
      Jingning Han authored
      Remove the semicolon in the definition of vp9_zero macro. Make all
      the use cases of vp9_zero of consistent format.
      
      Change-Id: Ibaf9751e8595872b12766381a93d185a4d90df8f
      c8e48f4b
    • Dmitry Kovalev's avatar
      Removing unused 8x4 transform from the encoder. · a4585285
      Dmitry Kovalev authored
      Change-Id: Icbcf68b5b685a56f255ebc3859c9692accdadf9e
      a4585285
  5. 11 Oct, 2013 3 commits
    • Yaowu Xu's avatar
      Masking intra mode choice adaptively · 8b175679
      Yaowu Xu authored
      The commit changes to mask available intra prediction modes for test
      based on prediction block size.
      
      With this patch, encoding time of CpuUsed 2 reduces from 10% to 20% for
      HD clips with a compression drop of 0.2%
      
      Change-Id: I65f320f1237c0f5ae3a355bf7caf447f55625455
      8b175679
    • Paul Wilkins's avatar
      Experimental rate control change. · 704028d4
      Paul Wilkins authored
      When the codec in VBR (or cq) mode hits its max q limits and is
      struggling to hit a target bandwidth, the bit target per frame collapses.
      
      In the first instance normal frames cap out at the maximum allowed
      Q and then the ARF and GFs do the same. This latter behavior is not
      generally desirable as GFs and ARFs are only effective from a quality
      and data rate perspective if they have at lease some level of -Q delta
      compared to the surrounding frames.
      
      In this patch I define a separate max Q for GFs and ARFs that is
      derived from but somewhat lower than that defined for normal frames.
      In effect there is a minimum Q delta that will always be available for
      GFs and ARFs regardless of the target rate and MAXQ setting.
      
      This may of course mean that the absolute lowest rate obtainable for
      a given clip is somewhat higher.
      
      Change-Id: I268868b28401900d0cd87e51e609cd3b784ab54a
      704028d4
    • Paul Wilkins's avatar
      Disable recode loop. · 8b989f5b
      Paul Wilkins authored
      For VBR coding disable the recode loop for speeds > 0.
      
      Results pending.
      
      Change-Id: I2cd9a87c3fcbe39c05b954798d0671a4ca62c37f
      8b989f5b
  6. 10 Oct, 2013 1 commit
  7. 09 Oct, 2013 1 commit
    • Jingning Han's avatar
      Deprecate the use of PARTITION_INFO from encoder · 03fe08ca
      Jingning Han authored
      Use b_mode_info to store the inter prediction mode of sub8x8 block,
      in replacement of the use of partition_info. Remove redundant buffer
      update for partition_info. For bus_cif at 2000 kbps, this seem to make
      speed 0 about 1% faster.
      
      Change-Id: Id1b3be45e75a24fb4b42335ac480c23e440978f6
      03fe08ca
  8. 08 Oct, 2013 2 commits
    • Dmitry Kovalev's avatar
      Removing inv_txm4x4_1_add and inv_txm4x4_add function pointers. · c983c966
      Dmitry Kovalev authored
      We already have itxm_add member in MACROBLOCKD structure. Both
      inv_txm4x4_1_add and inv_txm4x4_add are just its special cases for
      different eob values. But eob logic is already implemented in
      vp9_iwht4x4_add and vp9_idct4x4_add (that's why also removing
      inverse_transform_b_4x4_add).
      
      Change-Id: I80bec9b6f7d40c5e5033c613faca5c819c3e6326
      c983c966
    • Yaowu Xu's avatar
      Change to allow less rectangular partion check · e29137df
      Yaowu Xu authored
      For CpuUsed 1 & 2, this commit allow to skip retangular partition check
      when NONE is better than SPLIT. It also changed to allow such logic
      on alt ref frame coding rather than use square partition all them. The
      change has gain compressio about .3% on yt and ythd for both 1&2, It
      helped .6% compression on cif and stdhd for both CpuUsed 1&2.
      
      Change-Id: I814b653baf89f59acd20e042629a12938a1bd4e5
      e29137df
  9. 07 Oct, 2013 1 commit
    • Jim Bankoski's avatar
      cpplint errors in vp9_onyx_if.h · 7eb7dd2f
      Jim Bankoski authored
      Slightly bigger change -> broke up encode_frame_to_datarate,  lots
      of line length fixes.
      
      Change-Id: I7c53325e954de130f3fe1a6656626efc6705be82
      7eb7dd2f
  10. 05 Oct, 2013 1 commit
    • Jingning Han's avatar
      Allow sub8x8 intra modes test for alt frame coding · 0d0ed6a2
      Jingning Han authored
      This commit allows sub8x8 intra modes test in the rate-distortion
      loop for hd sequences in speed 1 and 2.
      
      For sequence y90n of hd set at 8000 kbps, speed 2 runtime goes
      from 207s to 210s. For ped_1080p at 3000 kbps, speed 2 runtim goes
      from 336s to 337s. Both are running with 300 frames.
      
      This improves compression performance by 0.24% for stdhd and 0.32%
      for hd.
      
      Change-Id: I173ca38a6411565ae6cfadd184c42b2070c5de1f
      0d0ed6a2
  11. 04 Oct, 2013 4 commits
    • Dmitry Kovalev's avatar
      Giving consistent names to IDCT/IWHT functions. · 3a060257
      Dmitry Kovalev authored
      The idea is to have the following names for each transform size:
      
      vp9_idct4x4_add
        vp9_idct4x4_1_add
        vp9_idct4x4_10_add
        vp9_idct4x4_16_add
      
      vp9_idct8x8_add
        vp9_idct8x8_1_add
        vp9_idct8x8_10_add
        vp9_idct8x8_64_add
      
      etc for 16x16, 32x32
      
      The actual list of renames in this patch:
      
      vp9_idct_add_lossless     -> vp9_iwht4x4_add
      vp9_short_iwalsh4x4_add   -> vp9_iwht4x4_16_add
      vp9_short_iwalsh4x4_1_add -> vp9_iwht4x4_1_add
      
      vp9_idct_add            -> vp9_idct4x4_add
      vp9_short_idct4x4_add   -> vp9_idct4x4_16_add
      vp9_short_idct4x4_1_add -> vp9_idct4x4_1_add
      
      Change-Id: I6f43f7437c68dd30cdd05d72e213765578ed30b1
      3a060257
    • Paul Wilkins's avatar
      Further clean up of speed 4 · 44e039b4
      Paul Wilkins authored
      Speed 4 still does not give a big gain over speed 3.
      This just cleans it up a little from the last patch and comments
      out features that do not seem to be giving much benefit.
      
      Change-Id: I5f366e6160e1dbe5dc45cf5eb90cc02712baa1b6
      44e039b4
    • Paul Wilkins's avatar
      Selective masking of split modes. · de6ecc5a
      Paul Wilkins authored
      Allow selective masking of individual split modes rather than
      just a single on / off flag.
      
      For speed 2 recovers the large speed loss seen for some derf
      clips  in change Ie6bdfa0a370148dd60bd800961077f7e97e67dd4
      and a small quality gain.
      
      For speed 1 10 % speed increase observed locally on some derf clips
      for minimal quality change.
      
      Change-Id: If86191087b93cbc05351c26c60c7933e2149e485
      de6ecc5a
    • Paul Wilkins's avatar
      Missing threshold case for disable split. · 03dd2818
      Paul Wilkins authored
      In relation to change:
      Refactor inter mode rate-distortion search
       Ie6bdfa0a370148dd60bd800961077f7e97e67dd4
      
      sf->thresh_mult_sub8x8[THR_INTRA] = INT_MAX missing;
      
      Change-Id: Ia86b68a5073368a3e2ca124a27b632243b525c8b
      03dd2818
  12. 03 Oct, 2013 2 commits
    • Jingning Han's avatar
      Refactor inter mode rate-distortion search · 11abab35
      Jingning Han authored
      This commit separates the rate-distortion optimization loop of
      superblocks from that of sub8x8 blocks. This allows better design
      rate-distortion optimization search loop for each setting. It also
      removes the use of SPLITMV and I4X4_PRED therein.
      
      No performance change in speed 0 settings. For bus@CIF at 2000kbps,
      the speed 1 runtime goes from 48009ms to 43894ms (about 10% faster).
      The overall compression performance on derf changed by -0.021%.
      
      Speed 2 runtime goes from 27114ms to 28700ms (6% slower), while the
      overall coding efficiency goes up by 1.629% for derf, 1.236% for yt.
      
      Change-Id: Ie6bdfa0a370148dd60bd800961077f7e97e67dd4
      11abab35
    • Paul Wilkins's avatar
      Speed setting review. · 6253cc92
      Paul Wilkins authored
      Substantial reworking of the speed vs quality trade offs for
      speed 1 and 2.
      
      In this patch I am attempting to freeze the "quality" meaning of
      speeds 1 and 2 relative to speed 0 so that in future we can
      better evaluate progress.
      
      I am targeting :
      Speed 1 quality ~-5% vs speed 0.
      Speed 2 quality ~-10% vs speed 0
      
      It is inevitable that quality will still fluctuate a little as we adjust
      settings and add new features, but we will attempt to keep as
      close as possible to these values. Above speed 2 things will remain
      a bit more fluid for now.
      
      In this patch speed 1 is approximately 4-5x as fast as speed 0. This
      is similar to before but the quality hit is a lot less. Likewise speed 2
      is approximately 2x as fast as speed 1 but is similar in quality to the
      previous speed 1 configuration.
      
      Also slight change to behavior of FLAG_EARLY_TERMINATE to insure
      all reference frames get at least one rd test. Important for very low
      variance regions.
      
      WIP :- Added a new speed level with old speed 4 becoming speed 5.
      Speed 3 and 4 tradeoffs still WIP
      
      Change-Id: Ic7a38dd7b5b63ab1501f9352411972f480ac6264
      6253cc92
  13. 02 Oct, 2013 1 commit
  14. 30 Sep, 2013 2 commits
    • Paul Wilkins's avatar
      Improved auto_partition_range. · 65b93c7e
      Paul Wilkins authored
      The code now takes into account temporal and spatial
      information to determine the partition size range, but the
      frequency counts have been removed.
      
      The net effect is similar in quality but about 10% faster.
      
      Change-Id: I39a513fb79cec9177b73b2a7218f0da70963ae95
      65b93c7e
    • Paul Wilkins's avatar
      Alter Speed 3. · a76caa7f
      Paul Wilkins authored
      This patch deletes the variance based speed three partitioning.
      Speed 3 now uses the same partitioning method as speed 2
      but with some stricter conditions.
      
      The speed and quality are now somewhere between speeds 2 and 4
      whereas before it was worse in both than speed 4.
      
      Change-Id: Ia142e7007299d79db3ceee6ca8670540db6f7a41
      a76caa7f
  15. 27 Sep, 2013 1 commit
    • Deb Mukherjee's avatar
      Some minor changes/cleanups in rate control · 80d58223
      Deb Mukherjee authored
      Some small changes to the quantizer mapping functions.
      Also includes some cleanups.
      
      Change-Id: I9dea29b24015f6e6697012a0e4d8983049d8e5c7
      Results:
      derfraw300: +0.106%
      stdhdraw250: +0.139%
      80d58223
  16. 24 Sep, 2013 1 commit
  17. 23 Sep, 2013 1 commit
    • Deb Mukherjee's avatar
      Improves constant qual, constrained qual turned on · d11221f4
      Deb Mukherjee authored
      Adds modeled functions to decide the qp for altref frames in constant q
      mode similar to other functions in use in bitrate mode.
      
      Also turns on the constrained quality mode (end-usage=2) option which
      was turned off before. Basic testing shows the mode works in principle,
      to cap bitrate to the target-bitrate specified, while allowing lower
      bitrate depending on the cq-level specified. The mode will need to be
      improved over time.
      
      Results for constant quality vs bitrate control mode:
      derfraw300/fullderfraw: +3.0% at constant quality over bitrate control.
      fullstdhdraw: +4.341%
      stdhdraw250: +5.361%
      
      Change-Id: If5027c9ec66c8e88d33e47062c6cb84a07b1cda9
      d11221f4
  18. 16 Sep, 2013 2 commits
    • Paul Wilkins's avatar
      Minor clean up. · cb50dc7f
      Paul Wilkins authored
      Removed some unused code and minor cleanup
      / reordering.
      
      Change-Id: I4083ae56aeb8edfe9b85aa2f42a16aa28d19da94
      cb50dc7f
    • Paul Wilkins's avatar
      Adjustment to mode_skip_start. · 3b017784
      Paul Wilkins authored
      Corrected values relating to modified mode order.
      
      Change-Id: I24fccba3af4bc16721d5e7e51888a66305bfa7fe
      3b017784
  19. 13 Sep, 2013 1 commit
    • Jingning Han's avatar
      Adaptive motion search control · c4826c59
      Jingning Han authored
      This commit enables adaptive constraint on motion search range for
      smaller partitions, given the motion vectors of collocated larger
      partition as a candidate initial search point.
      
      It makes speed 0 runtime of bus at CIF and 2000 kbps goes from
      167s down to 162s (3% speed-up), at 0.01dB performance gains. In
      the settings of speed 1, this makes the runtime goes from 33687 ms
      to 32142 ms (4.5% speed-up), at 0.03dB performance gains.
      
      Compression performance wise, it gains at speed 1:
      derf  0.118%
      yt    0.237%
      hd    0.203%
      stdhd 0.438%
      
      Change-Id: Ic8b34c67810d9504a9579bef2825d3fa54b69454
      c4826c59
  20. 11 Sep, 2013 3 commits
    • Deb Mukherjee's avatar
      Clean up of the search best filter speed feature · b9646467
      Deb Mukherjee authored
      Removes this speed feature since it is very slow and unlikely
      to be used in practice. This cleanup removes a bunch of unnecessary
      complications in the outer encode loop.
      
      Change-Id: I3c66ef1ca924fbfad7dadff297c9e7f652d308a1
      b9646467
    • Deb Mukherjee's avatar
      Changes in speed 2 settings · 69fe840e
      Deb Mukherjee authored
      Propose some changes to the speed 2 settings to improve quality.
      In particular, turns off the adjust_thresholds_by_speed feature
      which improves results by 6%. Also removes the code for
      adjust_thresholds_by_speed since it conflicts with the adaptive
      rd thresh feature.
      
      Overall, with this change speed 2 is -15.2% from speed 0 settings,
      on derf, which is significantly better than -21.6% down before.
      
      Change-Id: I6e90a563470979eb0c258ec32d6183ed7ce9a505
      69fe840e
    • Scott LaVarnway's avatar
      New mode_info_context storage -- undo revert · ac6093d1
      Scott LaVarnway authored
      mode_info_context was stored as a grid of MODE_INFO structs.
      The grid now constists of pointers to MODE_INFO structs.  The
      MODE_INFO structs are now stored as a stream (decoder only),
      eliminating unnecessary copies and is a little more cache
      friendly.
      
      Change-Id: I031d376284c6eb98a38ad5595b797f048a6cfc0d
      ac6093d1
  21. 10 Sep, 2013 3 commits
    • Deb Mukherjee's avatar
      Small tweaks on the constant quality mode · 09830aa0
      Deb Mukherjee authored
      Improves results a little.
      derf is now +1.078% over bitrate control.
      
      Change-Id: I4812136f3e67be21d14ec089419976a32a841785
      09830aa0
    • Yunqing Wang's avatar
      Modify encode breakout for static frames · 939791a1
      Yunqing Wang authored
      Thank Paul for the suggestions. While turning on static-thresh
      for static-image videos, a big jump on bitrate was seen. In this
      patch, we detected static frames in the video using first-pass
      stats. For different cases, disable encode breakout or reduce
      encode breakout threshold to limit the skipping.
      
      More modification need be done to break incorrect partition
      picking pattern for static frames while skipping happens.
      
      Change-Id: Ia25f47041af0f04e229c70a0185e12b0ffa6047f
      939791a1
    • Paul Wilkins's avatar
      Modified mode skip functionality. · 4f660cc0
      Paul Wilkins authored
      A previous speed feature skipped modes not used in earlier
      partitions but this not longer worked as intended following
      changes to the partition coding order and in conjunction
      with some other speed features (Especially speed 2 and above).
      
      This modified mode skip feature sets a mask after the first X
      modes have been tested in each partition depending on the
      reference frame of the current best case.
      
      This patch also makes some changes to the order modes are
      tested to fit better with this skip functionality.
      
      Initial testing suggests speed and rd hit count improvements
      of up to 20% at speed 1. Quality results. (derf -1.9%, std hd  +0.23%).
      
      Change-Id: Idd8efa656cbc0c28f06d09690984c1f18b1115e1
      4f660cc0