summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley Sepos <[email protected]>2018-12-14 14:54:38 -0500
committerBradley Sepos <[email protected]>2018-12-14 14:54:38 -0500
commitc69dfd82e7c3e720245d77410cfaa87a7a502b35 (patch)
tree618c9cd03dc249bdbcac2f942f5982d51db4088b
parente5f4a5ec826d4e8351f6ae30d844d4eb31b501ef (diff)
contrib: Add FFmpeg patch fixing decoding for certain MPEG streams.
Fixes #1563.
-rw-r--r--contrib/ffmpeg/A10-mpeg-quarter-sample.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A10-mpeg-quarter-sample.patch b/contrib/ffmpeg/A10-mpeg-quarter-sample.patch
new file mode 100644
index 000000000..a2febd761
--- /dev/null
+++ b/contrib/ffmpeg/A10-mpeg-quarter-sample.patch
@@ -0,0 +1,30 @@
+From 5282db5929f25ca9566a47ad217794842b364afc Mon Sep 17 00:00:00 2001
+From: Andriy Gelman <[email protected]>
+Date: Wed, 12 Dec 2018 23:57:35 -0500
+Subject: [PATCH] avcodec/mpeg: Initialize quarter_sample parameter from
+ previous thread.
+
+Fixes #7410.
+The value of sub-pixel precision for me/mc can change during an Intra frame. In multi-threaded decoding this change is not propagated to other frame threads causing decoding artifacts. This patch initializes the sub-pixel precision parameter from previous thread, which fixes the issue.
+
+Signed-off-by: Michael Niedermayer <[email protected]>
+---
+ libavcodec/mpegvideo.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
+index d4d3bea..dbb6ab9 100644
+--- a/libavcodec/mpegvideo.c
++++ b/libavcodec/mpegvideo.c
+@@ -538,6 +538,8 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
+ s->avctx->width = s1->avctx->width;
+ s->avctx->height = s1->avctx->height;
+
++ s->quarter_sample = s1->quarter_sample;
++
+ s->coded_picture_number = s1->coded_picture_number;
+ s->picture_number = s1->picture_number;
+
+--
+1.9.1
+