comparison h264_loopfilter.c @ 10946:5a23fa01dec1 libavcodec

Merge multiple IS_* macro uses where possible.
author michael
date Wed, 20 Jan 2010 01:15:30 +0000
parents 0d93bbc17950
children df6bda2aa59a
comparison
equal deleted inserted replaced
10945:0d93bbc17950 10946:5a23fa01dec1
442 || first_vertical_edge_done 442 || first_vertical_edge_done
443 || (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num); 443 || (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_num);
444 444
445 445
446 if (FRAME_MBAFF && (dir == 1) && ((mb_y&1) == 0) && start == 0 446 if (FRAME_MBAFF && (dir == 1) && ((mb_y&1) == 0) && start == 0
447 && !IS_INTERLACED(mb_type) 447 && IS_INTERLACED(mbm_type&~mb_type)
448 && IS_INTERLACED(mbm_type)
449 ) { 448 ) {
450 // This is a special case in the norm where the filtering must 449 // This is a special case in the norm where the filtering must
451 // be done twice (one each of the field) even if we are in a 450 // be done twice (one each of the field) even if we are in a
452 // frame macroblock. 451 // frame macroblock.
453 // 452 //
457 int qp; 456 int qp;
458 int i, j; 457 int i, j;
459 int16_t bS[4]; 458 int16_t bS[4];
460 459
461 for(j=0; j<2; j++, mbn_xy += s->mb_stride){ 460 for(j=0; j<2; j++, mbn_xy += s->mb_stride){
462 if( IS_INTRA(mb_type) || 461 if( IS_INTRA(mb_type|s->current_picture.mb_type[mbn_xy]) ) {
463 IS_INTRA(s->current_picture.mb_type[mbn_xy]) ) {
464 bS[0] = bS[1] = bS[2] = bS[3] = 3; 462 bS[0] = bS[1] = bS[2] = bS[3] = 3;
465 } else { 463 } else {
466 const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy]; 464 const uint8_t *mbn_nnz = h->non_zero_count[mbn_xy];
467 for( i = 0; i < 4; i++ ) { 465 for( i = 0; i < 4; i++ ) {
468 if( h->non_zero_count_cache[scan8[0]+i] != 0 || 466 if( h->non_zero_count_cache[scan8[0]+i] != 0 ||
624 622
625 if (FRAME_MBAFF 623 if (FRAME_MBAFF
626 // left mb is in picture 624 // left mb is in picture
627 && h->slice_table[mb_xy-1] != 0xFFFF 625 && h->slice_table[mb_xy-1] != 0xFFFF
628 // and current and left pair do not have the same interlaced type 626 // and current and left pair do not have the same interlaced type
629 && (IS_INTERLACED(mb_type) != IS_INTERLACED(s->current_picture.mb_type[mb_xy-1])) 627 && IS_INTERLACED(mb_type^s->current_picture.mb_type[mb_xy-1])
630 // and left mb is in the same slice if deblocking_filter == 2 628 // and left mb is in the same slice if deblocking_filter == 2
631 && (h->deblocking_filter!=2 || h->slice_table[mb_xy-1] == h->slice_num)) { 629 && (h->deblocking_filter!=2 || h->slice_table[mb_xy-1] == h->slice_num)) {
632 /* First vertical edge is different in MBAFF frames 630 /* First vertical edge is different in MBAFF frames
633 * There are 8 different bS to compute and 2 different Qp 631 * There are 8 different bS to compute and 2 different Qp
634 */ 632 */