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:44 +0100 |
commit | 7fa00653a550c0d24b3951c0f9fed6350ecf5ce4 (patch) | |
tree | c40ae79017ac633146cf66f76fb25a6e5a1234f6 /libavcodec/h264_refs.c | |
parent | 7bece9b22f75289d84ac71c1c7b79851274e723e (diff) | |
download | ffmpeg-7fa00653a550c0d24b3951c0f9fed6350ecf5ce4.tar.gz |
h264: add a parameter to the FIELD_PICTURE macro.
This way it does not look like a constant.
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r-- | libavcodec/h264_refs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 796f8295ed..c96503343b 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -122,7 +122,7 @@ int ff_h264_fill_default_ref_list(H264Context *h) int cur_poc, list; int lens[2]; - if (FIELD_PICTURE) + if (FIELD_PICTURE(h)) cur_poc = h->cur_pic_ptr->field_poc[h->picture_structure == PICT_BOTTOM_FIELD]; else cur_poc = h->cur_pic_ptr->poc; @@ -191,7 +191,7 @@ static void print_long_term(H264Context *h); static int pic_num_extract(H264Context *h, int pic_num, int *structure) { *structure = h->picture_structure; - if (FIELD_PICTURE) { + if (FIELD_PICTURE(h)) { if (!(pic_num & 1)) /* opposite field */ *structure ^= PICT_FRAME; @@ -291,7 +291,7 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h) COPY_PICTURE(&h->ref_list[list][i], &h->ref_list[list][i - 1]); } COPY_PICTURE(&h->ref_list[list][index], ref); - if (FIELD_PICTURE) { + if (FIELD_PICTURE(h)) { pic_as_field(&h->ref_list[list][index], pic_structure); } } @@ -524,11 +524,11 @@ int ff_generate_sliding_window_mmcos(H264Context *h, int first_slice) if (h->short_ref_count && h->long_ref_count + h->short_ref_count == h->sps.ref_frame_count && - !(FIELD_PICTURE && !h->first_field && h->cur_pic_ptr->reference)) { + !(FIELD_PICTURE(h) && !h->first_field && h->cur_pic_ptr->reference)) { mmco[0].opcode = MMCO_SHORT2UNUSED; mmco[0].short_pic_num = h->short_ref[h->short_ref_count - 1]->frame_num; mmco_index = 1; - if (FIELD_PICTURE) { + if (FIELD_PICTURE(h)) { mmco[0].short_pic_num *= 2; mmco[1].opcode = MMCO_SHORT2UNUSED; mmco[1].short_pic_num = mmco[0].short_pic_num + 1; @@ -751,7 +751,7 @@ int ff_h264_decode_ref_pic_marking(H264Context *h, GetBitContext *gb, if (long_arg >= 32 || (long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG && long_arg == 16) && - !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE))) { + !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE(h)))) { av_log(h->avctx, AV_LOG_ERROR, "illegal long ref in memory management control " "operation %d\n", opcode); |