summaryrefslogtreecommitdiff
path: root/libavcodec/h264_mb_template.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-04-17 12:09:50 +0200
committerAnton Khirnov <anton@khirnov.net>2015-04-29 05:52:58 +0200
commita0f2946068c62e18cb05ac25c0df3d86077251a6 (patch)
tree0b50e018335447012922f2e059b25f89405e4d94 /libavcodec/h264_mb_template.c
parent7a4f74eed51f914e9bbfebaffd4a92ac6791f819 (diff)
h264: use properly allocated AVFrames
Diffstat (limited to 'libavcodec/h264_mb_template.c')
-rw-r--r--libavcodec/h264_mb_template.c8
1 files changed, 4 insertions, 4 deletions
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);