st/va: implement poc type
authorBoyuan Zhang <boyuan.zhang@amd.com>
Tue, 7 Nov 2017 20:53:35 +0000 (15:53 -0500)
committerLeo Liu <leo.liu@amd.com>
Fri, 17 Nov 2017 17:25:47 +0000 (12:25 -0500)
pic_order_cnt_type is a required variable when encoding both sps and
slice header, therefore we need to get this value from st, e.g. vaapi
interface, and then pass it to radeon driver for encoding headers.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/va/picture.c

index 7427b98688a30dfdd45ca6627e83d19bab77ac6d..55ca16e1695d1a6da2a1ecf3a1fac1a6bad68aaa 100644 (file)
@@ -396,6 +396,7 @@ handleVAEncSequenceParameterBufferType(vlVaDriver *drv, vlVaContext *context, vl
    context->desc.h264enc.gop_size = h264->intra_idr_period * context->gop_coeff;
    context->desc.h264enc.rate_ctrl.frame_rate_num = h264->time_scale / 2;
    context->desc.h264enc.rate_ctrl.frame_rate_den = h264->num_units_in_tick;
+   context->desc.h264enc.pic_order_cnt_type = h264->seq_fields.bits.pic_order_cnt_type;
    return VA_STATUS_SUCCESS;
 }