Lines Matching refs:endbit
64 b->endbit=bits; in oggpack_writetrunc()
75 b->endbit=bits; in oggpackB_writetrunc()
97 bits+=b->endbit; in oggpack_write()
99 b->ptr[0]|=value<<b->endbit; in oggpack_write()
102 b->ptr[1]=(unsigned char)(value>>(8-b->endbit)); in oggpack_write()
104 b->ptr[2]=(unsigned char)(value>>(16-b->endbit)); in oggpack_write()
106 b->ptr[3]=(unsigned char)(value>>(24-b->endbit)); in oggpack_write()
108 if(b->endbit) in oggpack_write()
109 b->ptr[4]=(unsigned char)(value>>(32-b->endbit)); in oggpack_write()
119 b->endbit=bits&7; in oggpack_write()
138 bits+=b->endbit; in oggpackB_write()
140 b->ptr[0]|=value>>(24+b->endbit); in oggpackB_write()
143 b->ptr[1]=(unsigned char)(value>>(16+b->endbit)); in oggpackB_write()
145 b->ptr[2]=(unsigned char)(value>>(8+b->endbit)); in oggpackB_write()
147 b->ptr[3]=(unsigned char)(value>>(b->endbit)); in oggpackB_write()
149 if(b->endbit) in oggpackB_write()
150 b->ptr[4]=(unsigned char)(value<<(8-b->endbit)); in oggpackB_write()
160 b->endbit=bits&7; in oggpackB_write()
164 int bits=8-b->endbit; in oggpack_writealign()
170 int bits=8-b->endbit; in oggpackB_writealign()
187 if(b->endbit){ in oggpack_writecopy_helper()
233 b->endbit=b->endbyte=0; in oggpack_reset()
264 bits+=b->endbit; in oggpack_look()
271 ret=b->ptr[0]>>b->endbit; in oggpack_look()
273 ret|=b->ptr[1]<<(8-b->endbit); in oggpack_look()
275 ret|=b->ptr[2]<<(16-b->endbit); in oggpack_look()
277 ret|=b->ptr[3]<<(24-b->endbit); in oggpack_look()
278 if(bits>32 && b->endbit) in oggpack_look()
279 ret|=b->ptr[4]<<(32-b->endbit); in oggpack_look()
291 bits+=b->endbit; in oggpackB_look()
298 ret=b->ptr[0]<<(24+b->endbit); in oggpackB_look()
300 ret|=b->ptr[1]<<(16+b->endbit); in oggpackB_look()
302 ret|=b->ptr[2]<<(8+b->endbit); in oggpackB_look()
304 ret|=b->ptr[3]<<(b->endbit); in oggpackB_look()
305 if(bits>32 && b->endbit) in oggpackB_look()
306 ret|=b->ptr[4]>>(8-b->endbit); in oggpackB_look()
315 return((b->ptr[0]>>b->endbit)&1); in oggpack_look1()
320 return((b->ptr[0]>>(7-b->endbit))&1); in oggpackB_look1()
324 bits+=b->endbit; in oggpack_adv()
327 b->endbit=bits&7; in oggpack_adv()
335 if(++(b->endbit)>7){ in oggpack_adv1()
336 b->endbit=0; in oggpack_adv1()
351 bits+=b->endbit; in oggpack_read()
359 ret=b->ptr[0]>>b->endbit; in oggpack_read()
361 ret|=b->ptr[1]<<(8-b->endbit); in oggpack_read()
363 ret|=b->ptr[2]<<(16-b->endbit); in oggpack_read()
365 ret|=b->ptr[3]<<(24-b->endbit); in oggpack_read()
366 if(bits>32 && b->endbit){ in oggpack_read()
367 ret|=b->ptr[4]<<(32-b->endbit); in oggpack_read()
378 b->endbit=bits&7; in oggpack_read()
387 bits+=b->endbit; in oggpackB_read()
398 ret=b->ptr[0]<<(24+b->endbit); in oggpackB_read()
400 ret|=b->ptr[1]<<(16+b->endbit); in oggpackB_read()
402 ret|=b->ptr[2]<<(8+b->endbit); in oggpackB_read()
404 ret|=b->ptr[3]<<(b->endbit); in oggpackB_read()
405 if(bits>32 && b->endbit) in oggpackB_read()
406 ret|=b->ptr[4]>>(8-b->endbit); in oggpackB_read()
416 b->endbit=bits&7; in oggpackB_read()
429 ret=(b->ptr[0]>>b->endbit)&1; in oggpack_read1()
433 b->endbit++; in oggpack_read1()
434 if(b->endbit>7){ in oggpack_read1()
435 b->endbit=0; in oggpack_read1()
451 ret=(b->ptr[0]>>(7-b->endbit))&1; in oggpackB_read1()
455 b->endbit++; in oggpackB_read1()
456 if(b->endbit>7){ in oggpackB_read1()
457 b->endbit=0; in oggpackB_read1()
465 return(b->endbyte+(b->endbit+7)/8); in oggpack_bytes()
469 return(b->endbyte*8+b->endbit); in oggpack_bits()