diff mbox series

[FFmpeg-devel,v2,7/9] avcodec/av1_vaapi: set display surface when apply film grain

Message ID 20210705022933.29068-7-fei.w.wang@intel.com
State Superseded
Headers show
Series [FFmpeg-devel,v2,1/9] cbs_av1: fix incorrect data type
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Fei Wang July 5, 2021, 2:29 a.m. UTC
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
---
 libavcodec/vaapi_av1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/vaapi_av1.c b/libavcodec/vaapi_av1.c
index f577447be4..81b13bb1aa 100644
--- a/libavcodec/vaapi_av1.c
+++ b/libavcodec/vaapi_av1.c
@@ -76,7 +76,7 @@  static int vaapi_av1_start_frame(AVCodecContext *avctx,
         .order_hint_bits_minus_1 = seq->order_hint_bits_minus_1,
         .bit_depth_idx           = bit_depth_idx,
         .current_frame           = pic->output_surface,
-        .current_display_picture = pic->output_surface,
+        .current_display_picture = apply_grain ? ff_vaapi_get_surface_id(s->cur_frame.tf_display.f) : pic->output_surface,
         .frame_width_minus1      = frame_header->frame_width_minus_1,
         .frame_height_minus1     = frame_header->frame_height_minus_1,
         .primary_ref_frame       = frame_header->primary_ref_frame,