st/va: Fix H.264 PicOrderCnt value
authorMark Thompson <sw@jkqxz.net>
Wed, 12 Oct 2016 22:54:03 +0000 (23:54 +0100)
committerChristian König <christian.koenig@amd.com>
Fri, 14 Oct 2016 09:57:52 +0000 (11:57 +0200)
TopFieldPicOrderCnt is exactly the PicOrderCnt value for a frame - see
H.264 section 8.2.1.

Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/picture.c

index 399667f..66e6e0d 100644 (file)
@@ -390,7 +390,7 @@ handleVAEncPictureParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlV
    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 / 2;
+   context->desc.h264enc.pic_order_cnt = h264->CurrPic.TopFieldOrderCnt;
    if (context->desc.h264enc.is_idr)
       context->desc.h264enc.i_remain = 1;
    else