summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-21 12:58:00 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-21 12:58:00 +0100
commit92656787cfeaf28af368bd4c20ffbaedc8ad3ca9 (patch)
treee02cc36e4c072e410ff7252b5599f56f186623ed /libavcodec/h264.c
parentbf4d0f8328c8f64611ca44a6ffdc30ca4f028249 (diff)
parent6d2b6f21eb45ffbda1103c772060303648714832 (diff)
Merge commit '6d2b6f21eb45ffbda1103c772060303648714832'
* commit '6d2b6f21eb45ffbda1103c772060303648714832': h264: add a parameter to the CABAC macro. h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro. Conflicts: libavcodec/h264.c libavcodec/h264_cabac.c libavcodec/h264_cavlc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 6aed5841c3..87322a2b83 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1940,7 +1940,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
break;
case SEI_PIC_STRUCT_TOP_BOTTOM:
case SEI_PIC_STRUCT_BOTTOM_TOP:
- if (FIELD_OR_MBAFF_PICTURE)
+ if (FIELD_OR_MBAFF_PICTURE(h))
cur->f.interlaced_frame = 1;
else
// try to flag soft telecine progressive
@@ -1966,7 +1966,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
cur->f.interlaced_frame = (h->sei_ct_type & (1 << 1)) != 0;
} else {
/* Derive interlacing flag from used decoding process. */
- cur->f.interlaced_frame = FIELD_OR_MBAFF_PICTURE;
+ cur->f.interlaced_frame = FIELD_OR_MBAFF_PICTURE(h);
}
h->prev_interlaced_frame = cur->f.interlaced_frame;
@@ -3587,13 +3587,13 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h->cur_pic_ptr->frame_num = h->frame_num; // FIXME frame_num cleanup
av_assert1(h->mb_num == h->mb_width * h->mb_height);
- if (first_mb_in_slice << FIELD_OR_MBAFF_PICTURE >= h->mb_num ||
+ if (first_mb_in_slice << FIELD_OR_MBAFF_PICTURE(h) >= h->mb_num ||
first_mb_in_slice >= h->mb_num) {
av_log(h->avctx, AV_LOG_ERROR, "first_mb_in_slice overflow\n");
return -1;
}
h->resync_mb_x = h->mb_x = first_mb_in_slice % h->mb_width;
- h->resync_mb_y = h->mb_y = (first_mb_in_slice / h->mb_width) << FIELD_OR_MBAFF_PICTURE;
+ h->resync_mb_y = h->mb_y = (first_mb_in_slice / h->mb_width) << FIELD_OR_MBAFF_PICTURE(h);
if (h->picture_structure == PICT_BOTTOM_FIELD)
h->resync_mb_y = h->mb_y = h->mb_y + 1;
av_assert1(h->mb_y < h->mb_height);
@@ -4078,7 +4078,7 @@ static int fill_filter_caches(H264Context *h, int mb_type)
/* CAVLC 8x8dct requires NNZ values for residual decoding that differ
* from what the loop filter needs */
- if (!CABAC && h->pps.transform_8x8_mode) {
+ if (!CABAC(h) && h->pps.transform_8x8_mode) {
if (IS_8x8DCT(top_type)) {
nnz_cache[4 + 8 * 0] =
nnz_cache[5 + 8 * 0] = (h->cbp_table[top_xy] & 0x4000) >> 12;
@@ -4314,7 +4314,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
h->mb_x = lf_x_start = 0;
decode_finish_row(h);
++h->mb_y;
- if (FIELD_OR_MBAFF_PICTURE) {
+ if (FIELD_OR_MBAFF_PICTURE(h)) {
++h->mb_y;
if (FRAME_MBAFF(h) && h->mb_y < h->mb_height)
predict_field_decoding_flag(h);
@@ -4361,7 +4361,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
h->mb_x = lf_x_start = 0;
decode_finish_row(h);
++h->mb_y;
- if (FIELD_OR_MBAFF_PICTURE) {
+ if (FIELD_OR_MBAFF_PICTURE(h)) {
++h->mb_y;
if (FRAME_MBAFF(h) && h->mb_y < h->mb_height)
predict_field_decoding_flag(h);