Mercurial > libavcodec.hg
comparison cabac.h @ 5811:2926fc2a0396 libavcodec
Disable unused code; fixes several gcc warnings:
cabac.h:112: warning: ¡Æput_cabac_static¡Ç defined but not used
cabac.h:158: warning: ¡Æput_cabac_terminate¡Ç defined but not used
cabac.h:186: warning: ¡Æput_cabac_u¡Ç defined but not used
cabac.h:221: warning: ¡Æput_cabac_ueg¡Ç defined but not used
cabac.h:273: warning: ¡Ærefill2¡Ç defined but not used
cabac.h:811: warning: ¡Æget_cabac_u¡Ç defined but not used
cabac.h:827: warning: ¡Æget_cabac_ueg¡Ç defined but not used
author | diego |
---|---|
date | Fri, 12 Oct 2007 08:43:23 +0000 |
parents | 6e3cd570c312 |
children | bc467895b8c9 |
comparison
equal
deleted
inserted
replaced
5810:3e5e2bafe35c | 5811:2926fc2a0396 |
---|---|
88 c->range+= c->range; | 88 c->range+= c->range; |
89 c->low += c->low; | 89 c->low += c->low; |
90 } | 90 } |
91 } | 91 } |
92 | 92 |
93 #if 0 | |
93 static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ | 94 static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ |
94 int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state]; | 95 int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state]; |
95 | 96 |
96 if(bit == ((*state)&1)){ | 97 if(bit == ((*state)&1)){ |
97 c->range -= RangeLPS; | 98 c->range -= RangeLPS; |
257 | 258 |
258 if(is_signed) | 259 if(is_signed) |
259 put_cabac_bypass(c, sign); | 260 put_cabac_bypass(c, sign); |
260 } | 261 } |
261 } | 262 } |
263 #endif /* 0 */ | |
262 | 264 |
263 static void refill(CABACContext *c){ | 265 static void refill(CABACContext *c){ |
264 #if CABAC_BITS == 16 | 266 #if CABAC_BITS == 16 |
265 c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); | 267 c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); |
266 #else | 268 #else |
268 #endif | 270 #endif |
269 c->low -= CABAC_MASK; | 271 c->low -= CABAC_MASK; |
270 c->bytestream+= CABAC_BITS/8; | 272 c->bytestream+= CABAC_BITS/8; |
271 } | 273 } |
272 | 274 |
275 #if 0 | |
273 static void refill2(CABACContext *c){ | 276 static void refill2(CABACContext *c){ |
274 int i, x; | 277 int i, x; |
275 | 278 |
276 x= c->low ^ (c->low-1); | 279 x= c->low ^ (c->low-1); |
277 i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS-1)]; | 280 i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS-1)]; |
285 #endif | 288 #endif |
286 | 289 |
287 c->low += x<<i; | 290 c->low += x<<i; |
288 c->bytestream+= CABAC_BITS/8; | 291 c->bytestream+= CABAC_BITS/8; |
289 } | 292 } |
293 #endif | |
290 | 294 |
291 static inline void renorm_cabac_decoder(CABACContext *c){ | 295 static inline void renorm_cabac_decoder(CABACContext *c){ |
292 while(c->range < 0x100){ | 296 while(c->range < 0x100){ |
293 c->range+= c->range; | 297 c->range+= c->range; |
294 c->low+= c->low; | 298 c->low+= c->low; |
803 }else{ | 807 }else{ |
804 return c->bytestream - c->bytestream_start; | 808 return c->bytestream - c->bytestream_start; |
805 } | 809 } |
806 } | 810 } |
807 | 811 |
812 #if 0 | |
808 /** | 813 /** |
809 * Get (truncated) unary binarization. | 814 * Get (truncated) unary binarization. |
810 */ | 815 */ |
811 static int get_cabac_u(CABACContext *c, uint8_t * state, int max, int max_index, int truncated){ | 816 static int get_cabac_u(CABACContext *c, uint8_t * state, int max, int max_index, int truncated){ |
812 int i; | 817 int i; |
858 if(is_signed && get_cabac_bypass(c)){ | 863 if(is_signed && get_cabac_bypass(c)){ |
859 return -i; | 864 return -i; |
860 }else | 865 }else |
861 return i; | 866 return i; |
862 } | 867 } |
868 #endif /* 0 */ | |
863 | 869 |
864 #endif /* CABAC_H */ | 870 #endif /* CABAC_H */ |