[vlc-devel] [PATCH] contrib: ffmpeg: update the hashes to more recent versions

Steve Lhomme robux4 at ycbcr.xyz
Thu Oct 17 09:27:41 CEST 2019


---
 ...ce-set-the-SEI-parameters-early-on-t.patch | 48 -----------
 ...set-the-SEI-parameters-early-on-the-.patch | 79 -------------------
 contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch | 21 -----
 contrib/src/ffmpeg/rules.mak                  |  7 +-
 4 files changed, 2 insertions(+), 153 deletions(-)
 delete mode 100644 contrib/src/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch
 delete mode 100644 contrib/src/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch
 delete mode 100644 contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch

diff --git a/contrib/src/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch b/contrib/src/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch
deleted file mode 100644
index 4010520fd79..00000000000
--- a/contrib/src/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 1b3d0743f592a51a6a65eea2f667c0c2815ff9e2 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Wed, 29 May 2019 15:15:49 +0200
-Subject: [PATCH] avcodec/h264_slice: set the SEI parameters early on the
- AVCodecContext
-
-It's better to do it before the buffers are actually created. At least in VLC
-we currently don't support changing some parameters dynamically easily so we
-don't use the information if it comes after the buffer are created.
-
-Co-authored-by: James Almer <jamrial at gmail.com>
----
- libavcodec/h264_slice.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
-index 1c9a270fb6..5ceee107a0 100644
---- a/libavcodec/h264_slice.c
-+++ b/libavcodec/h264_slice.c
-@@ -1092,6 +1092,12 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
-                 h->avctx->colorspace      = sps->colorspace;
-             }
-         }
-+
-+        if (h->sei.alternative_transfer.present &&
-+            av_color_transfer_name(h->sei.alternative_transfer.preferred_transfer_characteristics) &&
-+            h->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
-+            h->avctx->color_trc = h->sei.alternative_transfer.preferred_transfer_characteristics;
-+        }
-     }
- 
-     if (!h->context_initialized || must_reinit || needs_reinit) {
-@@ -1332,12 +1338,6 @@ static int h264_export_frame_props(H264Context *h)
-         h->sei.picture_timing.timecode_cnt = 0;
-     }
- 
--    if (h->sei.alternative_transfer.present &&
--        av_color_transfer_name(h->sei.alternative_transfer.preferred_transfer_characteristics) &&
--        h->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
--        h->avctx->color_trc = cur->f->color_trc = h->sei.alternative_transfer.preferred_transfer_characteristics;
--    }
--
-     return 0;
- }
- 
--- 
-2.19.1.windows.1
-
diff --git a/contrib/src/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch b/contrib/src/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch
deleted file mode 100644
index 134200868c1..00000000000
--- a/contrib/src/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 66fac4911abbc52333bc35dcff0cab7fa6f0171d Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Fri, 24 May 2019 08:58:00 +0200
-Subject: [PATCH] avcodec/hevcdec: set the SEI parameters early on the
- AVCodecContext
-
-It's better to do it before the buffers are actually created. At least in VLC
-we currently don't support changing some parameters dynamically easily so we
-don't use the information if it comes after the buffer are created.
-
-Co-authored-by: James Almer <jamrial at gmail.com>
----
- libavcodec/hevcdec.c | 21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
-index 515b346535..f1934975d5 100644
---- a/libavcodec/hevcdec.c
-+++ b/libavcodec/hevcdec.c
-@@ -310,9 +310,10 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
-     return 0;
- }
- 
--static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
--                                 const HEVCSPS *sps)
-+static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)
- {
-+    AVCodecContext *avctx = s->avctx;
-+    const HEVCParamSets *ps = &s->ps;
-     const HEVCVPS *vps = (const HEVCVPS*)ps->vps_list[sps->vps_id]->data;
-     const HEVCWindow *ow = &sps->output_window;
-     unsigned int num = 0, den = 0;
-@@ -355,6 +356,12 @@ static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
-     if (num != 0 && den != 0)
-         av_reduce(&avctx->framerate.den, &avctx->framerate.num,
-                   num, den, 1 << 30);
-+
-+    if (s->sei.alternative_transfer.present &&
-+        av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) &&
-+        s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
-+        avctx->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;
-+    }
- }
- 
- static enum AVPixelFormat get_format(HEVCContext *s, const HEVCSPS *sps)
-@@ -447,7 +454,7 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps,
-     if (ret < 0)
-         goto fail;
- 
--    export_stream_params(s->avctx, &s->ps, sps);
-+    export_stream_params(s, sps);
- 
-     s->avctx->pix_fmt = pix_fmt;
- 
-@@ -2778,12 +2785,6 @@ static int set_side_data(HEVCContext *s)
-         s->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
-     }
- 
--    if (s->sei.alternative_transfer.present &&
--        av_color_transfer_name(s->sei.alternative_transfer.preferred_transfer_characteristics) &&
--        s->sei.alternative_transfer.preferred_transfer_characteristics != AVCOL_TRC_UNSPECIFIED) {
--        s->avctx->color_trc = out->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics;
--    }
--
-     return 0;
- }
- 
-@@ -3179,7 +3180,7 @@ static int hevc_decode_extradata(HEVCContext *s, uint8_t *buf, int length, int f
-     for (i = 0; i < FF_ARRAY_ELEMS(s->ps.sps_list); i++) {
-         if (first && s->ps.sps_list[i]) {
-             const HEVCSPS *sps = (const HEVCSPS*)s->ps.sps_list[i]->data;
--            export_stream_params(s->avctx, &s->ps, sps);
-+            export_stream_params(s, sps);
-             break;
-         }
-     }
--- 
-2.19.1.windows.1
-
diff --git a/contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch b/contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch
deleted file mode 100644
index 2ad31ca54af..00000000000
--- a/contrib/src/ffmpeg/ffmpeg-mkv-overshoot.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- ffmpeg/libavformat/matroskadec.c.overshoot	2019-02-11 16:03:57.375444600 +0100
-+++ ffmpeg/libavformat/matroskadec.c	2019-02-11 16:04:04.418307200 +0100
-@@ -1197,6 +1197,18 @@ static int ebml_parse_elem(MatroskaDemux
-                    length, max_lengths[syntax->type], syntax->type);
-             return AVERROR_INVALIDDATA;
-         }
-+        if (matroska->num_levels > 0) {
-+            MatroskaLevel *level = &matroska->levels[matroska->num_levels - 1];
-+            AVIOContext *pb = matroska->ctx->pb;
-+            int64_t pos = avio_tell(pb);
-+            if (level->length != (uint64_t) -1 &&
-+                (pos + length) > (level->start + level->length)) {
-+                av_log(matroska->ctx, AV_LOG_ERROR,
-+                       "Invalid length 0x%"PRIx64" > 0x%"PRIx64" in parent\n",
-+                       length, level->start + level->length);
-+                return AVERROR_INVALIDDATA;
-+            }
-+        }
-     }
- 
-     switch (syntax->type) {
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 8179fc3c936..1ba04616e50 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -5,12 +5,12 @@
 #USE_FFMPEG ?= 1
 
 ifndef USE_LIBAV
-FFMPEG_HASH=0e833f615b59cd7611374d1d77257eaf00635ad7
+FFMPEG_HASH=1e35519fe0b8bbad84641e83d49138152720b544
 FFMPEG_GITURL := http://git.videolan.org/git/ffmpeg.git
 FFMPEG_LAVC_MIN := 57.37.100
 USE_FFMPEG := 1
 else
-FFMPEG_HASH=35ed7f93dbc72d733e454ae464b1324f38af62a0
+FFMPEG_HASH=e5afa1b556542fd7a52a0a9b409c80f2e6e1e9bb
 FFMPEG_GITURL := git://git.libav.org/libav.git
 FFMPEG_LAVC_MIN := 57.16.0
 endif
@@ -244,9 +244,6 @@ ifdef USE_FFMPEG
 	$(APPLY) $(SRC)/ffmpeg/armv7_fixup.patch
 	$(APPLY) $(SRC)/ffmpeg/dxva_vc1_crash.patch
 	$(APPLY) $(SRC)/ffmpeg/h264_early_SAR.patch
-	$(APPLY) $(SRC)/ffmpeg/ffmpeg-mkv-overshoot.patch
-	$(APPLY) $(SRC)/ffmpeg/0001-avcodec-hevcdec-set-the-SEI-parameters-early-on-the-.patch
-	$(APPLY) $(SRC)/ffmpeg/0001-avcodec-h264_slice-set-the-SEI-parameters-early-on-t.patch
 endif
 ifdef USE_LIBAV
 	$(APPLY) $(SRC)/ffmpeg/libav_gsm.patch
-- 
2.17.1



More information about the vlc-devel mailing list