From: Alexander V. <ava...@vo...> - 2008-04-17 15:03:52
|
HI all, I am examining the video code of iaxclient, and have one question. I cannot understand the bitwise operations used to calculate the subclass of video packets, in the following code: for encoding the subclass: fh->csub = compress_subclass(fr->af.subclass & ~0x1) | ((fr->af.subclass & 0x1) << 6); for decoding the subclass: subclass = uncompress_subclass(fh->csub & ~0x40) | ((fh->csub >> 6) & 0x1); Could someone explain this, I think it would be useful to all to have this documented. Best regards Alexander Vassilev |