Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
64355eca
Commit
64355eca
authored
Apr 27, 2011
by
John Koleszar
Committed by
Code Review
Apr 27, 2011
Browse files
Merge "Speed up VP8DX_BOOL_DECODER_FILL"
parents
f8ffecb1
5e1fd413
Changes
1
Show whitespace changes
Inline
Side-by-side
vp8/decoder/dboolhuff.h
View file @
64355eca
...
...
@@ -51,19 +51,26 @@ void vp8dx_bool_decoder_fill(BOOL_DECODER *br);
#define VP8DX_BOOL_DECODER_FILL(_count,_value,_bufptr,_bufend) \
do \
{ \
int shift; \
for(shift = VP8_BD_VALUE_SIZE - 8 - ((_count) + 8); shift >= 0; ) \
int shift = VP8_BD_VALUE_SIZE - 8 - ((_count) + 8); \
int loop_end, x; \
size_t bits_left = ((_bufend)-(_bufptr))*CHAR_BIT; \
\
x = shift + CHAR_BIT - bits_left; \
loop_end = 0; \
if(x >= 0) \
{ \
if((_bufptr) >= (_bufend)) { \
(_count) += VP8_LOTS_OF_BITS; \
break; \
loop_end = x; \
if(!bits_left) break; \
} \
(_count) += 8; \
while(shift >= loop_end) \
{ \
(_count) += CHAR_BIT; \
(_value) |= (VP8_BD_VALUE)*(_bufptr)++ << shift; \
shift -=
8
; \
shift -=
CHAR_BIT
; \
} \
} \
while(0)
while(0)
\
static
int
vp8dx_decode_bool
(
BOOL_DECODER
*
br
,
int
probability
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment