| 1 |
/* { dg-additional-options "-fpermissive" } */ |
| 2 |
typedef struct RangeCoder |
| 3 |
{ |
| 4 |
unsigned char one_state[256]; |
| 5 |
} RangeCoder; |
| 6 |
static inline void put_rac(RangeCoder *c, unsigned char* const state) |
| 7 |
{ |
| 8 |
*state= c->one_state[*state]; |
| 9 |
} |
| 10 |
typedef struct PlaneContext{ |
| 11 |
unsigned (*state)[32]; |
| 12 |
} PlaneContext; |
| 13 |
static inline void put_symbol(RangeCoder *c, unsigned char *state) |
| 14 |
{ |
| 15 |
int i; |
| 16 |
const int e; |
| 17 |
put_rac(c, state); |
| 18 |
for(i=e-1; i>=0; i--) |
| 19 |
put_rac(c, state+22+i); |
| 20 |
} |
| 21 |
int encode_line(void) |
| 22 |
{ |
| 23 |
PlaneContext * const p; |
| 24 |
RangeCoder * const c; |
| 25 |
int a; |
| 26 |
put_symbol(c, p->state[a]); |
| 27 |
} |