Move all to deprecated folder.

This commit is contained in:
2016-11-16 21:57:57 +01:00
parent 01738a7684
commit 05de7d6c04
9777 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
From 74f1c9b43b191a9d6b494e90a4a11677fca33c13 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sun, 11 Sep 2011 19:04:51 +0200
Subject: [PATCH 01/13] Support raw dvdsub palette as stored on normal dvd's
This is how the palette is stored on dvd's. Currently
only xbmc passes the palette information to libavcodec
this way.
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 39604f3..a711e16 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -64,6 +64,24 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t *
}
}
+static void ayvu_to_argb(const uint8_t *ayvu, uint32_t *argb, int num_values)
+{
+ uint8_t *cm = ff_crop_tab + MAX_NEG_CROP;
+ uint8_t r, g, b;
+ int i, y, cb, cr, a;
+ int r_add, g_add, b_add;
+
+ for (i = num_values; i > 0; i--) {
+ a = *ayvu++;
+ y = *ayvu++;
+ cr = *ayvu++;
+ cb = *ayvu++;
+ YUV_TO_RGB1_CCIR(cb, cr);
+ YUV_TO_RGB2_CCIR(r, g, b, y);
+ *argb++ = (a << 24) | (r << 16) | (g << 8) | b;
+ }
+}
+
static int decode_run_2bit(GetBitContext *gb, int *color)
{
unsigned int v, t;
@@ -697,6 +715,12 @@ static av_cold int dvdsub_init(AVCodecContext *avctx)
parse_ifo_palette(ctx, ctx->ifo_str);
if (ctx->palette_str)
parse_palette(ctx, ctx->palette_str);
+
+ if (!ctx->has_palette && avctx->extradata_size == 64) {
+ ayvu_to_argb((uint8_t*)avctx->extradata, ctx->palette, 16);
+ ctx->has_palette = 1;
+ }
+
if (ctx->has_palette) {
int i;
av_log(avctx, AV_LOG_DEBUG, "palette:");
--
2.1.0

View File

@@ -0,0 +1,32 @@
From 54200b3e6009c6870e33c02c8bbcf023fcd92cac Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Mon, 28 Jun 2010 01:55:31 -0400
Subject: [PATCH 03/13] if av_read_packet returns AVERROR_IO, we are done.
ffmpeg's codecs might or might not handle returning any completed demuxed
packets correctly
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ae6347a..3e8af50 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1304,6 +1304,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
if (ret < 0) {
if (ret == AVERROR(EAGAIN))
return ret;
+ if (ret == AVERROR(EIO))
+ return ret;
/* flush the parsers */
for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i];
--
2.1.0

View File

@@ -0,0 +1,47 @@
From e9236f6fe3fae1ad4a3a2b6b63db493b083f0b21 Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Mon, 28 Jun 2010 02:10:50 -0400
Subject: [PATCH 04/13] added: Ticket #7187, TV Teletext support for DVB EBU
Teletext streams
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavcodec/avcodec.h | 4 ++++
libavformat/mpegts.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index dabae1b..dd6ef3f 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -520,6 +520,10 @@ enum AVCodecID {
AV_CODEC_ID_PJS = MKBETAG('P','h','J','S'),
AV_CODEC_ID_ASS = MKBETAG('A','S','S',' '), ///< ASS as defined in Matroska
+ /* data codecs */
+ AV_CODEC_ID_VBI_DATA= 0x17500,
+ AV_CODEC_ID_VBI_TELETEXT,
+
/* other specific kind of codecs (generally used for attachments) */
AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
AV_CODEC_ID_TTF = 0x18000,
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 97da0a3..5dd28f1 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -729,6 +729,8 @@ static const StreamType DESC_types[] = {
{ 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
{ 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT },
{ 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
+ { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_VBI_DATA }, /* VBI Data descriptor */
+ { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_VBI_TELETEXT }, /* VBI Teletext descriptor */
{ 0 },
};
--
2.1.0

View File

@@ -0,0 +1,46 @@
From 1f48ee2290e9041b0371eb9a9cb742e9568930a1 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sun, 18 Sep 2011 19:16:34 +0200
Subject: [PATCH 05/13] Don't accept mpegts PMT that isn't current
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mpegts.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 5dd28f1..9f85aed 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -572,6 +572,7 @@ typedef struct SectionHeader {
uint8_t tid;
uint16_t id;
uint8_t version;
+ uint8_t current;
uint8_t sec_num;
uint8_t last_sec_num;
} SectionHeader;
@@ -643,6 +644,7 @@ static int parse_section_header(SectionHeader *h,
val = get8(pp, p_end);
if (val < 0)
return val;
+ h->current = val & 0x1;
h->version = (val >> 1) & 0x1f;
val = get8(pp, p_end);
if (val < 0)
@@ -1968,6 +1970,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
return;
if (ts->skip_changes)
return;
+ if (!h->current)
+ return;
ts->stream->ts_id = h->id;
--
2.1.0

View File

@@ -0,0 +1,48 @@
From db98fbe37f2f7175ff03b8d582e940518ddf3642 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sun, 18 Sep 2011 19:17:23 +0200
Subject: [PATCH 06/13] Don't reparse PMT unless it's version has changed
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mpegts.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 9f85aed..25007a6 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -88,6 +88,7 @@ struct MpegTSFilter {
int es_id;
int last_cc; /* last cc code (-1 if first packet) */
int64_t last_pcr;
+ int last_version; /* last version of data on this pid */
enum MpegTSFilterType type;
union {
MpegTSPESFilter pes_filter;
@@ -450,6 +451,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid,
filter->es_id = -1;
filter->last_cc = -1;
filter->last_pcr= -1;
+ filter->last_version = -1;
return filter;
}
@@ -1972,6 +1974,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
return;
if (!h->current)
return;
+ if (h->version == filter->last_version)
+ return;
+ filter->last_version = h->version;
+ av_dlog(ts->stream, "version=%d\n", filter->last_version);
ts->stream->ts_id = h->id;
--
2.1.0

View File

@@ -0,0 +1,105 @@
From fdd8caea6535434a877587f5325e914ba50ed17f Mon Sep 17 00:00:00 2001
From: Cory Fields <theuni-nospam-@xbmc.org>
Date: Fri, 9 Jul 2010 16:43:31 -0400
Subject: [PATCH 07/13] Read PID timestamps as well as PCR timestamps to find
location in mpegts stream
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mpegts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 25007a6..d5a8a45 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -2459,6 +2459,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) {
av_log(s, pb->seekable ? AV_LOG_ERROR : AV_LOG_INFO, "Unable to seek back to the start\n");
}
+static int parse_timestamp(int64_t *ts, const uint8_t *buf)
+{
+ int afc, flags;
+ const uint8_t *p;
+
+ if(!(buf[1] & 0x40)) /* must be a start packet */
+ return -1;
+
+ afc = (buf[3] >> 4) & 3;
+ p = buf + 4;
+ if (afc == 0 || afc == 2) /* invalid or only adaption field */
+ return -1;
+ if (afc == 3)
+ p += p[0] + 1;
+ if (p >= buf + TS_PACKET_SIZE)
+ return -1;
+
+ if (p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01) /* packet_start_code_prefix */
+ return -1;
+
+ flags = p[3] | 0x100; /* stream type */
+ if (!((flags >= 0x1c0 && flags <= 0x1df) ||
+ (flags >= 0x1e0 && flags <= 0x1ef) ||
+ (flags == 0x1bd) || (flags == 0x1fd)))
+ return -1;
+
+ flags = p[7];
+ if ((flags & 0xc0) == 0x80) {
+ *ts = ff_parse_pes_pts(p+9);
+ return 0;
+ } else if ((flags & 0xc0) == 0xc0) {
+ *ts = ff_parse_pes_pts(p+9+5);
+ return 0;
+ }
+ return -1;
+}
+
+
static int mpegts_read_header(AVFormatContext *s)
{
MpegTSContext *ts = s->priv_data;
@@ -2658,6 +2696,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
uint8_t buf[TS_PACKET_SIZE];
int pcr_l, pcr_pid =
((PESContext *)s->streams[stream_index]->priv_data)->pcr_pid;
+ int pid = ((PESContext*)s->streams[stream_index]->priv_data)->pid;
int pos47 = ts->pos47_full % ts->raw_packet_size;
pos =
((*ppos + ts->raw_packet_size - 1 - pos47) / ts->raw_packet_size) *
@@ -2679,6 +2718,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
*ppos = pos;
return timestamp;
}
+ if ((pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pid) &&
+ parse_timestamp(&timestamp, buf) == 0) {
+ *ppos = pos;
+ return timestamp;
+ }
pos += ts->raw_packet_size;
}
@@ -2778,7 +2822,7 @@ AVInputFormat ff_mpegts_demuxer = {
.read_header = mpegts_read_header,
.read_packet = mpegts_read_packet,
.read_close = mpegts_read_close,
- .read_timestamp = mpegts_get_dts,
+ .read_timestamp = mpegts_get_pcr,
.flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
.priv_class = &mpegts_class,
};
@@ -2790,7 +2834,7 @@ AVInputFormat ff_mpegtsraw_demuxer = {
.read_header = mpegts_read_header,
.read_packet = mpegts_raw_read_packet,
.read_close = mpegts_read_close,
- .read_timestamp = mpegts_get_dts,
+ .read_timestamp = mpegts_get_pcr,
.flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT,
.priv_class = &mpegtsraw_class,
};
--
2.1.0

View File

@@ -0,0 +1,74 @@
From c57e5b8154f5fe1457f4c64e04885a2cdfb37f51 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sat, 22 Oct 2011 19:01:38 +0200
Subject: [PATCH 08/13] Get stream durations using read_timestamp
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3e8af50..f4fb172 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2356,6 +2356,41 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic)
#define DURATION_MAX_READ_SIZE 250000LL
#define DURATION_MAX_RETRY 4
+static void av_estimate_timings_from_pts2(AVFormatContext *ic, int64_t old_offset)
+{
+ AVStream *st;
+ int i, step= 1024;
+ int64_t ts, pos;
+
+ for(i=0;i<ic->nb_streams;i++) {
+ st = ic->streams[i];
+
+ pos = 0;
+ ts = ic->iformat->read_timestamp(ic, i, &pos, DURATION_MAX_READ_SIZE);
+ if (ts == AV_NOPTS_VALUE)
+ continue;
+ if (st->start_time > ts || st->start_time == AV_NOPTS_VALUE)
+ st->start_time = ts;
+
+ pos = avio_size(ic->pb) - 1;
+ do {
+ pos -= step;
+ ts = ic->iformat->read_timestamp(ic, i, &pos, pos + step);
+ step += step;
+ } while (ts == AV_NOPTS_VALUE && pos >= step && step < DURATION_MAX_READ_SIZE);
+
+ if (ts == AV_NOPTS_VALUE)
+ continue;
+
+ if (st->duration < ts - st->start_time || st->duration == AV_NOPTS_VALUE)
+ st->duration = ts - st->start_time;
+ }
+
+ fill_all_stream_timings(ic);
+
+ avio_seek(ic->pb, old_offset, SEEK_SET);
+}
+
/* only usable for MPEG-PS streams */
static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
{
@@ -2506,6 +2541,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
* the components */
fill_all_stream_timings(ic);
ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
+ } else if (ic->iformat->read_timestamp &&
+ file_size && ic->pb->seekable) {
+ /* get accurate estimate from the PTSes */
+ av_estimate_timings_from_pts2(ic, old_offset);
} else {
/* less precise: use bitrate info */
estimate_timings_from_bit_rate(ic);
--
2.1.0

View File

@@ -0,0 +1,33 @@
From 4bcec3ef0042244b0ade00d132368d0872f73c72 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Wed, 8 Dec 2010 14:03:43 +0000
Subject: [PATCH 09/13] changed: allow 4 second skew between streams in mov
before attempting to seek
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mov.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8d66c0a..127ffd9 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4028,8 +4028,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
(s->pb->seekable &&
((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
- ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
- (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
+ ((FFABS(best_dts - dts) <= 4*AV_TIME_BASE && current_sample->pos < sample->pos) ||
+ (FFABS(best_dts - dts) > 4*AV_TIME_BASE && dts < best_dts)))))) {
sample = current_sample;
best_dts = dts;
*st = avst;
--
2.1.0

View File

@@ -0,0 +1,44 @@
From cb7c19124165508ae5f38a385a14f9c13b096a27 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Fri, 26 Nov 2010 20:56:48 +0000
Subject: [PATCH 10/13] fixed: memleak in mpegts demuxer on some malformed (??)
mpegts files with too large pes packets
at-visions sample file brokenStream.mpg
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mpegts.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index d5a8a45..e070f1f 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -832,6 +832,10 @@ static void reset_pes_packet_state(PESContext *pes)
static void new_pes_packet(PESContext *pes, AVPacket *pkt)
{
+ if(pkt->data) {
+ av_log(pes->stream, AV_LOG_ERROR, "ignoring previously allocated packet on stream %d\n", pkt->stream_index);
+ av_free_packet(pkt);
+ }
av_init_packet(pkt);
pkt->buf = pes->buffer;
@@ -2649,6 +2653,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->size = -1;
ts->pkt = pkt;
+ ts->pkt->data = NULL;
+
ret = handle_packets(ts, 0);
if (ret < 0) {
av_free_packet(ts->pkt);
--
2.1.0

View File

@@ -0,0 +1,30 @@
From c315a758a292200c22925603682e259849d6d558 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Mon, 28 Jun 2010 21:26:54 +0000
Subject: [PATCH 11/13] Speed up mpegts av_find_stream_info
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavformat/mpegts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index e070f1f..dd9e129 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -994,7 +994,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
goto skip;
/* stream not present in PMT */
- if (!pes->st) {
+ if (ts->auto_guess && !pes->st) {
if (ts->skip_changes)
goto skip;
--
2.1.0

View File

@@ -0,0 +1,77 @@
From 939ebbbc46ca9995637415594f1815633587104f Mon Sep 17 00:00:00 2001
From: marc <mhocking@ubuntu-desktop.(none)>
Date: Mon, 18 Feb 2013 17:18:18 +0000
Subject: [PATCH 12/13] dxva-h264 Fix dxva playback of streams that don't start
with an I-Frame.
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
libavcodec/dxva2_h264.c | 8 ++++++++
libavcodec/h264.c | 1 +
libavcodec/h264.h | 2 ++
libavcodec/h264_slice.c | 1 +
4 files changed, 12 insertions(+)
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 6deccc3..85b25fd 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -451,6 +451,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
return -1;
+
+ // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs
+ if (!h->got_first_iframe) {
+ if (!(ctx_pic->pp.wBitFields & (1 << 15)))
+ return -1;
+ h->got_first_iframe = 1;
+ }
+
ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f,
&ctx_pic->pp, sizeof(ctx_pic->pp),
&ctx_pic->qm, sizeof(ctx_pic->qm),
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 222bf58..ea2ec17 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1085,6 +1085,7 @@ void ff_h264_flush_change(H264Context *h)
h->mmco_reset = 1;
for (i = 0; i < h->nb_slice_ctx; i++)
h->slice_ctx[i].list_count = 0;
+ h->got_first_iframe = 0;
}
/* forget old pics after a seek */
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index b94f06b..bc9458b 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -741,6 +741,8 @@ typedef struct H264Context {
int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag
int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag
+ int got_first_iframe;
+
// Timestamp stuff
int sei_buffering_period_present; ///< Buffering period SEI flag
int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 53f61ca..b171d78 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1189,6 +1189,7 @@ static int h264_slice_header_init(H264Context *h, int reinit)
ff_h264_free_tables(h, 0);
h->first_field = 0;
h->prev_interlaced_frame = 1;
+ h->got_first_iframe = 0;
init_scan_tables(h);
ret = ff_h264_alloc_tables(h);
--
2.1.0

View File

@@ -0,0 +1,53 @@
From 7d7ce18ff0d24b586634fa6e631fa0eec7865aae Mon Sep 17 00:00:00 2001
From: elupus <elupus@xbmc.org>
Date: Tue, 1 Nov 2011 20:18:35 +0100
Subject: [PATCH 13/13] add public version of ff_read_frame_flush
We need this since we sometimes seek on the
input stream behind ffmpeg's back. After this
all data need to be flushed completely.
Patch part of the XBMC patch set for ffmpeg, downloaded from
https://github.com/xbmc/FFmpeg/.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
libavformat/avformat.h | 5 +++++
libavformat/utils.c | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 2e54ed1..3a9f292 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2121,6 +2121,11 @@ int av_find_best_stream(AVFormatContext *ic,
int av_read_frame(AVFormatContext *s, AVPacket *pkt);
/**
+ * Clear out any buffered data in context
+ */
+void av_read_frame_flush(AVFormatContext *s);
+
+/**
* Seek to the keyframe at timestamp.
* 'timestamp' in 'stream_index'.
*
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f4fb172..10dda18 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1624,6 +1624,11 @@ void ff_read_frame_flush(AVFormatContext *s)
}
}
+void av_read_frame_flush(AVFormatContext *s)
+{
+ ff_read_frame_flush(s);
+}
+
void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)
{
int i;
--
2.1.0

View File

@@ -0,0 +1,167 @@
menuconfig BR2_PACKAGE_FFMPEG
bool "ffmpeg"
# fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2
depends on !BR2_nios2
help
FFmpeg is a complete, cross-platform solution to record, convert
and stream audio and video.
http://www.ffmpeg.org
if BR2_PACKAGE_FFMPEG
config BR2_PACKAGE_FFMPEG_GPL
bool "Enable GPL code"
help
allow use of GPL code, the resulting libs and binaries will
be under GPL
config BR2_PACKAGE_FFMPEG_NONFREE
bool "Enable nonfree code"
help
allow use of nonfree code, the resulting libs and binaries
will be unredistributable
config BR2_PACKAGE_FFMPEG_FFMPEG
bool "Build ffmpeg (the command line application)"
default y
help
FFmpeg is a very fast video and audio converter.
It can also grab from a live audio/video source.
It is not needed if you want to link the FFmpeg libraries
to your application.
config BR2_PACKAGE_FFMPEG_FFPLAY
bool "Build ffplay"
select BR2_PACKAGE_FFMPEG_SWSCALE
select BR2_PACKAGE_SDL
help
FFplay is a very simple and portable media player using the
FFmpeg libraries and the SDL library.
It is mostly used as a testbed for the various FFmpeg APIs.
config BR2_PACKAGE_FFMPEG_FFSERVER
bool "Build ffserver"
depends on BR2_USE_MMU # fork()
help
FFserver is a streaming server for both audio and video.
config BR2_PACKAGE_FFMPEG_FFPROBE
bool "Build ffprobe"
help
FFprobe is a utility to determine the audio and video
characteristics of a container file.
config BR2_PACKAGE_FFMPEG_AVRESAMPLE
bool "Build libavresample"
help
Avresample is a audio conversion library for compatibility.
config BR2_PACKAGE_FFMPEG_POSTPROC
bool "Build libpostproc"
depends on BR2_PACKAGE_FFMPEG_GPL
help
Postproc is a library of video postprocessing routines.
config BR2_PACKAGE_FFMPEG_SWSCALE
bool "Build libswscale"
help
Swscale is a library of video scaling routines.
config BR2_PACKAGE_FFMPEG_ENCODERS
string "Enabled encoders"
default "all"
help
Space-separated list of encoders to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-encoders in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_DECODERS
string "Enabled decoders"
default "all"
help
Space-separated list of decoders to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-decoders in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_MUXERS
string "Enabled muxers"
default "all"
help
Space-separated list of muxers to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-muxers in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_DEMUXERS
string "Enabled demuxers"
default "all"
help
Space-separated list of demuxers to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-demuxers in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_PARSERS
string "Enabled parsers"
default "all"
help
Space-separated list of parsers to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-parsers in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_BSFS
string "Enabled bitstreams"
default "all"
help
Space-separated list of bitstream filters to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-bsfs in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_PROTOCOLS
string "Enabled protocols"
default "all"
help
Space-separated list of protocols to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-protocols in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_FILTERS
string "Enabled filters"
default "all"
help
Space-separated list of filters to build in FFmpeg,
or "all" to build all of them.
Run ./configure --list-filters in the ffmpeg sources
directory to know the available options.
config BR2_PACKAGE_FFMPEG_INDEVS
bool "Enable input devices"
default y
config BR2_PACKAGE_FFMPEG_OUTDEVS
bool "Enable output devices"
default y
config BR2_PACKAGE_FFMPEG_EXTRACONF
string "Additional parameters for ./configure"
default ""
help
Extra parameters that will be appended to FFmpeg's
./configure commandline.
endif

View File

@@ -0,0 +1,2 @@
# Locally calculated
sha256 25bcedbdafadac3d09c325c1d46a51f53d858b26a260d5aed6b4f17fea6e07fa ffmpeg-2.8.6.tar.xz

View File

@@ -0,0 +1,488 @@
################################################################################
#
# ffmpeg
#
################################################################################
FFMPEG_VERSION = 2.8.6
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz
FFMPEG_SITE = http://ffmpeg.org/releases
FFMPEG_INSTALL_STAGING = YES
FFMPEG_LICENSE = LGPLv2.1+, libjpeg license
FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1
ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
FFMPEG_LICENSE += and GPLv2+
FFMPEG_LICENSE_FILES += COPYING.GPLv2
endif
FFMPEG_CONF_OPTS = \
--prefix=/usr \
--enable-avfilter \
--disable-version3 \
--enable-logging \
--enable-optimizations \
--disable-extra-warnings \
--enable-avdevice \
--enable-avcodec \
--enable-avformat \
--disable-x11grab \
--enable-network \
--disable-gray \
--enable-swscale-alpha \
--disable-small \
--enable-dct \
--enable-fft \
--enable-mdct \
--enable-rdft \
--disable-crystalhd \
--disable-vdpau \
--disable-dxva2 \
--enable-runtime-cpudetect \
--disable-hardcoded-tables \
--disable-memalign-hack \
--disable-mipsdspr1 \
--disable-mipsdspr2 \
--disable-msa \
--enable-hwaccels \
--disable-avisynth \
--disable-frei0r \
--disable-libopencore-amrnb \
--disable-libopencore-amrwb \
--disable-libopencv \
--disable-libcdio \
--disable-libdc1394 \
--disable-libfaac \
--disable-libgsm \
--disable-libilbc \
--disable-libnut \
--disable-libopenjpeg \
--disable-libschroedinger \
--disable-libvo-aacenc \
--disable-libvo-amrwbenc \
--disable-symver \
--disable-doc
FFMPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) host-pkgconf
ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
FFMPEG_CONF_OPTS += --enable-gpl
else
FFMPEG_CONF_OPTS += --disable-gpl
endif
ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y)
FFMPEG_CONF_OPTS += --enable-nonfree
else
FFMPEG_CONF_OPTS += --disable-nonfree
endif
ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y)
FFMPEG_CONF_OPTS += --enable-ffmpeg
else
FFMPEG_CONF_OPTS += --disable-ffmpeg
endif
ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y)
FFMPEG_DEPENDENCIES += sdl
FFMPEG_CONF_OPTS += --enable-ffplay
FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config
else
FFMPEG_CONF_OPTS += --disable-ffplay
endif
ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y)
FFMPEG_CONF_OPTS += --enable-ffserver
else
FFMPEG_CONF_OPTS += --disable-ffserver
endif
ifeq ($(BR2_PACKAGE_FFMPEG_AVRESAMPLE),y)
FFMPEG_CONF_OPTS += --enable-avresample
else
FFMPEG_CONF_OPTS += --disable-avresample
endif
ifeq ($(BR2_PACKAGE_FFMPEG_FFPROBE),y)
FFMPEG_CONF_OPTS += --enable-ffprobe
else
FFMPEG_CONF_OPTS += --disable-ffprobe
endif
ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
FFMPEG_CONF_OPTS += --enable-postproc
else
FFMPEG_CONF_OPTS += --disable-postproc
endif
ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
FFMPEG_CONF_OPTS += --enable-swscale
else
FFMPEG_CONF_OPTS += --disable-swscale
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all)
FFMPEG_CONF_OPTS += --disable-encoders \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all)
FFMPEG_CONF_OPTS += --disable-decoders \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all)
FFMPEG_CONF_OPTS += --disable-muxers \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all)
FFMPEG_CONF_OPTS += --disable-demuxers \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all)
FFMPEG_CONF_OPTS += --disable-parsers \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all)
FFMPEG_CONF_OPTS += --disable-bsfs \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsfs=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all)
FFMPEG_CONF_OPTS += --disable-protocols \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x))
endif
ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all)
FFMPEG_CONF_OPTS += --disable-filters \
$(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x))
endif
ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y)
FFMPEG_CONF_OPTS += --enable-indevs
else
FFMPEG_CONF_OPTS += --disable-indevs
endif
ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y)
FFMPEG_CONF_OPTS += --enable-outdevs
else
FFMPEG_CONF_OPTS += --disable-outdevs
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
FFMPEG_CONF_OPTS += --enable-pthreads
else
FFMPEG_CONF_OPTS += --disable-pthreads
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
FFMPEG_CONF_OPTS += --enable-zlib
FFMPEG_DEPENDENCIES += zlib
else
FFMPEG_CONF_OPTS += --disable-zlib
endif
ifeq ($(BR2_PACKAGE_BZIP2),y)
FFMPEG_CONF_OPTS += --enable-bzlib
FFMPEG_DEPENDENCIES += bzip2
else
FFMPEG_CONF_OPTS += --disable-bzlib
endif
ifeq ($(BR2_PACKAGE_FDK_AAC)$(BR2_PACKAGE_FFMPEG_NONFREE),yy)
FFMPEG_CONF_OPTS += --enable-libfdk-aac
FFMPEG_DEPENDENCIES += fdk-aac
else
FFMPEG_CONF_OPTS += --disable-libfdk-aac
endif
ifeq ($(BR2_PACKAGE_GNUTLS),y)
FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl
FFMPEG_DEPENDENCIES += gnutls
else
FFMPEG_CONF_OPTS += --disable-gnutls
ifeq ($(BR2_PACKAGE_OPENSSL),y)
# openssl isn't license compatible with GPL
ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx)
FFMPEG_CONF_OPTS += --disable-openssl
else
FFMPEG_CONF_OPTS += --enable-openssl
FFMPEG_DEPENDENCIES += openssl
endif
else
FFMPEG_CONF_OPTS += --disable-openssl
endif
endif
ifeq ($(BR2_PACKAGE_LIBDCADEC),y)
FFMPEG_CONF_OPTS += --enable-libdcadec
FFMPEG_DEPENDENCIES += libdcadec
else
FFMPEG_CONF_OPTS += --disable-libdcadec
endif
ifeq ($(BR2_PACKAGE_LIBOPENH264),y)
FFMPEG_CONF_OPTS += --enable-libopenh264
FFMPEG_DEPENDENCIES += libopenh264
else
FFMPEG_CONF_OPTS += --disable-libopenh264
endif
ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
FFMPEG_DEPENDENCIES += libvorbis
FFMPEG_CONF_OPTS += \
--enable-libvorbis \
--enable-muxer=ogg \
--enable-encoder=libvorbis
endif
ifeq ($(BR2_PACKAGE_LIBVA),y)
FFMPEG_CONF_OPTS += --enable-vaapi
FFMPEG_DEPENDENCIES += libva
else
FFMPEG_CONF_OPTS += --disable-vaapi
endif
ifeq ($(BR2_PACKAGE_OPUS),y)
FFMPEG_CONF_OPTS += --enable-libopus
FFMPEG_DEPENDENCIES += opus
else
FFMPEG_CONF_OPTS += --disable-libopus
endif
ifeq ($(BR2_PACKAGE_LIBVPX),y)
FFMPEG_CONF_OPTS += --enable-libvpx
FFMPEG_DEPENDENCIES += libvpx
else
FFMPEG_CONF_OPTS += --disable-libvpx
endif
ifeq ($(BR2_PACKAGE_LIBASS),y)
FFMPEG_CONF_OPTS += --enable-libass
FFMPEG_DEPENDENCIES += libass
else
FFMPEG_CONF_OPTS += --disable-libass
endif
ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
FFMPEG_CONF_OPTS += --enable-libbluray
FFMPEG_DEPENDENCIES += libbluray
else
FFMPEG_CONF_OPTS += --disable-libbluray
endif
ifeq ($(BR2_PACKAGE_RTMPDUMP),y)
FFMPEG_CONF_OPTS += --enable-librtmp
FFMPEG_DEPENDENCIES += rtmpdump
else
FFMPEG_CONF_OPTS += --disable-librtmp
endif
ifeq ($(BR2_PACKAGE_LAME),y)
FFMPEG_CONF_OPTS += --enable-libmp3lame
FFMPEG_DEPENDENCIES += lame
else
FFMPEG_CONF_OPTS += --disable-libmp3lame
endif
ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
FFMPEG_CONF_OPTS += --enable-libmodplug
FFMPEG_DEPENDENCIES += libmodplug
else
FFMPEG_CONF_OPTS += --disable-libmodplug
endif
ifeq ($(BR2_PACKAGE_SPEEX),y)
FFMPEG_CONF_OPTS += --enable-libspeex
FFMPEG_DEPENDENCIES += speex
else
FFMPEG_CONF_OPTS += --disable-libspeex
endif
ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
FFMPEG_CONF_OPTS += --enable-libtheora
FFMPEG_DEPENDENCIES += libtheora
else
FFMPEG_CONF_OPTS += --disable-libtheora
endif
ifeq ($(BR2_PACKAGE_WAVPACK),y)
FFMPEG_CONF_OPTS += --enable-libwavpack
FFMPEG_DEPENDENCIES += wavpack
else
FFMPEG_CONF_OPTS += --disable-libwavpack
endif
# ffmpeg freetype support require fenv.h which is only
# available/working on glibc.
# The microblaze variant doesn't provide the needed exceptions
ifeq ($(BR2_PACKAGE_FREETYPE)$(BR2_TOOLCHAIN_USES_GLIBC)x$(BR2_microblaze),yyx)
FFMPEG_CONF_OPTS += --enable-libfreetype
FFMPEG_DEPENDENCIES += freetype
else
FFMPEG_CONF_OPTS += --disable-libfreetype
endif
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
FFMPEG_CONF_OPTS += --enable-fontconfig
FFMPEG_DEPENDENCIES += fontconfig
else
FFMPEG_CONF_OPTS += --disable-fontconfig
endif
ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy)
FFMPEG_CONF_OPTS += --enable-libx264
FFMPEG_DEPENDENCIES += x264
else
FFMPEG_CONF_OPTS += --disable-libx264
endif
ifeq ($(BR2_PACKAGE_X265)$(BR2_PACKAGE_FFMPEG_GPL),yy)
FFMPEG_CONF_OPTS += --enable-libx265
FFMPEG_DEPENDENCIES += x265
else
FFMPEG_CONF_OPTS += --disable-libx265
endif
ifeq ($(BR2_X86_CPU_HAS_MMX),y)
FFMPEG_CONF_OPTS += --enable-yasm
FFMPEG_DEPENDENCIES += host-yasm
else
ifeq ($(BR2_x86_i586),y)
# Needed to work around a bug with gcc 5.x:
# error: 'asm' operand has impossible constraints
FFMPEG_CONF_OPTS += --disable-inline-asm
endif
FFMPEG_CONF_OPTS += --disable-yasm
FFMPEG_CONF_OPTS += --disable-mmx
endif
ifeq ($(BR2_X86_CPU_HAS_SSE),y)
FFMPEG_CONF_OPTS += --enable-sse
else
FFMPEG_CONF_OPTS += --disable-sse
endif
ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
FFMPEG_CONF_OPTS += --enable-sse2
else
FFMPEG_CONF_OPTS += --disable-sse2
endif
ifeq ($(BR2_X86_CPU_HAS_SSE3),y)
FFMPEG_CONF_OPTS += --enable-sse3
else
FFMPEG_CONF_OPTS += --disable-sse3
endif
ifeq ($(BR2_X86_CPU_HAS_SSSE3),y)
FFMPEG_CONF_OPTS += --enable-ssse3
else
FFMPEG_CONF_OPTS += --disable-ssse3
endif
ifeq ($(BR2_X86_CPU_HAS_SSE4),y)
FFMPEG_CONF_OPTS += --enable-sse4
else
FFMPEG_CONF_OPTS += --disable-sse4
endif
ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
FFMPEG_CONF_OPTS += --enable-sse42
else
FFMPEG_CONF_OPTS += --disable-sse42
endif
ifeq ($(BR2_X86_CPU_HAS_AVX),y)
FFMPEG_CONF_OPTS += --enable-avx
else
FFMPEG_CONF_OPTS += --disable-avx
endif
ifeq ($(BR2_X86_CPU_HAS_AVX2),y)
FFMPEG_CONF_OPTS += --enable-avx2
else
FFMPEG_CONF_OPTS += --disable-avx2
endif
# Explicitly disable everything that doesn't match for ARM
# FFMPEG "autodetects" by compiling an extended instruction via AS
# This works on compilers that aren't built for generic by default
ifeq ($(BR2_ARM_CPU_ARMV4),y)
FFMPEG_CONF_OPTS += --disable-armv5te
endif
ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y)
FFMPEG_CONF_OPTS += --enable-armv6
else
FFMPEG_CONF_OPTS += --disable-armv6 --disable-armv6t2
endif
ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y)
FFMPEG_CONF_OPTS += --enable-vfp
else
FFMPEG_CONF_OPTS += --disable-vfp
endif
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
FFMPEG_CONF_OPTS += --enable-neon
endif
ifeq ($(BR2_MIPS_SOFT_FLOAT),y)
FFMPEG_CONF_OPTS += \
--disable-mipsfpu
else
FFMPEG_CONF_OPTS += \
--enable-mipsfpu
endif
ifeq ($(BR2_mips_32r2),y)
FFMPEG_CONF_OPTS += \
--enable-mips32r2
else
FFMPEG_CONF_OPTS += \
--disable-mips32r2
endif
ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
FFMPEG_CONF_OPTS += --enable-altivec
else
FFMPEG_CONF_OPTS += --disable-altivec
endif
ifeq ($(BR2_STATIC_LIBS),)
FFMPEG_CONF_OPTS += --enable-pic
else
FFMPEG_CONF_OPTS += --disable-pic
endif
ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_CPU)
else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),)
FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH)
endif
FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF))
# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
define FFMPEG_CONFIGURE_CMDS
(cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
$(FFMPEG_CONF_ENV) \
./configure \
--enable-cross-compile \
--cross-prefix=$(TARGET_CROSS) \
--sysroot=$(STAGING_DIR) \
--host-cc="$(HOSTCC)" \
--arch=$(BR2_ARCH) \
--target-os="linux" \
--disable-stripping \
--pkg-config="$(PKG_CONFIG_HOST_BINARY)" \
$(SHARED_STATIC_LIBS_OPTS) \
$(FFMPEG_CONF_OPTS) \
)
endef
$(eval $(autotools-package))