Replace av_unused attributes by block structures

This is more portable and avoids warnings with compilers that do not
properly support av_unused.
This commit is contained in:
Diego Biurrun 2014-09-02 23:23:03 +02:00
parent 096a1d5b46
commit 213e606752
4 changed files with 32 additions and 21 deletions

View file

@ -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;