diff options
author | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-08-02 20:18:09 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-08-02 20:18:09 +0000 |
commit | 827d43bb9d439254eff5fa44b9809d263fbdc3cf (patch) | |
tree | 09174c0b8f38461476b8e02bcc16cbd95ee43107 /libavcodec/vp8.c | |
parent | 42907c6ab5e41ca29db3454851e15bb0bce3601d (diff) | |
download | ffmpeg-827d43bb9d439254eff5fa44b9809d263fbdc3cf.tar.gz |
VP8: move zeroing of luma DC block into the WHT
Lets us do the zeroing in asm instead of C.
Also makes it consistent with the way the regular iDCT code does it.
Originally committed as revision 24668 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 596cfc5a76..651924196b 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -117,6 +117,7 @@ typedef struct { */ DECLARE_ALIGNED(16, uint8_t, non_zero_count_cache)[6][4]; DECLARE_ALIGNED(16, DCTELEM, block)[6][4][16]; + DECLARE_ALIGNED(16, DCTELEM, block_dc)[16]; uint8_t intra4x4_pred_mode_mb[16]; int chroma_pred_mode; ///< 8x8c pred mode of the current macroblock @@ -864,22 +865,19 @@ static av_always_inline void decode_mb_coeffs(VP8Context *s, VP56RangeCoder *c, VP8Macroblock *mb, uint8_t t_nnz[9], uint8_t l_nnz[9]) { - LOCAL_ALIGNED_16(DCTELEM, dc,[16]); int i, x, y, luma_start = 0, luma_ctx = 3; int nnz_pred, nnz, nnz_total = 0; int segment = s->segment; if (mb->mode != MODE_I4x4 && mb->mode != VP8_MVMODE_SPLIT) { - AV_ZERO128(dc); - AV_ZERO128(dc+8); nnz_pred = t_nnz[8] + l_nnz[8]; // decode DC values and do hadamard - nnz = decode_block_coeffs(c, dc, s->prob->token[1], 0, nnz_pred, + nnz = decode_block_coeffs(c, s->block_dc, s->prob->token[1], 0, nnz_pred, s->qmat[segment].luma_dc_qmul); l_nnz[8] = t_nnz[8] = !!nnz; nnz_total += nnz; - s->vp8dsp.vp8_luma_dc_wht(s->block, dc); + s->vp8dsp.vp8_luma_dc_wht(s->block, s->block_dc); luma_start = 1; luma_ctx = 0; } |