diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-24 10:44:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-24 10:44:42 +0200 |
commit | caac12bd49844c776e1acda2908df198998cea63 (patch) | |
tree | a8c43b30b7ee4e8d20352ee8ac7cd0b19a242c64 /libavcodec | |
parent | 1ea28ffc4dbcdda64dc2e774c186f668ef7b030f (diff) | |
parent | fb13fe8342faff6f7ca9c747aff5d7cf7c5202c6 (diff) | |
download | ffmpeg-streaming-caac12bd49844c776e1acda2908df198998cea63.zip ffmpeg-streaming-caac12bd49844c776e1acda2908df198998cea63.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
golomb: reduce scope of a few variables
Conflicts:
libavcodec/golomb.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/golomb.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/libavcodec/golomb.h b/libavcodec/golomb.h index 62eb86b..43875dc 100644 --- a/libavcodec/golomb.h +++ b/libavcodec/golomb.h @@ -53,7 +53,6 @@ extern const uint8_t ff_interleaved_dirac_golomb_vlc_code[256]; static inline int get_ue_golomb(GetBitContext *gb) { unsigned int buf; - int log; OPEN_READER(re, gb); UPDATE_CACHE(re, gb); @@ -66,7 +65,7 @@ static inline int get_ue_golomb(GetBitContext *gb) return ff_ue_golomb_vlc_code[buf]; } else { - log = 2 * av_log2(buf) - 31; + int log = 2 * av_log2(buf) - 31; LAST_SKIP_BITS(re, gb, 32 - log); CLOSE_READER(re, gb); if (CONFIG_FTRAPV && log < 0) { @@ -184,7 +183,6 @@ static inline int get_te_golomb(GetBitContext *gb, int range) static inline int get_se_golomb(GetBitContext *gb) { unsigned int buf; - int log; OPEN_READER(re, gb); UPDATE_CACHE(re, gb); @@ -197,7 +195,7 @@ static inline int get_se_golomb(GetBitContext *gb) return ff_se_golomb_vlc_code[buf]; } else { - log = av_log2(buf); + int log = av_log2(buf); LAST_SKIP_BITS(re, gb, 31 - log); UPDATE_CACHE(re, gb); buf = GET_CACHE(re, gb); @@ -219,7 +217,6 @@ static inline int get_se_golomb(GetBitContext *gb) static inline int svq3_get_se_golomb(GetBitContext *gb) { unsigned int buf; - int log; OPEN_READER(re, gb); UPDATE_CACHE(re, gb); @@ -232,6 +229,7 @@ static inline int svq3_get_se_golomb(GetBitContext *gb) return ff_interleaved_se_golomb_vlc_code[buf]; } else { + int log; LAST_SKIP_BITS(re, gb, 8); UPDATE_CACHE(re, gb); buf |= 1 | (GET_CACHE(re, gb) >> 8); @@ -251,12 +249,10 @@ static inline int svq3_get_se_golomb(GetBitContext *gb) static inline int dirac_get_se_golomb(GetBitContext *gb) { - uint32_t buf; - uint32_t ret; - - ret = svq3_get_ue_golomb(gb); + uint32_t ret = svq3_get_ue_golomb(gb); if (ret) { + uint32_t buf; OPEN_READER(re, gb); UPDATE_CACHE(re, gb); buf = SHOW_SBITS(re, gb, 1); @@ -469,8 +465,6 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func, */ static inline void set_ue_golomb(PutBitContext *pb, int i) { - int e; - av_assert2(i >= 0); #if 0 @@ -482,7 +476,7 @@ static inline void set_ue_golomb(PutBitContext *pb, int i) if (i < 256) put_bits(pb, ff_ue_golomb_len[i], i + 1); else { - e = av_log2(i + 1); + int e = av_log2(i + 1); put_bits(pb, 2 * e + 1, i + 1); } } |