Displaying 4 results from an estimated 4 matches for "byteptr".
Did you mean:
byte_ptr
2004 Aug 06
0
some optimizations...
i'm optimizing some features....for exemple why not doing this :
-------------------------------------------------------------------------------
void speex_bits_advance(SpeexBits *bits, int n)
{
if (((bits->bytePtr<<3)+bits->bitPtr+n>bits->nbBits) || bits->overflow){
bits->overflow=1;
return;
}
bits->bytePtr += (bits->bitPtr+nbBits) >> 3; //divide by 8
bits->bitPtr = (bits->bitPtr+nbBits) & 7; // modulo by 8
}
--------------------------------...
2004 Aug 06
1
speex_bits_pack optimizations...
...optimization you can do for packing bits together...
the original one is :
-------------------------------------------------------------------------------------------------------------
void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
{
int i;
unsigned int d=data;
if (bits->bytePtr+((nbBits+bits->bitPtr)>>3) >= bits->buf_size)
{
//remain unchanged....
}
while(nbBits)
{
int bit;
bit = (d>>(nbBits-1))&1;
bits->bytes[bits->bytePtr] |= bit<<(7-bits->bitPtr);
bits->bitPtr++;
if (bits->...
2006 Dec 09
1
New function for manipulating SpeexBits
...llowing function added to the speex
bits...
void speex_bits_read_from_buffer(
SpeexBits * const bits,
void * const buff,
const int buf_size)
{
bits->bytes = (char*)buff;
bits->buf_size = buf_size;
bits->nbBits = buf_size << 3;
bits->bytePtr = 0;
bits->bitPtr = 0;
bits->owner = 0;
bits->overflow = 0;
}
... so a bitstream can be assigned to a SpeexBits structure for
processing by a decoder rather than unnecessarily copying the data.
As an aside, I'm working on a certain high profile embedded game's...
2006 Dec 11
0
New function for manipulating SpeexBits
...> void speex_bits_read_from_buffer(
> SpeexBits * const bits,
> void * const buff,
> const int buf_size)
> {
> bits->bytes = (char*)buff;
> bits->buf_size = buf_size;
> bits->nbBits = buf_size << 3;
> bits->bytePtr = 0;
> bits->bitPtr = 0;
> bits->owner = 0;
> bits->overflow = 0;
> }
>
> ... so a bitstream can be assigned to a SpeexBits structure for
> processing by a decoder rather than unnecessarily copying the data.
>
>
> As an aside, I'm wor...