在算术编码的文件biariencode.c中,以下put_byte() ,put_one_bit(b),put_one_bit_plus_outstanding(b)分别是做什麽用的始终不太清楚,麻烦高人指点一下,谢谢!
************************************************************************
* Macro for writing bytes of code
***********************************************************************
*/
#define put_byte() { \
Ecodestrm[(*Ecodestrm_len)++] = Ebuffer; \
Ebits_to_go = 8; \
while (eep->C > 7) { \
eep->C-=8; \
eep->E++; \
} \
}
#define put_one_bit(b) { \
Ebuffer <<= 1; Ebuffer |= (b); \
if (--Ebits_to_go == 0) \
put_byte(); \
}
#define put_one_bit_plus_outstanding(b) { \
put_one_bit(b); \
while (Ebits_to_follow > 0) \
{ \
Ebits_to_follow--; \
put_one_bit(!(b)); \
} \
}