[FFmpeg-cvslog] avcodec: Add picture structure information to AVCodecParserContext.

Yusuke Nakamura git at videolan.org
Fri May 24 12:00:35 CEST 2013


ffmpeg | branch: master | Yusuke Nakamura <muken.the.vfrmaniac at gmail.com> | Wed May 15 07:36:15 2013 +0900| [b493847df4ff8ce46f258749e4a3f304696b34c1] | committer: Anton Khirnov

avcodec: Add picture structure information to AVCodecParserContext.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b493847df4ff8ce46f258749e4a3f304696b34c1
---

 doc/APIchanges       |    3 +++
 libavcodec/avcodec.h |   17 +++++++++++++++++
 libavcodec/version.h |    2 +-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index fe1e1b3..4229453 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -13,6 +13,9 @@ libavutil:     2012-10-22
 
 API changes, most recent first:
 
+2013-05-xx - xxxxxxx - lavc 55.7.0 - avcodec.h
+  Add picture_structure to AVCodecParserContext.
+
 2013-05-xx - xxxxxxx - lavu 52.11.0 - pixdesc.h
   Replace PIX_FMT_* flags with AV_PIX_FMT_FLAG_*.
 
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index b48ba0c..21e0491 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3407,6 +3407,13 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
  * @{
  */
 
+enum AVPictureStructure {
+    AV_PICTURE_STRUCTURE_UNKNOWN,      //< unknown
+    AV_PICTURE_STRUCTURE_TOP_FIELD,    //< coded as top field
+    AV_PICTURE_STRUCTURE_BOTTOM_FIELD, //< coded as bottom field
+    AV_PICTURE_STRUCTURE_FRAME,        //< coded as frame
+};
+
 typedef struct AVCodecParserContext {
     void *priv_data;
     struct AVCodecParser *parser;
@@ -3542,6 +3549,16 @@ typedef struct AVCodecParserContext {
     int duration;
 
     enum AVFieldOrder field_order;
+
+    /**
+     * Indicate whether a picture is coded as a frame, top field or bottom field.
+     *
+     * For example, H.264 field_pic_flag equal to 0 corresponds to
+     * AV_PICTURE_STRUCTURE_FRAME. An H.264 picture with field_pic_flag
+     * equal to 1 and bottom_field_flag equal to 0 corresponds to
+     * AV_PICTURE_STRUCTURE_TOP_FIELD.
+     */
+    enum AVPictureStructure picture_structure;
 } AVCodecParserContext;
 
 typedef struct AVCodecParser {
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 065f71f..5fd9bd2 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
  */
 
 #define LIBAVCODEC_VERSION_MAJOR 55
-#define LIBAVCODEC_VERSION_MINOR  6
+#define LIBAVCODEC_VERSION_MINOR  7
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \



More information about the ffmpeg-cvslog mailing list