[XviD-devel] Regarding the BitstreamPutBits function in the bitstream.h file

Naveen Kumar naveen_ece09 at yahoo.com
Fri Mar 7 09:57:51 CET 2008


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


More information about the XviD-devel mailing list