diff --git a/src/gallium/frontends/va/picture_h264_enc.c b/src/gallium/frontends/va/picture_h264_enc.c index 0184648311a..3cf116134a7 100644 --- a/src/gallium/frontends/va/picture_h264_enc.c +++ b/src/gallium/frontends/va/picture_h264_enc.c @@ -215,6 +215,8 @@ vlVaHandleVAEncSequenceParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *con context->gop_coeff = VL_VA_ENC_GOP_COEFF; context->desc.h264enc.gop_size = context->desc.h264enc.intra_idr_period * context->gop_coeff; context->desc.h264enc.seq.pic_order_cnt_type = h264->seq_fields.bits.pic_order_cnt_type; + context->desc.h264enc.seq.log2_max_frame_num_minus4 = h264->seq_fields.bits.log2_max_frame_num_minus4; + context->desc.h264enc.seq.log2_max_pic_order_cnt_lsb_minus4 = h264->seq_fields.bits.log2_max_pic_order_cnt_lsb_minus4; context->desc.h264enc.seq.vui_parameters_present_flag = h264->vui_parameters_present_flag; if (h264->vui_parameters_present_flag) { context->desc.h264enc.seq.vui_flags.aspect_ratio_info_present_flag = @@ -376,11 +378,11 @@ static void parseEncSpsParamsH264(vlVaContext *context, struct vl_rbsp *rbsp) return; /* TODO */ } - vl_rbsp_ue(rbsp); /* log2_max_frame_num_minus4 */ - vl_rbsp_ue(rbsp); /* pic_order_cnt_type */ + context->desc.h264enc.seq.log2_max_frame_num_minus4 = vl_rbsp_ue(rbsp); /* log2_max_frame_num_minus4 */ + context->desc.h264enc.seq.pic_order_cnt_type = vl_rbsp_ue(rbsp); /* pic_order_cnt_type */ if (context->desc.h264enc.seq.pic_order_cnt_type == 0) - vl_rbsp_ue(rbsp); /* log2_max_pic_order_cnt_lsb_minus4 */ + context->desc.h264enc.seq.log2_max_pic_order_cnt_lsb_minus4 = vl_rbsp_ue(rbsp); /* log2_max_pic_order_cnt_lsb_minus4 */ else if (context->desc.h264enc.seq.pic_order_cnt_type == 1) { vl_rbsp_u(rbsp, 1); /* delta_pic_order_always_zero_flag */ vl_rbsp_se(rbsp); /* offset_for_non_ref_pic */ diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index 1acf9fd20e8..36df1ce0469 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -546,6 +546,8 @@ struct pipe_h264_enc_seq_param unsigned enc_frame_crop_top_offset; unsigned enc_frame_crop_bottom_offset; unsigned pic_order_cnt_type; + unsigned log2_max_frame_num_minus4; + unsigned log2_max_pic_order_cnt_lsb_minus4; unsigned num_temporal_layers; uint32_t vui_parameters_present_flag; struct {