comparison h264.c @ 2454:300f1207768d libavcodec

simplify
author michael
date Sun, 23 Jan 2005 19:11:02 +0000
parents f67b63ed036d
children 805431763e84
comparison
equal deleted inserted replaced
2453:f67b63ed036d 2454:300f1207768d
5530 uvlinesize = s->uvlinesize; 5530 uvlinesize = s->uvlinesize;
5531 5531
5532 /* dir : 0 -> vertical edge, 1 -> horizontal edge */ 5532 /* dir : 0 -> vertical edge, 1 -> horizontal edge */
5533 for( dir = 0; dir < 2; dir++ ) 5533 for( dir = 0; dir < 2; dir++ )
5534 { 5534 {
5535 int start = 0;
5536 int edge; 5535 int edge;
5537 5536 const int mbm_xy = dir == 0 ? mb_xy -1 : mb_xy - s->mb_stride;
5538 /* test picture boundary */ 5537 int start = h->slice_table[mbm_xy] == 255 ? 1 : 0;
5539 if( ( dir == 0 && mb_x == 0 ) || ( dir == 1 && mb_y == 0 ) ) { 5538
5539 if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_table[mb_xy])
5540 start = 1; 5540 start = 1;
5541 }
5542 if( 0 == start && 2 == h->deblocking_filter) {
5543 const int mbn_xy = dir == 0 ? mb_xy -1 : mb_xy - s->mb_stride;
5544 if (h->slice_table[mbn_xy] != h->slice_table[mb_xy]) {
5545 start = 1;
5546 }
5547 }
5548 5541
5549 /* Calculate bS */ 5542 /* Calculate bS */
5550 for( edge = start; edge < 4; edge++ ) { 5543 for( edge = start; edge < 4; edge++ ) {
5551 /* mbn_xy: neighbour macroblock (how that works for field ?) */ 5544 /* mbn_xy: neighbour macroblock (how that works for field ?) */
5552 int mbn_xy = edge > 0 ? mb_xy : ( dir == 0 ? mb_xy -1 : mb_xy - s->mb_stride ); 5545 int mbn_xy = edge > 0 ? mb_xy : mbm_xy;
5553 int bS[4]; 5546 int bS[4];
5554 int qp; 5547 int qp;
5555 5548
5556 if( IS_INTRA( s->current_picture.mb_type[mb_xy] ) || 5549 if( IS_INTRA( s->current_picture.mb_type[mb_xy] ) ||
5557 IS_INTRA( s->current_picture.mb_type[mbn_xy] ) ) { 5550 IS_INTRA( s->current_picture.mb_type[mbn_xy] ) ) {