From 4623420d84e97d141c20078cfa09c7568f693bd5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 27 Aug 2011 10:16:14 +0200 Subject: mpeg4enc: add 'data_partitioning' private option. Deprecate CODEC_FLAG_PART --- libavcodec/mpeg4videoenc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libavcodec/mpeg4videoenc.c') diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 900903779c..ad3e604df0 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/log.h" +#include "libavutil/opt.h" #include "mpegvideo.h" #include "h263.h" #include "mpeg4video.h" @@ -1274,6 +1276,20 @@ void ff_mpeg4_encode_video_packet_header(MpegEncContext *s) put_bits(&s->pb, 1, 0); /* no HEC */ } +#define OFFSET(x) offsetof(MpegEncContext, x) +#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM +static const AVOption options[] = { + { "data_partitioning", "Use data partitioning.", OFFSET(data_partitioning), FF_OPT_TYPE_INT, { 0 }, 0, 1, VE }, + { NULL }, +}; + +static const AVClass mpeg4enc_class = { + .class_name = "MPEG4 encoder", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_mpeg4_encoder = { .name = "mpeg4", .type = AVMEDIA_TYPE_VIDEO, @@ -1285,4 +1301,5 @@ AVCodec ff_mpeg4_encoder = { .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, .capabilities= CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), + .priv_class = &mpeg4enc_class, }; -- cgit v1.2.3