Mercurial > libavcodec.hg
comparison rangecoder.c @ 6169:43dd78019c14 libavcodec
Add #undef random and call the right function to fix test program compilation.
author | diego |
---|---|
date | Wed, 23 Jan 2008 10:18:08 +0000 |
parents | ecaf5226e9b0 |
children | e9d9d946f213 |
comparison
equal
deleted
inserted
replaced
6168:27f4e3175dac | 6169:43dd78019c14 |
---|---|
109 return c->bytestream - c->bytestream_start; | 109 return c->bytestream - c->bytestream_start; |
110 } | 110 } |
111 | 111 |
112 #ifdef TEST | 112 #ifdef TEST |
113 #define SIZE 10240 | 113 #define SIZE 10240 |
114 #undef random | |
114 int main(void){ | 115 int main(void){ |
115 RangeCoder c; | 116 RangeCoder c; |
116 uint8_t b[9*SIZE]; | 117 uint8_t b[9*SIZE]; |
117 uint8_t r[9*SIZE]; | 118 uint8_t r[9*SIZE]; |
118 int i; | 119 int i; |
131 START_TIMER | 132 START_TIMER |
132 put_rac(&c, state, r[i]&1); | 133 put_rac(&c, state, r[i]&1); |
133 STOP_TIMER("put_rac") | 134 STOP_TIMER("put_rac") |
134 } | 135 } |
135 | 136 |
136 ff_put_rac_terminate(&c); | 137 ff_rac_terminate(&c); |
137 | 138 |
138 ff_init_range_decoder(&c, b, SIZE); | 139 ff_init_range_decoder(&c, b, SIZE); |
139 | 140 |
140 memset(state, 128, sizeof(state)); | 141 memset(state, 128, sizeof(state)); |
141 | 142 |