diff options
author | Wan-Teh Chang <wtc-at-google.com@ffmpeg.org> | 2017-07-20 10:31:19 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-07-21 02:08:33 +0200 |
commit | 99c5ac20397ec1814d6a50bed74cadd421ad8b9d (patch) | |
tree | 45889108ba3640e0cc9c24a2b73c30b628ee6b4d /libavcodec/h264_cavlc.c | |
parent | b77e26b28525f366c5f978214b230a5324bedf81 (diff) | |
download | ffmpeg-99c5ac20397ec1814d6a50bed74cadd421ad8b9d.tar.gz |
avcodec/h264: Declare the local variable decode_chroma as const.
ff_h264_decode_mb_cabac() and ff_h264_decode_mb_cavlc() are very long
functions. Declaring decode_chroma as const makes it clear the variable
doesn't change after initialization.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/h264_cavlc.c')
-rw-r--r-- | libavcodec/h264_cavlc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index f01e76070c..187b1c64e2 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -704,8 +704,8 @@ int ff_h264_decode_mb_cavlc(const H264Context *h, H264SliceContext *sl) int mb_xy; int partition_count; unsigned int mb_type, cbp; - int dct8x8_allowed= h->ps.pps->transform_8x8_mode; - int decode_chroma = h->ps.sps->chroma_format_idc == 1 || h->ps.sps->chroma_format_idc == 2; + int dct8x8_allowed = h->ps.pps->transform_8x8_mode; + const int decode_chroma = h->ps.sps->chroma_format_idc == 1 || h->ps.sps->chroma_format_idc == 2; const int pixel_shift = h->pixel_shift; mb_xy = sl->mb_xy = sl->mb_x + sl->mb_y*h->mb_stride; |