Mercurial > libdvdnav.hg
comparison dvdread/nav_read.c @ 240:585e0f683973 src
nesting and indentation do not match, but I think the braces do not actually
change anything
author | mroi |
---|---|
date | Mon, 16 Feb 2004 15:53:20 +0000 |
parents | 9b1b740e3fc9 |
children | e75c52894630 |
comparison
equal
deleted
inserted
replaced
239:eaa775ba1306 | 240:585e0f683973 |
---|---|
75 state->byte = state->start[state->byte_position]; | 75 state->byte = state->start[state->byte_position]; |
76 } | 76 } |
77 number_of_bits = 0; | 77 number_of_bits = 0; |
78 } | 78 } |
79 } | 79 } |
80 if ((state->bit_position) == 0) | 80 if ((state->bit_position) == 0) { |
81 while (number_of_bits > 7) { | 81 while (number_of_bits > 7) { |
82 result = (result << 8) + state->byte; | 82 result = (result << 8) + state->byte; |
83 state->byte_position++; | 83 state->byte_position++; |
84 state->byte = state->start[state->byte_position]; | 84 state->byte = state->start[state->byte_position]; |
85 number_of_bits -= 8; | 85 number_of_bits -= 8; |
90 state->bit_position += number_of_bits; /* Here it is impossible for bit_position > 7 */ | 90 state->bit_position += number_of_bits; /* Here it is impossible for bit_position > 7 */ |
91 byte = byte >> (8 - number_of_bits); | 91 byte = byte >> (8 - number_of_bits); |
92 result = (result << number_of_bits) + byte; | 92 result = (result << number_of_bits) + byte; |
93 number_of_bits = 0; | 93 number_of_bits = 0; |
94 } | 94 } |
95 } | |
95 | 96 |
96 return result; | 97 return result; |
97 } | 98 } |
98 | 99 |
99 #if 0 /* TODO: optimized versions not yet used */ | 100 #if 0 /* TODO: optimized versions not yet used */ |