comparison cabac.h @ 3951:751bfc30df72 libavcodec

disable benchmarking code disable asm optims as the fastest depends on cpu type
author michael
date Sat, 07 Oct 2006 22:37:34 +0000
parents 900d21b85dd6
children 051a9c8b257f
comparison
equal deleted inserted replaced
3950:900d21b85dd6 3951:751bfc30df72
295 refill(c); 295 refill(c);
296 } 296 }
297 } 297 }
298 298
299 static inline void renorm_cabac_decoder_once(CABACContext *c){ 299 static inline void renorm_cabac_decoder_once(CABACContext *c){
300 #ifdef ARCH_X86 300 #ifdef ARCH_X86_DISABLED
301 int temp; 301 int temp;
302 #if 0 302 #if 0
303 //P3:683 athlon:475 303 //P3:683 athlon:475
304 asm( 304 asm(
305 "lea -0x2000000(%0), %2 \n\t" 305 "lea -0x2000000(%0), %2 \n\t"
365 refill(c); 365 refill(c);
366 } 366 }
367 367
368 static int get_cabac(CABACContext *c, uint8_t * const state){ 368 static int get_cabac(CABACContext *c, uint8_t * const state){
369 //FIXME gcc generates duplicate load/stores for c->low and c->range 369 //FIXME gcc generates duplicate load/stores for c->low and c->range
370 START_TIMER 370 //START_TIMER
371 int s = *state; 371 int s = *state;
372 int RangeLPS= c->lps_range[s][c->range>>(CABAC_BITS+7)]<<(CABAC_BITS+1); 372 int RangeLPS= c->lps_range[s][c->range>>(CABAC_BITS+7)]<<(CABAC_BITS+1);
373 int bit, lps_mask attribute_unused; 373 int bit, lps_mask attribute_unused;
374 374
375 c->range -= RangeLPS; 375 c->range -= RangeLPS;
404 c->range<<= lps_mask; 404 c->range<<= lps_mask;
405 c->low <<= lps_mask; 405 c->low <<= lps_mask;
406 if(!(c->low & CABAC_MASK)) 406 if(!(c->low & CABAC_MASK))
407 refill2(c); 407 refill2(c);
408 #endif 408 #endif
409 STOP_TIMER("get_cabac") 409 //STOP_TIMER("get_cabac")
410 return bit; 410 return bit;
411 } 411 }
412 412
413 static int get_cabac_bypass(CABACContext *c){ 413 static int get_cabac_bypass(CABACContext *c){
414 c->low += c->low; 414 c->low += c->low;