Commit c90c5e39 authored by Laurent Aimar's avatar Laurent Aimar

Optimized a bit bs_skip.

parent c182c63a
...@@ -132,10 +132,12 @@ static inline void bs_skip( bs_t *s, int i_count ) ...@@ -132,10 +132,12 @@ static inline void bs_skip( bs_t *s, int i_count )
{ {
s->i_left -= i_count; s->i_left -= i_count;
while( s->i_left <= 0 ) if( s->i_left <= 0 )
{ {
s->p++; const int i_bytes = ( -s->i_left + 8 ) / 8;
s->i_left += 8;
s->p += i_bytes;
s->i_left += 8 * i_bytes;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment