From 9150e5c1954b7c991a911379f21035eeeed3ccb6 Mon Sep 17 00:00:00 2001 From: Jason Tackaberry Date: Wed, 30 Apr 2008 14:19:08 +0100 Subject: Fix green smearing in h264 decoding Occasionally when playing h264-encoded files, green blocks will appear at the edges of the frame, and get smeared around (following the motion vectors, of course). This bug has existing in Xine for well over a year, and I keep hoping it will be fixed, but it never was. I recently learned that gstreamer had a similar problem and it was fixed last year. With this as a hint, I found http://bugzilla.gnome.org/show_bug.cgi?id=364139 and the patch attached to that bug. I've adapted that patch to xine, and it is attached. I have compared clips before and after applying this patch, and in all cases the green artifacts have gone away, and I have seen no negative side effects. --- src/combined/ffmpeg/ff_video_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index b18040d38..485e84afb 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -381,7 +381,7 @@ static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type) /* Some codecs (eg rv10) copy flags in init so it's necessary to set * this flag here in case we are going to use direct rendering */ - if(this->codec->capabilities & CODEC_CAP_DR1) { + if(this->codec->capabilities & CODEC_CAP_DR1 && this->codec->id != CODEC_ID_H264) { this->context->flags |= CODEC_FLAG_EMU_EDGE; } -- cgit v1.2.3