mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-18 22:55:12 +08:00
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:

committed by
Michael Niedermayer

parent
7062fad6e9
commit
d8e00c0997
@@ -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;
|
||||
|
Reference in New Issue
Block a user