aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-17 14:52:24 -0800
committerMartin Storsjö <martin@martin.st>2013-02-19 22:34:14 +0200
commit7ebfb466aec2c4628fcd42a72b29034efcaba4bc (patch)
treede856f2702d6366c7d5b22993d10a1fff2dca823 /libavcodec/h264.h
parent9918f57dcfc276cc8ecad3705875ca5877980c7a (diff)
downloadffmpeg-7ebfb466aec2c4628fcd42a72b29034efcaba4bc.tar.gz
h264: Don't store intra pcm samples in h->mb
Instead, keep them in the bitstream buffer until we read them verbatim, this saves a memcpy() and a subsequent clearing of the target buffer. decode_cabac+decode_mb for a sample file (CAPM3_Sony_D.jsv) goes from 6121.4 to 6095.5 cycles, i.e. 26 cycles faster. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 45c134e877..426f8b3491 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -416,6 +416,7 @@ typedef struct H264Context {
GetBitContext *intra_gb_ptr;
GetBitContext *inter_gb_ptr;
+ const uint8_t *intra_pcm_ptr;
DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2]; ///< as a dct coeffecient is int32_t in high depth, we need to reserve twice the space.
DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2];
int16_t mb_padding[256 * 2]; ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either check that i is not too large or ensure that there is some unused stuff after mb