summaryrefslogtreecommitdiff
path: root/libavcodec/h264_loopfilter.c
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_loopfilter.c
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_loopfilter.c')
-rw-r--r--libavcodec/h264_loopfilter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
index 2e4683d8e3..424c598dcf 100644
--- a/libavcodec/h264_loopfilter.c
+++ b/libavcodec/h264_loopfilter.c
@@ -740,9 +740,9 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
{3+4*0, 3+4*1, 3+4*2, 3+4*3, 3+4*0, 3+4*1, 3+4*2, 3+4*3},
}
};
- const uint8_t *off= offset[MB_FIELD][mb_y&1];
+ const uint8_t *off= offset[MB_FIELD(h)][mb_y&1];
for( i = 0; i < 8; i++ ) {
- int j= MB_FIELD ? i>>2 : i&1;
+ int j= MB_FIELD(h) ? i>>2 : i&1;
int mbn_xy = h->left_mb_xy[LEFT(j)];
int mbn_type= h->left_type[LEFT(j)];
@@ -751,7 +751,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
else{
bS[i] = 1 + !!(h->non_zero_count_cache[12+8*(i>>1)] |
((!h->pps.cabac && IS_8x8DCT(mbn_type)) ?
- (h->cbp_table[mbn_xy] & (((MB_FIELD ? (i&2) : (mb_y&1)) ? 8 : 2) << 12))
+ (h->cbp_table[mbn_xy] & (((MB_FIELD(h) ? (i&2) : (mb_y&1)) ? 8 : 2) << 12))
:
h->non_zero_count[mbn_xy][ off[i] ]));
}
@@ -775,7 +775,7 @@ void ff_h264_filter_mb( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint
/* Filter edge */
tprintf(h->avctx, "filter mb:%d/%d MBAFF, QPy:%d/%d, QPb:%d/%d QPr:%d/%d ls:%d uvls:%d", mb_x, mb_y, qp[0], qp[1], bqp[0], bqp[1], rqp[0], rqp[1], linesize, uvlinesize);
{ int i; for (i = 0; i < 8; i++) tprintf(h->avctx, " bS[%d]:%d", i, bS[i]); tprintf(h->avctx, "\n"); }
- if(MB_FIELD){
+ if (MB_FIELD(h)) {
filter_mb_mbaff_edgev ( h, img_y , linesize, bS , 1, qp [0], a, b, 1 );
filter_mb_mbaff_edgev ( h, img_y + 8* linesize, linesize, bS+4, 1, qp [1], a, b, 1 );
if (chroma){