aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rwxr-xr-xconfigure2
-rw-r--r--doc/t2h.init8
-rw-r--r--libavcodec/bink.c9
-rw-r--r--libavcodec/version.h2
-rw-r--r--libavdevice/pulse.c7
-rw-r--r--libavformat/options.c37
-rw-r--r--libavutil/avutil.h4
-rw-r--r--libavutil/pixdesc.c6
-rw-r--r--libavutil/pixfmt.h3
10 files changed, 45 insertions, 34 deletions
diff --git a/Changelog b/Changelog
index 7dd82efabf..0b2d13bc76 100644
--- a/Changelog
+++ b/Changelog
@@ -120,6 +120,7 @@ easier to use. The changes are:
- Encrypted OMA files support
- Discworld II BMV decoding support
- VBLE Decoder
+- OS X Video Decoder Acceleration (VDA) support
version 0.8:
diff --git a/configure b/configure
index 891fd5564d..8ff3f7f4e5 100755
--- a/configure
+++ b/configure
@@ -110,6 +110,7 @@ Configuration options:
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
--enable-vaapi enable VAAPI code [autodetect]
+ --enable-vda enable VDA code [autodetect]
--enable-vdpau enable VDPAU code [autodetect]
--disable-dxva2 disable DXVA2 code
--disable-vda disable VDA code
@@ -1496,6 +1497,7 @@ zmbv_encoder_select="zlib"
crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
vaapi_deps="va_va_h"
+vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
# parsers
diff --git a/doc/t2h.init b/doc/t2h.init
index 015712f699..ee87ac2230 100644
--- a/doc/t2h.init
+++ b/doc/t2h.init
@@ -9,9 +9,13 @@ $EXTRA_HEAD =
<link rel="stylesheet" type="text/css" href="default.css" />
';
+
+my $FFMPEG_NAVBAR = $ENV{"FFMPEG_NAVBAR"} || '';
+
$AFTER_BODY_OPEN =
-'<div id="container">
-<div id="body">';
+'<div id="container">' .
+"\n$FFMPEG_NAVBAR\n" .
+'<div id="body">';
$PRE_BODY_CLOSE = '</div></div>';
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 253a874937..6df7a3237b 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -595,7 +595,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
{
int coef_list[128];
int mode_list[128];
- int i, t, mask, bits, ccoef, mode, sign;
+ int i, t, bits, ccoef, mode, sign;
int list_start = 64, list_end = 64, list_pos;
int coef_count = 0;
int coef_idx[64];
@@ -609,8 +609,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
coef_list[list_end] = 2; mode_list[list_end++] = 3;
coef_list[list_end] = 3; mode_list[list_end++] = 3;
- bits = get_bits(gb, 4) - 1;
- for (mask = 1 << bits; bits >= 0; mask >>= 1, bits--) {
+ for (bits = get_bits(gb, 4) - 1; bits >= 0; bits--) {
list_pos = list_start;
while (list_pos < list_end) {
if (!(mode_list[list_pos] | coef_list[list_pos]) || !get_bits1(gb)) {
@@ -636,7 +635,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
if (!bits) {
t = 1 - (get_bits1(gb) << 1);
} else {
- t = get_bits(gb, bits) | mask;
+ t = get_bits(gb, bits) | 1 << bits;
sign = -get_bits1(gb);
t = (t ^ sign) - sign;
}
@@ -657,7 +656,7 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
if (!bits) {
t = 1 - (get_bits1(gb) << 1);
} else {
- t = get_bits(gb, bits) | mask;
+ t = get_bits(gb, bits) | 1 << bits;
sign = -get_bits1(gb);
t = (t ^ sign) - sign;
}
diff --git a/libavcodec/version.h b/libavcodec/version.h
index cd21d9504a..b7f01e95c6 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -21,7 +21,7 @@
#define AVCODEC_VERSION_H
#define LIBAVCODEC_VERSION_MAJOR 53
-#define LIBAVCODEC_VERSION_MINOR 33
+#define LIBAVCODEC_VERSION_MINOR 34
#define LIBAVCODEC_VERSION_MICRO 0
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c
index 79da7a6bfb..0b60651d08 100644
--- a/libavdevice/pulse.c
+++ b/libavdevice/pulse.c
@@ -46,6 +46,7 @@ typedef struct PulseData {
int fragment_size;
pa_simple *s;
int64_t pts;
+ int64_t frame_duration;
} PulseData;
static pa_sample_format_t codec_id_to_pulse_format(int codec_id) {
@@ -110,6 +111,8 @@ static av_cold int pulse_read_header(AVFormatContext *s,
av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in us */
pd->pts = AV_NOPTS_VALUE;
+ pd->frame_duration = (pd->frame_size * 1000000LL * 8) /
+ (pd->sample_rate * pd->channels * av_get_bits_per_sample(codec_id));
return 0;
}
@@ -119,8 +122,6 @@ static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt)
PulseData *pd = s->priv_data;
int res;
pa_usec_t latency;
- uint64_t frame_duration =
- (pd->frame_size*1000000LL) / (pd->sample_rate * pd->channels);
if (av_new_packet(pkt, pd->frame_size) < 0) {
return AVERROR(ENOMEM);
@@ -145,7 +146,7 @@ static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->pts = pd->pts;
- pd->pts += frame_duration;
+ pd->pts += pd->frame_duration;
return 0;
}
diff --git a/libavformat/options.c b/libavformat/options.c
index 4afb8b52bc..3290f92a37 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -53,30 +53,29 @@ static const AVClass *format_child_class_next(const AVClass *prev)
AVInputFormat *ifmt = NULL;
AVOutputFormat *ofmt = NULL;
- while (prev && (ifmt = av_iformat_next(ifmt)))
- if (ifmt->priv_class == prev){
- prev = NULL;
- break;
- }
if (!prev)
+#if !FF_API_OLD_AVIO
+ return &ffio_url_class;
+#else
+ prev = (void *)&ifmt; // Dummy pointer;
+#endif
+
+ while ((ifmt = av_iformat_next(ifmt)))
+ if (ifmt->priv_class == prev)
+ break;
+
+ if (!ifmt)
+ while ((ofmt = av_oformat_next(ofmt)))
+ if (ofmt->priv_class == prev)
+ break;
+ if (!ofmt)
while (ifmt = av_iformat_next(ifmt))
if (ifmt->priv_class)
return ifmt->priv_class;
- while (prev && (ofmt = av_oformat_next(ofmt)))
- if (ofmt->priv_class == prev){
- prev = NULL;
- break;
- }
- if (!prev)
- while (ofmt = av_oformat_next(ofmt))
- if (ofmt->priv_class)
- return ofmt->priv_class;
-
-#if !FF_API_OLD_AVIO
- if (prev != &ffio_url_class)
- return &ffio_url_class;
-#endif
+ while (ofmt = av_oformat_next(ofmt))
+ if (ofmt->priv_class)
+ return ofmt->priv_class;
return NULL;
}
diff --git a/libavutil/avutil.h b/libavutil/avutil.h
index ac84cccad2..72cfb8a3c0 100644
--- a/libavutil/avutil.h
+++ b/libavutil/avutil.h
@@ -40,8 +40,8 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 51
-#define LIBAVUTIL_VERSION_MINOR 24
-#define LIBAVUTIL_VERSION_MICRO 1
+#define LIBAVUTIL_VERSION_MINOR 25
+#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index 6648a7e8f5..958499db9d 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -790,6 +790,12 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
.log2_chroma_h = 1,
.flags = PIX_FMT_HWACCEL,
},
+ [PIX_FMT_VDA_VLD] = {
+ .name = "vda_vld",
+ .log2_chroma_w = 1,
+ .log2_chroma_h = 1,
+ .flags = PIX_FMT_HWACCEL,
+ },
[PIX_FMT_YUV420P9LE] = {
.name = "yuv420p9le",
.nb_components= 3,
diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h
index 6719e83489..37b694e7bf 100644
--- a/libavutil/pixfmt.h
+++ b/libavutil/pixfmt.h
@@ -151,6 +151,7 @@ enum PixelFormat {
PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
+ PIX_FMT_VDA_VLD, ///< hardware decoding through VDA
PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
@@ -158,8 +159,6 @@ enum PixelFormat {
PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
PIX_FMT_GBR24P, ///< planar GBR, 24bpp, 8G, 8B, 8R.
- PIX_FMT_VDA_VLD, ///< HW decoding through VDA.
-
PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
};