Commit e7606417 authored by Hendrik Leppkes's avatar Hendrik Leppkes

lavc: add vp9 profiles to AVCodecDescriptor

parent 5e8b0534
......@@ -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,
......
......@@ -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 */
......@@ -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,
......
......@@ -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 */
......@@ -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
......@@ -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),
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment