Mercurial > libavcodec.hg
comparison h264.h @ 11012:b2fd83b26dd9 libavcodec
Set top & left types for deblock in fill_caches().
author | michael |
---|---|
date | Tue, 26 Jan 2010 13:38:18 +0000 |
parents | cf9dd5b2cc30 |
children | 51d8befcc773 |
comparison
equal
deleted
inserted
replaced
11011:aa5bcf07731a | 11012:b2fd83b26dd9 |
---|---|
283 int intra16x16_pred_mode; | 283 int intra16x16_pred_mode; |
284 | 284 |
285 int top_mb_xy; | 285 int top_mb_xy; |
286 int left_mb_xy[2]; | 286 int left_mb_xy[2]; |
287 | 287 |
288 int top_type; | |
289 int left_type[2]; | |
290 | |
288 int8_t intra4x4_pred_mode_cache[5*8]; | 291 int8_t intra4x4_pred_mode_cache[5*8]; |
289 int8_t (*intra4x4_pred_mode)[8]; | 292 int8_t (*intra4x4_pred_mode)[8]; |
290 H264PredContext hpc; | 293 H264PredContext hpc; |
291 unsigned int topleft_samples_available; | 294 unsigned int topleft_samples_available; |
292 unsigned int top_samples_available; | 295 unsigned int top_samples_available; |
804 return 1; | 807 return 1; |
805 if( (left_xy[0]< 0 || ((qp + s->current_picture.qscale_table[left_xy[0]+s->mb_stride] + 1)>>1) <= qp_thresh) | 808 if( (left_xy[0]< 0 || ((qp + s->current_picture.qscale_table[left_xy[0]+s->mb_stride] + 1)>>1) <= qp_thresh) |
806 && (top_xy < s->mb_stride || ((qp + s->current_picture.qscale_table[top_xy -s->mb_stride] + 1)>>1) <= qp_thresh)) | 809 && (top_xy < s->mb_stride || ((qp + s->current_picture.qscale_table[top_xy -s->mb_stride] + 1)>>1) <= qp_thresh)) |
807 return 1; | 810 return 1; |
808 } | 811 } |
812 | |
813 if(h->deblocking_filter == 2){ | |
814 h->top_type = top_type = h->slice_table[top_xy ] == h->slice_num ? s->current_picture.mb_type[top_xy] : 0; | |
815 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; | |
816 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; | |
817 }else{ | |
818 h->top_type = top_type = h->slice_table[top_xy ] < 0xFFFF ? s->current_picture.mb_type[top_xy] : 0; | |
819 h->left_type[0]= left_type[0] = h->slice_table[left_xy[0] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[0]] : 0; | |
820 h->left_type[1]= left_type[1] = h->slice_table[left_xy[1] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[1]] : 0; | |
821 } | |
809 if(IS_INTRA(mb_type)) | 822 if(IS_INTRA(mb_type)) |
810 return 0; | 823 return 0; |
811 | 824 |
812 AV_COPY64(&h->non_zero_count_cache[0+8*1], &h->non_zero_count[mb_xy][ 0]); | 825 AV_COPY64(&h->non_zero_count_cache[0+8*1], &h->non_zero_count[mb_xy][ 0]); |
813 AV_COPY64(&h->non_zero_count_cache[0+8*2], &h->non_zero_count[mb_xy][ 8]); | 826 AV_COPY64(&h->non_zero_count_cache[0+8*2], &h->non_zero_count[mb_xy][ 8]); |
814 *((uint32_t*)&h->non_zero_count_cache[0+8*5])= *((uint32_t*)&h->non_zero_count[mb_xy][16]); | 827 *((uint32_t*)&h->non_zero_count_cache[0+8*5])= *((uint32_t*)&h->non_zero_count[mb_xy][16]); |
815 *((uint32_t*)&h->non_zero_count_cache[4+8*3])= *((uint32_t*)&h->non_zero_count[mb_xy][20]); | 828 *((uint32_t*)&h->non_zero_count_cache[4+8*3])= *((uint32_t*)&h->non_zero_count[mb_xy][20]); |
816 AV_COPY64(&h->non_zero_count_cache[0+8*4], &h->non_zero_count[mb_xy][24]); | 829 AV_COPY64(&h->non_zero_count_cache[0+8*4], &h->non_zero_count[mb_xy][24]); |
817 | 830 |
818 h->cbp= h->cbp_table[mb_xy]; | 831 h->cbp= h->cbp_table[mb_xy]; |
819 | |
820 top_type = h->slice_table[top_xy ] < 0xFFFF ? s->current_picture.mb_type[top_xy] : 0; | |
821 left_type[0] = h->slice_table[left_xy[0] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[0]] : 0; | |
822 left_type[1] = h->slice_table[left_xy[1] ] < 0xFFFF ? s->current_picture.mb_type[left_xy[1]] : 0; | |
823 | 832 |
824 { | 833 { |
825 int list; | 834 int list; |
826 for(list=0; list<h->list_count; list++){ | 835 for(list=0; list<h->list_count; list++){ |
827 int8_t *ref; | 836 int8_t *ref; |