comparison h264.h @ 11355:3f7b7e3695c0 libavcodec

Port Optimizations about *_type init from decode to filter code. 1 cpu cycle faster
author michael
date Thu, 04 Mar 2010 02:00:05 +0000
parents 2a9acfd46715
children 98970e51365a
comparison
equal deleted inserted replaced
11354:2a9acfd46715 11355:3f7b7e3695c0
1213 && (top_xy < s->mb_stride || ((qp + s->current_picture.qscale_table[top_xy -s->mb_stride] + 1)>>1) <= qp_thresh)) 1213 && (top_xy < s->mb_stride || ((qp + s->current_picture.qscale_table[top_xy -s->mb_stride] + 1)>>1) <= qp_thresh))
1214 return 1; 1214 return 1;
1215 } 1215 }
1216 } 1216 }
1217 1217
1218 top_type = s->current_picture.mb_type[top_xy] ;
1219 left_type[0] = s->current_picture.mb_type[left_xy[0]];
1220 left_type[1] = s->current_picture.mb_type[left_xy[1]];
1218 if(h->deblocking_filter == 2){ 1221 if(h->deblocking_filter == 2){
1219 h->top_type = top_type = h->slice_table[top_xy ] == h->slice_num ? s->current_picture.mb_type[top_xy] : 0; 1222 if(h->slice_table[top_xy ] != h->slice_num) top_type= 0;
1220 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; 1223 if(h->slice_table[left_xy[0] ] != h->slice_num) left_type[0]= left_type[1]= 0;
1221 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;
1222 }else{ 1224 }else{
1223 h->top_type = top_type = h->slice_table[top_xy ] < 0xFFFF ? s->current_picture.mb_type[top_xy] : 0; 1225 if(h->slice_table[top_xy ] == 0xFFFF) top_type= 0;
1224 h->left_type[0]= left_type[0] = h->slice_table[left_xy[0] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[0]] : 0; 1226 if(h->slice_table[left_xy[0] ] == 0xFFFF) left_type[0]= left_type[1] =0;
1225 h->left_type[1]= left_type[1] = h->slice_table[left_xy[1] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[1]] : 0; 1227 }
1226 } 1228 h->top_type = top_type ;
1229 h->left_type[0]= left_type[0];
1230 h->left_type[1]= left_type[1];
1231
1227 if(IS_INTRA(mb_type)) 1232 if(IS_INTRA(mb_type))
1228 return 0; 1233 return 0;
1229 1234
1230 AV_COPY64(&h->non_zero_count_cache[0+8*1], &h->non_zero_count[mb_xy][ 0]); 1235 AV_COPY64(&h->non_zero_count_cache[0+8*1], &h->non_zero_count[mb_xy][ 0]);
1231 AV_COPY64(&h->non_zero_count_cache[0+8*2], &h->non_zero_count[mb_xy][ 8]); 1236 AV_COPY64(&h->non_zero_count_cache[0+8*2], &h->non_zero_count[mb_xy][ 8]);