Browse Source

- ffmpeg-armbox: bump version to 4.2

master
vanhofen 6 years ago
parent
commit
55f50ed5eb
  1. 6
      make/target-ffmpeg-armbox.mk
  2. 2
      patches/ffmpeg-02-fix_mpegts.patch
  3. 14
      patches/ffmpeg-03-allow_to_choose_rtmp_impl_at_runtime.patch
  4. 10
      patches/ffmpeg-04-hls_replace_key_uri.patch
  5. 42
      patches/ffmpeg-06-optimize_aac.patch
  6. 12
      patches/ffmpeg-07-increase_buffer_size.patch
  7. 2
      patches/ffmpeg-09-fix_edit_list_parsing.patch
  8. 17
      patches/ffmpeg-mips64_cpu_detection.patch

6
make/target-ffmpeg-armbox.mk

@ -3,7 +3,7 @@
#
# -----------------------------------------------------------------------------
FFMPEG_VER = 4.1.3
FFMPEG_VER = 4.2
FFMPEG_TMP = ffmpeg-$(FFMPEG_VER)
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VER).tar.xz
FFMPEG_URL = http://www.ffmpeg.org/releases
@ -18,10 +18,6 @@ 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
FFMPEG_UNPATCHED := no

2
patches/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);

14
patches/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 = { \
};

10
patches/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);
@@ -2313,6 +2325,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},

42
patches/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;

12
patches/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;

2
patches/ffmpeg-09-fix_edit_list_parsing.patch

@ -1,6 +1,6 @@
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3561,8 +3561,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;

17
patches/ffmpeg-mips64_cpu_detection.patch

@ -1,6 +1,21 @@
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
@@ -5646,12 +5646,9 @@ elif enabled mips; then
@@ -5758,12 +5758,9 @@ elif enabled mips; then
# Enable minimum ISA based on selected options
if enabled mips64; then

Loading…
Cancel
Save