frontends/va/enc: save intra_idr_period in the context

The va frontend loses some information when processing parameter
buffers, but the virgl video encoding driver needs it to work.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18831>
This commit is contained in:
Feng Jiang
2022-09-29 11:36:46 +08:00
committed by Marge Bot
parent 316652a4bb
commit d4f189fe69
2 changed files with 3 additions and 0 deletions

View File

@@ -215,6 +215,7 @@ vlVaHandleVAEncSequenceParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *con
context->desc.h264enc.seq.time_scale = time_scale;
context->desc.h264enc.rate_ctrl[0].frame_rate_num = time_scale / 2;
context->desc.h264enc.rate_ctrl[0].frame_rate_den = num_units_in_tick;
context->desc.h264enc.intra_idr_period = h264->intra_idr_period;
if (h264->frame_cropping_flag) {
context->desc.h264enc.seq.enc_frame_cropping_flag = h264->frame_cropping_flag;

View File

@@ -499,6 +499,8 @@ struct pipe_h264_enc_picture_desc
struct pipe_h264_enc_pic_control pic_ctrl;
struct pipe_h264_enc_dbk_param dbk;
unsigned intra_idr_period;
unsigned quant_i_frames;
unsigned quant_p_frames;
unsigned quant_b_frames;