1. 22 Jul, 2011 - 1 commit
    • Johann's avatar
      fix sharpness bug and clean up · a04ed0e8
      Johann authored
      sharpness was not recalculated in vp8cx_pick_filter_level_fast
      
      remove last_filter_type. all values are calculated, don't need to update
      the lfi data when it changes.
      
      always use cm->sharpness_level. the extra indirection was annoying.
      
      don't track last frame_type or sharpness_level manually. frame type
      only matters for motion search and sharpness_level is taken care of in
      frame_init
      
      move function declarations to their proper header
      
      Change-Id: I7ef037bd4bf8cf5e37d2d36bd03b5e22a2ad91db
      a04ed0e8
  2. 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
    • Gaute Strokkenes's avatar
      Simplify decode_macroblock. · 81c05464
      Gaute Strokkenes authored
      Change-Id: Ieb2f3827ae7896ae594203b702b3e8fa8fb63d37
      81c05464
    • 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
  3. 27 Jun, 2011 - 1 commit
    • Stefan Holmer's avatar
      Adding support for error concealment in multi-threaded decoding · ba0822ba
      Stefan Holmer authored
      Also includes a couple of error concealment bug fixes:
      - the segment_id wasn't properly initialized when missing
      - when interpolating and no neighbors are found, set to zero
      - clear the qcoef buffer when concealing an MB
      
      Change-Id: Id79c876b41d78b559a2241e9cd0fd2cae6198f49
      ba0822ba
  4. 14 Jun, 2011 - 1 commit
    • James Zern's avatar
      fix corrupt frame leak · 532c30c8
      James Zern authored
      If setup_token_decoder reported an internal error the memory allocated
      there would not be freed in the resulting call to _remove_decompressor.
      
      Change-Id: Ib459de222d76b1910d6f449cdcd01663447dbdf6
      532c30c8
  5. 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
  6. 24 May, 2011 - 2 commits
    • Scott LaVarnway's avatar
      Removed unused variable warnings · cfab2cae
      Scott LaVarnway authored
      Change-Id: I6e5e921f03dc15a72da89a457848d519647677a3
      cfab2cae
    • 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
  7. 19 May, 2011 - 1 commit
    • Stefan Holmer's avatar
      Adding error-concealment to the decoder. · d04f8523
      Stefan Holmer authored
      The error-concealer is plugged in after any motion vectors have been
      decoded. It tries to estimate any missing motion vectors from the
      motion vectors of the previous frame. Intra blocks with missing
      residual are replaced with inter blocks with estimated motion vectors.
      
      This feature was developed in a separate sandbox
      (sandbox/holmer/error-concealment).
      
      Change-Id: I5c8917b031078d79dbafd90f6006680e84a23412
      d04f8523
  8. 28 Apr, 2011 - 1 commit
  9. 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
  10. 26 Apr, 2011 - 1 commit
    • Scott LaVarnway's avatar
      Test vector mismatch fix · 7a2b9c50
      Scott LaVarnway authored
      Fixed test vector mismatch that was introduced
      in the "Removed dc_diff from MB_MODE_INFO"
      (Ie2b9cdf9e0f4e8b932bbd36e0878c05bffd28931)
      
      Change-Id: I98fa509b418e757b5cdc4baa71202f4168dc14ec
      7a2b9c50
  11. 21 Apr, 2011 - 2 commits
    • Scott LaVarnway's avatar
      Removed unnecessary frame type checks · 6f6cd3ab
      Scott LaVarnway authored
      ref_frame is set to INTRA_FRAME for keyframes.  The B_PRED
      mode is only used in intra frames.
      
      Change-Id: I9bac8bec7c736300d47994f3cb570329edf11ec0
      6f6cd3ab
    • 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
  12. 20 Apr, 2011 - 1 commit
  13. 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
  14. 11 Mar, 2011 - 1 commit
  15. 18 Feb, 2011 - 1 commit
  16. 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
  17. 09 Feb, 2011 - 1 commit
  18. 04 Feb, 2011 - 1 commit
    • Johann's avatar
      remove unused dboolhuff code · bb9c95ea
      Johann authored
      we were holding on to this "just in case." purge it instead
      
      Change-Id: I77a367b36d0821d731019f2566ecfffdae1d4b8a
      bb9c95ea
  19. 19 Jan, 2011 - 1 commit
    • Henrik Lundin's avatar
      Implement error tracking in the decoder · 67fb3a51
      Henrik Lundin authored
      A new vpx_codec_control called VP8D_GET_FRAME_CORRUPTED. The output
      from the function is non-zero if the last decoded frame contains
      corruption due to packet losses.
      
      The decoder is also modified to accept encoded frames of zero length.
      A zero length frame indicates to the decoder that one or more frames
      have been completely lost. This will mark the last decoded reference
      buffer as corrupted. The data pointer can be NULL if the length is
      zero.
      
      Change-Id: Ic5902c785a281c6e05329deea958554b7a6c75ce
      67fb3a51
  20. 11 Jan, 2011 - 1 commit
    • Henrik Lundin's avatar
      Remove unused local variables · 48c28fc4
      Henrik Lundin authored
      Removing unused local variables causing compiler warnings in
      Visual Studio.
      
      Change-Id: I0e2096303be1fdbc01428a6e57cca9796bb32c8a
      48c28fc4
  21. 05 Nov, 2010 - 1 commit
    • John Koleszar's avatar
      fix integer promotion bug in partition size check · 9fb80f71
      John Koleszar authored
      The check '(user_data_end - partition < partition_size)' must be
      evaluated as a signed comparison, but because partition_size was
      unsigned, the LHS was promoted to unsigned, causing an incorrect
      result on 32-bit. Instead, check the upper and lower bounds of
      the segment separately.
      
      Change-Id: I6266aba7fd7de084268712a3d2a81424ead7aa06
      9fb80f71
  22. 28 Oct, 2010 - 2 commits
    • Timothy B. Terriberry's avatar
      Eliminate more warnings. · 97b766a4
      Timothy B. Terriberry authored
      This eliminates a large set of warnings exposed by the Mozilla build
       system (Use of C++ comments in ISO C90 source, commas at the end of
       enum lists, a couple incomplete initializers, and signed/unsigned
       comparisons).
      It also eliminates many (but not all) of the warnings expose by newer
       GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite
       without checking the return values).
      There are a few spurious warnings left on my system:
      
      ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used
       uninitialized in this function
      gcc seems to be unable to figure out that the value shortcut doesn't
       change between the two if blocks that test it here.
      
      ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned
       expression >= 0 is always true
      ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned
       expression >= 0 is always true
      This is true, so far as it goes, but it's comparing against an enum,
       and the C standard does not mandate that enums be unsigned, so the
       checks can't be removed.
      
      Change-Id: Iead6cd561a2afaa3d801fd63f1d8d58953da7426
      97b766a4
    • Timothy B. Terriberry's avatar
      Eliminate more warnings. · c4d7e5e6
      Timothy B. Terriberry authored
      This eliminates a large set of warnings exposed by the Mozilla build
       system (Use of C++ comments in ISO C90 source, commas at the end of
       enum lists, a couple incomplete initializers, and signed/unsigned
       comparisons).
      It also eliminates many (but not all) of the warnings expose by newer
       GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite
       without checking the return values).
      There are a few spurious warnings left on my system:
      
      ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used
       uninitialized in this function
      gcc seems to be unable to figure out that the value shortcut doesn't
       change between the two if blocks that test it here.
      
      ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned
       expression >= 0 is always true
      ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned
       expression >= 0 is always true
      This is true, so far as it goes, but it's comparing against an enum, and the C
       standard does not mandate that enums be unsigned, so the checks can't be
       removed.
      
      Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
      c4d7e5e6
  23. 22 Oct, 2010 - 2 commits
    • Timothy B. Terriberry's avatar
      Improve handling of invalid frames. · 09bcc1f7
      Timothy B. Terriberry authored
      The code was not checking for frame sizes smaller than 3 bytes, and the
       partition size checks might have failed if the input buffer was within
       16MB of the top of the heap.
      In addition, the reference count on the current frame buffer was not
       being decremented on error, so after a small number of errors, no new
       frame buffer could be found and it would run off the list of them.
      
      Change-Id: I0c60dba6adb1e2a29df39754f72a56ab6c776b46
      09bcc1f7
    • Timothy B. Terriberry's avatar
      Convert [4][4] matrices to [16] arrays. · 8f75ea6b
      Timothy B. Terriberry authored
      Most of the code that actually uses these matrices indexes them as
       if they were a single contiguous array, and coverity produces
       reports about the resulting accesses that overflow the static
       bounds of the first row.
      This is perfectly legal in C, but converting them to actual [16]
       arrays should eliminate the report, and removes a good deal of
       extraneous indexing and address operators from the code.
      
      Change-Id: Ibda479e2232b3e51f9edf3b355b8640520fdbf23
      8f75ea6b
  24. 17 Sep, 2010 - 1 commit
    • Yunqing Wang's avatar
      Restructure multi-threaded decoder · f857a850
      Yunqing Wang authored
      On each MB, loopfiltering is done right after MB decoding. This
      combines two loops in multi-threaded code into one, which reduces
      number of synchronizations to half.
      
      The above-row/left-col data are saved in temp buffers for
      next-row/next MB decoding.
      
      Tests on 4-core gLucid machine showed 10% decoder performance
      gain with threads=4 (tulip clip). Testing on other platforms
      isn't done yet.
      
      Change-Id: Id18ea7c1e84965dabea65d4c01ca5bc056ddeac9
      f857a850
  25. 09 Sep, 2010 - 2 commits
    • Scott LaVarnway's avatar
      Improved subset block search · c5fb0eb8
      Scott LaVarnway authored
      Improved the subset block search and fill.  (about 3% improvement for
      32 bit)  Modified/merged the code in order to create
      vp8_read_mb_modes_mv which can decode the modes/mvs on a macroblock
      level. This will allow the decode loop (in the future) to decode
      modes/mvs on a frame, row, or mb level.
      
      Change-Id: If637d994b508792f846d39b5d44a7bf9aa5cddf3
      c5fb0eb8
    • John Koleszar's avatar
      Use WebM in copyright notice for consistency · c2140b8a
      John Koleszar authored
      Changes 'The VP8 project' to 'The WebM project', for consistency
      with other webmproject.org repositories.
      
      Fixes issue #97.
      
      Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
      c2140b8a
  26. 31 Aug, 2010 - 1 commit
    • Scott LaVarnway's avatar
      Changed above and left context data layout · e85e6315
      Scott LaVarnway authored
      The main reason for the change was to reduce cycles in the token
      decoder. (~1.5% gain for 32 bit)  This layout should be more
      cache friendly.
      
      As a result of this change, the encoder had to be updated.
      
      Change-Id: Id5e804169d8889da0378b3a519ac04dabd28c837
      Note: dixie uses a similar layout
      e85e6315
  27. 23 Aug, 2010 - 1 commit
    • Fritz Koenig's avatar
      Rework idct calling structure. · 93c32a55
      Fritz Koenig authored
      Moving the eob structure allows for a non-struct based
      function to handle decoding an entire mb of
      idct/dequant/recon data.  This allows for SIMD functions
      to idct/dequant/recon multiple blocks at once.
      
      SSE2 implementation gives 3% gain on Atom.
      
      Change-Id: I8a8f3efd546ea4e0535f517d94f347cfb737c9c2
      93c32a55
  28. 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
  29. 11 Aug, 2010 - 1 commit
  30. 26 Jul, 2010 - 1 commit
    • Johann's avatar
      update arm idct functions · 56f5a9a0
      Johann authored
      Jeff Muizelaar posted some changes to the idct/reconstruction c code.
      This is the equivalent update for the arm assembly.
      
      This shows a good boost on v6, and a minor boost on neon.
      Here are some numbers for highway in qcif, 2641 frames:
      HEAD neon: ~161 fps
      new neon:  ~162 fps
      HEAD v6:   ~102 fps
      new v6:    ~106 fps
      
      The following functions have been updated for armv6 and neon:
      vp8_dc_only_idct_add
      vp8_dequant_idct_add
      vp8_dequant_dc_idct_add
      
      Conflicts:
      
      	vp8/decoder/arm/armv6/dequantdcidct_v6.asm
      	vp8/decoder/arm/armv6/dequantidct_v6.asm
      
      Resolved by removing these files. When I rewrote the functions, I also
      moved the files to dequant_dc_idct_v6.asm/dequant_idct_v6.asm
      
      Change-Id: Ie3300df824d52474eca1a5134cf22d8b7809a5d4
      56f5a9a0
  31. 23 Jul, 2010 - 2 commits
    • Jeff Muizelaar's avatar
      Combine idct and reconstruction steps · b2fa74ac
      Jeff Muizelaar authored
      This moves the prediction step before the idct and combines the idct and
      reconstruction steps into a single step. Combining them seems to give an
      overall decoder performance improvement of about 1%.
      
      Change-Id: I90d8b167ec70d79c7ba2ee484106a78b3d16e318
      b2fa74ac
    • Fritz Koenig's avatar
      Swap alt/gold/new/last frame buffer ptrs instead of copying. · 0ce39012
      Fritz Koenig authored
      At the end of the decode, frame buffers were being copied.
      The frames are not updated after the copy, they are just
      for reference on later frames.  This change allows multiple
      references to the same frame buffer instead of copying it.
      
      Changes needed to be made to the encoder to handle this.  The
      encoder is still doing frame buffer copies in similar places
      where pointer reference could be done.
      
      Change-Id: I7c38be4d23979cc49b5f17241ca3a78703803e66
      0ce39012
  32. 16 Jun, 2010 - 1 commit
    • Timothy B. Terriberry's avatar
      Change bitreader to use a larger window. · c17b62e1
      Timothy B. Terriberry authored
      Change bitreading functions to use a larger window which is refilled less
       often.
      
      This makes it cheap enough to do bounds checking each time the window is
       refilled, which avoids the need to copy the input into a large circular
       buffer.
      This uses less memory and speeds up the total decode time by 1.6% on an ARM11,
       2.8% on a Cortex A8, and 2.2% on x86-32, but less than 1% on x86-64.
      
      Inlining vp8dx_bool_decoder_fill() has a big penalty on x86-32, as does moving
       the refill loop to the front of vp8dx_decode_bool().
      However, having the refill loop between computation of the split values and
       the branch in vp8_decode_mb_tokens() is a big win on ARM (presumably due to
       memory latency and code size: refilling after normalization duplicates the
       code in the DECODE_AND_BRANCH_IF_ZERO and DECODE_AND_LOOP_IF_ZERO cases.
      Unfortunately, refilling at the end of vp8dx_bool_decoder_fill() and at the
       beginning of each decode step in vp8_decode_mb_tokens() means the latter
       requires an extra refill at the end.
      Platform-specific versions could avoid the problem, but would require most of
       detokenize.c to be duplicated.
      
      Change-Id: I16c782a63376f2a15b78f8086d899b987204c1c7
      c17b62e1