Regarding the BitstreamPutBits function in the bitstream.h file

Naveen Kumar <[email protected]>
Newsgroups gmane.comp.video.xvid.devel
Message-ID <[email protected]>
Hello,

I am trying to understand the xvid code downloaded from the xvid.org site.CAn amy one help me in explaining the BitstreamPutBits function as given below:,means what the function is exactly doing.


static void __inline
siso_mpeg4enc_BitstreamPutBits(siso_mpeg4enc_Bitstream * const bs,
     const uint32_t value,
     const uint32_t size)
{
 uint32_t shift = 32 - bs->pos - size;
 if (shift <= 32) {
  bs->buf |= value << shift;
  siso_mpeg4enc_BitstreamForward(bs, size);
 } else {
  uint32_t remainder;
  shift = size - (32 - bs->pos);
  bs->buf |= value >> shift;
  siso_mpeg4enc_BitstreamForward(bs, size - shift);
  remainder = shift;
  shift = 32 - shift;
  bs->buf |= value << shift;
  siso_mpeg4enc_BitstreamForward(bs, remainder);
 }
}


Can anyone provide me the link to the documentation for the xvid encoder ,I mean what the function exactly does. and even the explanation for the structure members

thanks in advance

regards,
naveen


      Now you can chat without downloading messenger. Go to http://in.messenger..yahoo.com/webmessengerpromo.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.