1. 10 Dec, 2011 1 commit
  2. 07 Dec, 2011 1 commit
    • Attila Nagy's avatar
      Reduce mem copies in encoder loopfilter level picking · e570b040
      Attila Nagy authored
      Do the test filtering in the existing backup frame buffer instead of
      the original. Copy the original data into extra buffer before doing
      the  filtering. This way there is no need to restore the original
      unfiltered  frame at the end of level picking process.
      
      This came up in some discussions with Johann. Thanks!
      
      Change-Id: I495f4301d983854673276c34ec0ddf9a9d622122
      e570b040
  3. 05 Dec, 2011 1 commit
    • Yunqing Wang's avatar
      Multiple-resolution encoder · aa7335e6
      Yunqing Wang authored
      The example encoder down-samples the input video frames a number of
      times with a down-sampling factor, and then encodes and outputs
      bitstreams with different resolutions.
      
      Support arbitrary down-sampling factor, and down-sampling factor
      can be different for each encoding level.
      
      For example, the encoder can be tested as follows.
      1. Configure with multi-resolution encoding enabled:
      ../libvpx/configure --target=x86-linux-gcc --disable-codecs
      --enable-vp8 --enable-runtime_cpu_detect --enable-debug
      --disable-install-docs --enable-error-concealment
      --enable-multi-res-encoding
      2. Run make
      3. Encode:
      If input video is 1280x720, run:
      ./vp8_multi_resolution_encoder 1280 720 input.yuv 1.ivf 2.ivf 3.ivf 1
      (output: 1.ivf(1280x720); 2.ivf(640x360); 3.ivf(320x180).
      The last parameter is set to 1/0 to show/not show PSNR.)
      4. Decode:
      ./simple_decoder 1.ivf 1.yuv
      ./simple_decoder 2.ivf 2.yuv
      ./simple_decoder 3.ivf 3.yuv
      5. View video:
      mplayer 1.yuv -demuxer rawvideo -rawvideo w=1280:h=720 -loop 0 -fps 30
      mplayer 2.yuv -demuxer rawvideo -rawvideo w=640:h=360 -loop 0 -fps 30
      mplayer 3.yuv -demuxer rawvideo -rawvideo w=320:h=180 -loop 0 -fps 30
      
      The encoding parameters can be modified in vp8_multi_resolution_encoder.c,
      for example, target bitrate, frame rate...
      
      Modified API. John helped a lot with that. Thanks!
      
      Change-Id: I03be9a51167eddf94399f92d269599fb3f3d54f5
      aa7335e6
  4. 28 Nov, 2011 1 commit
    • Yunqing Wang's avatar
      Populate q_index in multi-thread encoding · 06fc0f83
      Yunqing Wang authored
      This value needs to be copied to each thread's data structure.
      This fixed artifact problem in multi-thread encoder.
      
      Change-Id: Iab6d9745a1d44846aa503184705376f63a505597
      06fc0f83
  5. 23 Nov, 2011 1 commit
    • Attila Nagy's avatar
      Fix encoder partitioned output on ARM · 97259b46
      Attila Nagy authored
      API was not returning correct partition sizes on arm targets.
      The armv5 token packing functions were not storing the information to the
      partition size table.
      As a fix, have one boolcoder instance allocated for each partition so
      that partition sizes are internally available after all partitions
      were encoded. This will also allow more flexibility in producing
      several partitions in parallel.
      
      Use buffer validation (overflow check) in all ARM bitpacking
      functions.
      
      Change-Id: I31c8a11d8a7613676f0ff50928cb2a2ab14fd169
      97259b46
  6. 19 Nov, 2011 1 commit
    • Johann's avatar
      Move shared data to shared location · f2cd4ded
      Johann authored
      Storing vp8_bilinear_filters_mmx in an mmx file and using it in an sse2
      file is bad
      
      Moving towards allowing --disable-mmx
      
      Change-Id: I20493b35bdedcdcfc0915e6f05fdbe6c81a4a742
      f2cd4ded
  7. 18 Nov, 2011 2 commits
    • John Koleszar's avatar
      Speed selection support for disabled reference frames · e55974bf
      John Koleszar authored
      There was an implicit reference frame test order (typically LAST,
      GOLD, ARF) in the mode selection logic, but this doesn't provide the
      expected results when some reference frames are disabled. For
      instance, in real-time mode, the speed selection logic often disables
      the ARF modes. So if the user disables the LAST and GOLD frames, the
      encoder was always choosing INTRA, when in reality searching the ARF
      in this case has the same speed penalty as searching LAST would have
      had.
      
      Instead, introduce the notion of a reference frame search order. This
      patch preserves the former priorities, so if a frame is disabled, the
      other frames bump up a slot to take its place. This patch lays the
      groundwork for doing something smarter in the frame test order, for
      example considering temporal distance or looking at the frames used by
      nearby blocks.
      
      Change-Id: I1199149f8662a408537c653d2c021c7f1d29a700
      e55974bf
    • Attila Nagy's avatar
      Validate encoder buffer writes for single token partition · c84d42f8
      Attila Nagy authored
      Extend buffer write validation (overflow check) to single token
      partition packing, both mb and row based functions.
      
      Change-Id: I36e19b7d37fc43712d05c70e3ad223d3eb5b973d
      c84d42f8
  8. 15 Nov, 2011 1 commit
    • Scott LaVarnway's avatar
      Added predictor stride argument(s) to subtract functions · edd98b73
      Scott LaVarnway authored
      Patch set 2: 64 bit build fix
      Patch set 3: 64 bit crash fix
      
      [Tero]
      Patch set 4: Updated ARMv6 and NEON assembly.
                   Added also minor NEON optimizations to subtract
                   functions.
      
      Patch set 5: x86 stride bug fix
      
      Change-Id: I1fcca93e90c89b89ddc204e1c18f208682675c15
      edd98b73
  9. 11 Nov, 2011 1 commit
    • John Koleszar's avatar
      avoid resetting framerate during vpx_codec_enc_config_set() · bdd35c13
      John Koleszar authored
      The calculated frame_rate is a state variable in the codec, and
      shouldn't be maintained in the configuration struct. Move it to the
      main part of cpi so that it isn't clobbered when the configuration
      struct is updated. The initial framerate estimate is moved from the
      vp8_cx_iface.c wrapper into the body of init_config() in onyx_if.c, so
      that it is only called once and not reset on every call to
      vp8_change_config().
      
      Change-Id: I8d9a3d1283330d1ee297d07e9d78d1f2875f2465
      bdd35c13
  10. 09 Nov, 2011 2 commits
    • Scott LaVarnway's avatar
      Relocated idct/add calls for encoder · 861ed6a5
      Scott LaVarnway authored
      Call the idct/add after the tokenize.  This is WIP with
      the goal of creating a common idct/add for the encoder and
      decoder. This move is necessary because the decoder's version
      of the idct clobbers qcoeff, which is used by the tokenize.
      
      Change-Id: I6b08d8e8397cd873647fa4fb9469884e3c876756
      861ed6a5
    • Tero Rintaluoma's avatar
      ARMv6 optimized Intra4x4 prediction · 5a2fd63a
      Tero Rintaluoma authored
      Added ARM optimized intra 4x4 prediction
       - 2x faster on Profiler compared to C-code compiled with -O3
       - Function interface changed a little to improve BLOCKD structure
         access
      
      Change-Id: I9bc2b723155943fe0cf03dd9ca5f1760f7a81f54
      5a2fd63a
  11. 08 Nov, 2011 4 commits
    • Yunqing Wang's avatar
      Fix checks in MB quantizer initialization · 4c14efd2
      Yunqing Wang authored
      vp8cx_mb_init_quantizer() needs to be called at least once to get
      all values calculated. This change added one check to decide if
      we could skip initialization or not.
      
      Change-Id: I3f65eb548be57580a61444328336bc18c25c085b
      4c14efd2
    • Adrian Grange's avatar
      Third set of checks of buffer level against maximum buffer size · b615a6d4
      Adrian Grange authored
      Additional check of buffer level to ensure it doesn't exceed the
      maximum buffer size.
      
      Change-Id: I1ba4f8b09bbec89646885040ff47470196af521e
      b615a6d4
    • Adrian Grange's avatar
      Additional clipping of buffer level to maximum buffer size · fa25a31e
      Adrian Grange authored
      Added additional check of buffer level against maximum
      buffer size.
      
      Change-Id: Iaf1fbaf008601161e402b43ce82c3dbc129bf740
      fa25a31e
    • Adrian Grange's avatar
      Added check to make sure maximum buffer size not exceeded · 9dc95b0a
      Adrian Grange authored
      Added code to clip the buffer level to the maximum buffer
      size. Without this the buffer level would increase
      unchecked.
      
      This bug was found when encoding an essentially static
      scene at 2Mb/s. The encoder is unable to generate frames
      consistent with the high data-rate because Q bottoms out
      at Qmin.
      
      As frames generated are consistently undersized the buffer
      level increases and does not get checked against the
      maximum size specified by the user (or default).
      
      Change-Id: Id8a3c6323d3246da50f7cb53ddbf78b5528032c6
      9dc95b0a
  12. 05 Nov, 2011 1 commit
    • Fritz Koenig's avatar
      Compiler warning fix for const array. · f0c01413
      Fritz Koenig authored
      Fix compiler warning for passing a non const array
      to a function expecting a const array by using an
      intermediary pointer and casting.
      
      Change-Id: I9bdd358ebdc926223993fb8fb2098ffedd2f3fc7
      f0c01413
  13. 04 Nov, 2011 1 commit
  14. 03 Nov, 2011 1 commit
    • Tero Rintaluoma's avatar
      Change use of eob in the encoder · e4f2ec7a
      Tero Rintaluoma authored
      Changed 'int eob' to 'char *eob' in BLOCKD so that both encoder and
      decoder will use eobs[25] array from MACROBLOCKD structure. In future,
      this will enable use of the decoder side IDCT in the encoder.
      
      Change-Id: I6e1c011628cb8864fd4a0b80f0279ce16a5ca978
      e4f2ec7a
  15. 01 Nov, 2011 1 commit
    • Yunqing Wang's avatar
      Add checks in MB quantizer initialization · e44720af
      Yunqing Wang authored
      In some situations (f.g. error-resilient is turned on), vp8cx_mb
      _init_quantizer() was called once per macroblock. Added checks
      to avoid calculations when there is no change.
      
      Change-Id: Ie4f0a5ade2202041254990a4e9d5b03bd1ac5aea
      e44720af
  16. 28 Oct, 2011 1 commit
    • Yaowu Xu's avatar
      added code to clear 2nd order block when appropriate · 88e24f07
      Yaowu Xu authored
      It is discovered that in rare situations the 2nd order block may
      produce a few small magnitude coefficients that has no effect on
      reconstruction. The situations are a combination of low quantizer
      values (high quality) and low energy in residual signals (content
      dependent). This commit added code to detect such cases and reset
      the 2nd order block to all 0.
      
      Patch 1 to 4 used code to do all-zero-check on idct result buffer,
      and tests on derf set showed a consistent gain of .12%-.14% on all
      metrics.But due to a recent change Ie31d90b, the idct result buffer
      is not longer populated. So patch 5&6 use an alternative method to
      detect the situations. Tests on derf set now shows a consistent
      quality gain of .16%-.20%.
      
      As suggested by Jim, Patch 7&8 removed the condition of all first
      order block not having any coefficient, instead we reset 2nd order
      coefficients to all 0 if sum of absolute value of the coefficients
      is small. So it does slightly more than just detecting the oddity
      as discussed above, but tests on derf set now show a consistent
      gain of .20%-.23% on all metrics.
      
      It is worth noting here that this change does not have any effect
      on mid/high quantizer range, it only affects the quantizer value
      18 or blow. Within this range, the change helps compression by up
      to 2.5% on clips in the derf set.
      
      Change-Id: I718e19cf59a4fc2462cb7070832759beb9f7e7dd
      88e24f07
  17. 27 Oct, 2011 1 commit
  18. 26 Oct, 2011 1 commit
    • Attila Nagy's avatar
      Reduce partial frame copy in encoder's pick_filter_level_fast · de828094
      Attila Nagy authored
      The partial frame copy function used to copy an extra 8 lines above
      and  below. The partial frame filtering can only modify 3 pixel rows
      above the partial frame. Reduce copy to bare minimum needed, which is
      4 lines, so that partial filtering on copied frame is possible.
      
      Define the "magic" fraction number for partial filtering in
      loopfilter.h .
      
      Change-Id: I4791ffc541b6884b12759a0d0714a8faf16147ec
      de828094
  19. 24 Oct, 2011 1 commit
  20. 20 Oct, 2011 2 commits
    • James Berry's avatar
      Fix: check cx_data buffer prior to write · bc715113
      James Berry authored
      check to make sure that cx_data buffer has enough room before
      writting to it, prior behavior did not which could result in a crash.
      
      Change-Id: I3fab6f2bc4a96d7c675ea81acd39ece121738b28
      bc715113
    • Johann's avatar
      Don't copy borders for loop_filter_pick · 7cdc986c
      Johann authored
      During the _pick only the Y plane is examined. In addition, data beyond
      the borders of the frame is not read.
      
      Change-Id: Ic549adfca70fc6e0b55f8aab0efe81f0afac89f9
      7cdc986c
  21. 18 Oct, 2011 1 commit
    • Scott LaVarnway's avatar
      Remove usage of predict buffer for decode · ed9c66f5
      Scott LaVarnway authored
      Instead of using the predict buffer, the decoder now writes
      the predictor into the recon buffer.  For blocks with eob=0,
      unnecessary idcts can be eliminated.  This gave a performance
      boost of ~1.8% for the HD clips used.
      
      Tero: Added needed changes to ARM side and scheduled some
            assembly code to prevent interlocks.
      
      Patch Set 6:  Merged (I1bcdca7a95aacc3a181b9faa6b10e3a71ee24df3)
      into this commit because of similarities in the idct
      functions.
      Patch Set 7: EC bug fix.
      
      Change-Id: Ie31d90b5d3522e1108163f2ac491e455e3f955e6
      ed9c66f5
  22. 14 Oct, 2011 1 commit
    • Attila Nagy's avatar
      Fix: vp8cx_pack_tokens_into_partitions_armv5 crash · a5cd42fe
      Attila Nagy authored
      It was crashing when number of partitions was bigger than the number
      of MB rows (ex. 128x96 with 8 partitions).
      Start point was not checked against mb_rows, plus extra
      "empty" partitions were not written out.
      
      Change-Id: I9c2f013b9ec022354b658fab4ef799ff8b1de93d
      a5cd42fe
  23. 11 Oct, 2011 2 commits
    • Adrian Grange's avatar
      Added rate-targeted temporal scalability · 217591fd
      Adrian Grange authored
      Added the ability to create rate-targeted, temporally
      scalable, VP8 compatible bitstreams.
      
      The application vp8_scalable_patterns.c demonstrates how
      to use this capability. Users can create output bitstreams
      containing upto 5 temporally separable streams encoded
      as a single VP8 bitstream.
      (previously abandoned as:
      I92d1483e887adb274d07ce9e567e4d0314881b0a)
      
      Change-Id: I156250a3fe930be57c069d508c41b6a7a4ea8d6a
      217591fd
    • John Koleszar's avatar
      Reset FPU state after calc_plane_error() · 07ba4119
      John Koleszar authored
      Fixes a MMX/SSE2 mismatch when building with --enable-internal-stats.
      
      Change-Id: I0c50a1f246f6916b7a5fc6f36864ceb362f25520
      07ba4119
  24. 10 Oct, 2011 2 commits
  25. 04 Oct, 2011 1 commit
  26. 30 Sep, 2011 3 commits
    • Scott LaVarnway's avatar
      Improved tokenize · ab00d209
      Scott LaVarnway authored
      For a realtime HD encodings, up to 1.6% gains seen.
      
      
      
      Change-Id: If45028e23db95124da63f9d38ffe06e05596cc6e
      ab00d209
    • Alpha Lam's avatar
      Call vp8_find_near_mvs lazily · 7bce513a
      Alpha Lam authored
      vp8_find_near_mvs() is being called on all possible reference frames
      but the data computed may be used if the loop exits early, which can
      be due to x->skip beign set to 1.
      
      Optimize this by call vp8_find_near_mvs() laziy only if it is going
      to be used and not computed yet.
      
      Change-Id: Iccdbd4c962a670c9f2c99b8aca8096042ca5dc98
      7bce513a
    • Paul Wilkins's avatar
      CQ and two pass rate control. · b6e27d5f
      Paul Wilkins authored
      Changes to the selection of Q limits for two pass
      and two pass CQ mode.
      
      Allowance made for Mode and motion vector costs.
      Some refactoring of common code.
      
      For Derf and YT sets CQ mode average improvement
      circa 1% (SSIM and Global PSNR).
      
      Some increased tendency to undershoot even when
      user CQ not reached.
      
      Patch2: Removed some test code accidentally merged.
      
      Change-Id: Icf74d13af77437c08602571dc7a97e747cce5066
      b6e27d5f
  27. 29 Sep, 2011 1 commit
    • Attila Nagy's avatar
      Multithreaded encoder, late sync loopfilter · 380d64ec
      Attila Nagy authored
      Sync with loopfilter thread just at the beginning of next frame encoding.
      This returns control to application faster and allows a better multicore scaling.
      When PSNR packets are generated the final filtered frame is needed imediatly
      so we cannot delay the sync.
      
      Change-Id: I288d97b5e331d41d6f5bb49d97986fa12ac6f066
      380d64ec
  28. 22 Sep, 2011 1 commit
  29. 20 Sep, 2011 2 commits