From c28ed1d743443e783537d279ae721be3bbdf7646 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 29 Jan 2015 13:06:25 +0100 Subject: 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. --- libavcodec/h264_mb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavcodec/h264_mb.c') 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); } -- cgit v1.2.3