From 2c6811397bdf13d43ca206e48d6d6da9c2cd47c6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 31 Dec 2014 07:57:59 +0100 Subject: lavc: add profiles to AVCodecDescriptor The profiles are a property of the codec, so it makes sense to export them through AVCodecDescriptors, not just the codec implementations. --- libavcodec/mpeg4videodec.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'libavcodec/mpeg4videodec.c') diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b09aeb2b74..ac9bb40b31 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -28,6 +28,7 @@ #include "mpegvideodata.h" #include "mpeg4video.h" #include "h263.h" +#include "profiles.h" #include "thread.h" #include "xvididct.h" @@ -2599,25 +2600,6 @@ static av_cold int decode_init(AVCodecContext *avctx) return 0; } -static const AVProfile mpeg4_video_profiles[] = { - { FF_PROFILE_MPEG4_SIMPLE, "Simple Profile" }, - { FF_PROFILE_MPEG4_SIMPLE_SCALABLE, "Simple Scalable Profile" }, - { FF_PROFILE_MPEG4_CORE, "Core Profile" }, - { FF_PROFILE_MPEG4_MAIN, "Main Profile" }, - { FF_PROFILE_MPEG4_N_BIT, "N-bit Profile" }, - { FF_PROFILE_MPEG4_SCALABLE_TEXTURE, "Scalable Texture Profile" }, - { FF_PROFILE_MPEG4_SIMPLE_FACE_ANIMATION, "Simple Face Animation Profile" }, - { FF_PROFILE_MPEG4_BASIC_ANIMATED_TEXTURE, "Basic Animated Texture Profile" }, - { FF_PROFILE_MPEG4_HYBRID, "Hybrid Profile" }, - { FF_PROFILE_MPEG4_ADVANCED_REAL_TIME, "Advanced Real Time Simple Profile" }, - { FF_PROFILE_MPEG4_CORE_SCALABLE, "Code Scalable Profile" }, - { FF_PROFILE_MPEG4_ADVANCED_CODING, "Advanced Coding Profile" }, - { FF_PROFILE_MPEG4_ADVANCED_CORE, "Advanced Core Profile" }, - { FF_PROFILE_MPEG4_ADVANCED_SCALABLE_TEXTURE, "Advanced Scalable Texture Profile" }, - { FF_PROFILE_MPEG4_SIMPLE_STUDIO, "Simple Studio Profile" }, - { FF_PROFILE_MPEG4_ADVANCED_SIMPLE, "Advanced Simple Profile" }, -}; - AVCodec ff_mpeg4_decoder = { .name = "mpeg4", .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), @@ -2632,6 +2614,6 @@ AVCodec ff_mpeg4_decoder = { AV_CODEC_CAP_FRAME_THREADS, .flush = ff_mpeg_flush, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, - .profiles = NULL_IF_CONFIG_SMALL(mpeg4_video_profiles), + .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles), .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context), }; -- cgit v1.2.3