[FFmpeg-cvslog] lavc: add vp9 profiles to AVCodecDescriptor
Hendrik Leppkes
git at videolan.org
Fri Jan 1 16:27:01 CET 2016
ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Fri Jan 1 16:25:01 2016 +0100| [e76064172098582148665df15484ae5d4e5194a9] | committer: Hendrik Leppkes
lavc: add vp9 profiles to AVCodecDescriptor
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e76064172098582148665df15484ae5d4e5194a9
---
libavcodec/codec_desc.c | 1 +
libavcodec/libvpxdec.c | 11 ++---------
libavcodec/libvpxenc.c | 11 ++---------
libavcodec/profiles.c | 8 ++++++++
libavcodec/profiles.h | 1 +
libavcodec/vp9.c | 11 ++---------
6 files changed, 16 insertions(+), 27 deletions(-)
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index a445c56..e814507 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 7267590..698c546 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 8588241..9cf32bf 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 fa6baed..94069fd 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 0314de3..7e1f74d 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 d5bdbc7..9a0bb82 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),
};
More information about the ffmpeg-cvslog
mailing list