remove package 'ffmpeg'

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue
2014-02-03 16:34:33 +01:00
parent 407d1448a8
commit 9dddc7045e
55 changed files with 0 additions and 5383 deletions

View File

@@ -1,230 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="ffmpeg"
PKG_VERSION="1.2.5"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="LGPL"
PKG_SITE="http://ffmpeg.org"
PKG_URL="http://ffmpeg.org/releases/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS_TARGET="toolchain yasm:host zlib bzip2 libvorbis gnutls"
PKG_PRIORITY="optional"
PKG_SECTION="multimedia"
PKG_SHORTDESC="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video."
PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
if [ "$VAAPI" = yes ]; then
# configure GPU drivers and dependencies:
get_graphicdrivers
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET $LIBVA"
FFMPEG_VAAPI="--enable-vaapi"
else
FFMPEG_VAAPI="--disable-vaapi"
fi
if [ "$VDPAU" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libvdpau"
FFMPEG_VDPAU="--enable-vdpau"
else
FFMPEG_VDPAU="--disable-vdpau"
fi
if [ "$DEBUG" = yes ]; then
FFMPEG_DEBUG="--enable-debug --disable-stripping"
else
FFMPEG_DEBUG="--disable-debug --enable-stripping"
fi
if [ "$OPTIMIZATIONS" = size ]; then
FFMPEG_OPTIM="--disable-small"
else
FFMPEG_OPTIM="--disable-small"
fi
if [ "$CRYSTALHD" = yes ]; then
# disabled, we use XBMC's internal solution
FFMPEG_CRYSTALHD="--disable-crystalhd"
else
FFMPEG_CRYSTALHD="--disable-crystalhd"
fi
case "$TARGET_ARCH" in
arm)
FFMPEG_CPU=""
FFMPEG_TABLES="--enable-hardcoded-tables"
FFMPEG_PIC="--enable-pic"
;;
i?86)
FFMPEG_CPU=""
FFMPEG_TABLES="--disable-hardcoded-tables"
FFMPEG_PIC="--disable-pic"
;;
x86_64)
FFMPEG_CPU=""
FFMPEG_TABLES="--disable-hardcoded-tables"
FFMPEG_PIC="--enable-pic"
;;
esac
case "$TARGET_FPU" in
neon*)
FFMPEG_FPU="--enable-neon"
;;
vfp*)
FFMPEG_FPU=""
;;
*)
FFMPEG_FPU=""
;;
esac
pre_configure_target() {
cd $ROOT/$PKG_BUILD
rm -rf .$TARGET_NAME
export pkg_config="$ROOT/$TOOLCHAIN/bin/pkg-config"
# ffmpeg fails building with LTO support
strip_lto
# ffmpeg fails running with GOLD support
strip_gold
}
configure_target() {
./configure --prefix=/usr \
--cpu=$TARGET_CPU \
--arch=$TARGET_ARCH \
--enable-cross-compile \
--cross-prefix=$TARGET_PREFIX \
--sysroot=$SYSROOT_PREFIX \
--sysinclude="$SYSROOT_PREFIX/usr/include" \
--target-os="linux" \
--nm="$NM" \
--ar="$AR" \
--as="$CC" \
--cc="$CC" \
--ld="$CC" \
--host-cc="$HOST_CC" \
--host-cflags="$HOST_CFLAGS" \
--host-ldflags="$HOST_LDFLAGS" \
--host-libs="-lm" \
--extra-cflags="$CFLAGS" \
--extra-ldflags="$LDFLAGS" \
--extra-libs="" \
--extra-version="" \
--build-suffix="" \
--disable-static \
--enable-shared \
--enable-gpl \
--disable-version3 \
--disable-nonfree \
--enable-logging \
--disable-doc \
$FFMPEG_DEBUG \
$FFMPEG_PIC \
--enable-optimizations \
--disable-extra-warnings \
--disable-ffprobe \
--disable-ffplay \
--disable-ffserver \
--enable-ffmpeg \
--enable-avdevice \
--enable-avcodec \
--enable-avformat \
--enable-swscale \
--enable-postproc \
--enable-avfilter \
--disable-devices \
--enable-pthreads \
--disable-w32threads \
--disable-x11grab \
--enable-network \
--enable-gnutls \
--disable-gray \
--enable-swscale-alpha \
$FFMPEG_OPTIM \
--enable-dct \
--enable-fft \
--enable-mdct \
--enable-rdft \
$FFMPEG_CRYSTALHD \
$FFMPEG_VAAPI \
$FFMPEG_VDPAU \
--disable-dxva2 \
--enable-runtime-cpudetect \
$FFMPEG_TABLES \
--disable-memalign-hack \
--disable-encoders \
--enable-encoder=ac3 \
--enable-encoder=aac \
--disable-decoder=mpeg_xvmc \
--enable-hwaccels \
--disable-muxers \
--enable-muxer=spdif \
--enable-muxer=adts \
--enable-demuxers \
--enable-parsers \
--enable-bsfs \
--enable-protocol=http \
--disable-indevs \
--disable-outdevs \
--enable-filters \
--disable-avisynth \
--enable-bzlib \
--disable-frei0r \
--disable-libopencore-amrnb \
--disable-libopencore-amrwb \
--disable-libopencv \
--disable-libdc1394 \
--disable-libfaac \
--disable-libfreetype \
--disable-libgsm \
--disable-libmp3lame \
--disable-libnut \
--disable-libopenjpeg \
--disable-librtmp \
--disable-libschroedinger \
--disable-libspeex \
--disable-libtheora \
--disable-libvo-aacenc \
--disable-libvo-amrwbenc \
--enable-libvorbis --enable-muxer=ogg --enable-encoder=libvorbis \
--disable-libvpx \
--disable-libx264 \
--disable-libxavs \
--disable-libxvid \
--enable-zlib \
--enable-asm \
--disable-altivec \
$FFMPEG_CPU \
$FFMPEG_FPU \
--disable-vis \
--enable-yasm \
--disable-sram \
--disable-symver
}
post_makeinstall_target() {
rm -rf $INSTALL/usr/share/ffmpeg/examples
}

View File

@@ -1,53 +0,0 @@
From a77624551376c138dcda4d0bce167abe379a0a6b Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:08:55 +0000
Subject: [PATCH] Support-raw-dvdsub-palette-as-stored-on-normal-dvd-s
---
libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index cc9e11b..52ec0a8 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -54,6 +54,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_cropTbl + 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;
@@ -574,6 +592,12 @@ static int dvdsub_init(AVCodecContext *avctx)
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:");
--
1.7.10.4

View File

@@ -1,125 +0,0 @@
From bad37718f9fb608ffdd271c96a17f071ad508464 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:23:24 +0000
Subject: [PATCH] Change-fallthrough-logic-for-read_seek-to-be-based-o
---
libavformat/asfdec.c | 2 +-
libavformat/gxf.c | 4 ++--
libavformat/jvdec.c | 2 +-
libavformat/oggdec.c | 4 +++-
libavformat/pmpdec.c | 2 +-
libavformat/r3d.c | 2 +-
libavformat/utils.c | 4 +++-
7 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 2dcdf56..2581307 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1415,7 +1415,7 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
AVStream *st = s->streams[stream_index];
if (s->packet_size <= 0)
- return -1;
+ return AVERROR(ENOSYS);
/* Try using the protocol's read_seek if available */
if(s->pb) {
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index 86e6291..b46e6d6 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -559,7 +559,7 @@ static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int
idx = av_index_search_timestamp(st, timestamp - start_time,
AVSEEK_FLAG_ANY | AVSEEK_FLAG_BACKWARD);
if (idx < 0)
- return -1;
+ return AVERROR(ENOSYS);
pos = st->index_entries[idx].pos;
if (idx < st->nb_index_entries - 2)
maxlen = st->index_entries[idx + 2].pos - pos;
@@ -569,7 +569,7 @@ static int gxf_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int
return res;
found = gxf_resync_media(s, maxlen, -1, timestamp);
if (FFABS(found - timestamp) > 4)
- return -1;
+ return AVERROR(ENOSYS);
return 0;
}
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index e941492..8039b2a 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -209,7 +209,7 @@ static int read_seek(AVFormatContext *s, int stream_index,
}
if (i < 0 || i >= ast->nb_index_entries)
- return 0;
+ return -1;
if (avio_seek(s->pb, ast->index_entries[i].pos, SEEK_SET) < 0)
return -1;
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index e51db61..7441615 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -808,8 +808,10 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index,
ret = ff_seek_frame_binary(s, stream_index, timestamp, flags);
os = ogg->streams + stream_index;
- if (ret < 0)
+ if (ret < 0) {
os->keyframe_seek = 0;
+ ret = AVERROR(ENOSYS);
+ }
return ret;
}
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c
index 2ea37ef..0a89650 100644
--- a/libavformat/pmpdec.c
+++ b/libavformat/pmpdec.c
@@ -161,7 +161,7 @@ static int pmp_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
PMPContext *pmp = s->priv_data;
pmp->cur_stream = 0;
// fallback to default seek now
- return -1;
+ return AVERROR(ENOSYS);
}
static int pmp_close(AVFormatContext *s)
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 35da81e..452849d 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -366,7 +366,7 @@ static int r3d_seek(AVFormatContext *s, int stream_index, int64_t sample_time, i
int frame_num;
if (!st->avg_frame_rate.num)
- return -1;
+ return AVERROR(ENOSYS);
frame_num = av_rescale_q(sample_time, st->time_base,
av_inv_q(st->avg_frame_rate));
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5cbf7ca..4b8bcd1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2059,10 +2059,12 @@ static int seek_frame_internal(AVFormatContext *s, int stream_index,
ff_read_frame_flush(s);
ret = s->iformat->read_seek(s, stream_index, timestamp, flags);
} else
- ret = -1;
+ ret = AVERROR(ENOSYS);
if (ret >= 0) {
return 0;
}
+ if (ret != AVERROR(ENOSYS))
+ return ret;
if (s->iformat->read_timestamp && !(s->iformat->flags & AVFMT_NOBINSEARCH)) {
ff_read_frame_flush(s);
--
1.7.10.4

View File

@@ -1,60 +0,0 @@
From 6d0c6f74bce43810c2c8a7ca01de5e1f0e7da333 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:27:59 +0000
Subject: [PATCH] matroska-Check-return-value-of-avio_seek-and-avoid-m
---
libavformat/matroskadec.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 87c4a39..d066186 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2386,7 +2386,8 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
timestamp = FFMAX(timestamp, st->index_entries[0].timestamp);
if ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
- avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET);
+ if (avio_seek(s->pb, st->index_entries[st->nb_index_entries-1].pos, SEEK_SET) < 0)
+ return -1;
matroska->current_id = 0;
while ((index = av_index_search_timestamp(st, timestamp, flags)) < 0) {
matroska_clear_queue(matroska);
@@ -2395,16 +2396,11 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
}
}
- matroska_clear_queue(matroska);
if (index < 0 || (matroska->cues_parsing_deferred < 0 && index == st->nb_index_entries - 1))
goto err;
index_min = index;
for (i=0; i < matroska->tracks.nb_elem; i++) {
- tracks[i].audio.pkt_cnt = 0;
- tracks[i].audio.sub_packet_cnt = 0;
- tracks[i].audio.buf_timecode = AV_NOPTS_VALUE;
- tracks[i].end_timecode = 0;
if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE
&& tracks[i].stream->discard != AVDISCARD_ALL) {
index_sub = av_index_search_timestamp(tracks[i].stream, st->index_entries[index].timestamp, AVSEEK_FLAG_BACKWARD);
@@ -2415,7 +2411,16 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
}
}
- avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET);
+ if (avio_seek(s->pb, st->index_entries[index_min].pos, SEEK_SET) < 0)
+ return -1;
+
+ matroska_clear_queue(matroska);
+ for (i=0; i < matroska->tracks.nb_elem; i++) {
+ tracks[i].audio.pkt_cnt = 0;
+ tracks[i].audio.sub_packet_cnt = 0;
+ tracks[i].audio.buf_timecode = AV_NOPTS_VALUE;
+ tracks[i].end_timecode = 0;
+ }
matroska->current_id = 0;
st->skip_to_keyframe =
matroska->skip_to_keyframe = !(flags & AVSEEK_FLAG_ANY);
--
1.7.10.4

