summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-02-25 04:11:33 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-02-25 04:11:33 +0000
commite1c88a2138c2bb1f79f5b97b86fac8664f1c5bc7 (patch)
treeaf86c54ab792c4d0b5dc4d1dfaee9bf22bfc98e8 /libavcodec/h264.c
parentd43c192236a3043cbcbe27f268f04437caeadb34 (diff)
Cut the size of mvd_table by yet another factor of 2.
The code read/write code itself was 1 cycle faster, overall its likely more due to cache effects Originally committed as revision 22048 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index cd3ae6d155..fc39bdb49d 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -757,8 +757,8 @@ int ff_h264_alloc_tables(H264Context *h){
FF_ALLOCZ_OR_GOTO(h->s.avctx, h->cbp_table, big_mb_num * sizeof(uint16_t), fail)
FF_ALLOCZ_OR_GOTO(h->s.avctx, h->chroma_pred_mode_table, big_mb_num * sizeof(uint8_t), fail)
- FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mvd_table[0], 32*big_mb_num * sizeof(uint8_t), fail);
- FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mvd_table[1], 32*big_mb_num * sizeof(uint8_t), fail);
+ FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mvd_table[0], 16*big_mb_num * sizeof(uint8_t), fail);
+ FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mvd_table[1], 16*big_mb_num * sizeof(uint8_t), fail);
FF_ALLOCZ_OR_GOTO(h->s.avctx, h->direct_table, 32*big_mb_num * sizeof(uint8_t) , fail);
FF_ALLOCZ_OR_GOTO(h->s.avctx, h->list_counts, big_mb_num * sizeof(uint8_t), fail)
@@ -775,7 +775,7 @@ int ff_h264_alloc_tables(H264Context *h){
const int b8_xy= 2*x + 2*y*h->b8_stride;
h->mb2b_xy [mb_xy]= b_xy;
- h->mb2br_xy[mb_xy]= FMO ? b_xy : (b_xy % (8*h->b_stride));
+ h->mb2br_xy[mb_xy]= 8*(FMO ? mb_xy : (mb_xy % (2*s->mb_stride)));
h->mb2b8_xy[mb_xy]= b8_xy;
}
}