Browse Source

- ffmpeg: bump version to 4.1.3

master
vanhofen 6 years ago
parent
commit
b9aadf3054
  1. 36
      make/target-ffmpeg-armbox.mk
  2. 0
      patches/ffmpeg-02-fix_mpegts.patch
  3. 0
      patches/ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch
  4. 2
      patches/ffmpeg-04-hls_replace_key_uri.patch
  5. 0
      patches/ffmpeg-06-optimize_aac.patch
  6. 0
      patches/ffmpeg-07-increase_buffer_size.patch
  7. 2
      patches/ffmpeg-08-recheck_discard_flags.patch
  8. 2
      patches/ffmpeg-09-fix_edit_list_parsing.patch
  9. 24
      patches/ffmpeg-10-remove_avpriv_request_sample.patch
  10. 14
      patches/ffmpeg-A02-corrupt-h264-frames.patch
  11. 11
      patches/ffmpeg-A10-mpeg-quarter-sample.patch
  12. 55
      patches/ffmpeg-A11-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch
  13. 15
      patches/ffmpeg-mips64_cpu_detection.patch

36
make/target-ffmpeg-armbox.mk

@ -3,24 +3,30 @@
#
# -----------------------------------------------------------------------------
FFMPEG_VER = 4.1.1
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VER).tar.xz
FFMPEG_VER = 4.1.3
FFMPEG = ffmpeg-$(FFMPEG_VER)
FFMPEG_SOURCE = $(FFMPEG).tar.xz
FFMPEG_URL = http://www.ffmpeg.org/releases
$(ARCHIVE)/$(FFMPEG_SOURCE):
$(DOWNLOAD) http://www.ffmpeg.org/releases/$(FFMPEG_SOURCE)
$(DOWNLOAD) $(FFMPEG_URL)/$(FFMPEG_SOURCE)
# -----------------------------------------------------------------------------
FFMPEG_UNPATCHED := no
FFMPEG_PATCH = ffmpeg-$(FFMPEG_VER)-fix_hls.patch
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-increase_buffer_size.patch
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-optimize_aac.patch
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-fix_edit_list_parsing.patch
# ffmpeg exteplayer3 patches
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-fix_mpegts.patch
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-allow_to_choose_rtmp_impl_at_runtime.patch
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-hls_replace_key_uri.patch
FFMPEG_PATCH = ffmpeg-02-fix_mpegts.patch
FFMPEG_PATCH += ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch
FFMPEG_PATCH += ffmpeg-04-hls_replace_key_uri.patch
FFMPEG_PATCH += ffmpeg-06-optimize_aac.patch
FFMPEG_PATCH += ffmpeg-07-increase_buffer_size.patch
FFMPEG_PATCH += ffmpeg-08-recheck_discard_flags.patch
FFMPEG_PATCH += ffmpeg-09-fix_edit_list_parsing.patch
FFMPEG_PATCH += ffmpeg-10-remove_avpriv_request_sample.patch
FFMPEG_PATCH += ffmpeg-A02-corrupt-h264-frames.patch
FFMPEG_PATCH += ffmpeg-A10-mpeg-quarter-sample.patch
FFMPEG_PATCH += ffmpeg-A11-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch
FFMPEG_PATCH += ffmpeg-mips64_cpu_detection.patch
# -----------------------------------------------------------------------------
@ -347,13 +353,13 @@ FFMPEG_CONFIGURE_PLATFORM = \
# -----------------------------------------------------------------------------
$(D)/ffmpeg: $(FFMPEG_DEPS) $(ARCHIVE)/$(FFMPEG_SOURCE) | $(TARGET_DIR)
$(REMOVE)/ffmpeg-$(FFMPEG_VER)
$(REMOVE)/$(FFMPEG)
$(UNTAR)/$(FFMPEG_SOURCE)
ifneq ($(FFMPEG_UNPATCHED), yes)
$(CHDIR)/ffmpeg-$(FFMPEG_VER); \
$(CHDIR)/$(FFMPEG); \
$(call apply_patches, $(FFMPEG_PATCH))
endif
$(CHDIR)/ffmpeg-$(FFMPEG_VER); \
$(CHDIR)/$(FFMPEG); \
./configure \
$(FFMPEG_CONFIGURE_GENERIC) \
$(FFMPEG_CONFIGURE_PLATFORM) \
@ -367,5 +373,5 @@ endif
$(REWRITE_PKGCONF)/libavutil.pc
$(REWRITE_PKGCONF)/libswresample.pc
$(REWRITE_PKGCONF)/libswscale.pc
$(REMOVE)/ffmpeg-$(FFMPEG_VER)
$(REMOVE)/$(FFMPEG)
$(TOUCH)

0
patches/ffmpeg-4.1.1-fix_mpegts.patch → patches/ffmpeg-02-fix_mpegts.patch

0
patches/ffmpeg-4.1.1-allow_to_choose_rtmp_impl_at_runtime.patch → patches/ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch

2
patches/ffmpeg-4.1.1-hls_replace_key_uri.patch → patches/ffmpeg-04-hls_replace_key_uri.patch

@ -36,7 +36,7 @@
}
ff_data_to_hex(iv, seg->iv, sizeof(seg->iv), 0);
ff_data_to_hex(key, pls->key, sizeof(pls->key), 0);
@@ -2315,6 +2327,8 @@
@@ -2313,6 +2325,8 @@
OFFSET(http_persistent), AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, FLAGS },
{"http_multiple", "Use multiple HTTP connections for fetching segments",
OFFSET(http_multiple), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, FLAGS},

