1. 20 Jul, 2011 1 commit
  2. 18 Jul, 2011 1 commit
    • John Koleszar's avatar
      Improved 1-pass CBR rate control · b5ea2fbc
      John Koleszar authored
      This patch attempts to improve the handling of CBR streams with
      respect to the short term buffering requirements. The "buffer level"
      is changed to be an average over the rc buffer, rather than a long
      running average. Overshoot is also tracked over the same interval
      and the golden frame targets suppressed accordingly to correct for
      overly aggressive boosting.
      
      Testing shows that this is fairly consistently positive in one
      metric or another -- some clips that show significant decreases
      in quality have better buffering characteristics, others show
      improvenents in both.
      
      Change-Id: I924c89aa9bdb210271f2e03311e63de3f1f8f920
      b5ea2fbc
  3. 14 Jul, 2011 1 commit
    • John Koleszar's avatar
      Remove unused speed features · 04dce631
      John Koleszar authored
      min_fs_radius, max_fs_radius, full_freq were set but never read.
      
      Change-Id: I82657f4e7f2ba2acc3cbc3faa5ec0de5b9c6ec74
      04dce631
  4. 08 Jul, 2011 1 commit
    • Attila Nagy's avatar
      New loop filter interface · 62295844
      Attila Nagy authored
      Separate simple filter with reduced no. of parameters.
      MB filter level picking based on precalculated table. Level table updated for
      each frame. Inside and edge limits precalculated and updated just when
      sharpness changes. HEV threshhold is constant.
      ARM targets use scalars and others vectors.
      
      Change works only with --target=generic-gnu
      All other targets have to be updated!
      
      Change-Id: I6b73aca6b525075b20129a371699b2561bd4d51c
      62295844
  5. 07 Jul, 2011 1 commit
    • John Koleszar's avatar
      Set VPX_FRAME_IS_DROPPABLE · 37de0b8b
      John Koleszar authored
      Allow the encoder to inform the application that the encoded frame will not
      be used as a reference.
      
      Change-Id: I90e41962325ef73d44da03327deb340d6f7f4860
      37de0b8b
  6. 29 Jun, 2011 1 commit
    • Paul Wilkins's avatar
      Change to arf boost calculation. · 11694aab
      Paul Wilkins authored
      In this commit I have added an experimental function
      that tests prediction quality either side of a central position
      to calculate a suggested boost number for an ARF frame.
      
      The function is passed an offset from the current position and
      a number of frames to search forwards and backwards.
      It returns a forward, backward and compound boost number.
      
      The new code can be deactivated using #define NEW_BOOST 0
      
      In its current default state the code searches forwards and backwards
      from the proposed  position of the next alt ref.
      
      The the old code used a boost number calculated by scanning forward
      from the previous GF up to the proposed alt ref frame position.
      
      I have also added some code to try and prevent placement of a gf/arf
      where there is a brief flash.
      
      Change-Id: I98af789a5181148659f10dd5dd2ff2d4250cd51c
      11694aab
  7. 28 Jun, 2011 1 commit
    • Stefan Holmer's avatar
      Adding support for independent partitions · 4cb0ebe5
      Stefan Holmer authored
      Adding support in the encoder for generating
      independent residual partitions by forcing
      equal probabilities over the prev coef entropy
      contexts.
      
      Change-Id: I402f5c353255f3ca20eae2620af739f6a498cd21
      4cb0ebe5
  8. 23 Jun, 2011 1 commit
    • John Koleszar's avatar
      Revert "Reduce overshoot in 1 pass rate control" · db67dcba
      John Koleszar authored
      This reverts commit 212f6183.
      
      Further testing shows that the overshoot accumulation/damping is too
      aggressive on some clips. Allowing the accumulated overshoot to
      decay and limiting to damping to golden frames shows some promise.
      But some clips show significant overshoot in the buffer window, so
      I think this still needs work.
      
      Change-Id: Ic02a9ca34f55229f9cc04786f4fab54cdc1a3ef5
      db67dcba
  9. 03 Jun, 2011 1 commit
    • John Koleszar's avatar
      Reduce overshoot in 1 pass rate control · 212f6183
      John Koleszar authored
      This patch attempts to reduce the peak bitrate hit by the encoder
      when using small buffer windows.
      
      Tested on the CIF set over 200-500kbps using these settings:
      
        --buf-sz=500 --buf-initial-sz=250 --buf-optimal-sz=250 \
        --undershoot-pct=100
      
      Two pass encodes were tested at best quality. One pass encodes were
      tested only at realtime speed 4:
      
        --rt --cpu-used=-4
      
      The peak datarate (over the specified 500ms window) was measured
      for each encode, and averaged together to get metric for
      "average peak," computed as SUM(peak)/SUM(target). This patch
      reduces the average peak datarate as follows:
      
        One pass:
          baseline:   1.29715
          this patch: 1.23664
      
        Two pass:
          baseline:   1.32702
          this patch: 1.37824
      
      This change had a positive effect on our quality metrics as well:
      
        One pass CBR:
                          Min  / Mean / Max (pct)
          Average PSNR    -0.42 / 2.86 / 27.32
          Overall PSNR    -0.90 / 2.00 / 17.27
          SSIM            -0.05 / 3.95 / 37.46
      
        Two pass CBR:
                          Min  / Mean / Max (pct)
          Average PSNR    -4.47 / 4.35 / 35.99
          Overall PSNR    -3.40 / 4.18 / 36.46
          SSIM            -4.56 / 6.98 / 53.67
      
        One pass VBR:
                          Min  / Mean / Max (pct)
          Average PSNR    -5.21 /  0.01 / 3.30
          Overall PSNR    -8.10 / -0.38 / 1.21
          SSIM            -7.38 / -0.11 / 3.17
          (note: most values here were close to the mean, there were a few
           outliers on files that were very sensitive to golden frame size)
      
        Two pass VBR:
                          Min  / Mean / Max (pct)
          Average PSNR    0.00 / 0.00 / 0.00
          Overall PSNR    0.00 / 0.00 / 0.00
          SSIM            0.00 / 0.00 / 0.00
      
      Neither one pass or two pass CBR mode adheres particularly strictly
      to the short term buffer constraints, and two pass is less
      consistent, even in the baseline commit. This should be addressed
      in a later commit. This likely will hurt the quality numbers, as it
      will have to reduce the burstiness of golden frames.
      
      Aside: My work on this commit makes it clear that we need to make
      rate control modes "pluggable", where you can easily write a new
      one or work on one in isolation.
      
      Change-Id: I1ea9a48f2beedd59891f1288aabf7064956b4716
      212f6183
  10. 01 Jun, 2011 2 commits
    • Ronald S. Bultje's avatar
      Fix code under #if CONFIG_INTERNAL_STATS. · 34ba1876
      Ronald S. Bultje authored
      Change-Id: Iccbd78d91c3071b16fb3b2911523a22092652ecd
      34ba1876
    • Tero Rintaluoma's avatar
      neon fast quantize block pair · 61f0c090
      Tero Rintaluoma authored
      vp8_fast_quantize_b_pair_neon function added to quantize
      two adjacent blocks at the same time to improve performance.
       - Additional 3-6% speedup compared to neon optimized fast
         quantizer (Tanya VGA@30fps, 1Mbps stream, cpu-used=-5..-16)
      
      Change-Id: I3fcbf141e5d05e9118c38ca37310458afbabaa4e
      61f0c090
  11. 31 May, 2011 1 commit
    • John Koleszar's avatar
      Initialize first_time_stamp_ever · 0a72f568
      John Koleszar authored
      Misplaced #endif caused first_time_stamp_ever to only be initialized if
      CONFIG_INTERNAL_STATS was set.
      
      Change-Id: I2296a4ab00f7dfb767583edcc5d59b94f48c0621
      0a72f568
  12. 27 May, 2011 2 commits
    • James Berry's avatar
      bug fix check frame buffer index before copy · 8795b525
      James Berry authored
      in onyx_if.c update_reference_frames() make
      sure that frame buffer indexes are not equal
      before preforming a buffer copy.  If two frames
      share the same buffer the flags will already be
      set correctly.
      
      Change-Id: Ida9b5516d08e3435c90f131d2dc19d842cfb536e
      8795b525
    • Yunqing Wang's avatar
      Use hex search for realtime mode speed>4 · 4d052bdd
      Yunqing Wang authored
      Test showed using hex search in realtime mode largely speed up
      encoding process, and still achieves similar quality like the
      diamond search we have. Therefore, removed the diamond search
      option.
      
      Change-Id: I975767d0ec0539f9f6ed7fdfc09506e39761b66c
      4d052bdd
  13. 20 May, 2011 1 commit
  14. 19 May, 2011 4 commits
    • James Berry's avatar
      bug fix active_worst_quality set below active_best_quality · caa1b28b
      James Berry authored
      fixed a bug where active_worst_quality could be set
      below active_best_quality which could result in an
      infinite loop.
      
      Change-Id: I93c229c3bc5bff2a82b4c33f41f8acf4dd194039
      caa1b28b
    • 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
    • John Koleszar's avatar
      Move quantizer init functions to quantize.c · 87254e0b
      John Koleszar authored
      Group related functions together.
      
      Change-Id: I92fd779225b75a7204650f1decb713142c655d71
      87254e0b
  15. 13 May, 2011 1 commit
    • Paul Wilkins's avatar
      Restructure of activity masking code. · ff52bf36
      Paul Wilkins authored
      This commit restructures the mb activity masking code
      to better facilitate experimentation using different metrics
      etc. and also allows for adjustment of the zero bin either
      for encode only or both the encode and mode selection
      stages
      
      It also uses information from the current frame rather than
      the previous frame and the default strength has been
      reduced.
      
      Change-Id: Id39b19eace37574dc429f25aae810c203709629b
      ff52bf36
  16. 12 May, 2011 2 commits
    • John Koleszar's avatar
      Improve framerate adaptation · 5ed116e2
      John Koleszar authored
      This patch improves the accuracy of frame rate estimation by using a
      larger, 1 second window. It also more quickly adapts to step changes
      in the input frame rate (ie 30fps to 15fps)
      
      Change-Id: I39e48a8f5ac880b4c4b2ebd81049259b81a0218e
      5ed116e2
    • Scott LaVarnway's avatar
      Removed mv_bits_sadcost · 71a7501b
      Scott LaVarnway authored
      This sad cost is being generated but never used.
      
      Change-Id: I562eebdcb792b743770954feca365b5b37491ecd
      71a7501b
  17. 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
  18. 09 May, 2011 1 commit
    • 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
  19. 06 May, 2011 1 commit
    • Aron Rosenberg's avatar
      Fix semaphore emulation on Windows · eeb81173
      Aron Rosenberg authored
      The existing emulation of posix semaphores on Windows uses SetEvent()
      and WaitForSingleObject(), which implements a binary semaphore, not a
      counting semaphore as implemented by posix. This causes deadlock when
      used with the expected posix semantics. Instead, this patch uses the
      CreateSemaphore() and ReleaseSemaphore() calls (introduced in Windows
      2000) which have the expected behavior.
      
      This patch also reverts commit eb16f00c, which split a semaphore that
      was being used with counting semantics into two binary semaphores.
      That commit is unnecessary with corrected emulation.
      
      Change-Id: If400771536a27af4b0c3a31aa4c4e9ced89ce6a0
      eeb81173
  20. 05 May, 2011 1 commit
    • Yunqing Wang's avatar
      Fix rare hang in multi-thread encoder on Windows · eb16f00c
      Yunqing Wang authored
      This patch is to fix a rare hang in multi-thread encoder that was
      only seen on Windows. Thanks for John's help in debugging the
      problem. More test is needed.
      
      Change-Id: Idb11c6d344c2082362a032b34c5a602a1eea62fc
      eb16f00c
  21. 03 May, 2011 1 commit
  22. 29 Apr, 2011 1 commit
  23. 26 Apr, 2011 2 commits
    • John Koleszar's avatar
      Refactor calc_iframe_target_size · db5057c7
      John Koleszar authored
      Combine calc_iframe_target_size, previously only used for forced
      keyframes, with calc_auto_iframe_target_size, which handled most
      keyframes.
      
      Change-Id: I227051361cf46727caa5cd2b155752d2c9789364
      db5057c7
    • John Koleszar's avatar
      Move pick_frame_size() to ratectrl.c · 81d2206f
      John Koleszar authored
      This is a first step in cleaning up the redundancies between
      vp8_calc_{auto_,}iframe_target_size. The pick_frame_size() function is
      moved to ratectrl.c, and made to be the primary interface. This means
      that the various calc_*_target_size functions can be made private.
      
      Change-Id: I66a9a62a5f9c23c818015e03f92f3757bf3bb5c8
      81d2206f
  24. 25 Apr, 2011 4 commits
    • 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
    • John Koleszar's avatar
      Remove unused functions · 47bc1c70
      John Koleszar authored
      Remove estimate_min_frame_size() and calc_low_ss_err(), as they are
      never referenced.
      
      Change-Id: I3293363c14ef70b79c4678ca27aa65b345077726
      47bc1c70
    • John Koleszar's avatar
      Limit size of initial keyframe in one-pass. · 454cbc96
      John Koleszar authored
      Rather than using a default size of 1/2 or 3/2 seconds for the first
      frame, use a fraction of the initial buffer level to give the
      application some control.
      
      This will likely undergo further refinement as size limits on key
      frames are currently under discussion on codec-devel@, but this gives
      much better behavior for small buffer sizes as a starting point.
      
      Change-Id: Ieba55b86517b81e51e6f0a9fe27aabba295acab0
      454cbc96
    • John Koleszar's avatar
      Add rc_max_intra_bitrate_pct control · aa926fbd
      John Koleszar authored
      Adds a control to limit the maximum size of a keyframe, as a function of
      the per-frame bitrate. See this thread[1] for more detailed discussion:
      
      [1]: http://groups.google.com/a/webmproject.org/group/codec-devel/browse_thread/thread/271b944a5e47ca38
      
      Change-Id: I7337707642eb8041d1e593efc2edfdf66db02a94
      aa926fbd
  25. 21 Apr, 2011 1 commit
  26. 20 Apr, 2011 1 commit
    • Attila Nagy's avatar
      Do not copy data between encoder reference buffers. · 43464e94
      Attila Nagy authored
      Golden and ALT reference buffers were refreshed by copying from
      the new buffer. Replaced this by index manipulation.
      Also moved all the reference frame updates to one function for
      easier tracking.
      
      Change-Id: Icd3e534e7e2c8c5567168d222e6a64a96aae24a1
      43464e94
  27. 19 Apr, 2011 1 commit
    • John Koleszar's avatar
      Remove unused kf rate variables · ad6a8ca5
      John Koleszar authored
      Remove tot_key_frame_bits and prior_key_frame_size[] as they were
      tracked but never used. Remove intra_frame_target, as it was only
      used to initialize prior_key_frame_size.
      
      Refactor vp8_adjust_key_frame_context() some to remove unnecessary
      calculations.
      
      Change-Id: Icbc2c83d2b90e184be03e6f9679e678f3a4bce8f
      ad6a8ca5
  28. 13 Apr, 2011 2 commits
    • Fritz Koenig's avatar
      Use consistent delimiters. · 33cefd6f
      Fritz Koenig authored
      opsnr.stt file was using \t for delimiters on everything
      except between VPXSSIM and Time.
      
      Change-Id: I6284c4e40c05ff642bf4b0170dca062c279a42df
      33cefd6f
    • John Koleszar's avatar
      Refactor lookahead ring buffer · 88841f10
      John Koleszar authored
      This patch cleans up the source buffer storage and copy mechanism to
      allow access through a standard push/pop/peek interface. This approach
      also avoids an extra copy in the case where the source is not a
      multiple of 16, fixing issue #102.
      
      Change-Id: I05808c39f5743625cb4c7af54cc841b9b10fdbd9
      88841f10
  29. 11 Apr, 2011 1 commit