1. 06 Feb, 2012 3 commits
    • Paul Wilkins's avatar
      Coding the hybrid dual prediction signal. · 82b865da
      Paul Wilkins authored
      Initial modifications to make limited use of common prediction
      functions.
      
      The only functional change thus far is that updates to the probabilities are
      no longer "damped". This was a testing convenience but in fact seems to
      help by a little over 0.1% over the derf set.
      
      Change-Id: I8b82907d9d6b6a4a075728b60b31ce93392a5f2e
      82b865da
    • Paul Wilkins's avatar
      Moved prob_dualpred to common. · c98e9d28
      Paul Wilkins authored
      Moved the prob_dualpred[] sturcture to common.
      Created common prediction entry for Dual flag.
      
      Change-Id: I9ac3d128bae6114f09e5c18216d4b95cf36453d5
      c98e9d28
    • Paul Wilkins's avatar
      Modified prediction behavior for reference frame. · 58ec6fe8
      Paul Wilkins authored
      Trial of a modified prediction function that ranks each possible
      reference frame based on a combination of local usage and
      frame level probability. The code is a bit cleaner and simpler.
      
      In direct comparison with old unpredicted method with segment level
      coding turned off for mode,ref & EOB the prediction gives a gain on derf
      of around 0.4%. There is some further gain from bug fixes over earlier code.
      
      With segment coding on the prediction method is slightly -ve on some very
      easy clips (at low rates) due to slightly higher overheads, but better on harder
      clips. Overall neutral on derf in direct comparison on latest code base, but
      compared to earlier code without bug fixes about +0.7% overall psnr
      +0.3% SSIM.
      
      Change-Id: I5b8474658b208134d352d24f6517f25795490789
      58ec6fe8
  2. 03 Feb, 2012 1 commit
    • Paul Wilkins's avatar
      Reference frame prediction: · f0459549
      Paul Wilkins authored
      Extended prediction and coding of reference frame where
      a subset of options are flagged as available at the segment level.
      
      Updated copyright notices.
      
      Switch to SAD in mbgraph code as SATD problematic for the
      foreground and background separation as it can ignore large DC shifts.
      
      Change-Id: I661dbbb2f94f3ec0f96bb928c1655e5e415a7de1
      f0459549
  3. 02 Feb, 2012 1 commit
    • Adrian Grange's avatar
      Added encoding in Superblock Order · 5d0b5a17
      Adrian Grange authored
      As a precursor to encoding 32x32 blocks this cl adds the
      ability to encode the frame superblock (=32x32 block) at
      a time. Within a SB the 4 indiviual MBs are encoded in
      raster-order (NW,NE,SW,SE).
      
      This functionality is added as an experiment which can be
      enabled by ispecifying --enable-superblocks in the
      command line specified to configure (CONFIG_SUPERBLOCKS
      macro in the code).
      
      To make this work I had to disable the two intra
      prediction modes that use data from the top-right of the
      MB.
      
      On the tests that I have run the results produce
      almost exactly the same PSNRs & SSIMs with a very
      slightly higher average data rate (and slightly higher
      data rate than just disabling the two intra modes in
      the original code).
      
      NOTE: This will also break the multi-threaded code.
      
      This replaces the abandoned change:
      Iebebe0d1a50ce8c15c79862c537b765a2f67e162
      
      Change-Id: I1bc1a00f236abc1a373c7210d756e25f970fcad8
      5d0b5a17
  4. 01 Feb, 2012 2 commits
  5. 31 Jan, 2012 4 commits
  6. 16 Dec, 2011 1 commit
    • Adrian Grange's avatar
      Reset segment_id to 0 when segmentation is disabled · 0fafd054
      Adrian Grange authored
      Whilst the encoder explicitly set the segment_id to 0
      when segmentation is diabled, the decoder would allow
      the segment_id to persist from the previous frame.
      
      This fix attempts to make the decoder behave the same
      as the encoder by explicitly setting the segment_id to
      0 in this case.
      
      Change-Id: I65c3a05247550edb10706eb5d54d306dfb792309
      0fafd054
  7. 15 Dec, 2011 1 commit
    • Adrian Grange's avatar
      Fixed bug to use mode_info_stride rather than mb_cols · ae63ce24
      Adrian Grange authored
      Both encoder & decoder were using mb_cols to
      offset from one row of MODE_INFO structures to the next
      when they should have been using mode_info_stride.
      
      Fixing this in both encoder and decoder gives around
      a 3KB size saving and 0.025dB PSNR improvement on the one
      720P clip I tried.
      
      (Also removed "index" which was being updated but not used)
      
      Change-Id: I413bea802b142886bfcf8d8aa7f5a2f0c524fd4b
      ae63ce24
  8. 09 Dec, 2011 1 commit
    • Yaowu Xu's avatar
      Enabled adaptive UV intra coding for inter frames · be360d47
      Yaowu Xu authored
      Previously, Y-adaptive UV intra coding only enabled on key frames in
      UVINTRA experiment. This commit enabled the same coding for inter
      frames, so the encoding of UV intra modes are consistent cross all
      frame types. Tests on derf set showed a very small overall gain around
      .04%:
      
      http://www.corp.google.com/~yaowu/no_crawl/interUVintra.html
      
      The gain looks to be reasonable given inta coded MBs is only a
      small portion of MBs in inter frames.
      
      Change-Id: Ic6fc261923f2c253f4a0c9f8bccf4797557b9e16
      be360d47
  9. 07 Dec, 2011 3 commits
    • Yaowu Xu's avatar
      Removed #if CONFIG_I8X8 · d37cd976
      Yaowu Xu authored
      This commit removed the macro CONFIG_I8X8, which was used to indicate
      the 8x8 intra prediction experiment, made the change fully merged in.
      
      Change-Id: Iafa4443781ce6e83f5591c12ba615a0e92ce0ea0
      d37cd976
    • Yaowu Xu's avatar
      made vp8_mode_context adaptive · 76feb965
      Yaowu Xu authored
      vp8_mode_contexts[] is an entropy table used to code inter mode
      choices. It was a fixed constant table. This commit made the entropy
      context adaptive. Tests on derf set showed very good consistent gains
      on all metrics: avg psnr .47%, overall psnr .46% and ssim .40%.
      
      http://www.corp.google.com/~yaowu/no_crawl/newModeContext.html
      
      Change-Id: Ia62b14485c948e2b74586118619c5eb2068b43b2
      76feb965
    • Paul Wilkins's avatar
      Minor fixes: · 79774d10
      Paul Wilkins authored
      fixed issues caused by conflicts between two experiments.
      
      Change-Id: I56a9bd69493e4850c121ea057a6233c55777c2a5
      79774d10
  10. 06 Dec, 2011 1 commit
    • Ronald S. Bultje's avatar
      Dual 16x16 inter prediction. · 60cb39da
      Ronald S. Bultje authored
      This patch introduces the concept of dual inter16x16 prediction. A
      16x16 inter-predicted macroblock can use 2 references instead of 1,
      where both references use the same mvmode (new, near/est, zero). In the
      case of newmv, this means that two MVs are coded instead of one. The
      frame can be encoded in 3 ways: all MBs single-prediction, all MBs dual
      prediction, or per-MB single/dual prediction selection ("hybrid"), in
      which case a single bit is coded per-MB to indicate whether the MB uses
      single or dual inter prediction.
      
      In the future, we can (maybe?) get further gains by mixing this with
      Adrian's 32x32 work, per-segment dual prediction settings, or adding
      support for dual splitmv/8x8mv inter prediction.
      
      Gain (on derf-set, CQ mode) is ~2.8% (SSIM) or ~3.6% (glb PSNR). Most
      gain is at medium/high bitrates, but there's minor gains at low bitrates
      also. Output was confirmed to match between encoder and decoder.
      
      Note for optimization people: this patch introduces a 2nd version of
      16x16/8x8 sixtap/bilin functions, which does an avg instead of a
      store. They may want to look and make sure this is implemented to
      their satisfaction so we can optimize it best in the future.
      
      Change-ID: I59dc84b07cbb3ccf073ac0f756d03d294cb19281
      60cb39da
  11. 02 Dec, 2011 2 commits
    • Yaowu Xu's avatar
      added separate entropy context for alt_ref · acf5d20c
      Yaowu Xu authored
      This commit added code to keep track of separate entropy contexts for
      normal frames and alt ref frames. The underly assumption was that the
      two type of frames have different entropy characteristics given they
      typically have quite different quantization levels. By keeping entropy
      contexts separate, it helps the entropy context distribution to be more
      closely adapted to each frame type.
      
      Tests on derf set showed a good and very consistent gain on all clips
      on all metrics, avg psnr: 0.89%, overall psnr: 0.84% and ssim 0.93%.
      
      http://www.corp.google.com/~yaowu/no_crawl/mulcontext.html
      
      Change-Id: I15bc9697f6ff7829042911fe0c62930585d7e65d
      acf5d20c
    • Yaowu Xu's avatar
      enabled 8x8 intra prediction modes on inter frames · a8fbab86
      Yaowu Xu authored
      This commit enabled the usage of 8x8 intra prediction modes on inter
      frames. There are a few TODO items related to this: 1)baseline entropy
      need be calibrated; 2)cost of UV need to be done more properly rather
      than using decision only relying on Y; 3)Threshold for allowing picking
      8x8 intra prediction should be lowered to lower than the B_PRED.
      
      Even with all the TODOs, tests showed consistent gain on derf set ~0.1%
      (PSNR:0.08% and SSIM:0.14%). It is assumed that 8x8 intra prediction
      will help more on large resolution clips, especially with above TODOs
      addressed.
      
      Change-Id: I398ada49dfc32575cfab962a569c2885111ae3ba
      a8fbab86
  12. 28 Nov, 2011 1 commit
    • Yaowu Xu's avatar
      changed find_near_mvs search to include a mb from last frame · 643238a3
      Yaowu Xu authored
      This is an experiment to include a mv contribution from last frame to
      nearest and near mv definition. Initial test showed some small though
      consistent gain.
      
      latest patch slightly better result ~.13%-~.18%.
      
      TODO: the entropy used to encode the mode choice, i.e. the mv counts
      based conditional distribution of modes should be re-collected to
      reflect this change, it is expected that there is some further gain
      from that.
      
      Change-Id: Ief1e284a36d8aa56b49ae5b360c91419ec494fa4
      643238a3
  13. 21 Nov, 2011 2 commits
    • Paul Wilkins's avatar
      Cosmetic clean up. · 54f090b1
      Paul Wilkins authored
      Clean up of vp8_kfread_modes().
      Remove unnecessary indentation and enforce line length.
      
      Change-Id: I0864d1aff55368126db01bb23efa815786b5245d
      54f090b1
    • Paul Wilkins's avatar
      Decoder segmentation bug. · 19d87e8e
      Paul Wilkins authored
      Fix decoder segmentation bug for temporal coding where the segment map
      was first initialized on a key frame.
      
      in vp8_kfread_modes() after reading the segment id it must be written to
      the  pbi->segmentation_map[] for use in temporal coding on subsequent frames.
      
      Change-Id: I1489305efc376564e734a216f69c2844646ee3d3
      19d87e8e
  14. 15 Nov, 2011 3 commits
    • Paul Wilkins's avatar
      Merge CONFIGURE_SEGMENTATION experiment. · 3cdfdb55
      Paul Wilkins authored
      Removal of CONFIGURE_SEGMENTATION ifdefs.
      
      Removal of legacy support code fo the old coding mechanism.
      
      Use local reference "xd" for MACROBLOCKD structure in
      encode_frame_to_data_rate()
      
      Moved call to choose_segmap_coding_method() out of encode
      loop as the cost of segmentation is not properly accounted
      in the loop anyway. If this is desirable in the future it
      can be moved back. The use of this function to do all the
      analysis and set the probabilities also removes the need
      to track segment useage in threading code.
      
      Change-Id: I85bc8fd63440e7176c73d26cb742698f9b70cade
      3cdfdb55
    • Paul Wilkins's avatar
      Further clean up of Segmentation experiment code · 6394ef28
      Paul Wilkins authored
      Changed name and sense of segment_flag to "seg_id_predicted"
      Added some additional comments and retested.
      
      I also did some experimentation with a spatial prediction option
      using a similar strategy to the temporal mode implemented.
      This helps in some cases where temporal prediction is bad but
      I suspect there is more overlap here with work on a larger scale
      block structure and spatial correlation will likely be better
      handled through that mechanism.
      
      Next check in will remove #ifdefs and legacy mode code.
      
      Change-Id: I3b382b65ed2a57bd7775ac0f3a01a9508a209cbc
      6394ef28
    • Paul Wilkins's avatar
      Further work on Segmentation Experiment: · 661b2c2d
      Paul Wilkins authored
      This check in includes quite a lot of clean up and refactoring.
      
      Most of the analysis and set up for the different coding options for the
      segment map (currently simple distribution based coding or temporaly
      predicted coding), has been moved to one location (the function
      choose_segmap_coding_method() in segmenation.c). This code was previously
      scattered around in various locations making integration with other
      experiments and modification / debug more difficult.
      
      Currently the functionality is as it was with the exception that the
      prediction probabilities are now only transmitted when the temporal
      prediction mode is selected.
      
      There is still quite a bit more clean up work that will be possible
      when the #ifdef is removed. Also at that time I may rename and alter
      the sense of macroblock based variable "segment_flag" which indicates
      (1 that the segmnet id is not predicted vs 0 that it is predicted).
      
      I also intend to experiment with a spatial prediction mode that can be
      used when coding a key frame segment map or in cases where temporal
      prediction does not work well but there is spatial correlation.
      
      In a later check in when the ifdefs have gone I may also move the call
      to choose_segmap_coding_method() to just before where the bitsream is
      packed (currently it is in vp8_encode_frame()) to further reduce the
      possibility of clashes with other experiments and prevent it being called
      on each itteration of the recode loop.
      
      Change-Id: I3d4aba2a2826ec21f367678d5b07c1d1c36db168
      661b2c2d
  15. 11 Nov, 2011 1 commit
    • Paul Wilkins's avatar
      SEGMENTATION experiment: · bf25d4ad
      Paul Wilkins authored
      Some initial cleanup to aid testing and debug.
      
      Pull code to choose temporal or spatial encoding
      out of encodeframe.c into a dedicated function
      in segmentation.c.
      
      For now disable broken temporal mode.
      
      Move the coding of "temporal_update" flag and
      only transmit if segment map update is indicated.
      
      Rename the functions read_mb_features() and
      write_mb_features() to read_mb_segid() and
      read_mb_segid() as they only read and write
      the macroblock segment id not any of the
      features.
      
      Change-Id: Ib75118520b1144c24d35fdfc6ce46106803cabcf
      bf25d4ad
  16. 04 Nov, 2011 2 commits
    • Paul Wilkins's avatar
      Segment Feature Data Access · a258bba1
      Paul Wilkins authored
      No change to functionality or output.
      
      Updates to the segment feature data structure now all done
      through functions such as set_segdata() and get_segdata()
      in seg_common.c.
      
      The reason for this is to make changing the structures (if needed)
      and debug easier.
      
      In addition it provides a single location for subsequent addition
      of range and validity checks. For  example valid combination of
      mode and reference frame.
      
      Change-Id: I2e866505562db4e4cb6f17a472b25b4465f01add
      a258bba1
    • Yaowu Xu's avatar
      make uv intra mode coding adaptive to Y mode · 2bbde250
      Yaowu Xu authored
      This commit tries to do UV intra mode coding adaptive to Y intra mode.
      Entropy context is defined as conditional PDF of uv intra mode given
      the Y mode. All constants are normalized with 256 to be fit in 8 bits.
      
      This provides further coding efficiency beyond the quantizer adaptive
      y intra mode coding. Consistent gains were observed on all clips and
      all bit rates for HD all key encoding tests.
      
      To test, configure with
      --enable-experimental --enable-uvintra
      
      Change-Id: I2d78d73f143127f063e19bd0bac3b68c418d756a
      2bbde250
  17. 03 Nov, 2011 1 commit
    • Paul Wilkins's avatar
      Segment Features. Removal of #ifdefs · a10a268e
      Paul Wilkins authored
      Removal of configure #ifdefs so that segment features
      always available. Removal of code supporting old
      segment feature method.
      
      Still a good deal of tidying up to do.
      
      Change-Id: I397855f086f8c09ab1fae0a5f65d9e06d2e3e39f
      a10a268e
  18. 02 Nov, 2011 1 commit
    • Paul Wilkins's avatar
      Segmentation: Reference frames · 87ff8620
      Paul Wilkins authored
      Modify reference frame segmentation so that ONE or MORE
      reference frames may be marked as a available for a given
      segment.
      
      Fixed bugs relating to segment coding of INTRA and some
      INTER modes at the segment level.
      
      Modified Q boost for static areas based on ambient average Q.
      
      Strong results now on clips with significant static areas.
      (some data points in derf set as high as 9% and some static &
      slide show type content in YT set > 20%)
      
      Change-Id: Ia79f912efa84b977f35a23683ae3643251e24f0c
      87ff8620
  19. 24 Oct, 2011 1 commit
    • Paul Wilkins's avatar
      Further segment feature extensions. · 01ce04bc
      Paul Wilkins authored
      This quite large check in includes the following:
      
      Merge in some code from Ronald (mbgraph.c) that scans a Gf/arf group.
      This is used as a basis for a simple segmentation for the normal frames
      in a gf/arf group. This code also uses satd functions from Yaowu.
      
      Adds functionality for coding the latest possible position of an EOB for
      blocks in the segment. (Currently 0-15 only, hence just for 4x4 dct).
      Where the EOB position is 0 this acts like "skip" and the normal coding
      of skip at the per mb level is disabled.
      
      Added functions (seg_common.c) for setting and reading segment feature
      elements. These may want to be optimized away at some point but while the
      mecahnism is in a state of flux they provide a single location for making
      changes and keep things a bit cleaner.
      
      This is still proof of concept code. Currently the tested feature set:-
      
      Quantizer,
      Loop Filter level,
      Reference frame,
      Prediction Mode,
      EOB end stop.
      
      TBD:-
      
      Add functions for setting and reading the feature data with range
      and validity checking.
      
      Handling of signed and unsigned feature data. At the moment all is assumed
      to be signed and a sign bit is coded but many cannot be negative.
      
      Correct handling of EOB feature with intra coded blocks.
      
      Testing/trapping of legal/illegal ref frame and mode combinations.
      
      Transform size switch plus merge and test with 8c8 DCT work
      
      Merge and test with Sumans Segmenation coding optimizations
      
      Change-Id: Iee12e83661c7abbd1e0ce6810915eb4ec35e2d8e
      01ce04bc
  20. 30 Sep, 2011 1 commit
    • Paul Wilkins's avatar
      Segment coding of mode and reference frame. · 156b221a
      Paul Wilkins authored
      Proof of concept test code that encodes mode and reference
      frame data at the segment level.
      
      Decode-able bit stream but some issues not yet resolved.
      As it this helps a little on a couple of clips but hurts on most as
      the basis for segmentation is unsound.
      
      To build and test, configure with
      --enable-experimental --enable-segfeatures
      
      Change-Id: I22a60774f69273523fb152db8c31f4b10b07c7f4
      156b221a
  21. 16 Sep, 2011 3 commits
    • Yaowu Xu's avatar
      enable selecting&transmitting to for intra mode entropy · 1d44e7ce
      Yaowu Xu authored
      This commit added a 3 bit index to the bitstream, the index is used to
      look into the intra mode coding entropy context table. The commit uses
      the mode stats to calculate the cost of transmitting modes using 8
      possible entropy distributions, and selects the distribution that
      provides the lowest cost to do the actual mode coding.
      
      Initial test show this provides additional .2%~.3% gain over quantizer
      adaptive intra mode coding. So the adaptive intra mode coding provides
      a total of .5%(psnr) to .6% gain(ssim) combined for all-key-encoding
      
      To build and test, configure with
      --enable-experimental --enable-qimode
      
      Change-Id: I7c41cd8bfb352bc1fe7c5da1848a58faea5ed74a
      1d44e7ce
    • Yaowu Xu's avatar
      add quantizer adaptive intra mb mode encoding · aac2c126
      Yaowu Xu authored
      make intra mode coding entropy distribution adaptive to baseQindex, an
      encoding test on hd clips with all key frame shows universal gain on
      all clips in both .2%(psnr) and (ssim).3%.
      
      To build and test, configure with
      --enable-experimental --enable-qimode
      
      Change-Id: Iaa69241b984d4fdd8baa6d77ee78c0140f5ac00a
      aac2c126
    • Yaowu Xu's avatar
      add 8x8 intra prediction modes · ca6b85aa
      Yaowu Xu authored
      Patch 1 to Patch 3 is an initial implementation of 8x8 intra prediction
      modes, here are with the following assumptions:
      a. 8x8 has 4 prediction modes DC, H, V and TM
      b. UV 4x4 block use the same mode as corresponding 8x8 area
      c. i8x8 modes are enabled for key frame only for now
      Patch 4:
      d. removed debug code from previous patches
      Patch 5:
      e. added stats code to collect entropy stats and further cleaned up
      Patch 6:
      f. changed mode stats code to collect finer stats of modes
      Patch 7:
      g. normalized i8x8 modes distribution to total at 256 (8bits).
      Patch 8:
      h. fixed a bug in decoder and removed debug printf output.
      Patch 9:
      i. more cleanups to address paul's comment
      Patch 10:
      j. messy rebase/merges to bring the commit up to date.
      
      Tests on HD clips encoded with all key frame showing consistent gain
      on all clips and all metrics:~0.5%(psnr) and 0.6%(ssim):
      http://www.corp.google.com/~yaowu/no_crawl/i8x8hd_allkey_fixedq.html
      
      To build and test, configure with:
      --enable-experimental --enable-i8x8
      
      Change-Id: I9813fe07ae48cab5fdb5d904bca022514ad01e7f
      ca6b85aa
  22. 12 Aug, 2011 2 commits
  23. 21 Jul, 2011 1 commit
    • Yaowu Xu's avatar
      fix more merge issues · 8c31484e
      Yaowu Xu authored
      With this fix, the experimental branch now builds and encodes correctly
      with the following two configure options respectively:
      --enable-experimental --enable-t8x8
      --enable-experimental
      
      Change-Id: I3147c33c503fe713a85fd371e4f1a974805778bf
      8c31484e
  24. 20 Jul, 2011 1 commit