diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-03 10:27:51 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-05-03 10:27:55 +0100 |
commit | 2a018be10fc84252ee21fd40306a51e60bd471a0 (patch) | |
tree | fafb035d71b531e179d4c97afebe893a514a1ff5 /libavcodec/svq3.c | |
parent | f32a23c8491297d0ff19656cd7a09b6c8fa3eafb (diff) | |
parent | 7bbdae81e895a49125dba58bad01b98389966c39 (diff) | |
download | ffmpeg-2a018be10fc84252ee21fd40306a51e60bd471a0.tar.gz |
Merge commit '7bbdae81e895a49125dba58bad01b98389966c39'
* commit '7bbdae81e895a49125dba58bad01b98389966c39':
svq3: move block_offset to SVQ3Context
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index de532049a8..0b3c1c1c8e 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -130,6 +130,7 @@ typedef struct SVQ3Context { DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2]; DECLARE_ALIGNED(8, uint8_t, non_zero_count_cache)[15 * 8]; uint32_t dequant4_coeff[QP_MAX_NUM + 1][16]; + int block_offset[2 * (16 * 3)]; } SVQ3Context; #define FULLPEL_MODE 1 @@ -670,7 +671,7 @@ static void hl_decode_mb(SVQ3Context *s, const H264Context *h) uint8_t *dest_y, *dest_cb, *dest_cr; int linesize, uvlinesize; int i, j; - const int *block_offset = &h->block_offset[0]; + const int *block_offset = &s->block_offset[0]; const int block_h = 16 >> h->chroma_y_shift; linesize = s->cur_pic->f->linesize[0]; @@ -1461,14 +1462,14 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, return ret; for (i = 0; i < 16; i++) { - h->block_offset[i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 4 * s->cur_pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); - h->block_offset[48 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 8 * s->cur_pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); + s->block_offset[i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 4 * s->cur_pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); + s->block_offset[48 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 8 * s->cur_pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); } for (i = 0; i < 16; i++) { - h->block_offset[16 + i] = - h->block_offset[32 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 4 * s->cur_pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); - h->block_offset[48 + 16 + i] = - h->block_offset[48 + 32 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 8 * s->cur_pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); + s->block_offset[16 + i] = + s->block_offset[32 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 4 * s->cur_pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); + s->block_offset[48 + 16 + i] = + s->block_offset[48 + 32 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 8 * s->cur_pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); } if (s->pict_type != AV_PICTURE_TYPE_I) { |