]> git.sesse.net Git - ffmpeg/commit
h264: move q0 scan tables into context
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 31 May 2012 18:19:56 +0000 (20:19 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 31 May 2012 18:25:23 +0000 (20:25 +0200)
commitb7d14883939e756cbda376c66552be9d843910a0
tree8c7fdd52c3a487265a67e66f7fb4324c7ba3bdc5
parent18b46a494ef3592d69f4638dac1ebb613c0f548d
h264: move q0 scan tables into context

This fixes out of global array reads.
The alternative solutions of checking the index or modifying the VLC tables
to prevent the index going outside are each about 1-2 cpu cyclces slower
per coded 4x4 block.
The alternative of padding the global tables directly is more ugly and
moving them to the context should benefit cache locality.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264data.h