aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rangecoder.h
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-09-02 23:23:03 +0200
committerDiego Biurrun <diego@biurrun.de>2014-09-05 13:55:04 +0200
commit213e606752d16f51337e94431962fb5d7749c07e (patch)
tree0a952a63f2338533101fb978e585c2a4d6ede03d /libavcodec/rangecoder.h
parent096a1d5b46391f65dfd0bee6292e9962f53bd7c8 (diff)
downloadffmpeg-213e606752d16f51337e94431962fb5d7749c07e.tar.gz
Replace av_unused attributes by block structures
This is more portable and avoids warnings with compilers that do not properly support av_unused.
Diffstat (limited to 'libavcodec/rangecoder.h')
-rw-r--r--libavcodec/rangecoder.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/rangecoder.h b/libavcodec/rangecoder.h
index ad9c81faa4..4c88169790 100644
--- a/libavcodec/rangecoder.h
+++ b/libavcodec/rangecoder.h
@@ -115,7 +115,6 @@ static inline void refill(RangeCoder *c)
static inline int get_rac(RangeCoder *c, uint8_t *const state)
{
int range1 = (c->range * (*state)) >> 8;
- int av_unused one_mask;
c->range -= range1;
#if 1
@@ -131,13 +130,14 @@ static inline int get_rac(RangeCoder *c, uint8_t *const state)
return 1;
}
#else
- one_mask = (c->range - c->low - 1) >> 31;
+ {
+ int one_mask one_mask = (c->range - c->low - 1) >> 31;
- c->low -= c->range & one_mask;
- c->range += (range1 - c->range) & one_mask;
-
- *state = c->zero_state[(*state) + (256 & one_mask)];
+ c->low -= c->range & one_mask;
+ c->range += (range1 - c->range) & one_mask;
+ *state = c->zero_state[(*state) + (256 & one_mask)];
+ }
refill(c);
return one_mask & 1;