summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2016-01-01 16:25:01 +0100
committerHendrik Leppkes <h.leppkes@gmail.com>2016-01-01 16:25:50 +0100
commite76064172098582148665df15484ae5d4e5194a9 (patch)
tree4b4fc134ad23cf84c95393c3d6508af767da8194 /libavcodec
parent5e8b05345243cdec3ca01116ce130da812ffed3d (diff)
downloadffmpeg-e76064172098582148665df15484ae5d4e5194a9.tar.gz
lavc: add vp9 profiles to AVCodecDescriptor
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/codec_desc.c1
-rw-r--r--libavcodec/libvpxdec.c11
-rw-r--r--libavcodec/libvpxenc.c11
-rw-r--r--libavcodec/profiles.c8
-rw-r--r--libavcodec/profiles.h1
-rw-r--r--libavcodec/vp9.c11
6 files changed, 16 insertions, 27 deletions
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index a445c565e6..e81450719a 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -917,6 +917,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
.name = "vp9",
.long_name = NULL_IF_CONFIG_SMALL("Google VP9"),
.props = AV_CODEC_PROP_LOSSY,
+ .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
},
{
.id = AV_CODEC_ID_PICTOR,
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 7267590e01..698c546277 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -32,6 +32,7 @@
#include "avcodec.h"
#include "internal.h"
#include "libvpx.h"
+#include "profiles.h"
typedef struct VP8DecoderContext {
struct vpx_codec_ctx decoder;
@@ -242,14 +243,6 @@ static av_cold int vp9_init(AVCodecContext *avctx)
return vpx_init(avctx, &vpx_codec_vp9_dx_algo);
}
-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_decoder = {
.name = "libvpx-vp9",
.long_name = NULL_IF_CONFIG_SMALL("libvpx VP9"),
@@ -261,6 +254,6 @@ AVCodec ff_libvpx_vp9_decoder = {
.decode = vp8_decode,
.capabilities = AV_CODEC_CAP_AUTO_THREADS | AV_CODEC_CAP_DR1,
.init_static_data = ff_vp9_init_static,
- .profiles = NULL_IF_CONFIG_SMALL(profiles),
+ .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
};
#endif /* CONFIG_LIBVPX_VP9_DECODER */
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 85882411f8..9cf32bf001 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -32,6 +32,7 @@
#include "internal.h"
#include "libavutil/avassert.h"
#include "libvpx.h"
+#include "profiles.h"
#include "libavutil/base64.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
@@ -1077,14 +1078,6 @@ 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"),
@@ -1095,7 +1088,7 @@ AVCodec ff_libvpx_vp9_encoder = {
.encode2 = vp8_encode,
.close = vp8_free,
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AUTO_THREADS,
- .profiles = NULL_IF_CONFIG_SMALL(profiles),
+ .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
.priv_class = &class_vp9,
.defaults = defaults,
.init_static_data = ff_vp9_init_static,
diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
index fa6baedfeb..94069fd692 100644
--- a/libavcodec/profiles.c
+++ b/libavcodec/profiles.c
@@ -121,4 +121,12 @@ const AVProfile ff_vc1_profiles[] = {
{ FF_PROFILE_UNKNOWN },
};
+const AVProfile ff_vp9_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 },
+};
+
#endif /* !CONFIG_SMALL */
diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
index 0314de351b..7e1f74d0ff 100644
--- a/libavcodec/profiles.h
+++ b/libavcodec/profiles.h
@@ -30,5 +30,6 @@ extern const AVProfile ff_jpeg2000_profiles[];
extern const AVProfile ff_mpeg2_video_profiles[];
extern const AVProfile ff_mpeg4_video_profiles[];
extern const AVProfile ff_vc1_profiles[];
+extern const AVProfile ff_vp9_profiles[];
#endif
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index d5bdbc7e6c..9a0bb8224d 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -24,6 +24,7 @@
#include "avcodec.h"
#include "get_bits.h"
#include "internal.h"
+#include "profiles.h"
#include "thread.h"
#include "videodsp.h"
#include "vp56.h"
@@ -4336,14 +4337,6 @@ static int vp9_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo
}
#endif
-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_vp9_decoder = {
.name = "vp9",
.long_name = NULL_IF_CONFIG_SMALL("Google VP9"),
@@ -4357,5 +4350,5 @@ AVCodec ff_vp9_decoder = {
.flush = vp9_decode_flush,
.init_thread_copy = ONLY_IF_THREADS_ENABLED(vp9_decode_init_thread_copy),
.update_thread_context = ONLY_IF_THREADS_ENABLED(vp9_decode_update_thread_context),
- .profiles = NULL_IF_CONFIG_SMALL(profiles),
+ .profiles = NULL_IF_CONFIG_SMALL(ff_vp9_profiles),
};