Mercurial > libavcodec.hg
changeset 9685:ab8b3b2e4d49 libavcodec
Move eatgq blocks array from the stack to the codec context and make sure
it is aligned as necessary for DSPContext's idct_put.
Just aligning it on the stack would have been possible but less reliable
and without any real benefit.
author | reimar |
---|---|
date | Fri, 22 May 2009 18:39:00 +0000 |
parents | c1ed557cd3b8 |
children | bc32976d6d9d |
files | eatgq.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/eatgq.c Fri May 22 17:14:22 2009 +0000 +++ b/eatgq.c Fri May 22 18:39:00 2009 +0000 @@ -42,6 +42,7 @@ int width,height; ScanTable scantable; int qtable[64]; + DECLARE_ALIGNED_16(DCTELEM, block[6][64]); } TgqContext; static av_cold int tgq_decode_init(AVCodecContext *avctx){ @@ -144,7 +145,6 @@ int mode; int i; int8_t dc[6]; - DCTELEM block[6][64]; mode = bytestream_get_byte(bs); if (mode>buf_end-*bs) { @@ -156,8 +156,8 @@ GetBitContext gb; init_get_bits(&gb, *bs, mode*8); for(i=0; i<6; i++) - tgq_decode_block(s, block[i], &gb); - tgq_idct_put_mb(s, block, mb_x, mb_y); + tgq_decode_block(s, s->block[i], &gb); + tgq_idct_put_mb(s, s->block, mb_x, mb_y); }else{ if (mode==3) { memset(dc, (*bs)[0], 4);