Mercurial > libavcodec.hg
diff h264.c @ 11292:411ab09ada91 libavcodec
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
author | michael |
---|---|
date | Thu, 25 Feb 2010 23:44:42 +0000 |
parents | 43a179c59c57 |
children | b79f22337b6f |
line wrap: on
line diff
--- a/h264.c Thu Feb 25 18:41:48 2010 +0000 +++ b/h264.c Thu Feb 25 23:44:42 2010 +0000 @@ -661,7 +661,6 @@ 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 @@ 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 @@ 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 @@ 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)