summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videoenc.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-27 10:16:14 +0200
committerAnton Khirnov <anton@khirnov.net>2011-08-31 13:25:18 +0200
commit4623420d84e97d141c20078cfa09c7568f693bd5 (patch)
tree84969fd04f76c854818d040c7fde0c63c0d6a475 /libavcodec/mpeg4videoenc.c
parent0cc06b9e23bc798b1af3302d095db23f000a97e6 (diff)
mpeg4enc: add 'data_partitioning' private option.
Deprecate CODEC_FLAG_PART
Diffstat (limited to 'libavcodec/mpeg4videoenc.c')
-rw-r--r--libavcodec/mpeg4videoenc.c17
1 files changed, 17 insertions, 0 deletions
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,
};