1. 20 Jul, 2011 - 2 commits
  2. 19 Jul, 2011 - 1 commit
    • Scott LaVarnway's avatar
      Moved vp8_encode_bool into boolhuff.h · a25f6a9c
      Scott LaVarnway authored
      allowing the compiler to inline this function.  For real-time
      encodes, this gave a boost of 1% to 2.5%, depending on the
      speed setting.
      
      Change-Id: I3929d176cca086b4261267b848419d5bcff21c02
      a25f6a9c
  3. 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
  4. 15 Jul, 2011 - 1 commit
    • Tero Rintaluoma's avatar
      Tokenize MB optimized · 4e82f015
      Tero Rintaluoma authored
      Optimized C-code of the following functions:
       - vp8_tokenize_mb
       - tokenize1st_order_b
       - tokenize2nd_order_b
      Gives ~1-5% speed-up for RT encoding on Cortex-A8/A9
      depending on encoding parameters.
      
      Change-Id: I6be86104a589a06dcbc9ed3318e8bf264ef4176c
      4e82f015
  5. 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
  6. 11 Jul, 2011 - 1 commit
  7. 08 Jul, 2011 - 3 commits
    • Yunqing Wang's avatar
      Minor change in pick_inter_mode() · 587ca06d
      Yunqing Wang authored
      Scott suggested to move vp8_mv_pred() under "case NEWMV" to save
      extra checks.
      
      Change-Id: I09e69892f34a08dd425a4d81cfcc83674e344a20
      587ca06d
    • Yunqing Wang's avatar
      Adjust full-pixel clamping and motion vector limit calculation · 40991fae
      Yunqing Wang authored
      Do mvp clamping in full-pixel precision instead of 1/8-pixel
      precision to avoid error caused by right shifting operation.
      Also, further fixed the motion vector limit calculation in change:
      b7480454
      
      Change-Id: Ied88a4f7ddfb0476eb9f7afc6ceeddbf209fffd7
      40991fae
    • 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
  8. 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
  9. 30 Jun, 2011 - 1 commit
    • Yunqing Wang's avatar
      Bug fix in motion vector limit calculation · b7480454
      Yunqing Wang authored
      Motion vector limits are calculated using right shifts, which
      could give wrong results for negative numbers. James Berry's
      test on one clip showed encoder produced some artifacts. This
      change fixed that.
      
      Change-Id: I035fc02280b10455b7f6eb388f7c2e33b796b018
      b7480454
  10. 29 Jun, 2011 - 3 commits
    • 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
    • Johann's avatar
      remove incorrect initialization · fe53107f
      Johann authored
      Values were set, then reset. Only set them once.
      
      Change-Id: Iaf43c8467129f2f261f04fa9188b603aa46216b5
      fe53107f
    • Johann's avatar
      clean up warnings when building arm with rtcd · 6611f669
      Johann authored
      Change-Id: I3683cb87e9cb7c36fc22c1d70f0799c7c46a21df
      6611f669
  11. 28 Jun, 2011 - 3 commits
    • John Koleszar's avatar
      Use MAX_ENTROPY_TOKENS and ENTROPY_NODES more consistently · b32da7c3
      John Koleszar authored
      There were many instances in the code of vp8_coef_tokens and
      vp8_coef_tokens-1, which was a preprocessor macro despite the naming
      convention. Replace these with MAX_ENTROPY_TOKENS and ENTROPY_NODES,
      respectively.
      
      Change-Id: I72c4f6c7634c94e1fa066cd511471e5592c748da
      b32da7c3
    • Stefan Holmer's avatar
      New ways of passing encoded data between encoder and decoder. · 7296b3f9
      Stefan Holmer authored
      With this commit frames can be received partition-by-partition
      from the encoder and passed partition-by-partition to the
      decoder.
      
      At the encoder-side this makes it easier to split encoded
      frames at partition boundaries, useful when packetizing
      frames. When VPX_CODEC_USE_OUTPUT_PARTITION is enabled,
      several VPX_CODEC_CX_FRAME_PKT packets will be returned
      from vpx_codec_get_cx_data(), containing one partition
      each. The partition_id (starting at 0) specifies the decoding
      order of the partitions. All partitions but the last has
      the VPX_FRAME_IS_FRAGMENT flag set.
      
      At the decoder this opens up the possibility of decoding partition
      N even though partition N-1 was lost (given that independent
      partitioning has been enabled in the encoder) if more info
      about the missing parts of the stream is available through
      external signaling.
      
      Each partition is passed to the decoder through the
      vpx_codec_decode() function, with the data pointer pointing
      to the start of the partition, and with data_sz equal to the
      size of the partition. Missing partitions can be signaled to
      the decoder by setting data != NULL and data_sz = 0. When
      all partitions have been given to the decoder "end of data"
      should be signaled by calling vpx_codec_decode() with
      data = NULL and data_sz = 0.
      
      The first partition is the first partition according to the
      VP8 bitstream + the uncompressed data chunk + DCT address
      offsets if multiple residual partitions are used.
      
      Change-Id: I5bc0682b9e4112e0db77904755c694c3c7ac6e74
      7296b3f9
    • 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
  12. 23 Jun, 2011 - 3 commits
    • 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
    • Yaowu Xu's avatar
      fix build issues for experimental branch · 7793b386
      Yaowu Xu authored
      experimental branch build was broken from some merge artifacts, this
      commit fixes those issues to enable the experimental branch to build.
      
      Change-Id: Ic52b2d2f1d1b80abb7ecaa4c0927bcf887ac0c2a
      7793b386
    • 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
  13. 20 Jun, 2011 - 1 commit
    • Yaowu Xu's avatar
      adjusting the calculation of errorperbit · 10ed60dc
      Yaowu Xu authored
      RDMULT/RDDIV defines a bit worth of distortion in term of sum squared
      difference. This has also been used as errorperbit in subpixel motion
      search, where the distortions computed as variance of the difference.
      The variance of differences is different from sum squared differences
      by amount of DC squared. Typically, for inter predicted MBs, this
      difference averages around 10% between the two distortion, so this patch
      introduces a 110% constant in deriving errorperbit from RDMULT/RDDIV.
      
      Test on CIF set shows small but positive gain on overall PSNR (.03%)
      and SSIM (.07%), overall impact on average PSNR is 0.
      
      Change-Id: I95425f922d037b4d96083064a10c7cdd4948ee62
      10ed60dc
  14. 17 Jun, 2011 - 1 commit
    • Yunqing Wang's avatar
      Remove unnecessary bounds checking in motion search · 2cd1c285
      Yunqing Wang authored
      The starting points are always within the limits, and bounds
      checking on these points is not needed. For speed < 5, the
      encoded result changes a little because different treatment
      is taken while starting point equals the bounds.
      
      Change-Id: I09a402d310f51e305a3519f1601b1d17b05c6152
      2cd1c285
  15. 16 Jun, 2011 - 1 commit
    • Ronald S. Bultje's avatar
      Assign boost to GF bit allocation if past frame had no ARF. · 87fd66bb
      Ronald S. Bultje authored
      Modify the second-pass code to provide a full golden-frame (GF) bit
      allocation boost if the past GF group (GFG) had no alt-ref frame (ARF),
      even if the current GFG does contain and ARF.
      
      This mostly has no effect on clips, since switching ARFs on/off between
      GFGs is not very common. Has a positive effect on e.g. cheer (+0.45 SSIM
      at 600kbps) and football (+0.25 SSIM at 600kbps), particularly at high
      bitrates. Has a negative effect (-0.04 SSIM at 300kbps) at pamphlet,
      which appears only marginally related to this patch, and crew (-0.1 SSIM
      at 700kbps).
      
      Change-Id: I2e32899638b59f857e26efeac18a82e0c0b77089
      87fd66bb
  16. 15 Jun, 2011 - 2 commits
    • John Koleszar's avatar
      Use SSE as BPRED distortion metric consistently · 61599fb5
      John Koleszar authored
      The BPRED mode selection uses SSE as a distortion metric, but the early
      breakout threshold being used was a variance value.
      
      Change-Id: I42d4602fb9b548bf681a36445701fada5e73aff1
      61599fb5
    • Ronald S. Bultje's avatar
      Disable specialcase for last frames if the sequence contains ARFs. · 299193dd
      Ronald S. Bultje authored
      firstpass.c contains some rate adjustment code that assures that the
      last few frames in a sequence abide by rate limits. If the second-to-
      last group of frames contains an alt-ref frame (ARF), the last golden
      frame (GF) is zero bytes, and we will thus spend a ridiculously high
      number of bits on regular P-frames trying to hit the target rate. This
      does slightly enhance the quality of these last few frames, but has
      no perceptual value (other than hitting the target rate).
      
      Disabling this code means we consistently (slightly) undershoot the
      target rate and consequently do worse on the last few frames of a
      clip, which is particularly noticeable for small clips. The quality-
      per-bitrate is generally better, ~0.2% better overall on derf-set,
      especially on clips such as garden, tennis, foreman at low bitrates.
      Has a negative effect on hallmonitor at high bitrates.
      
      Change-Id: I1d63452fef5fee4a0ad2fb2e9af4c9f2e0d86d23
      299193dd
  17. 14 Jun, 2011 - 2 commits
    • Johann's avatar
      fix --disable-runtime-cpu-detect on x86 · 92b0e544
      Johann authored
      Change-Id: Ib8e429152c9a8b6032be22b5faac802aa8224caa
      92b0e544
    • 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
  18. 13 Jun, 2011 - 2 commits
    • 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
    • Scott LaVarnway's avatar
      Calc ref_frame_cost once per frame · e71a0106
      Scott LaVarnway authored
      instead of every macro block.
      
      Change-Id: I2604e94c6b89e3a8457777e21c8c38406d55b165
      e71a0106
  19. 09 Jun, 2011 - 3 commits
  20. 08 Jun, 2011 - 7 commits
    • Johann's avatar
      use GCC inline magic · 79327be6
      Johann authored
      Better fix for #326. ICC happens to support the inline magic
      
      Change-Id: Ic367eea608c88d89475cb7b05d73500d2a1bc42b
      79327be6
    • John Koleszar's avatar
      vp8_pick_inter_mode: remove best_bmodes · 001bd51c
      John Koleszar authored
      Since BPRED will be tested at most once, and SPLITMV is not enabled,
      there's nothing to clobber the subblock modes, so there's no need to
      save and restore them.
      
      Change-Id: I7c3615b69190c10bd068a44df5488d6e8b85a364
      001bd51c
    • John Koleszar's avatar
      vp8_pick_intra_mode: correct returned rate · 91907e0b
      John Koleszar authored
      The returned rate was always the 4x4 rate, instead of the rate
      matching the selected mode.
      
      Change-Id: I51da31f80884f5e37f3bcc77d1047d31e612ded4
      91907e0b
    • Scott LaVarnway's avatar
      Removed unused function parameters · 69d8d386
      Scott LaVarnway authored
      Change-Id: Ib641c624faec28ad9eb99e2b5de51ae74bbcb2a2
      69d8d386
    • Yaowu Xu's avatar
      Adjust errorperbit according to RDMULT in activity masking · 1fba1e38
      Yaowu Xu authored
      In activity masking, RDO constant RDMULT is adjusted on a per MB basis
      adaptive to activity with the MB. errorperbit, which is defined as
      RDMULT/RDDIV, is a constant used in motion estimation. Previously, in
      activity masking, errorperbit is not changed even when RDMULT is changed.
      This commit changed to adjust errorperbit according to the change in
      RDMULT.
      
      Test in cif set showed a very small but consistent gain by all quality
      metrics (average, overall psnr and ssim) when activity masking is on.
      
      Change-Id: I07ded3e852919ab76757691939fe435328273823
      1fba1e38
    • John Koleszar's avatar
      Move RD intra block mode selection to rdopt.c · 96a42aaa
      John Koleszar authored
      This change is analogous to I0b67dae1f8a74902378da7bdf565e39ab832dda7,
      which made the move for the non-RD path.
      
      Change-Id: If63fc1b0cd1eb7f932e710f83ff24d91454f8ed1
      96a42aaa
    • John Koleszar's avatar
      Move intra block mode selection to pickinter.c · e90d17d2
      John Koleszar authored
      This commit moves the intra block mode selection from encodeframe.c
      to pickinter.c (in the non-RD case). This allowed pick_intra_mbuv_mode
      and pick_intra4x4mby_modes to be made static, and is a step towards
      refactoring intra mode selection in the main pickinter loop. Gave a
      small perf increase (~0.5%).
      
      Change-Id: I0b67dae1f8a74902378da7bdf565e39ab832dda7
      e90d17d2