aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-29 08:42:14 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:16 +0100
commita12d3188cbec15e22070e139fa5cc541da07e2c3 (patch)
treed3fc06fc85319a761832f32fcbb811af9a1e8de2 /libavcodec/h264.h
parent94295106d20b32666a8c4e0d028ef79b9d3f3b7a (diff)
downloadffmpeg-a12d3188cbec15e22070e139fa5cc541da07e2c3.tar.gz
h264: use a smaller struct for the ref lists
There is no need to store a whole H264Picture, with a full AVFrame embedded in it. This should allow getting rid of the embedded AVFrame later.
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 8b73b752ad..9fc5c12fee 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -296,6 +296,17 @@ typedef struct H264Picture {
int recovered; ///< picture at IDR or recovery point + recovery count
} H264Picture;
+typedef struct H264Ref {
+ uint8_t *data[3];
+ int linesize[3];
+
+ int reference;
+ int poc;
+ int pic_id;
+
+ H264Picture *parent;
+} H264Ref;
+
typedef struct H264SliceContext {
struct H264Context *h264;
GetBitContext gb;
@@ -393,7 +404,7 @@ typedef struct H264SliceContext {
*/
unsigned int ref_count[2]; ///< counts frames or fields, depending on current mb mode
unsigned int list_count;
- H264Picture ref_list[2][48]; /**< 0..15: frame refs, 16..47: mbaff field refs.
+ H264Ref 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
@@ -585,7 +596,7 @@ typedef struct H264Context {
*/
int max_pic_num;
- H264Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture
+ H264Ref 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?