1. 21 Mar, 2012 1 commit
  2. 07 Mar, 2012 1 commit
    • Paul Wilkins's avatar
      Snapshot candidate · 68033ca4
      Paul Wilkins authored
      Pulled out super block code for the snapshot as this
      is not quite ready and will need an extensive re-merge.
      
      Change-Id: I436369b511257447a7b0ea064016cb63f5011849
      68033ca4
  3. 01 Mar, 2012 1 commit
  4. 29 Feb, 2012 1 commit
  5. 10 Feb, 2012 1 commit
    • Ronald S. Bultje's avatar
      Improved coding using 8x8 transform · f64725a0
      Ronald S. Bultje authored
      In summary, this commit encompasses a series of changes in attempt to
      improve the 8x8 transform based coding to help overall compression
      quality, please refer to the detailed commit history below for what
      are the rationale underly the series of changes:
      
      a. A frame level flag to indicate if 8x8 transform is used at all.
      b. 8x8 transform is not used for key frames and small image size.
      c. On inter coded frame, macroblocks using modes B_PRED, SPLIT_MV
      and I8X8_PRED are forced to using 4x4 transform based coding, the
      rest uses 8x8 transform based coding.
      d. Encoder and decoder has the same assumption on the relationship
      between prediction modes and transform size, therefore no signaling
      is encoded in bitstream.
      e. Mode decision process now calculate the rate and distortion scores
      using their respective transforms.
      
      Overall test results:
      1. HD set
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120206.html
      (avg psnr: 3.09% glb psnr: 3.22%, ssim: 3.90%)
      2. Cif set:
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120206.html
      (avg psnr: -0.03%, glb psnr: -0.02%, ssim: -0.04%)
      It should be noted here, as 8x8 transform coding itself is disabled
      for cif size clips, the 0.03% loss is purely from the 1 bit/frame
      flag overhead on if 8x8 transform is used or not for the frame.
      
      ---patch history for future reference---
      Patch 1:
      this commit tries to select transform size based on macroblock
      prediction mode. If the size of a prediction mode is 16x16, then
      the macroblock is forced to use 8x8 transform. If the prediction
      mode is B_PRED, SPLITMV or I8X8_PRED, then the macroblock is forced
      to use 4x4 transform. Tests on the following HD clips showed mixed
      results: (all hd clips only used first 100 frames in the test)
      
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8.html
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_log.html
      
      while the results are mixed and overall negative, it is interesting to
      see 8x8 helped a few of the clips.
      
      Patch 2:
      this patch tries to hard-wire selection of transform size based on
      prediction modes without using segmentation to signal the transform size.
      encoder and decoder both takes the same assumption that all macroblocks
      use 8x8 transform except when prediciton mode is B_PRED, I8X8_PRED or
      SPLITMV. Test results are as follows:
      
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/cifmodebase8x8_0125.html
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdmodebased8x8_0125log.html
      
      Interestingly, by removing the overhead or coding the segmentation, the
      results on this limited HD set have turn positive on average.
      
      Patch 3:
      this patch disabled the usage of 8x8 transform on key frames, and kept the
      logic from patch 2 for inter frames only. test results on HD set turned
      decidedly positive with 8x8 transform enabled on inter frame with 16x16
      prediction modes: (avg psnr: .81% glb psnr: .82 ssim: .55%)
      
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/hdintermode8x8_0125.html
      results on cif set still negative overall
      
      Patch 4:
      continued from last patch, but now in mode decision process, the rate and
      distortion estimates are computed based on 8x8 transform results for MBs
      with modes associated with 8x8 transform. This patch also fixed a problem
      related to segment based eob coding when 8x8 transform is used. The patch
      significantly improved the results on HD clips:
      
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/hd8x8RDintermode.html
      (avg psnr: 2.70% glb psnr: 2.76% ssim: 3.34%)
      results on cif also improved, though they are still negative compared to
      baseline that uses 4x4 transform only:
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif8x8RDintermode.html
      (avg psnr: -.78% glb psnr: -.86% ssim: -.19%)
      
      Patch 5:
      This patch does 3 things:
      a. a bunch of decoder bug fixes, encodings and decodings were verified
      to have matched recon buffer on a number of encodes on cif size mobile and
      hd version of _pedestrian.
      b. the patch further improved the rate distortion calculation of MBS that
      use 8x8 transform. This provided some further gain on compression.
      c. the patch also got the experimental work SEG_LVL_EOB to work with 8x8
      transformed macroblock, test results indicates it improves the cif set
      but hurt the HD set slightly.
      
      Tests results on HD clips:
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/HD_t8x8_20120201.html
      (avg psnr: 3.19% glb psnr: 3.30% ssim: 3.93%)
      
      Test results on cif clips:
      http://www.corp.google.com/~yaowu/no_crawl/t8x8/cif_t8x8_20120201.html
      (avg psnr: -.47% glb psnr: -.51% ssim: +.28%)
      
      Patch 6:
      Added a frame level flag to indicate if 8x8 transform is allowed at all.
      temporarily the decision is based on frame size, can be optimized later
      one. This get the cif results to basically unchanged, with one bit per
      frame overhead on both cif and hd clips.
      
      Patch 8:
      Rebase and Merge to head by PGW.
      Fixed some suspect 4s that look like hey should be 64s in regard
      to segmented EOB. Perhaps #defines would be bette.
      Bulit and tested without T8x8 enabled and produces unchanged
      output.
      
      Patch 9:
      Corrected misalligned code/decode of "txfm_mode" bit.
      Limited testing for correct encode and decode with
      T8x8 configured on derf clips.
      
      Change-Id: I156e1405d25f81579d579dff8ab9af53944ec49c
      f64725a0
  6. 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
  7. 07 Dec, 2011 2 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
    • Ronald S. Bultje's avatar
      Rename use_dc_pred to use_16x16_pred. · 73bbdfe5
      Ronald S. Bultje authored
      Because the variable doesn't distinguish between DC and non-DC
      prediction, but rather between 16x16 or 4x4 prediction.
      
      Change-ID: Ia4e7dda2bd6230c91515072e3277be2d64e42629
      73bbdfe5
  8. 01 Dec, 2011 1 commit
    • Yaowu Xu's avatar
      added transform type to MB_MODE_INFO · bba710fc
      Yaowu Xu authored
      this commit is to add an variable in the macroblock level mode
      info structure to track the transform size used in each MB, so
      the information can be used later in the loop filter to change
      how loop filter works on MBs with different transform sizes.
      
      Change-Id: Id0eeaba6cc854c6d1be00ed8d237b3d9e250e447
      bba710fc
  9. 08 Nov, 2011 1 commit
    • Paul Wilkins's avatar
      Segment signaling of TX size · a9df4183
      Paul Wilkins authored
      Initial attempt at using new segment feature signaling
      to indicate 4x4 or 8x8 transform.
      
      needs --enable-experimental --enable-t8x8
      
      Note this is work in progress.
      
      Change-Id: Ib160d46a5d810307bfcbc79853ce1a65b5b870b7
      a9df4183
  10. 16 Sep, 2011 1 commit
    • 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
  11. 20 Jul, 2011 1 commit
  12. 23 Jun, 2011 1 commit
    • Yunqing Wang's avatar
      Copy macroblock data to a buffer before encoding it · 0d87098e
      Yunqing Wang authored
      I got this idea from Pascal (Thanks). Before encoding a macroblock,
      copy it to a 16x16 buffer, and then read source data from there
      instead. This will help keep the source data in cache, and help
      with the performance.
      
      Change-Id: Id05f4cb601299150511d59dcba0ae62c49b5b757
      0d87098e
  13. 14 Jun, 2011 1 commit
    • Tero Rintaluoma's avatar
      Fix RT only build · 99090474
      Tero Rintaluoma authored
      Moved encode_intra function from firstpass.c to encodeintra.c to
      prevent linking problem in real-time only build. Also changed name
      of the function to vp8_encode_intra because it is not a static.
      
      Change-Id: Ibf3c6c1de3152567347e5fbef47d1d39564620a5
      99090474
  14. 13 Jun, 2011 1 commit
    • Scott LaVarnway's avatar
      Populate bmi for B_PRED only · 223d1b54
      Scott LaVarnway authored
      Small decode performance gain (~1%) on keyframes.  No
      noticeable gains on encode.  Also changed pick_intra4x4mby_modes()
      to read the above and left block modes for keyframes only.
      
      Change-Id: I1f4885252f5b3e9caf04d4e01e643960f910aba5
      223d1b54
  15. 02 Jun, 2011 1 commit
    • Scott LaVarnway's avatar
      Removed B_MODE_INFO · 773768ae
      Scott LaVarnway authored
      Declared the bmi in BLOCKD as a union instead of B_MODE_INFO.
      Then removed B_MODE_INFO completely.
      
      Change-Id: Ieb7469899e265892c66f7aeac87b7f2bf38e7a67
      773768ae
  16. 24 May, 2011 1 commit
    • Scott LaVarnway's avatar
      MODE_INFO size reduction · e11f21af
      Scott LaVarnway authored
      Declared the bmi in MODE_INFO as a union instead of B_MODE_INFO.
      This reduced the memory footprint by 518,400 bytes for 1080
      resolutions.  The decoder performance improved by ~4% for the
      clip used and the encoder showed very small improvements. (0.5%)
      This reduction was first mentioned to me by John K. and in a
      later discussion by Yaowu.
      This is WIP.
      
      Change-Id: I8e175fdbc46d28c35277302a04bee4540efc8d29
      e11f21af
  17. 20 May, 2011 2 commits
  18. 11 May, 2011 1 commit
    • Yaowu Xu's avatar
      remove a variable no longer in use · f7cf439b
      Yaowu Xu authored
      The variable is introduced in commit 2e53e9e5 to make more use of
      trellis quantization, but this is no longer necessary after RDMULT
      was made adaptive in a number of later commits.
      
      Change-Id: I7420522ec7723f38cf77033466c25afb405d52ae
      f7cf439b
  19. 27 Apr, 2011 1 commit
    • Ronald S. Bultje's avatar
      SSE2/SSSE3 optimizations for build_predictors_mbuv{,_s}(). · 1083fe49
      Ronald S. Bultje authored
      decoding
      
      before
      10.425
      10.432
      10.423
      =10.426
      
      after:
      10.405
      10.416
      10.398
      =10.406, 0.2% faster
      
      encoding
      
      before
      14.252
      14.331
      14.250
      14.223
      14.241
      14.220
      14.221
      =14.248
      
      after
      14.095
      14.090
      14.085
      14.095
      14.064
      14.081
      14.089
      =14.086, 1.1% faster
      
      Change-Id: I483d3d8f0deda8ad434cea76e16028380722aee2
      1083fe49
  20. 11 Apr, 2011 1 commit
  21. 18 Mar, 2011 1 commit
    • John Koleszar's avatar
      Increase static linkage, remove unused functions · 429dc676
      John Koleszar authored
      A large number of functions were defined with external linkage, even
      though they were only used from within one file. This patch changes
      their linkage to static and removes the vp8_ prefix from their names,
      which should make it more obvious to the reader that the function is
      contained within the current translation unit. Functions that were
      not referenced were removed.
      
      These symbols were identified by:
      
        $ nm -A libvpx.a | sort -k3 | uniq -c -f2 | grep ' [A-Z] ' \
          | sort | grep '^ *1 '
      
      Change-Id: I59609f58ab65312012c047036ae1e0634f795779
      429dc676
  22. 11 Mar, 2011 1 commit
  23. 14 Feb, 2011 2 commits
    • Scott LaVarnway's avatar
      Improved vp8_rd_pick_intra_mbuv_mode · 94d4fee0
      Scott LaVarnway authored
      Eliminated unnecessary calculations. Very small change
      to performance.
      
      Change-Id: Ib7213d43c64e36955177c4d47950ff472266f822
      94d4fee0
    • Scott LaVarnway's avatar
      Improved rd_pick_intra4x4block · d419b93e
      Scott LaVarnway authored
      Eliminated unnecessary calculations.  Improved performance
      by 10% on keyframes and 1.6% overall for the test clip used.
      
      Change-Id: I87671b26af5e2cc439e81d0fee3b15c7cd2a3309
      d419b93e
  24. 10 Feb, 2011 1 commit
    • John Koleszar's avatar
      Fix relative include paths · 02321de0
      John Koleszar authored
      Allow compiling without adding vp8/{common,encoder,decoder} to the
      include paths.
      
      Change-Id: Ifeb5dac351cdfadcd659736f5158b315a0030b6c
      02321de0
  25. 26 Jan, 2011 1 commit
    • Paul Wilkins's avatar
      Rationalize vp8_rd_pick_intra16x16mby_mode() · 35bb74a6
      Paul Wilkins authored
      Use the function macro_block_yrd() to calculate error and distortion
      in keeping with what is done for inter frames.
      
      The old code was using a variance metric for once case and an
      SSE function for measuring distortion in the other case.
      
      The function vp8_encode_intra16x16mbyrd() is no longer used.
      
      Change-Id: Ic228cb00a78ff637f4365b43f58fbe5a9273d36f
      35bb74a6
  26. 26 Oct, 2010 1 commit
    • John Koleszar's avatar
      make vp8_recon16x16mb{,y} RTCD functions · d6c67f02
      John Koleszar authored
      ARM NEON has a platform specific version of vp8_recon16x16mb, though
      it's just a stub to extract the various parameters from the
      MACROBLOCKD struct and pass them to vp8_recon16x16mb_neon(). Using
      that function's prototype directly will be a better long term solution,
      but it's quite an invasive change.
      
      Change-Id: I04273149e2ade34749e2d09e7edb0c396e1dd620
      d6c67f02
  27. 15 Oct, 2010 1 commit
    • Yaowu Xu's avatar
      change to make use of more trellis quantization · 2e53e9e5
      Yaowu Xu authored
      when a subsequent frame is encoded as an alt reference frame, it is
      unlikely that any mb in current frame will be used as reference for
      future frames, so we can enable quantization optimization even when
      the RD constant is slightly rate-biased. The change has an overall
      benefit between 0.1% to 0.2% bit savings on the test sets based on
      vpxssim scores.
      
      Change-Id: I9aa7bc5cd573ea84e3ee655d2834c18c4460ceea
      2e53e9e5
  28. 12 Oct, 2010 2 commits
    • John Koleszar's avatar
      Centralize mb skip state calculation · 13685747
      John Koleszar authored
      This patch moves the scattered updates to the mb skip state
      (mode_info_context->mbmi.mb_skip_coeff) to vp8_tokenize_mb. Recent
      changes to the quantizer exposed a bug where if a macroblock
      could be coded as a skip but isn't, the encoder would run the
      loopfilter but the decoder wouldn't, causing a reference buffer
      mismatch.
      
      The loopfilter is controlled by a flag called dc_diff. The decoder
      looks at the number of decoded coefficients when setting this flag.
      The encoder sets this flag based on the skip state, since any
      skippable macroblock should be transmitted as a skip. The coefficient
      optimization pass (vp8_optimize_b()) could change the coefficients
      such that a block that was not a skip becomes one. The encoder was
      not updating the skip state in this situation for intra coded blocks.
      
      The underlying issue predates it, but this bug was recently triggered
      by enabling trellis quantization on the Y2 block in commit dcd29e36,
      and by changing the quantizer range control in commit 305be4e4.
      
      Change-Id: I5cce5da0dbc2d22f7d79ee48149f01e868a64802
      13685747
    • Timothy B. Terriberry's avatar
      Add simple version of activity masking. · 8d0f7a01
      Timothy B. Terriberry authored
      This uses MB variance to change the RDO weight for mode decision
       and quantization.
      Activity is normalized against the average for the frame, which is
       currently tracked using feed-forward statistics.
      This could also be used to adjust the quantizer for the entire
       frame, but that requires more extensive rate control changes.
      This does not yet attempt to adapt the quantizer within the frame,
       but the signaling cost means that will likely only be useful at
       very high rates.
      
      Change-Id: I26cd7c755cac3ff33cfe0688b1da50b2b87b9c93
      8d0f7a01
  29. 09 Sep, 2010 1 commit
  30. 12 Aug, 2010 1 commit
    • Scott LaVarnway's avatar
      Removed unnecessary MB_MODE_INFO copies · 9c7a0090
      Scott LaVarnway authored
      These copies occurred for each macroblock in the encoder and decoder.
      Thetemp MB_MODE_INFO mbmi was removed from MACROBLOCKD.  As a result,
      a large number compile errors had to be fixed.
      
      Change-Id: I4cf0ffae3ce244f6db04a4c217d52dd256382cf3
      9c7a0090
  31. 11 Aug, 2010 2 commits
    • Yaowu Xu's avatar
      Removed duplicate functions · c404fa42
      Yaowu Xu authored
      Change-Id: Ie587972ccefd3c762b8cdf8ef39345cd22924b9b
      c404fa42
    • Timothy B. Terriberry's avatar
      Add trellis quantization. · 8fa38096
      Timothy B. Terriberry authored
      Replace the exponential search for optimal rounding during
       quantization with a linear Viterbi trellis and enable it
       by default when using --best.
      Right now this operates on top of the output of the adaptive
       zero-bin quantizer in vp8_regular_quantize_b() and gives a small
       gain.
      It can be tested as a replacement for that quantizer by
       enabling the call to vp8_strict_quantize_b(), which uses
       normal rounding and no zero bin offset.
      Ultimately, the quantizer will have to become a function of lambda
       in order to take advantage of activity masking, since there is
       limited ability to change the quantization factor itself.
      However, currently vp8_strict_quantize_b() plus the trellis
       quantizer (which is lambda-dependent) loses to
       vp8_regular_quantize_b() alone (which is not) on my test clip.
      
      Patch Set 3:
      
      Fix an issue related to the cost evaluation of successor
      states when a coefficient is reduced to zero. With this
      issue fixed, now the trellis search almost exactly matches
      the exponential search.
      
      Patch Set 2:
      
      Overall, the goal of this patch set is to make "trellis"
      search to produce encodings that match the exponential
      search version. There are three main differences between
      Patch Set 2 and 1:
      a. Patch set 1 did not properly account for the scale of
      2nd order error, so patch set 2 disable it all together
      for 2nd blocks.
      b. Patch set 1 was not consistent on when to enable the
      the quantization optimization. Patch set 2 restore the
      condition to be consistent.
      c. Patch set 1 checks quantized level L-1, and L for any
      input coefficient was quantized to L. Patch set 2 limits
      the candidate coefficient to those that were rounded up
      to L. It is worth noting here that a strategy to check
      L and L+1 for coefficients that were truncated down to L
      might work.
      
      (a and b get trellis quant to basically match the exponential
      search on all mid/low rate encodings on cif set, without
      a, b, trellis quant can hurt the psnr by 0.2 to .3db at
      200kbps for some cif clips)
      (c gets trellis quant  to match the exponential search
      to match at Q0 encoding, without c, trellis quant can be
      1.5 to 2db lower for encodings with fixed Q at 0 on most
      derf cif clips)
      
      Change-Id:	Ib1a043b665d75fbf00cb0257b7c18e90eebab95e
      8fa38096
  32. 24 Jun, 2010 1 commit
    • Yaowu Xu's avatar
      Redo the forward 4x4 dct · d0dd01b8
      Yaowu Xu authored
      The new fdct lowers the round trip sum squared error for a
      4x4 block ~0.12. or ~0.008/pixel. For reference, the old
      matrix multiply version has average round trip error 1.46
      for a 4x4 block.
      
      Thanks to "derf" for his suggestions and references.
      
      Change-Id: I5559d1e81d333b319404ab16b336b739f87afc79
      d0dd01b8
  33. 18 Jun, 2010 1 commit
    • John Koleszar's avatar
      cosmetics: trim trailing whitespace · 94c52e4d
      John Koleszar authored
      When the license headers were updated, they accidentally contained
      trailing whitespace, so unfortunately we have to touch all the files
      again.
      
      Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
      94c52e4d
  34. 07 Jun, 2010 1 commit
  35. 04 Jun, 2010 1 commit