frontends/va: Remove now unused ref fields for AV1 encode
Need to get rid of these as they allocate buffers for drivers not implementing create_dpb_buffer and waste memory. No driver is using these fields anymore. Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31520>
This commit is contained in:
@@ -133,7 +133,6 @@ vlVaDpbIndex(vlVaContext *context, VASurfaceID id)
|
||||
VAStatus vlVaHandleVAEncPictureParameterBufferTypeAV1(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)
|
||||
{
|
||||
VAEncPictureParameterBufferAV1 *av1 = buf->data;
|
||||
struct pipe_video_buffer *video_buf = NULL;
|
||||
vlVaBuffer *coded_buf;
|
||||
vlVaSurface *surf;
|
||||
int i, j;
|
||||
@@ -339,24 +338,6 @@ VAStatus vlVaHandleVAEncPictureParameterBufferTypeAV1(vlVaDriver *drv, vlVaConte
|
||||
if (context->desc.av1enc.frame_type == FRAME_TYPE_KEY_FRAME)
|
||||
context->desc.av1enc.last_key_frame_num = context->desc.av1enc.frame_num;
|
||||
|
||||
if (av1->reconstructed_frame != VA_INVALID_ID) {
|
||||
vlVaGetReferenceFrame(drv, av1->reconstructed_frame, &video_buf);
|
||||
context->desc.av1enc.recon_frame = video_buf;
|
||||
}
|
||||
else
|
||||
context->desc.av1enc.recon_frame = NULL;
|
||||
|
||||
for (int i = 0 ; i < ARRAY_SIZE(context->desc.av1enc.ref_list); i++) {
|
||||
if (av1->reference_frames[i] != VA_INVALID_ID) {
|
||||
vlVaGetReferenceFrame(drv, av1->reference_frames[i], &video_buf);
|
||||
context->desc.av1enc.ref_list[i] = video_buf;
|
||||
}
|
||||
else
|
||||
context->desc.av1enc.ref_list[i] = NULL;
|
||||
}
|
||||
|
||||
context->desc.av1enc.ref_frame_ctrl_l0 = av1->ref_frame_ctrl_l0.value;
|
||||
|
||||
/* Initialize slice descriptors for this picture */
|
||||
context->desc.av1enc.num_tile_groups = 0;
|
||||
memset(&context->desc.av1enc.tile_groups, 0, sizeof(context->desc.av1enc.tile_groups));
|
||||
|
||||
@@ -1389,9 +1389,6 @@ struct pipe_av1_enc_picture_desc
|
||||
uint8_t refresh_frame_flags;
|
||||
uint8_t ref_frame_idx[7];
|
||||
uint32_t delta_frame_id_minus_1[7];
|
||||
uint32_t ref_frame_ctrl_l0; /* forward prediction only */
|
||||
void *ref_list[8]; /* for tracking ref frames */
|
||||
void *recon_frame;
|
||||
uint32_t frame_presentation_time;
|
||||
uint32_t current_frame_id;
|
||||
uint32_t ref_order_hint[8];
|
||||
|
||||
Reference in New Issue
Block a user