use the interface defined in vaapi for av1 film grain's output
https://github.com/intel/libva/blob/master/va/va_dec_av1.h#L296-L304
CC: 22.3
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20139>
context->desc.av1.picture_parameter.matrix_coefficients =
av1->matrix_coefficients;
- context->desc.av1.picture_parameter.current_frame_id = av1->current_frame;
+
+ context->desc.av1.film_grain_target = NULL;
+ if (av1->film_grain_info.film_grain_info_fields.bits.apply_grain)
+ context->desc.av1.picture_parameter.current_frame_id = av1->current_display_picture;
+ else
+ context->desc.av1.picture_parameter.current_frame_id = av1->current_frame;
+
context->desc.av1.picture_parameter.order_hint = av1->order_hint;
context->desc.av1.picture_parameter.primary_ref_frame = av1->primary_ref_frame;
context->desc.av1.picture_parameter.frame_width = av1->frame_width_minus1 + 1;