diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-01-17 22:28:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-21 11:27:13 +0100 |
commit | e6287f077c3e8e4aca11e61dd4bade1351439e6b (patch) | |
tree | fe27d754efb718b11606b3c14973ac1c8bde515c /libavcodec/h264.c | |
parent | f69574cf7aca4fe4d57a2155e925f37fc863474d (diff) | |
download | ffmpeg-e6287f077c3e8e4aca11e61dd4bade1351439e6b.tar.gz |
h264: move {mv,ref}_cache into the per-slice context
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 2b29389d60..ee6d86334b 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -71,8 +71,8 @@ static void h264_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, ref = 0; fill_rectangle(&h->cur_pic.ref_index[0][4 * h->mb_xy], 2, 2, 2, ref, 1); - fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1); - fill_rectangle(h->mv_cache[0][scan8[0]], 4, 4, 8, + fill_rectangle(&sl->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1); + fill_rectangle(sl->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32((*mv)[0][0][0], (*mv)[0][0][1]), 4); assert(!FRAME_MBAFF(h)); ff_h264_hl_decode_mb(h, &h->slice_ctx[0]); @@ -484,12 +484,14 @@ int ff_h264_context_init(H264Context *h) FF_ALLOCZ_OR_GOTO(h->avctx, h->top_borders[1], h->mb_width * 16 * 3 * sizeof(uint8_t) * 2, fail) - h->ref_cache[0][scan8[5] + 1] = - h->ref_cache[0][scan8[7] + 1] = - h->ref_cache[0][scan8[13] + 1] = - h->ref_cache[1][scan8[5] + 1] = - h->ref_cache[1][scan8[7] + 1] = - h->ref_cache[1][scan8[13] + 1] = PART_NOT_AVAILABLE; + for (i = 0; i < h->nb_slice_ctx; i++) { + h->slice_ctx[i].ref_cache[0][scan8[5] + 1] = + h->slice_ctx[i].ref_cache[0][scan8[7] + 1] = + h->slice_ctx[i].ref_cache[0][scan8[13] + 1] = + h->slice_ctx[i].ref_cache[1][scan8[5] + 1] = + h->slice_ctx[i].ref_cache[1][scan8[7] + 1] = + h->slice_ctx[i].ref_cache[1][scan8[13] + 1] = PART_NOT_AVAILABLE; + } if (CONFIG_ERROR_RESILIENCE) { /* init ER */ |