Mercurial > libavcodec.hg
comparison h264.h @ 10908:28840dfd4b52 libavcodec
Disable a few things in fill_filter_caches() that arent needed.
0.1% speedup
author | michael |
---|---|
date | Sun, 17 Jan 2010 22:05:36 +0000 |
parents | 2d82b73b12ef |
children | f4cf3960b8c6 |
comparison
equal
deleted
inserted
replaced
10907:2d82b73b12ef | 10908:28840dfd4b52 |
---|---|
828 top_type = h->slice_table[top_xy ] == h->slice_num ? s->current_picture.mb_type[top_xy] : 0; | 828 top_type = h->slice_table[top_xy ] == h->slice_num ? s->current_picture.mb_type[top_xy] : 0; |
829 topright_type= h->slice_table[topright_xy] == h->slice_num ? s->current_picture.mb_type[topright_xy]: 0; | 829 topright_type= h->slice_table[topright_xy] == h->slice_num ? s->current_picture.mb_type[topright_xy]: 0; |
830 left_type[0] = h->slice_table[left_xy[0] ] == h->slice_num ? s->current_picture.mb_type[left_xy[0]] : 0; | 830 left_type[0] = h->slice_table[left_xy[0] ] == h->slice_num ? s->current_picture.mb_type[left_xy[0]] : 0; |
831 left_type[1] = h->slice_table[left_xy[1] ] == h->slice_num ? s->current_picture.mb_type[left_xy[1]] : 0; | 831 left_type[1] = h->slice_table[left_xy[1] ] == h->slice_num ? s->current_picture.mb_type[left_xy[1]] : 0; |
832 | 832 |
833 if(IS_INTRA(mb_type)){ | 833 if(IS_INTRA(mb_type) && !for_deblock){ |
834 int type_mask= h->pps.constrained_intra_pred ? IS_INTRA(-1) : -1; | 834 int type_mask= h->pps.constrained_intra_pred ? IS_INTRA(-1) : -1; |
835 h->topleft_samples_available= | 835 h->topleft_samples_available= |
836 h->top_samples_available= | 836 h->top_samples_available= |
837 h->left_samples_available= 0xFFFF; | 837 h->left_samples_available= 0xFFFF; |
838 h->topright_samples_available= 0xEEEA; | 838 h->topright_samples_available= 0xEEEA; |
959 h->non_zero_count_cache[0+8*1 + 8*i]= | 959 h->non_zero_count_cache[0+8*1 + 8*i]= |
960 h->non_zero_count_cache[0+8*4 + 8*i]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; | 960 h->non_zero_count_cache[0+8*4 + 8*i]= CABAC && !IS_INTRA(mb_type) ? 0 : 64; |
961 } | 961 } |
962 } | 962 } |
963 | 963 |
964 if( CABAC ) { | 964 if( CABAC && !for_deblock) { |
965 // top_cbp | 965 // top_cbp |
966 if(top_type) { | 966 if(top_type) { |
967 h->top_cbp = h->cbp_table[top_xy]; | 967 h->top_cbp = h->cbp_table[top_xy]; |
968 } else if(IS_INTRA(mb_type)) { | 968 } else if(IS_INTRA(mb_type)) { |
969 h->top_cbp = 0x1C0; | 969 h->top_cbp = 0x1C0; |
1172 } | 1172 } |
1173 } | 1173 } |
1174 } | 1174 } |
1175 #endif | 1175 #endif |
1176 | 1176 |
1177 if(!for_deblock) | |
1177 h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]); | 1178 h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]); |
1178 } | 1179 } |
1179 | 1180 |
1180 static void fill_decode_caches(H264Context *h, int mb_type){ | 1181 static void fill_decode_caches(H264Context *h, int mb_type){ |
1181 fill_caches(h, mb_type, 0); | 1182 fill_caches(h, mb_type, 0); |