Mercurial > libavcodec.hg
changeset 11306:c3d8a8eb1a45 libavcodec
Split *_type setting up, 4 cpu cycles faster.
author | michael |
---|---|
date | Sat, 27 Feb 2010 03:46:16 +0000 |
parents | 1a349d669184 |
children | eefbe8dadcd2 |
files | h264.h |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.h Fri Feb 26 22:45:35 2010 +0000 +++ b/h264.h Sat Feb 27 03:46:16 2010 +0000 @@ -811,11 +811,18 @@ 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){