diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 18:19:54 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 18:19:58 +0100 |
commit | e845b9573df1cc20dcfa466cec07de351d9cc754 (patch) | |
tree | 70144d2816043082179d57c30c012afd6454ffcc /libavcodec/h264_cavlc.c | |
parent | eb058a8dc5acf01860bd103d0ae64e68715226bc (diff) | |
parent | 7505c8dfba255f8e6c6dbb574d0cec91da16f24d (diff) | |
download | ffmpeg-e845b9573df1cc20dcfa466cec07de351d9cc754.tar.gz |
Merge commit '7505c8dfba255f8e6c6dbb574d0cec91da16f24d'
* commit '7505c8dfba255f8e6c6dbb574d0cec91da16f24d':
h264_cavlc: constify all uses of H264Context
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_cavlc.c')
-rw-r--r-- | libavcodec/h264_cavlc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index 0e26ff22ae..ce14dcef5e 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -284,7 +284,7 @@ static int8_t cavlc_level_tab[7][1<<LEVEL_TAB_BITS][2]; * Get the predicted number of non-zero coefficients. * @param n block index */ -static inline int pred_non_zero_count(H264Context *h, H264SliceContext *sl, int n) +static inline int pred_non_zero_count(const H264Context *h, H264SliceContext *sl, int n) { const int index8= scan8[n]; const int left = sl->non_zero_count_cache[index8 - 1]; @@ -443,7 +443,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) @@ -635,7 +635,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)){ @@ -701,7 +706,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; |