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>
pull/41/head
Michael Niedermayer 11 years ago
commit caac12bd49
  1. 18
      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);
}
}

Loading…
Cancel
Save