diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-03 10:48:11 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-03 10:48:11 +0200 |
commit | 82fdfe8e51c593b484fd590368f2d70ef39f2bf8 (patch) | |
tree | ff95c2e7a87ca4929a8471e30765b8c7724faea6 | |
parent | 1607a985455287ccae3bfa46393a6cdfc04ce64f (diff) | |
parent | a8b19271c3b40ac3c3dc769fe248887acf14ba5a (diff) | |
download | ffmpeg-82fdfe8e51c593b484fd590368f2d70ef39f2bf8.tar.gz |
Merge commit 'a8b19271c3b40ac3c3dc769fe248887acf14ba5a'
* commit 'a8b19271c3b40ac3c3dc769fe248887acf14ba5a':
avcodec: Add output_picture_number to AVCodecParserContext
Conflicts:
doc/APIchanges
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | libavcodec/avcodec.h | 8 | ||||
-rw-r--r-- | libavcodec/h264.c | 3 | ||||
-rw-r--r-- | libavcodec/h264_parser.c | 2 | ||||
-rw-r--r-- | libavcodec/version.h | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index 2bb45fad10..8df27a87cd 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2012-10-22 API changes, most recent first: +2013-08-xx - xxxxxxx - lavc 55.11.0 - avcodec.h + Add output_picture_number to AVCodecParserContext. + 2013-07-XX - xxxxxxx - XXXXXXXXXXXXXX - avcodec.h Add avcodec_chroma_pos_to_enum() Add avcodec_enum_to_chroma_pos() diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 17c48ddde1..ae6625f5b9 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3960,6 +3960,14 @@ typedef struct AVCodecParserContext { * AV_PICTURE_STRUCTURE_TOP_FIELD. */ enum AVPictureStructure picture_structure; + + /** + * Picture number incremented in presentation or output order. + * This field may be reinitialized at the first picture of a new sequence. + * + * For example, this corresponds to H.264 PicOrderCnt. + */ + int output_picture_number; } AVCodecParserContext; typedef struct AVCodecParser { diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 2cb98df1f9..c08720876b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2768,8 +2768,7 @@ int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc) pic_field_poc[0] = field_poc[0]; if (h->picture_structure != PICT_TOP_FIELD) pic_field_poc[1] = field_poc[1]; - if (pic_poc) - *pic_poc = FFMIN(pic_field_poc[0], pic_field_poc[1]); + *pic_poc = FFMIN(pic_field_poc[0], pic_field_poc[1]); return 0; } diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index db5adf723e..f6bd1b6c06 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -288,7 +288,7 @@ static inline int parse_nal_units(AVCodecParserContext *s, h->delta_poc[1] = get_se_golomb(&h->gb); } - ff_init_poc(h, field_poc, NULL); + ff_init_poc(h, field_poc, &s->output_picture_number); if (h->sps.pic_struct_present_flag) { switch (h->sei_pic_struct) { diff --git a/libavcodec/version.h b/libavcodec/version.h index 06777bf3a0..38c7029ebf 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "libavutil/avutil.h" #define LIBAVCODEC_VERSION_MAJOR 55 -#define LIBAVCODEC_VERSION_MINOR 19 +#define LIBAVCODEC_VERSION_MINOR 20 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |