summaryrefslogtreecommitdiff
path: root/ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-01-29 23:39:59 +0100
committerKarel Kočí <cynerd@email.cz>2020-01-29 23:39:59 +0100
commit53b7a6e4a180ddf1baaed8c3393229eb4ffa86f7 (patch)
tree201a5b8d076425f68733c9dc00d664dd1cc5c838 /ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
parent75148c3d7a641d491cff015ed9cee3b13a59165a (diff)
downloadalpine-personal-pkgs-53b7a6e4a180ddf1baaed8c3393229eb4ffa86f7.tar.gz
alpine-personal-pkgs-53b7a6e4a180ddf1baaed8c3393229eb4ffa86f7.tar.bz2
alpine-personal-pkgs-53b7a6e4a180ddf1baaed8c3393229eb4ffa86f7.zip
ffmpeg-rpi: try to port from LibreELEC
Diffstat (limited to 'ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch')
-rw-r--r--ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch b/ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
new file mode 100644
index 0000000..6721c8d
--- /dev/null
+++ b/ffmpeg-rpi/ffmpeg-99.1002-mpeg4video-Signal-unsupported-GMC-with-more-than-one.patch
@@ -0,0 +1,48 @@
+From d8bdcc8791c501921ee8961f3b0de0bd47668ebf Mon Sep 17 00:00:00 2001
+From: popcornmix <popcornmix@gmail.com>
+Date: Fri, 5 Jun 2015 22:48:33 +0100
+Subject: [PATCH] mpeg4video: Signal unsupported GMC with more than one warp
+ point
+
+---
+ libavcodec/avcodec.h | 1 +
+ libavcodec/mpeg4videodec.c | 4 ++++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
+index c26b6d607c..6c4b011b5c 100644
+--- a/libavcodec/avcodec.h
++++ b/libavcodec/avcodec.h
+@@ -2965,6 +2965,7 @@ typedef struct AVCodecContext {
+ #define FF_BUG_MS 8192 ///< Work around various bugs in Microsoft's broken decoders.
+ #define FF_BUG_TRUNCATED 16384
+ #define FF_BUG_IEDGE 32768
++#define FF_BUG_GMC_UNSUPPORTED (1<<30)
+
+ /**
+ * strictly follow the standard (MPEG-4, ...).
+diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
+index cd39131d55..d8c8227cb4 100644
+--- a/libavcodec/mpeg4videodec.c
++++ b/libavcodec/mpeg4videodec.c
+@@ -2250,6 +2250,9 @@ int ff_mpeg4_workaround_bugs(AVCodecContext *avctx)
+
+ if (ctx->divx_version >= 0)
+ s->workaround_bugs |= FF_BUG_HPEL_CHROMA;
++
++ if (ctx->num_sprite_warping_points > 1)
++ s->workaround_bugs |= FF_BUG_GMC_UNSUPPORTED;
+ }
+
+ if (s->workaround_bugs & FF_BUG_STD_QPEL) {
+@@ -2274,6 +2277,7 @@ int ff_mpeg4_workaround_bugs(AVCodecContext *avctx)
+ s->workaround_bugs, ctx->lavc_build, ctx->xvid_build,
+ ctx->divx_version, ctx->divx_build, s->divx_packed ? "p" : "");
+
++ avctx->workaround_bugs = s->workaround_bugs;
+ if (CONFIG_MPEG4_DECODER && ctx->xvid_build >= 0 &&
+ s->codec_id == AV_CODEC_ID_MPEG4 &&
+ avctx->idct_algo == FF_IDCT_AUTO) {
+--
+2.14.1
+