View File

@@ -1,37 +0,0 @@
From 16ed0150800958b4ca544fd380bda92f21393555 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Mon, 12 Sep 2011 21:37:17 +0200
Subject: [PATCH 04/24] asf hacks
---
libavformat/asfdec.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index a62bab3..7db3bd8 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -1277,9 +1277,20 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts, int
ASFContext *asf = s->priv_data;
AVStream *st = s->streams[stream_index];
+ if (pts == 0) {
+ // this is a hack since av_gen_search searches the entire file in this case
+ av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", s->data_offset);
+ if (avio_seek(s->pb, s->data_offset, SEEK_SET) < 0)
+ return -1;
+ return 0;
+ }
+
if (s->packet_size <= 0)
return AVERROR(ENOSYS);
+ if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO)
+ return -1;
+
/* Try using the protocol's read_seek if available */
if(s->pb) {
int ret = avio_seek_time(s->pb, stream_index, pts, flags);
--
1.7.9.4

View File

@@ -1,24 +0,0 @@
From dac532f278c50002ed2fae5c7e2c5b3edfc4f96e Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:34:09 +0000
Subject: [PATCH] if-av_read_packet-returns-AVERROR_IO-we-are-done.-ff
---
libavformat/utils.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4b8bcd1..bdb9d17 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1386,6 +1386,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];
--
1.7.10.4

