From 7505c8dfba255f8e6c6dbb574d0cec91da16f24d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 27 Jan 2015 15:53:33 +0100 Subject: h264_cavlc: constify all uses of H264Context All the variables modified by this code are either per-MB arrays or have been moved to the per-slice context --- libavcodec/h264_cavlc.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'libavcodec/h264_cavlc.c') diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index 4e531db108..0a7dca2225 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -283,7 +283,7 @@ static int8_t cavlc_level_tab[7][1<non_zero_count_cache[index8 - 1]; @@ -442,7 +442,7 @@ static inline int get_level_prefix(GetBitContext *gb){ * @param max_coeff number of coefficients in the block * @return <0 if an error occurred */ -static int decode_residual(H264Context *h, H264SliceContext *sl, +static int decode_residual(const H264Context *h, H264SliceContext *sl, GetBitContext *gb, int16_t *block, int n, const uint8_t *scantable, const uint32_t *qmul, int max_coeff) @@ -628,7 +628,12 @@ static int decode_residual(H264Context *h, H264SliceContext *sl, return 0; } -static av_always_inline int decode_luma_residual(H264Context *h, H264SliceContext *sl, GetBitContext *gb, const uint8_t *scan, const uint8_t *scan8x8, int pixel_shift, int mb_type, int cbp, int p){ +static av_always_inline +int decode_luma_residual(const H264Context *h, H264SliceContext *sl, + GetBitContext *gb, const uint8_t *scan, + const uint8_t *scan8x8, int pixel_shift, + int mb_type, int cbp, int p) +{ int i4x4, i8x8; int qscale = p == 0 ? sl->qscale : sl->chroma_qp[p - 1]; if(IS_INTRA16x16(mb_type)){ @@ -694,7 +699,7 @@ static av_always_inline int decode_luma_residual(H264Context *h, H264SliceContex } } -int ff_h264_decode_mb_cavlc(H264Context *h, H264SliceContext *sl) +int ff_h264_decode_mb_cavlc(const H264Context *h, H264SliceContext *sl) { int mb_xy; int partition_count; -- cgit v1.2.3