diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-03-09 20:37:11 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-21 10:20:48 +0100 |
commit | a6931d8ecea17aa232157f89abdbe7afbb93a8db (patch) | |
tree | 7630ff67a82e4034411ac0c96ed7a3611619bf81 /libavcodec/h264.c | |
parent | 7fa00653a550c0d24b3951c0f9fed6350ecf5ce4 (diff) | |
download | ffmpeg-a6931d8ecea17aa232157f89abdbe7afbb93a8db.tar.gz |
h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.
This way it does not look like a constant.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 14369ac70c..c81ba5e797 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1862,7 +1862,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 @@ -1888,7 +1888,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; @@ -3448,13 +3448,13 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->cur_pic_ptr->frame_num = h->frame_num; // FIXME frame_num cleanup assert(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; assert(h->mb_y < h->mb_height); @@ -4163,7 +4163,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); @@ -4210,7 +4210,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); |