h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.

This way it does not look like a constant.
This commit is contained in:
Anton Khirnov
2013-03-09 20:37:11 +01:00
parent 7fa00653a5
commit a6931d8ece
4 changed files with 9 additions and 9 deletions

View File

@@ -324,7 +324,7 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
if (!slice_param)
return -1;
slice_param->slice_data_bit_offset = get_bits_count(&h->gb) + 8; /* bit buffer started beyond nal_unit_type */
slice_param->first_mb_in_slice = (h->mb_y >> FIELD_OR_MBAFF_PICTURE) * h->mb_width + h->mb_x;
slice_param->first_mb_in_slice = (h->mb_y >> FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + h->mb_x;
slice_param->slice_type = ff_h264_get_slice_type(h);
slice_param->direct_spatial_mv_pred_flag = h->slice_type == AV_PICTURE_TYPE_B ? h->direct_spatial_mv_pred : 0;
slice_param->num_ref_idx_l0_active_minus1 = h->list_count > 0 ? h->ref_count[0] - 1 : 0;