diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-27 06:46:16 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-27 06:46:16 +0300 |
commit | 82fb5bb2ee991405e7cd60c961b2df0605ce3a18 (patch) | |
tree | 69db0f3df05d1089bff58e4a9dc57ea058f35530 /libavcodec/h264.h | |
parent | 821fe7f3e60a23fc472b529c31e60ed4e30b2b96 (diff) |
Split *_type setting up, 4 cpu cycles faster.
Originally committed as revision 22085 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r-- | libavcodec/h264.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 5eae1e2526..d4d87b171c 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -811,11 +811,18 @@ static void fill_decode_neighbors(H264Context *h, int mb_type){ h->left_mb_xy[0] = left_xy[0]; h->left_mb_xy[1] = left_xy[1]; //FIXME do we need all in the context? - h->topleft_type = h->slice_table[topleft_xy ] == h->slice_num ? s->current_picture.mb_type[topleft_xy] : 0; - h->top_type = h->slice_table[top_xy ] == h->slice_num ? s->current_picture.mb_type[top_xy] : 0; - h->topright_type= h->slice_table[topright_xy] == h->slice_num ? s->current_picture.mb_type[topright_xy]: 0; - h->left_type[0] = h->slice_table[left_xy[0] ] == h->slice_num ? s->current_picture.mb_type[left_xy[0]] : 0; - h->left_type[1] = h->slice_table[left_xy[1] ] == h->slice_num ? s->current_picture.mb_type[left_xy[1]] : 0; + + h->topleft_type = s->current_picture.mb_type[topleft_xy] ; + h->top_type = s->current_picture.mb_type[top_xy] ; + h->topright_type= s->current_picture.mb_type[topright_xy]; + h->left_type[0] = s->current_picture.mb_type[left_xy[0]] ; + h->left_type[1] = s->current_picture.mb_type[left_xy[1]] ; + + if(h->slice_table[topleft_xy ] != h->slice_num) h->topleft_type = 0; + if(h->slice_table[top_xy ] != h->slice_num) h->top_type = 0; + if(h->slice_table[topright_xy] != h->slice_num) h->topright_type= 0; + if(h->slice_table[left_xy[0] ] != h->slice_num) h->left_type[0] = 0; + if(h->slice_table[left_xy[1] ] != h->slice_num) h->left_type[1] = 0; } static void fill_decode_caches(H264Context *h, int mb_type){ |