From debca90863e4ee53447efd02483c500f89766384 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 17 May 2016 16:45:15 +0200 Subject: 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. --- libavcodec/h264.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'libavcodec/h264.h') 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? -- cgit v1.2.3