0
patches/ffmpeg-4.1.1-optimize_aac.patch → patches/ffmpeg-06-optimize_aac.patch

0
patches/ffmpeg-4.1.1-increase_buffer_size.patch → patches/ffmpeg-07-increase_buffer_size.patch

2
patches/ffmpeg-4.1.1-fix_hls.patch → patches/ffmpeg-08-recheck_discard_flags.patch

@ -1,6 +1,6 @@
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -2062,8 +2062,10 @@
@@ -2074,8 +2074,10 @@
HLSContext *c = s->priv_data;
int ret, i, minplaylist = -1;

2
patches/ffmpeg-4.1.1-fix_edit_list_parsing.patch → patches/ffmpeg-09-fix_edit_list_parsing.patch

@ -1,6 +1,6 @@
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3558,8 +3558,10 @@
@@ -3561,8 +3561,10 @@
if (ctts_data_old && ctts_index_old < ctts_count_old) {
curr_ctts = ctts_data_old[ctts_index_old].duration;

24
patches/ffmpeg-10-remove_avpriv_request_sample.patch

@ -0,0 +1,24 @@
From c8232e50074f6f9f9b0674d0a5433f49d73a4e50 Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Wed, 19 Jun 2019 13:41:01 +0200
Subject: [PATCH] lavc/tableprint_vlc: Remove avpriv_request_sample() from
included files.
Fixes compilation with --enable-hardcoded-tables.
Fixes ticket #7962.
---
libavcodec/tableprint_vlc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/tableprint_vlc.h b/libavcodec/tableprint_vlc.h
index 3004be3f9c..b3ff36562b 100644
--- a/libavcodec/tableprint_vlc.h
+++ b/libavcodec/tableprint_vlc.h
@@ -36,6 +36,7 @@
#define AVCODEC_AVCODEC_H
#define AVCODEC_INTERNAL_H
#define AV_INPUT_BUFFER_PADDING_SIZE 64 // the value does not matter for this
+#define avpriv_request_sample(...)
#include "tableprint.h"
#include "get_bits.h"
#include "mathtables.c"

14
patches/ffmpeg-A02-corrupt-h264-frames.patch

@ -0,0 +1,14 @@
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1463,6 +1463,11 @@
h->avctx->has_b_frames = sps->num_reorder_frames;
}
+ if (sps && sps->bitstream_restriction_flag &&
+ h->avctx->has_b_frames < sps->num_reorder_frames) {
+ h->avctx->has_b_frames = FFMAX(h->avctx->has_b_frames, sps->num_reorder_frames);
+ }
+
last_pic_droppable = h->droppable;
last_pic_structure = h->picture_structure;
h->droppable = (nal->ref_idc == 0);

11
patches/ffmpeg-A10-mpeg-quarter-sample.patch

@ -0,0 +1,11 @@
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -538,6 +538,8 @@
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;

55
patches/ffmpeg-A11-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch

@ -0,0 +1,55 @@
--- a/libavcodec/amfenc.c
+++ b/libavcodec/amfenc.c
@@ -680,6 +680,52 @@ int ff_amf_send_frame(AVCodecContext *avctx, const AVFrame *frame)
break;
}
+ // Override Picture Type for Frame
+ if (avctx->codec->id == AV_CODEC_ID_H264) {
+ switch (frame->pict_type) {
+ case AV_PICTURE_TYPE_I:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_I);
+ break;
+ case AV_PICTURE_TYPE_P:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_P);
+ break;
+ case AV_PICTURE_TYPE_B:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_B);
+ break;
+ case AV_PICTURE_TYPE_S:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_SKIP);
+ break;
+ default:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_NONE);
+ break;
+ }
+ // Keyframe overrides previous assignment.
+ if (frame->key_frame) {
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_PICTURE_TYPE_IDR);
+ }
+ } else if (avctx->codec->id == AV_CODEC_ID_HEVC) {
+ switch (frame->pict_type) {
+ case AV_PICTURE_TYPE_I:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_I);
+ break;
+ case AV_PICTURE_TYPE_P:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_P);
+ break;
+ case AV_PICTURE_TYPE_B:
+ av_log(ctx, AV_LOG_WARNING, "Ignoring B-Frame, unsupported by AMD AMF H.265 Encoder.");
+ break;
+ case AV_PICTURE_TYPE_S:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_SKIP);
+ break;
+ default:
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_NONE);
+ break;
+ }
+ // Keyframe overrides previous assignment.
+ if (frame->key_frame) {
+ AMF_ASSIGN_PROPERTY_INT64(res, surface, AMF_VIDEO_ENCODER_HEVC_FORCE_PICTURE_TYPE, AMF_VIDEO_ENCODER_HEVC_PICTURE_TYPE_IDR);
+ }
+ }
// submit surface
res = ctx->encoder->pVtbl->SubmitInput(ctx->encoder, (AMFData*)surface);

15
patches/ffmpeg-mips64_cpu_detection.patch

@ -0,0 +1,15 @@
--- a/configure
+++ b/configure
@@ -5646,12 +5646,9 @@ elif enabled mips; then
# Enable minimum ISA based on selected options
if enabled mips64; then
- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6'
enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2'
disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64'
else
- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6'
- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5'
enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2'
disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32'
fi
Loading…
Cancel
Save