# HG changeset patch # User michael # Date 1267668005 0 # Node ID 3f7b7e3695c071506c62ac737e102a2f79d64f14 # Parent 2a9acfd46715589825391ce07ee9fb1c010de4a1 Port Optimizations about *_type init from decode to filter code. 1 cpu cycle faster diff -r 2a9acfd46715 -r 3f7b7e3695c0 h264.h --- a/h264.h Thu Mar 04 01:03:15 2010 +0000 +++ b/h264.h Thu Mar 04 02:00:05 2010 +0000 @@ -1215,15 +1215,20 @@ } } + top_type = s->current_picture.mb_type[top_xy] ; + left_type[0] = s->current_picture.mb_type[left_xy[0]]; + left_type[1] = s->current_picture.mb_type[left_xy[1]]; if(h->deblocking_filter == 2){ - h->top_type = top_type = h->slice_table[top_xy ] == h->slice_num ? s->current_picture.mb_type[top_xy] : 0; - h->left_type[0]= 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]= left_type[1] = h->slice_table[left_xy[1] ] == h->slice_num ? s->current_picture.mb_type[left_xy[1]] : 0; + if(h->slice_table[top_xy ] != h->slice_num) top_type= 0; + if(h->slice_table[left_xy[0] ] != h->slice_num) left_type[0]= left_type[1]= 0; }else{ - h->top_type = top_type = h->slice_table[top_xy ] < 0xFFFF ? s->current_picture.mb_type[top_xy] : 0; - h->left_type[0]= left_type[0] = h->slice_table[left_xy[0] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[0]] : 0; - h->left_type[1]= left_type[1] = h->slice_table[left_xy[1] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[1]] : 0; + if(h->slice_table[top_xy ] == 0xFFFF) top_type= 0; + if(h->slice_table[left_xy[0] ] == 0xFFFF) left_type[0]= left_type[1] =0; } + h->top_type = top_type ; + h->left_type[0]= left_type[0]; + h->left_type[1]= left_type[1]; + if(IS_INTRA(mb_type)) return 0;