aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-17 05:49:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-17 05:51:27 +0100
commitc237e88d51b9da12026734101a9ba578d04b4b15 (patch)
tree4619fc3624a92400ad92ee2b61e42f3678037a67 /libavcodec/h264.h
parent4f22e39e65e9e4705845fb091a05ca4526eb835a (diff)
parent9b749c8274f6b6f35dde2cf29b99fa4f719abf87 (diff)
downloadffmpeg-c237e88d51b9da12026734101a9ba578d04b4b15.tar.gz
Merge commit '9b749c8274f6b6f35dde2cf29b99fa4f719abf87'
* commit '9b749c8274f6b6f35dde2cf29b99fa4f719abf87': h264: move relevant fields from Picture to H264Picture Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h60
1 files changed, 51 insertions, 9 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 840a91d35b..613c356228 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -281,6 +281,48 @@ typedef struct MMCO {
int long_arg; ///< index, pic_num, or num long refs depending on opcode
} MMCO;
+typedef struct H264Picture {
+ struct AVFrame f;
+ ThreadFrame tf;
+
+ AVBufferRef *qscale_table_buf;
+ int8_t *qscale_table;
+
+ AVBufferRef *motion_val_buf[2];
+ int16_t (*motion_val[2])[2];
+
+ AVBufferRef *mb_type_buf;
+ uint32_t *mb_type;
+
+ AVBufferRef *hwaccel_priv_buf;
+ void *hwaccel_picture_private; ///< hardware accelerator private data
+
+ AVBufferRef *ref_index_buf[2];
+ int8_t *ref_index[2];
+
+ int field_poc[2]; ///< top/bottom POC
+ int poc; ///< frame POC
+ int frame_num; ///< frame_num (raw frame_num from slice header)
+ int mmco_reset; /**< MMCO_RESET set this 1. Reordering code must
+ not mix pictures before and after MMCO_RESET. */
+ int pic_id; /**< pic_num (short -> no wrap version of pic_num,
+ pic_num & max_pic_num; long -> long_pic_num) */
+ int long_ref; ///< 1->long term reference 0->short term reference
+ int ref_poc[2][2][32]; ///< POCs of the frames used as reference (FIXME need per slice)
+ int ref_count[2][2]; ///< number of entries in ref_poc (FIXME need per slice)
+ int mbaff; ///< 1 -> MBAFF frame 0-> not MBAFF
+ int field_picture; ///< whether or not picture was encoded in separate fields
+
+ int needs_realloc; ///< picture needs to be reallocated (eg due to a frame size change)
+ int reference;
+ int recovered; ///< picture at IDR or recovery point + recovery count
+ int invalid_gap;
+
+ int crop;
+ int crop_left;
+ int crop_top;
+} H264Picture;
+
/**
* H264Context
*/
@@ -296,9 +338,9 @@ typedef struct H264Context {
DSPContext dsp;
ERContext er;
- Picture *DPB;
- Picture *cur_pic_ptr;
- Picture cur_pic;
+ H264Picture *DPB;
+ H264Picture *cur_pic_ptr;
+ H264Picture cur_pic;
int pixel_shift; ///< 0 for 8-bit H264, 1 for high-bit-depth H264
int chroma_qp[2]; // QPc
@@ -433,7 +475,7 @@ typedef struct H264Context {
unsigned int ref_count[2]; ///< counts frames or fields, depending on current mb mode
unsigned int list_count;
uint8_t *list_counts; ///< Array of list_count per MB specifying the slice type
- Picture ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs.
+ H264Picture ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs.
* Reordered version of default_ref_list
* according to picture reordering in slice header */
int ref2frm[MAX_SLICES][2][64]; ///< reference to frame number lists, used in the loop filter, the first 2 are for -2,-1
@@ -548,12 +590,12 @@ typedef struct H264Context {
int redundant_pic_count;
- Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture
- Picture *short_ref[32];
- Picture *long_ref[32];
- Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size?
+ H264Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture
+ H264Picture *short_ref[32];
+ H264Picture *long_ref[32];
+ H264Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size?
int last_pocs[MAX_DELAYED_PIC_COUNT];
- Picture *next_output_pic;
+ H264Picture *next_output_pic;
int outputed_poc;
int next_outputed_poc;