diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 23:44:42 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-25 23:44:42 +0000 |
commit | 358b5b1a5958fa12b841aefe09e5e81c7d8bd346 (patch) | |
tree | c6210b5aa5107d8e34d04494ac13880e687c6c4c /libavcodec/h264.c | |
parent | f3a572ca146555e68c8100d27f948c7fcd4a4ce5 (diff) | |
download | ffmpeg-358b5b1a5958fa12b841aefe09e5e81c7d8bd346.tar.gz |
Get rid of mb2b8_xy and b8_stride, change arrays organized based on b8_stride to
ones based on mb_stride in h264.
about 20 cpu cycles faster overall per MB
Originally committed as revision 22065 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 2b6ecd55ab..5c1c840e79 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -661,7 +661,6 @@ static void free_tables(H264Context *h){ av_freep(&h->mb2b_xy); av_freep(&h->mb2br_xy); - av_freep(&h->mb2b8_xy); for(i = 0; i < MAX_THREADS; i++) { hx = h->thread_context[i]; @@ -764,16 +763,13 @@ int ff_h264_alloc_tables(H264Context *h){ 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++){ const int mb_xy= x + y*s->mb_stride; const int b_xy = 4*x + 4*y*h->b_stride; - const int b8_xy= 2*x + 2*y*h->b8_stride; h->mb2b_xy [mb_xy]= b_xy; h->mb2br_xy[mb_xy]= 8*(FMO ? mb_xy : (mb_xy % (2*s->mb_stride))); - h->mb2b8_xy[mb_xy]= b8_xy; } } @@ -798,7 +794,6 @@ static void clone_tables(H264Context *dst, H264Context *src){ 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]; dst->mvd_table[1] = src->mvd_table[1]; @@ -1768,7 +1763,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ s->mb_height= h->sps.mb_height * (2 - h->sps.frame_mbs_only_flag); h->b_stride= s->mb_width*4; - h->b8_stride= s->mb_width*2; s->width = 16*s->mb_width - 2*FFMIN(h->sps.crop_right, 7); if(h->sps.frame_mbs_only_flag) |