[FFmpeg-cvslog] h263: disable loop filter with lowres

Michael Niedermayer git at videolan.org
Sat Jun 9 21:11:48 CEST 2012


ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Sun Jun  3 14:41:21 2012 +0200| [6a441ee78ee7bc49311994583455755663811243] | committer: Michael Niedermayer

h263: disable loop filter with lowres

Fixes ticket1212

Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit cc229d4e83889d1298f1a0863b55feec6c5c339a)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a441ee78ee7bc49311994583455755663811243
---

 libavcodec/intelh263dec.c |    2 +-
 libavcodec/ituh263dec.c   |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c
index a011a9f..a2ce68b 100644
--- a/libavcodec/intelh263dec.c
+++ b/libavcodec/intelh263dec.c
@@ -77,7 +77,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
         }
         if(get_bits(&s->gb, 2))
             av_log(s->avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
-        s->loop_filter = get_bits1(&s->gb);
+        s->loop_filter = get_bits1(&s->gb) * !s->avctx->lowres;
         if(get_bits1(&s->gb))
             av_log(s->avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
         if(get_bits1(&s->gb))
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index b1e6723..634fd8a 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -961,6 +961,8 @@ int h263_decode_picture_header(MpegEncContext *s)
             s->h263_aic = get_bits1(&s->gb); /* Advanced Intra Coding (AIC) */
             s->loop_filter= get_bits1(&s->gb);
             s->unrestricted_mv = s->umvplus || s->obmc || s->loop_filter;
+            if(s->avctx->lowres)
+                s->loop_filter = 0;
 
             s->h263_slice_structured= get_bits1(&s->gb);
             if (get_bits1(&s->gb) != 0) {



More information about the ffmpeg-cvslog mailing list