[FFmpeg-devel] [PATCH 2/4] avc/avcodec: add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag
Linjie Fu
linjie.fu at intel.com
Mon Jul 29 17:43:52 EEST 2019
Add AV_CODEC_CAP_VARIABLE_DIMENSIONS flag to indicate whether encoder
supports variable dimension encoding.
Signed-off-by: Linjie Fu <linjie.fu at intel.com>
---
fftools/cmdutils.c | 2 ++
libavcodec/avcodec.h | 5 +++++
libavcodec/rawenc.c | 1 +
libavcodec/version.h | 2 +-
4 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 9cfbc45..25ea1c6 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -1424,6 +1424,8 @@ static void print_codec(const AVCodec *c)
printf("hardware ");
if (c->capabilities & AV_CODEC_CAP_HYBRID)
printf("hybrid ");
+ if (c->capabilities & AV_CODEC_CAP_VARIABLE_DIMENSIONS)
+ printf("multidimension ");
if (!c->capabilities)
printf("none");
printf("\n");
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index d234271..a7704ea 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1092,6 +1092,11 @@ typedef struct RcOverride{
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE (1 << 20)
/**
+ * Codec supports variable dimensions in encoding.
+ */
+#define AV_CODEC_CAP_VARIABLE_DIMENSIONS (1 << 21)
+
+/**
* Pan Scan area.
* This specifies the area which should be displayed.
* Note there may be multiple such areas for one frame.
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index d181b74..486c0d7 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -92,4 +92,5 @@ AVCodec ff_rawvideo_encoder = {
.id = AV_CODEC_ID_RAWVIDEO,
.init = raw_encode_init,
.encode2 = raw_encode,
+ .capabilities = AV_CODEC_CAP_VARIABLE_DIMENSIONS,
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 43c8cdb..e70ebc0 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 55
-#define LIBAVCODEC_VERSION_MICRO 100
+#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
--
2.7.4
More information about the ffmpeg-devel
mailing list