summaryrefslogtreecommitdiff
path: root/libavcodec/h261.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-10-08 22:57:39 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-10-08 22:57:39 +0000
commit5f6c92d40c2003471b005cc05430ec8488000867 (patch)
tree0ec3694130da09c13e97f255642c8cb278941501 /libavcodec/h261.c
parent8c7aaf5b6de268518e19a1368fb3fb2f78829e95 (diff)
downloadffmpeg-5f6c92d40c2003471b005cc05430ec8488000867.tar.gz
h.261 loop filter fix
closes bug #1033108 Originally committed as revision 3574 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h261.c')
-rw-r--r--libavcodec/h261.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h261.c b/libavcodec/h261.c
index d4ad97cbef..ca8f29716e 100644
--- a/libavcodec/h261.c
+++ b/libavcodec/h261.c
@@ -57,14 +57,17 @@ typedef struct H261Context{
int gob_start_code_skipped; // 1 if gob start code is already read before gob header is read
}H261Context;
-void ff_h261_loop_filter(H261Context * h){
- MpegEncContext * const s = &h->s;
+void ff_h261_loop_filter(MpegEncContext *s){
+ H261Context * h= (H261Context*)s;
const int linesize = s->linesize;
const int uvlinesize= s->uvlinesize;
uint8_t *dest_y = s->dest[0];
uint8_t *dest_cb= s->dest[1];
uint8_t *dest_cr= s->dest[2];
-
+
+ if(!(IS_FIL (h->mtype)))
+ return;
+
s->dsp.h261_loop_filter(dest_y , linesize);
s->dsp.h261_loop_filter(dest_y + 8, linesize);
s->dsp.h261_loop_filter(dest_y + 8 * linesize , linesize);
@@ -256,6 +259,7 @@ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 )
s->mv[0][0][0] = 0;
s->mv[0][0][1] = 0;
s->mb_skiped = 1;
+ h->mtype &= ~MB_TYPE_H261_FIL;
MPV_decode_mb(s, s->block);
}
@@ -388,10 +392,6 @@ intra:
MPV_decode_mb(s, s->block);
- if(IS_FIL (h->mtype)){
- ff_h261_loop_filter(h);
- }
-
return SLICE_OK;
}