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
commitbc98e8c0e0a8babfea35c98855e366b29cbe1191 (patch)
tree0dbf428535cd1236545a6c31b3d3f57c7d65b911 /libavcodec/h264_mb.c
parent6490a0c0fbe0e55f765ea2aa2e8495181ea1f719 (diff)
h264: move mb_field_decoding_flag into the per-slice context
Diffstat (limited to 'libavcodec/h264_mb.c')
-rw-r--r--libavcodec/h264_mb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c
index 972fe14bdc..e3dce36df3 100644
--- a/libavcodec/h264_mb.c
+++ b/libavcodec/h264_mb.c
@@ -57,7 +57,7 @@ static inline void get_lowest_part_y(const H264Context *h, H264SliceContext *sl,
{
int my;
- y_offset += 16 * (sl->mb_y >> MB_FIELD(h));
+ y_offset += 16 * (sl->mb_y >> MB_FIELD(sl));
if (list0) {
int ref_n = sl->ref_cache[0][scan8[n]];
@@ -225,7 +225,7 @@ static av_always_inline void mc_dir_part(const H264Context *h, H264SliceContext
const int full_mx = mx >> 2;
const int full_my = my >> 2;
const int pic_width = 16 * h->mb_width;
- const int pic_height = 16 * h->mb_height >> MB_FIELD(h);
+ const int pic_height = 16 * h->mb_height >> MB_FIELD(sl);
int ysh;
if (mx & 7)
@@ -285,7 +285,7 @@ static av_always_inline void mc_dir_part(const H264Context *h, H264SliceContext
}
ysh = 3 - (chroma_idc == 2 /* yuv422 */);
- if (chroma_idc == 1 /* yuv420 */ && MB_FIELD(h)) {
+ if (chroma_idc == 1 /* yuv420 */ && MB_FIELD(sl)) {
// chroma offset when predicting from a field of opposite parity
my += 2 * ((sl->mb_y & 1) - (pic->reference - 1));
emu |= (my >> 3) < 0 || (my >> 3) + 8 >= (pic_height >> 1);
@@ -346,7 +346,7 @@ static av_always_inline void mc_part_std(const H264Context *h, H264SliceContext
dest_cr += (x_offset << pixel_shift) + y_offset * sl->mb_uvlinesize;
}
x_offset += 8 * sl->mb_x;
- y_offset += 8 * (sl->mb_y >> MB_FIELD(h));
+ y_offset += 8 * (sl->mb_y >> MB_FIELD(sl));
if (list0) {
H264Picture *ref = &sl->ref_list[0][sl->ref_cache[0][scan8[n]]];
@@ -400,7 +400,7 @@ static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceCon
dest_cr += (x_offset << pixel_shift) + y_offset * sl->mb_uvlinesize;
}
x_offset += 8 * sl->mb_x;
- y_offset += 8 * (sl->mb_y >> MB_FIELD(h));
+ y_offset += 8 * (sl->mb_y >> MB_FIELD(sl));
if (list0 && list1) {
/* don't optimize for luma-only case, since B-frames usually
@@ -528,7 +528,7 @@ static av_always_inline void xchg_mb_border(const H264Context *h, H264SliceConte
deblock_top = sl->top_type;
} else {
deblock_topleft = (sl->mb_x > 0);
- deblock_top = (sl->mb_y > !!MB_FIELD(h));
+ deblock_top = (sl->mb_y > !!MB_FIELD(sl));
}
src_y -= linesize + 1 + pixel_shift;