summaryrefslogtreecommitdiff
path: root/libavcodec/h264_mb.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-17 22:28:46 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:15 +0100
commitc377e04d8aa74d030672e9a4788a700b0695fc14 (patch)
tree86171a6dca7f3e538cdc00ed02c92b5f7a1f4c75 /libavcodec/h264_mb.c
parent36d04801ba9d8622c2d759c172aea18561bac74d (diff)
h264: move top_borders into the per-slice context
Also change the method for allocating to the same one as used by edge_emu_buffer.
Diffstat (limited to 'libavcodec/h264_mb.c')
-rw-r--r--libavcodec/h264_mb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c
index 23aa684fcc..2eaf55ad75 100644
--- a/libavcodec/h264_mb.c
+++ b/libavcodec/h264_mb.c
@@ -535,8 +535,8 @@ static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceConte
src_cb -= uvlinesize + 1 + pixel_shift;
src_cr -= uvlinesize + 1 + pixel_shift;
- top_border_m1 = h->top_borders[top_idx][sl->mb_x - 1];
- top_border = h->top_borders[top_idx][sl->mb_x];
+ top_border_m1 = sl->top_borders[top_idx][sl->mb_x - 1];
+ top_border = sl->top_borders[top_idx][sl->mb_x];
#define XCHG(a, b, xchg) \
if (pixel_shift) { \
@@ -559,7 +559,7 @@ static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceConte
XCHG(top_border + (0 << pixel_shift), src_y + (1 << pixel_shift), xchg);
XCHG(top_border + (8 << pixel_shift), src_y + (9 << pixel_shift), 1);
if (sl->mb_x + 1 < h->mb_width) {
- XCHG(h->top_borders[top_idx][sl->mb_x + 1],
+ XCHG(sl->top_borders[top_idx][sl->mb_x + 1],
src_y + (17 << pixel_shift), 1);
}
}
@@ -575,8 +575,8 @@ static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceConte
XCHG(top_border + (32 << pixel_shift), src_cr + (1 << pixel_shift), xchg);
XCHG(top_border + (40 << pixel_shift), src_cr + (9 << pixel_shift), 1);
if (sl->mb_x + 1 < h->mb_width) {
- XCHG(h->top_borders[top_idx][sl->mb_x + 1] + (16 << pixel_shift), src_cb + (17 << pixel_shift), 1);
- XCHG(h->top_borders[top_idx][sl->mb_x + 1] + (32 << pixel_shift), src_cr + (17 << pixel_shift), 1);
+ XCHG(sl->top_borders[top_idx][sl->mb_x + 1] + (16 << pixel_shift), src_cb + (17 << pixel_shift), 1);
+ XCHG(sl->top_borders[top_idx][sl->mb_x + 1] + (32 << pixel_shift), src_cr + (17 << pixel_shift), 1);
}
}
} else {