diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-01-23 19:11:02 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-23 19:11:02 +0000 |
commit | 4ae33c9b52a463e8580176046bd4ad6eecfabc2e (patch) | |
tree | 8f9340563f25d8d71bfd89257d13876c8ea03327 | |
parent | 934982c4ace1a3d5d627b518782ed092a456c49e (diff) | |
download | ffmpeg-4ae33c9b52a463e8580176046bd4ad6eecfabc2e.tar.gz |
simplify
Originally committed as revision 3873 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/h264.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 856b0804a4..6025bce727 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -5532,24 +5532,17 @@ static void filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8 /* dir : 0 -> vertical edge, 1 -> horizontal edge */ for( dir = 0; dir < 2; dir++ ) { - int start = 0; int edge; + const int mbm_xy = dir == 0 ? mb_xy -1 : mb_xy - s->mb_stride; + int start = h->slice_table[mbm_xy] == 255 ? 1 : 0; - /* test picture boundary */ - if( ( dir == 0 && mb_x == 0 ) || ( dir == 1 && mb_y == 0 ) ) { + if (h->deblocking_filter==2 && h->slice_table[mbm_xy] != h->slice_table[mb_xy]) start = 1; - } - if( 0 == start && 2 == h->deblocking_filter) { - const int mbn_xy = dir == 0 ? mb_xy -1 : mb_xy - s->mb_stride; - if (h->slice_table[mbn_xy] != h->slice_table[mb_xy]) { - start = 1; - } - } /* Calculate bS */ for( edge = start; edge < 4; edge++ ) { /* mbn_xy: neighbour macroblock (how that works for field ?) */ - int mbn_xy = edge > 0 ? mb_xy : ( dir == 0 ? mb_xy -1 : mb_xy - s->mb_stride ); + int mbn_xy = edge > 0 ? mb_xy : mbm_xy; int bS[4]; int qp; |