1. 01 Jun, 2011 2 commits
    • Yaowu Xu's avatar
      further clean up of errorperbit and sadperbit · 5b2fb329
      Yaowu Xu authored
      this commit makes the usage errorperbit and sadperbit consistent for
      encoding modes and passes. Removed all different magic weight factors
      associated with errorperbit. Now 1/2 is used for both sadperbit16 and
      sadperbit4, the /2 operation is merged into initializations of the 2
      variables.
      
      Tests on cif set show .23%, 0.18% and 0.19% gain by avg psnr, overall
      psnr and ssim respectively.
      
      Change-Id: Ifa285c3e065ce0a5a77addfc9f95aabf54ee270d
      5b2fb329
    • Yaowu Xu's avatar
      remove some magic weights associated with sad_per_bit · 50916c6a
      Yaowu Xu authored
      sad_per_bit has been used for a number of motion vector search routines
      with different magic weights: 1, 1/2 and 1/4. This commit remove these
      magic numbers and use 1/2 for all motion search routines, also reformat
      a number of source code lines to within 80 column limit.
      
      Test on cif set shows overall effect is neutral on all metrics. <=0.01%
      
      Change-Id: I8a382821fa4cffc9c0acf8e8431435a03df74885
      50916c6a
  2. 31 May, 2011 1 commit
  3. 27 May, 2011 1 commit
    • Yunqing Wang's avatar
      Remove unused code · 2dc24635
      Yunqing Wang authored
      Hex search is not called in rdopt.c
      
      Change-Id: I67347f03e13684147a7c77fb9e9147e440bb5e8e
      2dc24635
  4. 25 May, 2011 1 commit
  5. 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
  6. 23 May, 2011 1 commit
  7. 19 May, 2011 3 commits
    • John Koleszar's avatar
      cleanup: collect twopass variables · 63cb1a7c
      John Koleszar authored
      This patch collects the twopass specific memebers of VP8_COMP into a
      dedicated struct. This is a first step towards isolating the two pass
      rate control and aids readability by decorating these variables with
      the 'twopass.' namespace. This makes it clear to the reader in what
      contexts the variable will be valid, and is a hint that a section of
      code might be a good candidate to move to firstpass.c in later
      refactoring. There likely will be other rate control modes that need
      their own specific data as well.
      
      This notation is probably overly verbose in firstpass.c, so an
      alternative would be to access this struct through a pointer like
      'rc->' instead of 'cpi->firstpass.' in that file. Feel free to make
      a review comment to that effect if you prefer.
      
      Change-Id: I0ab8254647cb4b493a77c16b5d236d0d4a94ca4d
      63cb1a7c
    • John Koleszar's avatar
      Remove unused members of VP8_COMP · 04849772
      John Koleszar authored
      Various members that were either completely unreferenced or written
      and not read.
      
      Change-Id: Ie41ebac0ff0364a76f287586e4fe09a68907806e
      04849772
    • Scott LaVarnway's avatar
      Using partition_info instead of blockd info for splitmv · 99b97576
      Scott LaVarnway authored
      The partition_info struct contains info just for SPLITMV,
      so it should be used instead of BLOCKD.  Eventually, I want
      to reduce the size of B_MODE_INFO struct found in BLOCKD, so
      this is the first step toward that goal.
      Also, since SPLITMV is not supported in vp8_pick_inter_mode(),
      the unnecessary mem copies and checks were removed.  For rt
      encodes, this gave a slight performance improvement.
      
      Change-Id: I5585c98fa9d5acbde1c7e0f452a01d9ecc080574
      99b97576
  8. 18 May, 2011 1 commit
    • Yunqing Wang's avatar
      Fix a bug in vp8_clamp_mv function · 9c62f941
      Yunqing Wang authored
      Scott fixed the bug in MV clamping function in encoder, which
      could cause artifacts.
      
      Change-Id: Id05f2794c43c31cdd45e66179c8811f3ee452cb9
      9c62f941
  9. 17 May, 2011 1 commit
  10. 12 May, 2011 2 commits
    • Scott LaVarnway's avatar
      Using int_mv instead of MV · 6b25501b
      Scott LaVarnway authored
      The compiler produces better assembly when using int_mv
      for assignments.  The compiler shifts and ors the two 16bit
      values when assigning MV.
      
      Change-Id: I52ce4bc2bfbfaf3f1151204b2f21e1e0654f960f
      6b25501b
    • Yaowu Xu's avatar
      adjusting rd constant slightly by ~10% · bd9d8906
      Yaowu Xu authored
      This is to reflect the RD improvement in the encoder. The change has a
      small positive impact on quality (0.25% by VPXSSIM and 0.05% by PSNR)
      
      Change-Id: Ic66ffc19b10870645088c0624c85556f009fd210
      bd9d8906
  11. 09 May, 2011 2 commits
    • Yunqing Wang's avatar
      Use diamond search to replace full search in full-pixel refining search · cb7b1fb1
      Yunqing Wang authored
      In NEWMV mode, currently, full search is used as the refining search
      after n-step search. By replacing it with an iterative diamond search
      of radius 1 largely reduced the computation complexity, but still
      maintained the same encoding quality since the refining search is
      done for every macroblock instead of only a small precentage of
      macroblocks while using full search.
      
      Tests on the test set showed a 3.4% encoding speed increase with none
      psnr & ssim loss.
      
      Change-Id: Ife907d7eb9544d15c34f17dc6e4cfd97cb743d41
      cb7b1fb1
    • Johann's avatar
      clean up unused variable warnings · a7d4d3c5
      Johann authored
      Change-Id: I9467d7a50eac32d8e8f3a2f26db818e47c93c94b
      a7d4d3c5
  12. 27 Apr, 2011 2 commits
    • 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
    • Yunqing Wang's avatar
      Use insertion sort instead of quick sort · 5abafcc3
      Yunqing Wang authored
      Insertion sort performs better for sorting small arrays. In real-
      time encoding (speed=-5), test on test set showed 1.7% performance
      gain with 0% PSNR change in average.
      
      Change-Id: Ie02eaa6fed662866a937299194c590d41b25bc3d
      5abafcc3
  13. 25 Apr, 2011 1 commit
    • Johann's avatar
      remove simpler_lpf · 01527e74
      Johann authored
      the decision to run the regular or simple loopfilter is made outside the
      function and managed with pointers
      
      stop tracking the option in two places. use filter_type exclusively
      
      Change-Id: I39d7b5d1352885efc632c0a94aaf56b72cc2fe15
      01527e74
  14. 21 Apr, 2011 1 commit
    • Scott LaVarnway's avatar
      Removed dc_diff from MB_MODE_INFO · 3698c1f6
      Scott LaVarnway authored
      The dc_diff flag is used to skip loopfiltering.  Instead
      of setting this flag in the decoder/encoder, we now check
      for this condition in the loopfilter.
      
      Change-Id: Ie2b9cdf9e0f4e8b932bbd36e0878c05bffd28931
      3698c1f6
  15. 20 Apr, 2011 2 commits
  16. 18 Apr, 2011 1 commit
    • Yunqing Wang's avatar
      Use sub-pixel search's SSE in mode selection · b8f0b599
      Yunqing Wang authored
      Passed SSE from sub-pixel search back to pick_inter_mode
      function, which is compared with the encode_breakout to
      see if we could skip evaluating the remaining modes.
      
      Change-Id: I4a86442834f0d1b880a19e21ea52d17d505f941d
      b8f0b599
  17. 14 Apr, 2011 1 commit
    • Yunqing Wang's avatar
      Reduce unnecessary distortion computation · 918fb548
      Yunqing Wang authored
      In vp8_pick_inter_mode(), for NEWMV mode, use the error result got
      from motion search as distortion. This helps performance in real-
      time mode.
      
      Change-Id: I398c4e46cc5381f7d874e748cf78827ef0e0860c
      918fb548
  18. 12 Apr, 2011 1 commit
    • John Koleszar's avatar
      Bugfix for error accumulator stats · e689a27d
      John Koleszar authored
      Previous to commit de4e9e3b, there was an early return in the alt-ref
      case that was inadvertantly removed when the function was refactored
      to return void. This patch restores the prior behavior.
      
      Change-Id: I783ffd594a4690297e2742f99526fd7ad67698b2
      e689a27d
  19. 11 Apr, 2011 2 commits
  20. 08 Apr, 2011 2 commits
    • Yunqing Wang's avatar
      Fix input MV for full search · 4b43167a
      Yunqing Wang authored
      Input MV needs to be modified to full-pixel precision.
      
      Change-Id: Ic5d78e41bf27077e325024332b9fe89f76c44f0c
      4b43167a
    • Paul Wilkins's avatar
      Error accumulator stats bug. · de4e9e3b
      Paul Wilkins authored
      The error accumulator stats values cpi->prediction_error and
      cpi->intra_error were being populated with rd values not
      distortion values.
      
      These are only "currently" used in a limited way for RT compress
      key frame detection.
      
      Change-Id: I2702ba1cab6e49ab8dc096ba75b6b34ab3573021
      de4e9e3b
  21. 06 Apr, 2011 1 commit
  22. 01 Apr, 2011 1 commit
    • Yunqing Wang's avatar
      Use full-pixel MV in mvsadcost calculation · 3d681581
      Yunqing Wang authored
      MV sad cost error is only used in full-pixel motion search,
      which only need full-pixel resolution instead of quarter-pixel
      resolution. This change reduced mvsadcost table size, and
      removed unneccessary pamameter passing since this table is
      constant once it is generated.
      
      Change-Id: I9f931e55f6abc3c99011321f1dfb2f3562e6f6b0
      3d681581
  23. 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
  24. 11 Mar, 2011 1 commit
  25. 08 Mar, 2011 1 commit
    • John Koleszar's avatar
      correct zbin boost for splitmv mode · 5d1d9911
      John Koleszar authored
      Disable zbin boost in SPLITMV mode as intended. Was incorrectly looking
      at vp8_ref_frame_order instead of vp8_mode_order when comparing against
      SPLITMV. This condition should have always been false, as SPLITMV is
      not in the range of valid reference frames.
      
      Change-Id: I0408cc7595eff68f00efef6d008e79f5b60d14bf
      5d1d9911
  26. 24 Feb, 2011 2 commits
  27. 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
  28. 10 Feb, 2011 2 commits
    • 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
    • Yunqing Wang's avatar
      Improve motion search in real-time mode · 41e6eceb
      Yunqing Wang authored
      Applied better MV prediction in real-time mode, which improves
      the encoding quality.
      
      Used quarter-pixel search instead of iterative sub-pixel search
      for speed >=5 to improve encoding performance.
      
      Tests on the test set showed:
      1. For speed=-5, quality improvement: 1.7% on AvgPSNR and 2.1%
      on SSIM, performance improvement: 3.6% (This counts in the
      performance lose caused by MV prediction calculation in "Improve
      MV prediction in vp8_pick_inter_mode() for speed>3").
      2. For speed=-8, quality improvement: 2.1% on AvgPSNR and 2.5%
      on SSIM. but, 6.9% performance decrease because of MV prediction
      calculation. This should be improved later.
      
      Change-Id: I349a96c452bd691081d8c8e3e54419e7f477bebd
      41e6eceb