summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-05-17 16:45:15 +0200
committerAnton Khirnov <anton@khirnov.net>2016-06-21 11:09:21 +0200
commitdebca90863e4ee53447efd02483c500f89766384 (patch)
tree975ff0f16546c0cad05df07ca1c17f1ff5393018 /libavcodec/h264.h
parentf966498e433fead2f5e6b5b66fad2ac062146d22 (diff)
h264: store {curr,max}_pic_num in the per-slice context
While the value of those variables will be constant for the whole frame, they are only used in two functions called from slice header decoding. Moving them to the per-slice context allows us to make the H264Context passed to slice_header_parse() constant.
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 4a109e119c..cc7dd7ffea 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -451,6 +451,8 @@ typedef struct H264SliceContext {
int poc_lsb;
int delta_poc_bottom;
int delta_poc[2];
+ int curr_pic_num;
+ int max_pic_num;
} H264SliceContext;
/**
@@ -565,16 +567,6 @@ typedef struct H264Context {
H264POCContext poc;
- /**
- * frame_num for frames or 2 * frame_num + 1 for field pics.
- */
- int curr_pic_num;
-
- /**
- * max_frame_num or 2 * max_frame_num for field pics.
- */
- int max_pic_num;
-
H264Picture *short_ref[32];
H264Picture *long_ref[32];
H264Picture *delayed_pic[MAX_DELAYED_PIC_COUNT + 2]; // FIXME size?