summaryrefslogtreecommitdiff
path: root/libavcodec/libvpxenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-21 21:48:44 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-21 22:57:54 +0200
commit1e7008675b2d930955b0295808ef208d92e5639d (patch)
tree7613e4d48a8d265373b678fe709ec81ab3d1d308 /libavcodec/libvpxenc.c
parent30e9ebb14f197bbc3fcbde467da39d1a79ac8d52 (diff)
parent8655c54160767de1a6b96f8bc310d6e4eaceff48 (diff)
Merge commit '8655c54160767de1a6b96f8bc310d6e4eaceff48'
* commit '8655c54160767de1a6b96f8bc310d6e4eaceff48': libvpx: Support the vp9 extended profiles Conflicts: Changelog configure libavcodec/libvpx.c libavcodec/libvpx.h libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/version.h mostly not merged, as requested by jamrial See: 01e59d48ed1a41b88107ed1d4d56ae0cbcd1a60e See: 079b7f6eacc09bc2813fc1ddc230ab05022b69c2 and others Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libvpxenc.c')
-rw-r--r--libavcodec/libvpxenc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index a5b750f8ba..a7303f8af3 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -381,7 +381,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
const struct vpx_codec_iface *iface)
{
VP8Context *ctx = avctx->priv_data;
- struct vpx_codec_enc_cfg enccfg;
+ struct vpx_codec_enc_cfg enccfg = { 0 };
struct vpx_codec_enc_cfg enccfg_alpha;
vpx_codec_flags_t flags = (avctx->flags & CODEC_FLAG_PSNR) ? VPX_CODEC_USE_PSNR : 0;
int res;
@@ -1056,6 +1056,14 @@ static const AVClass class_vp9 = {
.version = LIBAVUTIL_VERSION_INT,
};
+static const AVProfile profiles[] = {
+ { FF_PROFILE_VP9_0, "Profile 0" },
+ { FF_PROFILE_VP9_1, "Profile 1" },
+ { FF_PROFILE_VP9_2, "Profile 2" },
+ { FF_PROFILE_VP9_3, "Profile 3" },
+ { FF_PROFILE_UNKNOWN },
+};
+
AVCodec ff_libvpx_vp9_encoder = {
.name = "libvpx-vp9",
.long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"),
@@ -1066,6 +1074,7 @@ AVCodec ff_libvpx_vp9_encoder = {
.encode2 = vp8_encode,
.close = vp8_free,
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS,
+ .profiles = NULL_IF_CONFIG_SMALL(profiles),
.priv_class = &class_vp9,
.defaults = defaults,
.init_static_data = ff_vp9_init_static,