summaryrefslogtreecommitdiff
path: root/libavcodec/h264_mvpred.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-09 20:37:11 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-21 10:20:35 +0100
commitda6be8fcec16a94d8084bda8bb8a0a411a96bcf7 (patch)
tree2033e189dae6e172d9609b4cfb6723813c1b3c53 /libavcodec/h264_mvpred.h
parent82313eaa34b02cf1a4b6f55c1b73549ec8d056f0 (diff)
h264: add a parameter to the MB_FIELD macro.
This way it does not look like a constant.
Diffstat (limited to 'libavcodec/h264_mvpred.h')
-rw-r--r--libavcodec/h264_mvpred.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index a61ad20f66..b0f60343f6 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -61,11 +61,11 @@ static av_always_inline int fetch_diagonal_mv(H264Context *h, const int16_t **C,
AV_ZERO32(h->mv_cache[list][scan8[0] - 2]);
*C = h->mv_cache[list][scan8[0] - 2];
- if (!MB_FIELD && IS_INTERLACED(h->left_type[0])) {
+ if (!MB_FIELD(h) && IS_INTERLACED(h->left_type[0])) {
SET_DIAG_MV(* 2, >> 1, h->left_mb_xy[0] + h->mb_stride,
(h->mb_y & 1) * 2 + (i >> 5));
}
- if (MB_FIELD && !IS_INTERLACED(h->left_type[0])) {
+ if (MB_FIELD(h) && !IS_INTERLACED(h->left_type[0])) {
// left shift will turn LIST_NOT_USED into PART_NOT_AVAILABLE, but that's OK.
SET_DIAG_MV(/ 2, << 1, h->left_mb_xy[i >= 36], ((i >> 2)) & 3);
}
@@ -232,7 +232,7 @@ static av_always_inline void pred_8x16_motion(H264Context *const h,
#define FIX_MV_MBAFF(type, refn, mvn, idx) \
if (FRAME_MBAFF) { \
- if (MB_FIELD) { \
+ if (MB_FIELD(h)) { \
if (!IS_INTERLACED(type)) { \
refn <<= 1; \
AV_COPY32(mvbuf[idx], mvn); \
@@ -360,7 +360,7 @@ static void fill_decode_neighbors(H264Context *h, int mb_type)
h->topleft_partition = -1;
- top_xy = mb_xy - (h->mb_stride << MB_FIELD);
+ top_xy = mb_xy - (h->mb_stride << MB_FIELD(h));
/* Wow, what a mess, why didn't they simplify the interlacing & intra
* stuff, I can't imagine that these complex rules are worth it. */
@@ -761,7 +761,7 @@ static void fill_decode_caches(H264Context *h, int mb_type)
MAP_F2F(scan8[0] - 1 + 3 * 8, left_type[LBOT])
if (FRAME_MBAFF) {
- if (MB_FIELD) {
+ if (MB_FIELD(h)) {
#define MAP_F2F(idx, mb_type) \
if (!IS_INTERLACED(mb_type) && h->ref_cache[list][idx] >= 0) { \
@@ -801,7 +801,7 @@ static void av_unused decode_mb_skip(H264Context *h)
memset(h->non_zero_count[mb_xy], 0, 48);
- if (MB_FIELD)
+ if (MB_FIELD(h))
mb_type |= MB_TYPE_INTERLACED;
if (h->slice_type_nos == AV_PICTURE_TYPE_B) {