]> git.sesse.net Git - ffmpeg/commit
avcodec/mpeg12dec: Optimize reading mpeg2 intra escape codes
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 8 Oct 2020 19:45:21 +0000 (21:45 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sat, 10 Oct 2020 02:26:38 +0000 (04:26 +0200)
commitfe9bc1cc45e2bebba1efa7b9a20b0d66679bf2d5
treefe07756b61693916f5f8cda67d0ef74074ef4438
parenta11cc04786c298a8e4df3da12d8e275eaaf6b333
avcodec/mpeg12dec: Optimize reading mpeg2 intra escape codes

Said escape code is only six bits long, so that one has at least 25 - 6
bits in the bitstream reader's cache after reading it; therefore the
whole following 18 bits (containing the actual code) are already in the
bitstream reader's cache, making it unnecessary to reload the cache.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/mpeg12dec.c