diff options
author | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-07-23 00:05:44 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-07-23 00:05:44 +0000 |
commit | b74f70d64699907717ec1620f683d31840a9e4e3 (patch) | |
tree | bb9feb0a240b1966bc8f2dce5146da308cdc4f44 | |
parent | 145d31865de9ae6eeaca5153f1173d1504f23fb4 (diff) | |
download | ffmpeg-b74f70d64699907717ec1620f683d31840a9e4e3.tar.gz |
VP8: avoid a memset for non-i4x4 blocks with no coefficients
Originally committed as revision 24447 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vp8.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index e21e810caa..30a4c7d80a 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -970,6 +970,9 @@ static void intra_predict(VP8Context *s, uint8_t *dst[3], VP8Macroblock *mb, tr_right = (uint8_t *)&tr; } + if (mb->skip) + AV_ZERO128(s->non_zero_count_cache); + for (y = 0; y < 4; y++) { uint8_t *topright = ptr + 4 - s->linesize; for (x = 0; x < 4; x++) { @@ -1500,10 +1503,6 @@ static int vp8_decode_frame(AVCodecContext *avctx, void *data, int *data_size, if (!mb->skip) decode_mb_coeffs(s, c, mb, s->top_nnz[mb_x], s->left_nnz); - else { - AV_ZERO128(s->non_zero_count_cache); // luma - AV_ZERO64(s->non_zero_count_cache[4]); // chroma - } if (mb->mode <= MODE_I4x4) intra_predict(s, dst, mb, intra4x4_mb, mb_x, mb_y); |