rv10/20: tell decoder to use edge emulation
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 17 Aug 2011 08:36:33 +0000 (10:36 +0200)
committerReinhard Tartler <siretart@tauware.de>
Sat, 24 Dec 2011 11:20:32 +0000 (12:20 +0100)
This removes out-of-edge motion compensation artifacts (easily spotted green
blocks in avplay, gray blocks in transcoding), for example here:
http://samples.libav.org/samples/real/tv_watching_t1.rm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 331971116d7d36743601bd2dc5384c5211d3bb48)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavcodec/rv10.c

index b6ca031..7b635b3 100644 (file)
@@ -454,6 +454,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
     s->avctx= avctx;
     s->out_format = FMT_H263;
     s->codec_id= avctx->codec_id;
+    avctx->flags |= CODEC_FLAG_EMU_EDGE;
 
     s->orig_width = s->width  = avctx->coded_width;
     s->orig_height= s->height = avctx->coded_height;