diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 02:42:25 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 02:42:25 +0000 |
commit | d43c192236a3043cbcbe27f268f04437caeadb34 (patch) | |
tree | 09b8ca07d582cb171514d00ae7b7f3677afbc76e /libavcodec/h264.c | |
parent | b6a4185367faa7785fa5d3fc93caa82b1e659386 (diff) | |
download | ffmpeg-d43c192236a3043cbcbe27f268f04437caeadb34.tar.gz |
Keep mvd_table values of only 2 mb rows.
Originally committed as revision 22047 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 7c1e30cd1f..cd3ae6d155 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -663,6 +663,7 @@ static void free_tables(H264Context *h){ av_freep(&h->list_counts); av_freep(&h->mb2b_xy); + av_freep(&h->mb2br_xy); av_freep(&h->mb2b8_xy); for(i = 0; i < MAX_THREADS; i++) { @@ -765,6 +766,7 @@ int ff_h264_alloc_tables(H264Context *h){ h->slice_table= h->slice_table_base + s->mb_stride*2 + 1; FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mb2b_xy , big_mb_num * sizeof(uint32_t), fail); + FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mb2br_xy , big_mb_num * sizeof(uint32_t), fail); FF_ALLOCZ_OR_GOTO(h->s.avctx, h->mb2b8_xy , big_mb_num * sizeof(uint32_t), fail); for(y=0; y<s->mb_height; y++){ for(x=0; x<s->mb_width; x++){ @@ -773,6 +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->mb2b8_xy[mb_xy]= b8_xy; } } @@ -797,6 +800,7 @@ static void clone_tables(H264Context *dst, H264Context *src){ dst->slice_table = src->slice_table; dst->cbp_table = src->cbp_table; dst->mb2b_xy = src->mb2b_xy; + dst->mb2br_xy = src->mb2br_xy; dst->mb2b8_xy = src->mb2b8_xy; dst->chroma_pred_mode_table = src->chroma_pred_mode_table; dst->mvd_table[0] = src->mvd_table[0]; |