bitstream reader optimize patch by (BERO <bero at geocities dot co dot jp>)

Originally committed as revision 1871 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
BERO
2003-05-14 00:32:22 +00:00
committed by Michael Niedermayer
parent 7062fad6e9
commit d8e00c0997
4 changed files with 72 additions and 19 deletions

View File

@@ -140,9 +140,19 @@ void init_get_bits(GetBitContext *s,
#ifdef ALT_BITSTREAM_READER
s->index=0;
#elif defined LIBMPEG2_BITSTREAM_READER
#ifdef LIBMPEG2_BITSTREAM_HACK
if ((int)buffer&1) {
/* word alignment */
s->cache = (*buffer++)<<24;
s->buffer_ptr = buffer;
s->bit_count = 16-8;
} else
#endif
{
s->buffer_ptr = buffer;
s->bit_count = 16;
s->cache = 0;
}
#elif defined A32_BITSTREAM_READER
s->buffer_ptr = (uint32_t*)buffer;
s->bit_count = 32;