summaryrefslogtreecommitdiff
path: root/libavcodec/h264_mb.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-29 13:06:25 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:16 +0100
commitc28ed1d743443e783537d279ae721be3bbdf7646 (patch)
tree9d9177a0fb4622a085b87c8732078c37342b4bf0 /libavcodec/h264_mb.c
parentb53569e0681ff7bc99103ab4c961dbac3cc0fce6 (diff)
h264: move [uv]linesize to the per-slice context
While it is a per-frame variable, it is only really used in the low-level decoding code, so it is more efficient to store it in the slice context.
Diffstat (limited to 'libavcodec/h264_mb.c')
-rw-r--r--libavcodec/h264_mb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c
index 57d429ab02..fea733a9c3 100644
--- a/libavcodec/h264_mb.c
+++ b/libavcodec/h264_mb.c
@@ -487,13 +487,13 @@ static av_always_inline void prefetch_motion(const H264Context *h, H264SliceCont
int off = (mx << pixel_shift) +
(my + (sl->mb_x & 3) * 4) * sl->mb_linesize +
(64 << pixel_shift);
- h->vdsp.prefetch(src[0] + off, h->linesize, 4);
+ h->vdsp.prefetch(src[0] + off, sl->linesize, 4);
if (chroma_idc == 3 /* yuv444 */) {
- h->vdsp.prefetch(src[1] + off, h->linesize, 4);
- h->vdsp.prefetch(src[2] + off, h->linesize, 4);
+ h->vdsp.prefetch(src[1] + off, sl->linesize, 4);
+ h->vdsp.prefetch(src[2] + off, sl->linesize, 4);
} else {
off = ((mx >> 1) << pixel_shift) +
- ((my >> 1) + (sl->mb_x & 7)) * h->uvlinesize +
+ ((my >> 1) + (sl->mb_x & 7)) * sl->uvlinesize +
(64 << pixel_shift);
h->vdsp.prefetch(src[1] + off, src[2] - src[1], 2);
}