View File

@@ -1,40 +0,0 @@
From 81f4c30d6f4dd4f1da818553c869082b50ab601b Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:41:56 +0000
Subject: [PATCH] added-Ticket-7187-TV-Teletext-support-for-DVB-EBU-Te
---
libavcodec/avcodec.h | 4 ++++
libavformat/mpegts.c | 2 ++
2 files changed, 6 insertions(+)
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ab7a8a5..fff064c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -472,6 +472,10 @@ enum AVCodecID {
AV_CODEC_ID_VPLAYER = MKBETAG('V','P','l','r'),
AV_CODEC_ID_PJS = MKBETAG('P','h','J','S'),
+ /* 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 a6e07fa..87269d7 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -611,6 +611,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 },
};
--
1.7.10.4

View File

@@ -1,41 +0,0 @@
From 3bf21b1049abf8991beac79235adfcca9d705eda Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sun, 18 Sep 2011 19:16:34 +0200
Subject: [PATCH 07/24] Don't accept mpegts PMT that isn't current
---
libavformat/mpegts.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index e7e061e..817fbed 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -437,6 +437,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;
@@ -508,6 +509,7 @@ static int parse_section_header(SectionHeader *h,
val = get8(pp, p_end);
if (val < 0)
return -1;
+ h->current = val & 0x1;
h->version = (val >> 1) & 0x1f;
val = get8(pp, p_end);
if (val < 0)
@@ -1556,6 +1558,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
return;
if (h->tid != PAT_TID)
return;
+ if (!h->current)
+ return;
ts->stream->ts_id = h->id;
--
1.7.9.4

View File

@@ -1,43 +0,0 @@
From 5fecd135de1486be63e0cef53134c44f8b4becd6 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Sun, 18 Sep 2011 19:17:23 +0200
Subject: [PATCH 08/24] Don't reparse PMT unless it's version has changed
---
libavformat/mpegts.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 817fbed..8bdafc5 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -78,6 +78,7 @@ struct MpegTSFilter {
int pid;
int es_id;
int last_cc; /* last cc code (-1 if first packet) */
+ int last_version; /* last version of data on this pid */
enum MpegTSFilterType type;
union {
MpegTSPESFilter pes_filter;
@@ -334,6 +335,7 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts, unsigned int
filter->pid = pid;
filter->es_id = -1;
filter->last_cc = -1;
+ filter->last_version = -1;
sec = &filter->u.section_filter;
sec->section_cb = section_cb;
sec->opaque = opaque;
@@ -1560,6 +1562,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;
--
1.7.9.4

View File

@@ -1,64 +0,0 @@
From eaa6e4a2d98b3f04b4e1d9cd7db6185015d370d7 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:46:38 +0000
Subject: [PATCH] fixed-compile-with-VDPAU-header-versions-without-MPE
---
configure | 2 ++
libavcodec/vdpau.c | 2 ++
libavcodec/vdpau.h | 2 ++
3 files changed, 6 insertions(+)
diff --git a/configure b/configure
index 0707a94..6b9e668 100755
--- a/configure
+++ b/configure
@@ -3748,6 +3748,8 @@ check_header termios.h
check_header unistd.h
check_header vdpau/vdpau.h
check_header vdpau/vdpau_x11.h
+check_cpp_condition vdpau/vdpau.h "defined(VDP_DECODER_PROFILE_MPEG4_PART2_SP)" && enable vdpau_mpeg4_support
+
check_header VideoDecodeAcceleration/VDADecoder.h
check_header windows.h
check_header X11/extensions/XvMClib.h
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index 6ac195e..09dcb3e 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -316,6 +316,7 @@ void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf,
render->bitstream_buffers_used = 0;
}
+#ifdef VDP_DECODER_PROFILE_MPEG4_PART2_SP
void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf,
int buf_size)
{
@@ -369,6 +370,7 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf,
ff_draw_horiz_band(s, 0, s->avctx->height);
render->bitstream_buffers_used = 0;
}
+#endif
// Only dummy functions for now
static int vdpau_mpeg2_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 23394b5..67fadb6 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -56,7 +56,9 @@ union FFVdpPictureInfo {
VdpPictureInfoH264 h264;
VdpPictureInfoMPEG1Or2 mpeg;
VdpPictureInfoVC1 vc1;
- VdpPictureInfoMPEG4Part2 mpeg4;
+#ifdef VDP_DECODER_PROFILE_MPEG4_PART2_SP
+ VdpPictureInfoMPEG4Part2 mpeg4;
+#endif
};
/**
--
1.7.10.4

View File

@@ -1,98 +0,0 @@
From 3c31f5987079c3796f3f7313d97ee3c58fb0d4db Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:52:01 +0000
Subject: [PATCH] Read-PID-timestamps-as-well-as-PCR-timestamps-to-fin
---
libavformat/mpegts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 3befaf8..21df7b3 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1985,6 +1985,44 @@ static int parse_pcr(int64_t *ppcr_high, int *ppcr_low,
return 0;
}
+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;
@@ -2176,6 +2214,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index,
int64_t pos, timestamp;
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;
pos = ((*ppos + ts->raw_packet_size - 1 - ts->pos47) / ts->raw_packet_size) * ts->raw_packet_size + ts->pos47;
while(pos < pos_limit) {
if (avio_seek(s->pb, pos, SEEK_SET) < 0)
@@ -2193,6 +2232,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;
}
@@ -2294,7 +2338,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,
};
@@ -2305,7 +2349,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,
};
--
1.7.10.4

View File

@@ -1,68 +0,0 @@
From f3bdfee28332b1ccc794186d91a1f9e082004a1e Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 11:55:37 +0000
Subject: [PATCH] Get-stream-durations-using-read_timestamp
---
libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index bdb9d17..3e7dec9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2283,6 +2283,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)
{
@@ -2382,6 +2417,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 {
av_log(ic, AV_LOG_WARNING, "Estimating duration from bitrate, this may be inaccurate\n");
/* less precise: use bitrate info */
--
1.7.10.4

