diff mbox

[FFmpeg-devel] avcodec/mpeg: Initialize quarter_sample parameter from previous thread.

Message ID 20181213045735.8390-1-andriy.gelman@gmail.com
State Accepted
Commit 5282db5929f25ca9566a47ad217794842b364afc
Headers show

Commit Message

Andriy Gelman Dec. 13, 2018, 4:57 a.m. UTC
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.
---
 libavcodec/mpegvideo.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer Dec. 14, 2018, 6:08 p.m. UTC | #1
On Wed, Dec 12, 2018 at 11:57:35PM -0500, Andriy Gelman wrote:
> 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.
> ---
>  libavcodec/mpegvideo.c | 2 ++
>  1 file changed, 2 insertions(+)

will apply

thx

[...]
diff mbox

Patch

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;