comparison x86/vp56_arith.h @ 12385:d0b25641338b libavcodec

VP5/6/8: ~7% faster arithmetic decoding Grab from the bitstream in 16-bit chunks instead of 8-bit chunks. TODO: grab in 32-bit chunks on 64-bit systems.
author darkshikari
date Thu, 12 Aug 2010 01:11:32 +0000
parents eba266986930
children
comparison
equal deleted inserted replaced
12384:e1ef713061ce 12385:d0b25641338b
29 static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob) 29 static av_always_inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
30 { 30 {
31 unsigned int code_word = vp56_rac_renorm(c); 31 unsigned int code_word = vp56_rac_renorm(c);
32 unsigned int high = c->high; 32 unsigned int high = c->high;
33 unsigned int low = 1 + (((high - 1) * prob) >> 8); 33 unsigned int low = 1 + (((high - 1) * prob) >> 8);
34 unsigned int low_shift = low << 8; 34 unsigned int low_shift = low << 16;
35 int bit = 0; 35 int bit = 0;
36 36
37 __asm__( 37 __asm__(
38 "subl %4, %1 \n\t" 38 "subl %4, %1 \n\t"
39 "subl %3, %2 \n\t" 39 "subl %3, %2 \n\t"