From 83b3401731179a87ae20ceb70e78f3bcb719370d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andreas=20=C3=96man?= Date: Sun, 3 Jun 2007 11:44:43 +0000 Subject: [PATCH] =?utf8?q?filter=5Fmb=5Ffast()=20doesn't=20handle=20h->deb?= =?utf8?q?locking=5Ffilter=3D=3D2=20(skip=20slice=20edges),=20so=20delegat?= =?utf8?q?e=20that=20case=20to=20filter=5Fmb().=20Patch=20by=20Andreas=20?= =?utf8?q?=C3=96man=20[andreas=20at=20olebyn=20dot=20nu].?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Originally committed as revision 9180 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h264.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index ab61a8c38..57531d765 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -6665,13 +6665,16 @@ static void filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, int mb_xy, mb_type; int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh; - if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength) { + mb_xy = mb_x + mb_y*s->mb_stride; + + if(mb_x==0 || mb_y==0 || !s->dsp.h264_loop_filter_strength || + (h->deblocking_filter == 2 && (h->slice_table[mb_xy] != h->slice_table[h->top_mb_xy] || + h->slice_table[mb_xy] != h->slice_table[mb_xy - 1]))) { filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize); return; } assert(!FRAME_MBAFF); - mb_xy = mb_x + mb_y*s->mb_stride; mb_type = s->current_picture.mb_type[mb_xy]; qp = s->current_picture.qscale_table[mb_xy]; qp0 = s->current_picture.qscale_table[mb_xy-1]; -- 2.11.0