diff options
author | Boyuan Zhang <[email protected]> | 2017-12-08 18:22:25 -0500 |
---|---|---|
committer | Leo Liu <[email protected]> | 2017-12-15 16:04:05 -0500 |
commit | 3181065b7fe76a429a46974fa9ee7a8220b6f5bf (patch) | |
tree | d537076b84a315c17745be9fed391b393f6bfc35 /src/gallium/state_trackers | |
parent | 130e1d142fcae560db0f97b2534e8133a4405b99 (diff) |
st/va: directly use idr pic flag
Remove is_idr flag, and use idr_pic_flag provided by vaapi directly
Signed-off-by: Boyuan Zhang <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/va/picture.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/va/picture.c b/src/gallium/state_trackers/va/picture.c index 55ca16e1695..895157375a6 100644 --- a/src/gallium/state_trackers/va/picture.c +++ b/src/gallium/state_trackers/va/picture.c @@ -432,7 +432,6 @@ handleVAEncPictureParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlV h264 = buf->data; context->desc.h264enc.frame_num = h264->frame_num; context->desc.h264enc.not_referenced = false; - context->desc.h264enc.is_idr = (h264->pic_fields.bits.idr_pic_flag == 1); context->desc.h264enc.pic_order_cnt = h264->CurrPic.TopFieldOrderCnt; if (context->desc.h264enc.gop_cnt == 0) context->desc.h264enc.i_remain = context->gop_coeff; @@ -451,7 +450,7 @@ handleVAEncPictureParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlV UINT_TO_PTR(h264->CurrPic.picture_id), UINT_TO_PTR(h264->frame_num)); - if (context->desc.h264enc.is_idr) + if (h264->pic_fields.bits.idr_pic_flag == 1) context->desc.h264enc.picture_type = PIPE_H264_ENC_PICTURE_TYPE_IDR; else context->desc.h264enc.picture_type = PIPE_H264_ENC_PICTURE_TYPE_P; @@ -493,10 +492,9 @@ handleVAEncSliceParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaB else if (h264->slice_type == 0) context->desc.h264enc.picture_type = PIPE_H264_ENC_PICTURE_TYPE_P; else if (h264->slice_type == 2) { - if (context->desc.h264enc.is_idr){ - context->desc.h264enc.picture_type = PIPE_H264_ENC_PICTURE_TYPE_IDR; + if (context->desc.h264enc.picture_type == PIPE_H264_ENC_PICTURE_TYPE_IDR) context->desc.h264enc.idr_pic_id++; - } else + else context->desc.h264enc.picture_type = PIPE_H264_ENC_PICTURE_TYPE_I; } else context->desc.h264enc.picture_type = PIPE_H264_ENC_PICTURE_TYPE_SKIP; |