diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 10:22:43 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-30 12:36:28 +0000 |
commit | 271a6c3487a14599023a9106329505597638d793 (patch) | |
tree | e040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c | |
parent | 7b2ffa587235a47d4094787d72f38102089f402a (diff) | |
download | qtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz |
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c')
-rw-r--r-- | chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c b/chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c index f67a1c8e796..72d034981ab 100644 --- a/chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c +++ b/chromium/third_party/ffmpeg/libavfilter/vf_deinterlace_vaapi.c @@ -181,12 +181,11 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) VAAPIVPPContext *vpp_ctx = avctx->priv; DeintVAAPIContext *ctx = avctx->priv; AVFrame *output_frame = NULL; - VASurfaceID input_surface, output_surface; + VASurfaceID input_surface; VASurfaceID backward_references[MAX_REFERENCES]; VASurfaceID forward_references[MAX_REFERENCES]; VAProcPipelineParameterBuffer params; VAProcFilterParameterBufferDeinterlacing *filter_params; - VARectangle input_region; VAStatus vas; void *filter_params_addr = NULL; int err, i, field, current_frame_index; @@ -238,30 +237,14 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) goto fail; } - output_surface = (VASurfaceID)(uintptr_t)output_frame->data[3]; - av_log(avctx, AV_LOG_DEBUG, "Using surface %#x for " - "deinterlace output.\n", output_surface); - - memset(¶ms, 0, sizeof(params)); - - input_region = (VARectangle) { - .x = 0, - .y = 0, - .width = input_frame->width, - .height = input_frame->height, - }; - - params.surface = input_surface; - params.surface_region = &input_region; - params.surface_color_standard = - ff_vaapi_vpp_colour_standard(input_frame->colorspace); - - params.output_region = NULL; - params.output_background_color = VAAPI_VPP_BACKGROUND_BLACK; - params.output_color_standard = params.surface_color_standard; + err = av_frame_copy_props(output_frame, input_frame); + if (err < 0) + return err; - params.pipeline_flags = 0; - params.filter_flags = VA_FRAME_PICTURE; + err = ff_vaapi_vpp_init_params(avctx, ¶ms, + input_frame, output_frame); + if (err < 0) + goto fail; if (!ctx->auto_enable || input_frame->interlaced_frame) { vas = vaMapBuffer(vpp_ctx->hwctx->display, vpp_ctx->filter_buffers[0], @@ -301,11 +284,7 @@ static int deint_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) params.num_filters = 0; } - err = ff_vaapi_vpp_render_picture(avctx, ¶ms, output_surface); - if (err < 0) - goto fail; - - err = av_frame_copy_props(output_frame, input_frame); + err = ff_vaapi_vpp_render_picture(avctx, ¶ms, output_frame); if (err < 0) goto fail; |