mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 02:20:07 +01:00
GetBitContext.size is allways multiplied by 8 -> use size_in_bits to avoid useless *8 in a few inner loops
Originally committed as revision 1486 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -99,10 +99,12 @@ void put_string(PutBitContext * pbc, char *s)
|
||||
/* bit input functions */
|
||||
|
||||
void init_get_bits(GetBitContext *s,
|
||||
UINT8 *buffer, int buffer_size)
|
||||
UINT8 *buffer, int bit_size)
|
||||
{
|
||||
const int buffer_size= (bit_size+7)>>3;
|
||||
|
||||
s->buffer= buffer;
|
||||
s->size= buffer_size;
|
||||
s->size_in_bits= bit_size;
|
||||
s->buffer_end= buffer + buffer_size;
|
||||
#ifdef ALT_BITSTREAM_READER
|
||||
s->index=0;
|
||||
|
||||
Reference in New Issue
Block a user