summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-02-17 14:52:24 -0800
committerMichael Niedermayer <michaelni@gmx.at>2013-02-18 01:21:23 +0100
commitc63f9fb37a7b7da03bed6d79115f7f2e36607808 (patch)
treef405ac2af54069fd224ea5a06c071a023869efff /libavcodec/h264.c
parent54b2bddd22fb32a67038848b8d2394bee671b143 (diff)
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: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 0644dadbb1..d4e5d25ca9 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1528,7 +1528,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
for (i = 0; i < MAX_PPS_COUNT; i++)
av_freep(h->pps_buffers + i);
- memcpy(h, h1, offsetof(H264Context, mb));
+ memcpy(h, h1, offsetof(H264Context, intra_pcm_ptr));
memcpy(&h->cabac, &h1->cabac,
sizeof(H264Context) - offsetof(H264Context, cabac));
av_assert0(&h->cabac == &h->mb_padding + 1);