From a0f2946068c62e18cb05ac25c0df3d86077251a6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 17 Apr 2015 12:09:50 +0200 Subject: h264: use properly allocated AVFrames --- libavcodec/h264_mb_template.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libavcodec/h264_mb_template.c') diff --git a/libavcodec/h264_mb_template.c b/libavcodec/h264_mb_template.c index 75757a66a5..968c55e43e 100644 --- a/libavcodec/h264_mb_template.c +++ b/libavcodec/h264_mb_template.c @@ -57,9 +57,9 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex const int block_h = 16 >> h->chroma_y_shift; const int chroma422 = CHROMA422(h); - dest_y = h->cur_pic.f.data[0] + ((mb_x << PIXEL_SHIFT) + mb_y * sl->linesize) * 16; - dest_cb = h->cur_pic.f.data[1] + (mb_x << PIXEL_SHIFT) * 8 + mb_y * sl->uvlinesize * block_h; - dest_cr = h->cur_pic.f.data[2] + (mb_x << PIXEL_SHIFT) * 8 + mb_y * sl->uvlinesize * block_h; + dest_y = h->cur_pic.f->data[0] + ((mb_x << PIXEL_SHIFT) + mb_y * sl->linesize) * 16; + dest_cb = h->cur_pic.f->data[1] + (mb_x << PIXEL_SHIFT) * 8 + mb_y * sl->uvlinesize * block_h; + dest_cr = h->cur_pic.f->data[2] + (mb_x << PIXEL_SHIFT) * 8 + mb_y * sl->uvlinesize * block_h; h->vdsp.prefetch(dest_y + (sl->mb_x & 3) * 4 * sl->linesize + (64 << PIXEL_SHIFT), sl->linesize, 4); h->vdsp.prefetch(dest_cb + (sl->mb_x & 7) * sl->uvlinesize + (64 << PIXEL_SHIFT), dest_cr - dest_cb, 2); @@ -286,7 +286,7 @@ static av_noinline void FUNC(hl_decode_mb_444)(const H264Context *h, H264SliceCo const int plane_count = (SIMPLE || !CONFIG_GRAY || !(h->flags & CODEC_FLAG_GRAY)) ? 3 : 1; for (p = 0; p < plane_count; p++) { - dest[p] = h->cur_pic.f.data[p] + + dest[p] = h->cur_pic.f->data[p] + ((mb_x << PIXEL_SHIFT) + mb_y * sl->linesize) * 16; h->vdsp.prefetch(dest[p] + (sl->mb_x & 3) * 4 * sl->linesize + (64 << PIXEL_SHIFT), sl->linesize, 4); -- cgit v1.2.3