diff options
-rw-r--r-- | contrib/ffmpeg/A01-matroskaenc-pgs-duration.patch | 32 | ||||
-rw-r--r-- | contrib/ffmpeg/A04-videotoolbox.patch | 27 | ||||
-rw-r--r-- | contrib/ffmpeg/A05-hevc-nonref.patch | 35 | ||||
-rw-r--r-- | contrib/ffmpeg/A06-cbs-av1-field-storage.patch | 31 | ||||
-rw-r--r-- | contrib/ffmpeg/A07-cbs-av1-sint-parse.patch | 89 | ||||
-rw-r--r-- | contrib/ffmpeg/A08-mpeg-er-clear-chroma.patch | 29 | ||||
-rw-r--r-- | contrib/ffmpeg/A09-mov-eac3.patch | 75 | ||||
-rw-r--r-- | contrib/ffmpeg/module.defs | 6 |
8 files changed, 3 insertions, 321 deletions
diff --git a/contrib/ffmpeg/A01-matroskaenc-pgs-duration.patch b/contrib/ffmpeg/A01-matroskaenc-pgs-duration.patch deleted file mode 100644 index 550ebae15..000000000 --- a/contrib/ffmpeg/A01-matroskaenc-pgs-duration.patch +++ /dev/null @@ -1,32 +0,0 @@ -From dab79ea5cd01187567b1761aaf1c329926483786 Mon Sep 17 00:00:00 2001 -From: John Stebbins <[email protected]> -Date: Wed, 29 Oct 2014 10:54:44 -0700 -Subject: [PATCH] matroskaenc: Fix writing zero duration subtitles - -The matroska spec says blockduration == 0 means the frame is not a -keyframe. Since all subtitles are "keyframes", 0 blockduration should -not be written. - -Fixes mkvalidator error messages for PGS subtitles. ---- - libavformat/matroskaenc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c -index dad6d6c..61ce0f7 100644 ---- a/libavformat/matroskaenc.c -+++ b/libavformat/matroskaenc.c -@@ -2396,7 +2396,8 @@ FF_ENABLE_DEPRECATION_WARNINGS - #endif - /* All subtitle blocks are considered to be keyframes. */ - mkv_write_block(s, pb, MATROSKA_ID_BLOCK, pkt, 1); -- put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); -+ if (duration > 0) -+ put_ebml_uint(pb, MATROSKA_ID_BLOCKDURATION, duration); - end_ebml_master(pb, blockgroup); - } - - --- -1.9.3 - diff --git a/contrib/ffmpeg/A04-videotoolbox.patch b/contrib/ffmpeg/A04-videotoolbox.patch deleted file mode 100644 index 387af0d66..000000000 --- a/contrib/ffmpeg/A04-videotoolbox.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c -index 7796a68..e8b6245 100644 ---- a/libavcodec/videotoolboxenc.c -+++ b/libavcodec/videotoolboxenc.c -@@ -866,6 +866,14 @@ static int get_cv_color_primaries(AVCodecContext *avctx, - *primaries = NULL; - break; - -+ case AVCOL_PRI_BT470BG: -+ *primaries = kCVImageBufferColorPrimaries_EBU_3213; -+ break; -+ -+ case AVCOL_PRI_SMPTE170M: -+ *primaries = kCVImageBufferColorPrimaries_SMPTE_C; -+ break; -+ - case AVCOL_PRI_BT709: - *primaries = kCVImageBufferColorPrimaries_ITU_R_709_2; - break; -@@ -1302,6 +1310,7 @@ static av_cold int vtenc_init(AVCodecContext *avctx) - vtctx->get_param_set_func = compat_keys.CMVideoFormatDescriptionGetHEVCParameterSetAtIndex; - if (!vtctx->get_param_set_func) return AVERROR(EINVAL); - if (!get_vt_hevc_profile_level(avctx, &profile_level)) return AVERROR(EINVAL); -+ vtctx->has_b_frames = avctx->max_b_frames > 0; - } - - vtctx->session = NULL; diff --git a/contrib/ffmpeg/A05-hevc-nonref.patch b/contrib/ffmpeg/A05-hevc-nonref.patch deleted file mode 100644 index 8f1c7f21c..000000000 --- a/contrib/ffmpeg/A05-hevc-nonref.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 11dff170ef79d26d1de2bcd13b603a6c4c5c9815 Mon Sep 17 00:00:00 2001 -From: Mark Wu <[email protected]> -Date: Tue, 23 Oct 2018 12:49:08 +0800 -Subject: [PATCH] avcodec/hevcdec: fix non-ref frame judgement - -After inspecting the source code of x265, mpv and ffmpeg, I've found that -ffmpeg mistakenly regards EVC_NAL_BLA_N_LP and HEVC_NAL_IDR_N_LP as non- -reference frames, which are acutally reference frames according to the -specification in x265, and drops them. - -This patch should address the problem. I have tested it with mpv. - -Signed-off-by: Mark Wu <[email protected]> -Signed-off-by: James Almer <[email protected]> -(cherry picked from commit 10bc4c3a7df7bb26303067b97311b7eeedfd453e) ---- - libavcodec/hevcdec.h | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/libavcodec/hevcdec.h b/libavcodec/hevcdec.h -index f0f588f..dd951aa 100644 ---- a/libavcodec/hevcdec.h -+++ b/libavcodec/hevcdec.h -@@ -559,8 +559,6 @@ static av_always_inline int ff_hevc_nal_is_nonref(enum HEVCNALUnitType type) - case HEVC_NAL_VCL_N10: - case HEVC_NAL_VCL_N12: - case HEVC_NAL_VCL_N14: -- case HEVC_NAL_BLA_N_LP: -- case HEVC_NAL_IDR_N_LP: - return 1; - break; - default: break; --- -1.9.1 - diff --git a/contrib/ffmpeg/A06-cbs-av1-field-storage.patch b/contrib/ffmpeg/A06-cbs-av1-field-storage.patch deleted file mode 100644 index 55503ff7a..000000000 --- a/contrib/ffmpeg/A06-cbs-av1-field-storage.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 49bc641e89f7c89648f28feafa2daa3756ba9c7d Mon Sep 17 00:00:00 2001 -From: James Almer <[email protected]> -Date: Sat, 10 Nov 2018 22:51:18 -0300 -Subject: [PATCH] avcodec/cbs_av1: fix storage size for segmentation_params - feature_value fields - -The valid range is -255 to 255. - -Reviewed-by: Mark Thompson <[email protected]> -Signed-off-by: James Almer <[email protected]> -(cherry picked from commit 79831f4531d98c3c1eab96c10f1135d08abef5f3) ---- - libavcodec/cbs_av1.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavcodec/cbs_av1.h b/libavcodec/cbs_av1.h -index f662265..84622ed 100644 ---- a/libavcodec/cbs_av1.h -+++ b/libavcodec/cbs_av1.h -@@ -210,7 +210,7 @@ typedef struct AV1RawFrameHeader { - uint8_t segmentation_temporal_update; - uint8_t segmentation_update_data; - uint8_t feature_enabled[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX]; -- uint8_t feature_value[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX]; -+ int16_t feature_value[AV1_MAX_SEGMENTS][AV1_SEG_LVL_MAX]; - - uint8_t delta_q_present; - uint8_t delta_q_res; --- -1.9.1 - diff --git a/contrib/ffmpeg/A07-cbs-av1-sint-parse.patch b/contrib/ffmpeg/A07-cbs-av1-sint-parse.patch deleted file mode 100644 index ce09f2503..000000000 --- a/contrib/ffmpeg/A07-cbs-av1-sint-parse.patch +++ /dev/null @@ -1,89 +0,0 @@ -From a9e9303f26597b2a166374cd46b00adc0401e634 Mon Sep 17 00:00:00 2001 -From: James Almer <[email protected]> -Date: Sat, 10 Nov 2018 22:52:12 -0300 -Subject: [PATCH] avcodec/cbs_av1: fix parsing signed integer values - -Reviewed-by: Mark Thompson <[email protected]> -Signed-off-by: James Almer <[email protected]> -(cherry picked from commit f0f2832a5ce93bad9b1d29f99df6bda2380fc41c) ---- - libavcodec/cbs_av1.c | 30 +++++++++--------------------- - 1 file changed, 9 insertions(+), 21 deletions(-) - -diff --git a/libavcodec/cbs_av1.c b/libavcodec/cbs_av1.c -index ff32a6f..ed5211b 100644 ---- a/libavcodec/cbs_av1.c -+++ b/libavcodec/cbs_av1.c -@@ -189,30 +189,26 @@ static int cbs_av1_read_su(CodedBitstreamContext *ctx, GetBitContext *gbc, - int width, const char *name, - const int *subscripts, int32_t *write_to) - { -- uint32_t magnitude; -- int position, sign; -+ int position; - int32_t value; - - if (ctx->trace_enable) - position = get_bits_count(gbc); - -- if (get_bits_left(gbc) < width + 1) { -+ if (get_bits_left(gbc) < width) { - av_log(ctx->log_ctx, AV_LOG_ERROR, "Invalid signed value at " - "%s: bitstream ended.\n", name); - return AVERROR_INVALIDDATA; - } - -- magnitude = get_bits(gbc, width); -- sign = get_bits1(gbc); -- value = sign ? -(int32_t)magnitude : magnitude; -+ value = get_sbits(gbc, width); - - if (ctx->trace_enable) { - char bits[33]; - int i; - for (i = 0; i < width; i++) -- bits[i] = magnitude >> (width - i - 1) & 1 ? '1' : '0'; -- bits[i] = sign ? '1' : '0'; -- bits[i + 1] = 0; -+ bits[i] = value & (1 << (width - i - 1)) ? '1' : '0'; -+ bits[i] = 0; - - ff_cbs_trace_syntax_element(ctx, position, - name, subscripts, bits, value); -@@ -226,29 +222,21 @@ static int cbs_av1_write_su(CodedBitstreamContext *ctx, PutBitContext *pbc, - int width, const char *name, - const int *subscripts, int32_t value) - { -- uint32_t magnitude; -- int sign; -- -- if (put_bits_left(pbc) < width + 1) -+ if (put_bits_left(pbc) < width) - return AVERROR(ENOSPC); - -- sign = value < 0; -- magnitude = sign ? -value : value; -- - if (ctx->trace_enable) { - char bits[33]; - int i; - for (i = 0; i < width; i++) -- bits[i] = magnitude >> (width - i - 1) & 1 ? '1' : '0'; -- bits[i] = sign ? '1' : '0'; -- bits[i + 1] = 0; -+ bits[i] = value & (1 << (width - i - 1)) ? '1' : '0'; -+ bits[i] = 0; - - ff_cbs_trace_syntax_element(ctx, put_bits_count(pbc), - name, subscripts, bits, value); - } - -- put_bits(pbc, width, magnitude); -- put_bits(pbc, 1, sign); -+ put_sbits(pbc, width, value); - - return 0; - } --- -1.9.1 - diff --git a/contrib/ffmpeg/A08-mpeg-er-clear-chroma.patch b/contrib/ffmpeg/A08-mpeg-er-clear-chroma.patch deleted file mode 100644 index 8850421c4..000000000 --- a/contrib/ffmpeg/A08-mpeg-er-clear-chroma.patch +++ /dev/null @@ -1,29 +0,0 @@ -From d4c5f515f09076635bf5e1591e5ff9d21ac13572 Mon Sep 17 00:00:00 2001 -From: Marton Balint <[email protected]> -Date: Sat, 17 Nov 2018 23:26:24 +0100 -Subject: [PATCH] avcodec/mpeg_er: fix clearing chroma blocks for 422 and 444 - -Fixes ticket #7494. - -Signed-off-by: Marton Balint <[email protected]> -(cherry picked from commit e3a96309826dd0ea33db0300f7c75414fdbea0a4) ---- - libavcodec/mpeg_er.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/libavcodec/mpeg_er.c b/libavcodec/mpeg_er.c -index ada1a16..f54cb85 100644 ---- a/libavcodec/mpeg_er.c -+++ b/libavcodec/mpeg_er.c -@@ -78,6 +78,8 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, - ff_update_block_index(s); - - s->bdsp.clear_blocks(s->block[0]); -+ if (!s->chroma_y_shift) -+ s->bdsp.clear_blocks(s->block[6]); - - s->dest[0] = s->current_picture.f->data[0] + - s->mb_y * 16 * s->linesize + --- -1.9.1 - diff --git a/contrib/ffmpeg/A09-mov-eac3.patch b/contrib/ffmpeg/A09-mov-eac3.patch deleted file mode 100644 index adf1e5f2c..000000000 --- a/contrib/ffmpeg/A09-mov-eac3.patch +++ /dev/null @@ -1,75 +0,0 @@ -From fcffed470a5236bc1799bc3022d588704d9ae5ef Mon Sep 17 00:00:00 2001 -From: Paul B Mahol <[email protected]> -Date: Wed, 21 Nov 2018 11:45:02 +0100 -Subject: [PATCH] avformat/movenc: fix size calculation in mov_write_eac3_tag() - -Otherwise it would assert when flushing bits. - -(cherry picked from commit 027f032bbce9bdf7bbec40665b98590cade33416) ---- - libavformat/movenc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libavformat/movenc.c b/libavformat/movenc.c -index 33978ee..bee8e89 100644 ---- a/libavformat/movenc.c -+++ b/libavformat/movenc.c -@@ -541,7 +541,7 @@ static int mov_write_eac3_tag(AVIOContext *pb, MOVTrack *track) - return AVERROR(EINVAL); - - info = track->eac3_priv; -- size = 2 + 4 * (info->num_ind_sub + 1); -+ size = 2 + ((34 * (info->num_ind_sub + 1) + 7) >> 3); - buf = av_malloc(size); - if (!buf) { - size = AVERROR(ENOMEM); --- -1.9.1 - -From 59e30c05d74e59d28f2ec4ffd4dbf1822f921f06 Mon Sep 17 00:00:00 2001 -From: Paul B Mahol <[email protected]> -Date: Thu, 22 Nov 2018 21:28:59 +0100 -Subject: [PATCH] avformat/movenc: get number of written bytes from bitstream - writer - -Update fate test. - -(cherry picked from commit 97d1ee437bbf67d7e3897bc73df4f7d9771ac309) ---- - libavformat/movenc.c | 2 +- - tests/ref/fate/copy-trac3074 | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libavformat/movenc.c b/libavformat/movenc.c -index bee8e89..6dab519 100644 ---- a/libavformat/movenc.c -+++ b/libavformat/movenc.c -@@ -563,12 +563,12 @@ static int mov_write_eac3_tag(AVIOContext *pb, MOVTrack *track) - put_bits(&pbc, 4, info->substream[i].num_dep_sub); - if (!info->substream[i].num_dep_sub) { - put_bits(&pbc, 1, 0); /* reserved */ -- size--; - } else { - put_bits(&pbc, 9, info->substream[i].chan_loc); - } - } - flush_put_bits(&pbc); -+ size = put_bits_count(&pbc) >> 3; - - avio_wb32(pb, size + 8); - ffio_wfourcc(pb, "dec3"); -diff --git a/tests/ref/fate/copy-trac3074 b/tests/ref/fate/copy-trac3074 -index 5ce5694..ff66900 100644 ---- a/tests/ref/fate/copy-trac3074 -+++ b/tests/ref/fate/copy-trac3074 -@@ -1,5 +1,5 @@ --39aef1afff761d673fd1be07182941d1 *tests/data/fate/copy-trac3074.mp4 --333991 tests/data/fate/copy-trac3074.mp4 -+f92a201033712bda262f1e071e25544a *tests/data/fate/copy-trac3074.mp4 -+333992 tests/data/fate/copy-trac3074.mp4 - #tb 0: 1/48000 - #media_type 0: audio - #codec_id 0: eac3 --- -1.9.1 - diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index 0065859c8..1225fd916 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -12,9 +12,9 @@ endif $(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,$(__deps__))) $(eval $(call import.CONTRIB.defs,FFMPEG)) -FFMPEG.FETCH.url = https://download.handbrake.fr/handbrake/contrib/ffmpeg-4.1.tar.bz2 -FFMPEG.FETCH.url += https://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2 -FFMPEG.FETCH.sha256 = b684fb43244a5c4caae652af9022ed5d85ce15210835bce054a33fb26033a1a5 +FFMPEG.FETCH.url = https://download.handbrake.fr/handbrake/contrib/ffmpeg-4.1.1.tar.bz2 +FFMPEG.FETCH.url += https://ffmpeg.org/releases/ffmpeg-4.1.1.tar.bz2 +FFMPEG.FETCH.sha256 = 0cb40e3b8acaccd0ecb38aa863f66f0c6e02406246556c2992f67bf650fab058 FFMPEG.CONFIGURE.deps = FFMPEG.CONFIGURE.host = |