From cd8ca0f6a089b7dc2f69769901682b8ea680d4d9 Mon Sep 17 00:00:00 2001 From: Markham Date: Sat, 31 Aug 2019 14:01:50 +0200 Subject: [PATCH] bump version ffmpeg-4.2 --- ...pegts.patch => ffmpeg-02-fix_mpegts.patch} | 2 +- ...llow_to_choose_rtmp_impl_at_runtime.patch} | 14 ++--- ...ch => ffmpeg-04-hls_replace_key_uri.patch} | 10 ++-- ...aac.patch => ffmpeg-06-optimize_aac.patch} | 42 +++++++------- ...h => ffmpeg-07-increase_buffer_size.patch} | 12 ++-- ... => ffmpeg-08-recheck_discard_flags.patch} | 2 +- ... => ffmpeg-09-fix_edit_list_parsing.patch} | 2 +- ...fenc-Add-support-for-pict_type-field.patch | 55 ------------------- .../ffmpeg-4.1.3-corrupt-h264-frames.patch | 14 ----- .../ffmpeg-4.1.3-mpeg-quarter-sample.patch | 10 ---- .../ffmpeg/ffmpeg-mips64_cpu_detection.patch | 30 ++++++++++ make/ffmpeg.mk | 23 ++++---- make/versions.mk | 2 +- 13 files changed, 83 insertions(+), 135 deletions(-) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-fix_mpegts.patch => ffmpeg-02-fix_mpegts.patch} (78%) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-allow_to_choose_rtmp_impl_at_runtime.patch => ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch} (90%) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-hls_replace_key_uri.patch => ffmpeg-04-hls_replace_key_uri.patch} (82%) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-optimize_aac.patch => ffmpeg-06-optimize_aac.patch} (86%) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-increase_buffer_size.patch => ffmpeg-07-increase_buffer_size.patch} (89%) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-fix_hls.patch => ffmpeg-08-recheck_discard_flags.patch} (94%) rename archive-patches/ffmpeg/{ffmpeg-4.1.3-fix_edit_list_parsing.patch => ffmpeg-09-fix_edit_list_parsing.patch} (88%) delete mode 100644 archive-patches/ffmpeg/ffmpeg-4.1.3-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch delete mode 100644 archive-patches/ffmpeg/ffmpeg-4.1.3-corrupt-h264-frames.patch delete mode 100644 archive-patches/ffmpeg/ffmpeg-4.1.3-mpeg-quarter-sample.patch create mode 100644 archive-patches/ffmpeg/ffmpeg-mips64_cpu_detection.patch diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-fix_mpegts.patch b/archive-patches/ffmpeg/ffmpeg-02-fix_mpegts.patch similarity index 78% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-fix_mpegts.patch rename to archive-patches/ffmpeg/ffmpeg-02-fix_mpegts.patch index c98f2f6..83c7feb 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-fix_mpegts.patch +++ b/archive-patches/ffmpeg/ffmpeg-02-fix_mpegts.patch @@ -1,6 +1,6 @@ --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c -@@ -948,10 +948,12 @@ +@@ -1014,10 +1014,12 @@ static int new_pes_packet(PESContext *pes, AVPacket *pkt) pes->buffer = NULL; reset_pes_packet_state(pes); diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-allow_to_choose_rtmp_impl_at_runtime.patch b/archive-patches/ffmpeg/ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch similarity index 90% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-allow_to_choose_rtmp_impl_at_runtime.patch rename to archive-patches/ffmpeg/ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch index 4463417..dd9192b 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-allow_to_choose_rtmp_impl_at_runtime.patch +++ b/archive-patches/ffmpeg/ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -3291,10 +3291,8 @@ +@@ -3353,10 +3353,8 @@ xv_outdev_deps="xlib" # protocols async_protocol_deps="threads" bluray_protocol_deps="libbluray" @@ -11,7 +11,7 @@ ffrtmphttp_protocol_select="http_protocol" ftp_protocol_select="tcp_protocol" gopher_protocol_select="network" -@@ -3307,20 +3305,18 @@ +@@ -3369,20 +3367,18 @@ https_protocol_suggest="zlib" icecast_protocol_select="http_protocol" mmsh_protocol_select="http_protocol" mmst_protocol_select="network" @@ -46,7 +46,7 @@ sctp_protocol_deps="struct_sctp_event_subscribe struct_msghdr_msg_flags" --- a/libavformat/Makefile +++ b/libavformat/Makefile -@@ -593,12 +593,12 @@ +@@ -599,12 +599,12 @@ OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o OBJS-$(CONFIG_PIPE_PROTOCOL) += file.o OBJS-$(CONFIG_PROMPEG_PROTOCOL) += prompeg.o @@ -67,7 +67,7 @@ OBJS-$(CONFIG_SRTP_PROTOCOL) += srtpproto.o srtp.o --- a/libavformat/protocols.c +++ b/libavformat/protocols.c -@@ -44,12 +44,12 @@ +@@ -44,12 +44,12 @@ extern const URLProtocol ff_mmst_protocol; extern const URLProtocol ff_md5_protocol; extern const URLProtocol ff_pipe_protocol; extern const URLProtocol ff_prompeg_protocol; @@ -88,7 +88,7 @@ extern const URLProtocol ff_srtp_protocol; --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c -@@ -2592,7 +2592,7 @@ +@@ -2592,7 +2592,7 @@ static int inject_fake_duration_metadata(RTMPContext *rt) static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **opts) { RTMPContext *rt = s->priv_data; @@ -97,7 +97,7 @@ char *old_app, *qmark, *n, fname_buffer[1024]; uint8_t buf[2048]; int port; -@@ -2603,7 +2603,9 @@ +@@ -2603,7 +2603,9 @@ static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **o rt->is_input = !(flags & AVIO_FLAG_WRITE); @@ -108,7 +108,7 @@ hostname, sizeof(hostname), &port, path, sizeof(path), s->filename); -@@ -3137,9 +3139,9 @@ +@@ -3137,9 +3139,9 @@ const URLProtocol ff_##flavor##_protocol = { \ }; diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-hls_replace_key_uri.patch b/archive-patches/ffmpeg/ffmpeg-04-hls_replace_key_uri.patch similarity index 82% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-hls_replace_key_uri.patch rename to archive-patches/ffmpeg/ffmpeg-04-hls_replace_key_uri.patch index 25bff13..f5e1101 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-hls_replace_key_uri.patch +++ b/archive-patches/ffmpeg/ffmpeg-04-hls_replace_key_uri.patch @@ -1,6 +1,6 @@ --- a/libavformat/hls.c +++ b/libavformat/hls.c -@@ -208,6 +208,8 @@ +@@ -207,6 +207,8 @@ typedef struct HLSContext { int max_reload; int http_persistent; int http_multiple; @@ -9,7 +9,7 @@ AVIOContext *playlist_pb; } HLSContext; -@@ -1198,8 +1200,16 @@ +@@ -1205,8 +1207,16 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg, } else if (seg->key_type == KEY_AES_128) { char iv[33], key[33], url[MAX_URL_SIZE]; if (strcmp(seg->key, pls->key_url)) { @@ -26,8 +26,8 @@ + if (open_url(pls->parent, &pb, key_url, c->avio_opts, opts, NULL) == 0) { ret = avio_read(pb, pls->key, sizeof(pls->key)); if (ret != sizeof(pls->key)) { - av_log(NULL, AV_LOG_ERROR, "Unable to read key file %s\n", -@@ -1211,6 +1221,8 @@ + av_log(pls->parent, AV_LOG_ERROR, "Unable to read key file %s\n", +@@ -1218,6 +1228,8 @@ static int open_input(HLSContext *c, struct playlist *pls, struct segment *seg, seg->key); } av_strlcpy(pls->key_url, seg->key, sizeof(pls->key_url)); @@ -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 @@ +@@ -2319,6 +2331,8 @@ static const AVOption hls_options[] = { 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}, diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-optimize_aac.patch b/archive-patches/ffmpeg/ffmpeg-06-optimize_aac.patch similarity index 86% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-optimize_aac.patch rename to archive-patches/ffmpeg/ffmpeg-06-optimize_aac.patch index 2f97e1e..e207f52 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-optimize_aac.patch +++ b/archive-patches/ffmpeg/ffmpeg-06-optimize_aac.patch @@ -1,17 +1,17 @@ ---- a/libavcodec/mdct_template.c -+++ b/libavcodec/mdct_template.c -@@ -102,7 +102,7 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale) - * @param output N/2 samples - * @param input N/2 samples +--- a/libavcodec/aacdec_template.c ++++ b/libavcodec/aacdec_template.c +@@ -2482,7 +2482,7 @@ static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt, + * @param decode 1 if tool is used normally, 0 if tool is used in LTP. + * @param coef spectral coefficients */ --void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input) -+void __attribute__((optimize(0))) ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input) +-static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, ++static __attribute__((optimize(0))) void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, + IndividualChannelStream *ics, int decode) { - int k, n8, n4, n2, n, j; - const uint16_t *revtab = s->revtab; + const int mmm = FFMIN(ics->tns_max_bands, ics->max_sfb); --- a/libavcodec/aacps.c +++ b/libavcodec/aacps.c -@@ -659,7 +659,7 @@ +@@ -659,7 +659,7 @@ static void map_val_20_to_34(INTFLOAT par[PS_MAX_NR_IIDICC]) par[ 1] = AAC_HALF_SUM(par[ 0], par[ 1]); } @@ -22,7 +22,7 @@ LOCAL_ALIGNED_16(INTFLOAT, transient_gain, [34], [PS_QMF_TIME_SLOTS]); --- a/libavcodec/fft_template.c +++ b/libavcodec/fft_template.c -@@ -538,7 +538,7 @@ +@@ -562,7 +562,7 @@ static void fft##n(FFTComplex *z)\ pass(z,FFT_NAME(ff_cos_##n),n4/2);\ } @@ -31,7 +31,7 @@ { FFTDouble t1, t2, t3, t4, t5, t6, t7, t8; -@@ -552,7 +552,7 @@ +@@ -576,7 +576,7 @@ static void fft4(FFTComplex *z) BF(z[2].im, z[0].im, t2, t5); } @@ -40,14 +40,14 @@ { FFTDouble t1, t2, t3, t4, t5, t6; ---- a/libavcodec/aacdec_template.c -+++ b/libavcodec/aacdec_template.c -@@ -2483,7 +2483,7 @@ - * @param decode 1 if tool is used normally, 0 if tool is used in LTP. - * @param coef spectral coefficients +--- a/libavcodec/mdct_template.c ++++ b/libavcodec/mdct_template.c +@@ -102,7 +102,7 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale) + * @param output N/2 samples + * @param input N/2 samples */ --static void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, -+static __attribute__((optimize(0))) void apply_tns(INTFLOAT coef_param[1024], TemporalNoiseShaping *tns, - IndividualChannelStream *ics, int decode) +-void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input) ++void __attribute__((optimize(0))) ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input) { - const int mmm = FFMIN(ics->tns_max_bands, ics->max_sfb); + int k, n8, n4, n2, n, j; + const uint16_t *revtab = s->revtab; diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-increase_buffer_size.patch b/archive-patches/ffmpeg/ffmpeg-07-increase_buffer_size.patch similarity index 89% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-increase_buffer_size.patch rename to archive-patches/ffmpeg/ffmpeg-07-increase_buffer_size.patch index 6ea31db..824dfbc 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-increase_buffer_size.patch +++ b/archive-patches/ffmpeg/ffmpeg-07-increase_buffer_size.patch @@ -1,6 +1,6 @@ --- a/libavformat/avio.h +++ b/libavformat/avio.h -@@ -290,12 +290,6 @@ typedef struct AVIOContext { +@@ -290,13 +290,6 @@ typedef struct AVIOContext { */ int writeout_count; @@ -10,9 +10,10 @@ - * This field is internal to libavformat and access from outside is not allowed. - */ - int orig_buffer_size; - +- /** * Threshold to favor readahead over seek. + * This is current internal only, do not use from outside. --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -33,7 +33,7 @@ @@ -32,11 +33,11 @@ s->buffer_size = buffer_size; s->buf_ptr = buffer; s->buf_ptr_max = buffer; -@@ -570,16 +569,16 @@ static void fill_buffer(AVIOContext *s) +@@ -570,15 +569,16 @@ static void fill_buffer(AVIOContext *s) } /* make buffer smaller in case it ended up large after probing */ -- if (s->read_packet && s->orig_buffer_size && s->buffer_size > s->orig_buffer_size) { +- if (s->read_packet && s->orig_buffer_size && s->buffer_size > s->orig_buffer_size && len >= s->orig_buffer_size) { + if (s->read_packet && s->buffer_size > max_buffer_size) { if (dst == s->buffer && s->buf_ptr != dst) { - int ret = ffio_set_buf_size(s, s->orig_buffer_size); @@ -46,14 +47,13 @@ s->checksum_ptr = dst = s->buffer; } -- av_assert0(len >= s->orig_buffer_size); - len = s->orig_buffer_size; + av_assert0(len >= max_buffer_size); + len = max_buffer_size; } len = read_packet_wrapper(s, dst, len); -@@ -1087,7 +1086,6 @@ int ffio_set_buf_size(AVIOContext *s, int buf_size) +@@ -1086,7 +1086,6 @@ int ffio_set_buf_size(AVIOContext *s, int buf_size) av_free(s->buffer); s->buffer = buffer; diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-fix_hls.patch b/archive-patches/ffmpeg/ffmpeg-08-recheck_discard_flags.patch similarity index 94% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-fix_hls.patch rename to archive-patches/ffmpeg/ffmpeg-08-recheck_discard_flags.patch index 2be7277..35e3be0 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-fix_hls.patch +++ b/archive-patches/ffmpeg/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; diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-fix_edit_list_parsing.patch b/archive-patches/ffmpeg/ffmpeg-09-fix_edit_list_parsing.patch similarity index 88% rename from archive-patches/ffmpeg/ffmpeg-4.1.3-fix_edit_list_parsing.patch rename to archive-patches/ffmpeg/ffmpeg-09-fix_edit_list_parsing.patch index 36df835..a182401 100644 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-fix_edit_list_parsing.patch +++ b/archive-patches/ffmpeg/ffmpeg-09-fix_edit_list_parsing.patch @@ -1,6 +1,6 @@ --- a/libavformat/mov.c +++ b/libavformat/mov.c -@@ -3558,8 +3558,10 @@ +@@ -3558,8 +3558,10 @@ static void mov_fix_index(MOVContext *mov, AVStream *st) if (ctts_data_old && ctts_index_old < ctts_count_old) { curr_ctts = ctts_data_old[ctts_index_old].duration; diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch b/archive-patches/ffmpeg/ffmpeg-4.1.3-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch deleted file mode 100644 index 77f1375..0000000 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- 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); diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-corrupt-h264-frames.patch b/archive-patches/ffmpeg/ffmpeg-4.1.3-corrupt-h264-frames.patch deleted file mode 100644 index acc3854..0000000 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-corrupt-h264-frames.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- 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); diff --git a/archive-patches/ffmpeg/ffmpeg-4.1.3-mpeg-quarter-sample.patch b/archive-patches/ffmpeg/ffmpeg-4.1.3-mpeg-quarter-sample.patch deleted file mode 100644 index aa74c54..0000000 --- a/archive-patches/ffmpeg/ffmpeg-4.1.3-mpeg-quarter-sample.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- 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; diff --git a/archive-patches/ffmpeg/ffmpeg-mips64_cpu_detection.patch b/archive-patches/ffmpeg/ffmpeg-mips64_cpu_detection.patch new file mode 100644 index 0000000..5a78cb4 --- /dev/null +++ b/archive-patches/ffmpeg/ffmpeg-mips64_cpu_detection.patch @@ -0,0 +1,30 @@ +It will add -mips64r6 and -mips64r2 to cmdline which will +cause conflicts + +in OE we user mips32r2 and mips64r2 for mips arch versions +so there is no benefit of detecting it automatically by +poking at tools especially in cross env + +Fixes errors like + +linking -mnan=2008 module with previous -mnan=legacy modules +failed to merge target specific data of file + +-Khem +Upstream-Status: Inappropriate [OE-Specific] + +--- a/configure ++++ b/configure +@@ -5758,12 +5758,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 diff --git a/make/ffmpeg.mk b/make/ffmpeg.mk index 2ce647a..3e75670 100644 --- a/make/ffmpeg.mk +++ b/make/ffmpeg.mk @@ -438,26 +438,23 @@ FFMPEG_CONFIGURE += --cpu=cortex-a15 --disable-vfp --extra-cflags="-Wno-deprecat endif # -# ffmpeg_patches +# ffmpeg_patch # -FFMPEG_PATCHES = \ - ffmpeg-$(FFMPEG_VER)-fix_hls.patch \ - ffmpeg-$(FFMPEG_VER)-increase_buffer_size.patch \ - ffmpeg-$(FFMPEG_VER)-optimize_aac.patch \ - ffmpeg-$(FFMPEG_VER)-fix_edit_list_parsing.patch \ - ffmpeg-$(FFMPEG_VER)-fix_mpegts.patch \ - ffmpeg-$(FFMPEG_VER)-allow_to_choose_rtmp_impl_at_runtime.patch \ - ffmpeg-$(FFMPEG_VER)-hls_replace_key_uri.patch \ - ffmpeg-$(FFMPEG_VER)-corrupt-h264-frames.patch \ - ffmpeg-$(FFMPEG_VER)-FFmpeg-devel-amfenc-Add-support-for-pict_type-field.patch \ - ffmpeg-$(FFMPEG_VER)-mpeg-quarter-sample.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-mips64_cpu_detection.patch ffmpeg-armbox: $(ARCHIVE)/ffmpeg-$(FFMPEG_VER).tar.xz | $(TARGETPREFIX) $(START_BUILD) $(REMOVE)/ffmpeg-$(FFMPEG_VER) $(UNTAR)/ffmpeg-$(FFMPEG_VER).tar.xz set -e; pushd $(BUILD_TMP)/ffmpeg-$(FFMPEG_VER) && \ - for i in $(FFMPEG_PATCHES); do \ + for i in $(FFMPEG_PATCH); do \ echo -e "==> $(TERM_RED)Applying Patch:$(TERM_NORMAL) $$i"; \ $(PATCH)/ffmpeg/$$i; \ done; \ diff --git a/make/versions.mk b/make/versions.mk index fa015cf..93b300b 100644 --- a/make/versions.mk +++ b/make/versions.mk @@ -71,7 +71,7 @@ FBSHOT_VER = 0.3 # FFMPEG | A complete, cross-platform solution to record, convert and stream audio and video ifeq ($(BOXTYPE), armbox) -FFMPEG_VER = 4.1.3 +FFMPEG_VER = 4.2 else FFMPEG_GIT = 2ba896f endif -- 2.39.5