View File

@@ -1,33 +0,0 @@
From 51e09f5022d1250802cbec8017a2c5e76160bdcb Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 16:53:54 +0000
Subject: [PATCH] aacenc-add-recognized-profiles-array
---
libavcodec/aacenc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 348d3a2..3cbca03 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -818,6 +818,11 @@ static const int mpeg4audio_sample_rates[16] = {
24000, 22050, 16000, 12000, 11025, 8000, 7350
};
+static const AVProfile profiles[] = {
+ { FF_PROFILE_AAC_LOW, "Low" },
+ { FF_PROFILE_UNKNOWN },
+};
+
AVCodec ff_aac_encoder = {
.name = "aac",
.type = AVMEDIA_TYPE_AUDIO,
@@ -833,4 +838,5 @@ AVCodec ff_aac_encoder = {
AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
.priv_class = &aacenc_class,
+ .profiles = profiles,
};
--
1.7.10.4

View File

@@ -1,28 +0,0 @@
From 5cc735503bfe1242606f19638bffeb686dd4d1b5 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Wed, 8 Dec 2010 14:03:43 +0000
Subject: [PATCH 14/24] changed: allow 4 second skew between streams in mov
before attempting to seek
---
libavformat/mov.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9da8eab..0f9836c 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2763,8 +2763,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;
--
1.7.9.4

View File

@@ -1,38 +0,0 @@
From b83c9a2505338cdf021dd499c26686e82bcbc066 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Fri, 26 Nov 2010 20:56:48 +0000
Subject: [PATCH 15/24] fixed: memleak in mpegts demuxer on some malformed
(??) mpegts files with too large pes packets
at-visions sample file brokenStream.mpg
---
libavformat/mpegts.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index ba2f163..c374cb9 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -664,6 +664,10 @@ static int mpegts_set_stream_info(AVStream *st, 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->destruct = av_destruct_packet;
@@ -2117,6 +2121,8 @@ static int mpegts_read_packet(AVFormatContext *s,
int ret, i;
ts->pkt = pkt;
+ ts->pkt->data = NULL;
+
ret = handle_packets(ts, 0);
if (ret < 0) {
/* flush pes data left */
--
1.7.9.4

View File

@@ -1,37 +0,0 @@
From c240357f903f20ba51001fb90aa2de415d5be825 Mon Sep 17 00:00:00 2001
From: Joakim Plate <elupus@ecce.se>
Date: Mon, 28 Jun 2010 21:26:54 +0000
Subject: [PATCH 16/24] Speed up mpegts av_find_stream_info
---
libavformat/mpegts.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index c374cb9..6da6db5 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -825,7 +825,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
goto skip;
/* stream not present in PMT */
- if (!pes->st) {
+ if (ts->auto_guess && !pes->st) {
pes->st = avformat_new_stream(ts->stream, NULL);
if (!pes->st)
return AVERROR(ENOMEM);
@@ -2013,7 +2013,10 @@ static int mpegts_read_header(AVFormatContext *s,
av_dlog(ts->stream, "tuning done\n");
- s->ctx_flags |= AVFMTCTX_NOHEADER;
+ /* only flag NOHEADER if we are in file mode,
+ in streaming mode scanning may take too long for users */
+ if (pb->seekable)
+ s->ctx_flags |= AVFMTCTX_NOHEADER;
} else {
AVStream *st;
int pcr_pid, pid, nb_packets, nb_pcrs, ret, pcr_l;
--
1.7.9.4

View File

@@ -1,40 +0,0 @@
From 4f4aacd3d85c5caecbc0b0f02739aff0b9d8f657 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 16:58:33 +0000
Subject: [PATCH] allow-customizing-shared-library-soname-name-with-ma
---
configure | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure b/configure
index 6b9e668..d4aa8f2 100755
--- a/configure
+++ b/configure
@@ -269,6 +269,7 @@ Advanced options (experts only):
--arch=ARCH select architecture [$arch]
--cpu=CPU select the minimum required CPU (affects
instruction selection, may crash on older CPUs)
+ --custom-libname-with-major=NAME custom library name with major [$SLIBNAME_WITH_MAJOR]
--enable-pic build position-independent code
--enable-sram allow use of on-chip SRAM
--enable-thumb compile for Thumb instruction set
@@ -1527,6 +1528,7 @@ CMDLINE_SET="
cpu
cross_prefix
cxx
+ custom_libname_with_major
dep_cc
extra_version
host_cc
@@ -3408,6 +3410,8 @@ EOF
exit 1;
fi
+test -n "$custom_libname_with_major" && SLIBNAME_WITH_MAJOR="$custom_libname_with_major"
+
die_license_disabled() {
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
}
--
1.7.10.4

View File

@@ -1,75 +0,0 @@
From 40f4c15370f7027dc5422edcb10e8a3b7e58e83d Mon Sep 17 00:00:00 2001
From: CrystalP <CrystalP@xbmc.org>
Date: Wed, 5 Oct 2011 12:38:30 -0400
Subject: [PATCH 18/24] dxva-mpeg2 Allocate slices array dynamically - fixes
videos with > 175 slices. They used to result in
images with a black bottom.
sample on team ftp samples/PR471/too_many_slices.ts
Inspired by the vaapi code to reallocate the slices array for each new slice.
Could be more efficient if the array could be preserved for all frames and
freed only at the end of the video, but there doesn't seem to be anywhere
appropriate to free the memory at the end.
Alternative is to allocate the proper size straight away for a new frame,
instead of realloc'ing for each slice.
---
libavcodec/dxva2_mpeg2.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index 951305d..8ba83b6 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -22,12 +22,12 @@
#include "dxva2_internal.h"
-#define MAX_SLICES (SLICE_MAX_START_CODE - SLICE_MIN_START_CODE + 1)
struct dxva2_picture_context {
DXVA_PictureParameters pp;
DXVA_QmatrixData qm;
unsigned slice_count;
- DXVA_SliceInfo slice[MAX_SLICES];
+ DXVA_SliceInfo *slice;
+ unsigned int slice_alloc;
const uint8_t *bitstream;
unsigned bitstream_size;
@@ -220,6 +220,8 @@ static int start_frame(AVCodecContext *avctx,
fill_quantization_matrices(avctx, ctx, s, &ctx_pic->qm);
ctx_pic->slice_count = 0;
+ ctx_pic->slice = NULL;
+ ctx_pic->slice_alloc = 0;
ctx_pic->bitstream_size = 0;
ctx_pic->bitstream = NULL;
return 0;
@@ -232,9 +234,14 @@ static int decode_slice(AVCodecContext *avctx,
struct dxva2_picture_context *ctx_pic =
s->current_picture_ptr->f.hwaccel_picture_private;
unsigned position;
+ DXVA_SliceInfo* slice;
- if (ctx_pic->slice_count >= MAX_SLICES)
+ slice = av_fast_realloc(ctx_pic->slice,
+ &ctx_pic->slice_alloc,
+ (ctx_pic->slice_count + 1) * sizeof(DXVA_SliceInfo));
+ if (!slice)
return -1;
+ ctx_pic->slice = slice;
if (!ctx_pic->bitstream)
ctx_pic->bitstream = buffer;
@@ -258,6 +265,7 @@ static int end_frame(AVCodecContext *avctx)
if (!ret)
ff_mpeg_draw_horiz_band(s, 0, avctx->height);
return ret;
+ av_freep(ctx_pic->slice);
}
AVHWAccel ff_mpeg2_dxva2_hwaccel = {
--
1.7.9.4

View File

@@ -1,75 +0,0 @@
From 681f74b224e16a4df7f8c4e31a9be56975d57e10 Mon Sep 17 00:00:00 2001
From: CrystalP <CrystalP@xbmc.org>
Date: Mon, 10 Oct 2011 19:42:50 -0400
Subject: [PATCH 19/24] dxva-mpeg2 speed up slice allocation
The number of slices is not very likely to change from frame to frame, so
at the beginning of a new frame, allocate memory for the amount of slices of
the previous frame. Saves a lot of reallocation, for some TV capture samples
there are over 200 slices.
There wasn't anywhere really appropriate to store last_slice_count (needs to
live from first frame to last frame), so this is likely to cause discussion to
merge upstream.
Adding members to dxva_context breaks ABI, which we don't care too much about
since on Windows we don't support external ffmpeg.
dxva mpeg2 code also has access to MpegEncContext, but adding there would
likely break ABI as well.
---
libavcodec/dxva2.h | 1 +
libavcodec/dxva2_mpeg2.c | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/libavcodec/dxva2.h b/libavcodec/dxva2.h
index fc99560..16a6994 100644
--- a/libavcodec/dxva2.h
+++ b/libavcodec/dxva2.h
@@ -66,6 +66,7 @@ struct dxva_context {
* Private to the FFmpeg AVHWAccel implementation
*/
unsigned report_id;
+ unsigned last_slice_count;
};
#endif /* AVCODEC_DXVA_H */
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index 8ba83b6..90507f9 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -222,6 +222,16 @@
ctx_pic->slice_count = 0;
ctx_pic->bitstream_size = 0;
ctx_pic->bitstream = NULL;
+
+ if (ctx->last_slice_count > 0)
+ {
+ ctx_pic->slice = av_fast_realloc(NULL,
+ &ctx_pic->slice_alloc,
+ ctx->last_slice_count * sizeof(DXVA_SliceInfo));
+ if (!ctx_pic->slice)
+ return -1;
+ }
+
return 0;
}
@@ -251,6 +261,7 @@
struct MpegEncContext *s = avctx->priv_data;
struct dxva2_picture_context *ctx_pic =
s->current_picture_ptr->f.hwaccel_picture_private;
+ struct dxva_context *ctx = avctx->hwaccel_context;
int ret;
if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
@@ -261,6 +272,8 @@
commit_bitstream_and_slice_buffer);
if (!ret)
ff_mpeg_draw_horiz_band(s, 0, avctx->height);
+
+ ctx->last_slice_count = ctx_pic->slice_count;
return ret;
}
--
1.7.9.4

View File

@@ -1,46 +0,0 @@
From 85a109a59218337bbfac6b3ff54e37499dcbb306 Mon Sep 17 00:00:00 2001
Date: Mon, 18 Feb 2013 17:06:15 +0000
Subject: [PATCH] dxva-vc1-Take-BI-into-account-for-forward-and-backwa
---
libavcodec/dxva2_vc1.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index ed4836d..26e1ad4 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -38,15 +38,17 @@ static void fill_picture_parameters(AVCodecContext *avctx,
{
const MpegEncContext *s = &v->s;
const Picture *current_picture = s->current_picture_ptr;
+ BYTE bPicIntra = s->pict_type == AV_PICTURE_TYPE_I || v->bi_type == 1;
+ BYTE bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B && v->bi_type == 0;
memset(pp, 0, sizeof(*pp));
pp->wDecodedPictureIndex =
pp->wDeblockedPictureIndex = ff_dxva2_get_surface_index(ctx, current_picture);
- if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
+ if (!bPicIntra)
pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->last_picture);
else
pp->wForwardRefPictureIndex = 0xffff;
- if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type)
+ if (bPicBackwardPrediction)
pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(ctx, &s->next_picture);
else
pp->wBackwardRefPictureIndex = 0xffff;
@@ -69,8 +71,8 @@ static void fill_picture_parameters(AVCodecContext *avctx,
if (s->picture_structure & PICT_BOTTOM_FIELD)
pp->bPicStructure |= 0x02;
pp->bSecondField = v->interlace && v->fcm == ILACE_FIELD && v->second_field;
- pp->bPicIntra = s->pict_type == AV_PICTURE_TYPE_I || v->bi_type;
- pp->bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type;
+ pp->bPicIntra = bPicIntra;
+ pp->bPicBackwardPrediction = bPicBackwardPrediction;
pp->bBidirectionalAveragingMode = (1 << 7) |
((ctx->cfg->ConfigIntraResidUnsigned != 0) << 6) |
((ctx->cfg->ConfigResidDiffAccelerator != 0) << 5) |
--
1.7.10.4

Some files were not shown because too many files have changed in this diff Show More