Commit bc1023eb authored by Clément Bœsch's avatar Clément Bœsch

Merge commit 'bdf7610e'

* commit 'bdf7610e':
  vf_scale_vaapi: Crop input surface to active region
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents 9a0f9131 bdf7610e
......@@ -273,6 +273,7 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
VASurfaceID input_surface, output_surface;
VAProcPipelineParameterBuffer params;
VABufferID params_id;
VARectangle input_region;
VAStatus vas;
int err;
......@@ -306,8 +307,17 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
memset(&params, 0, sizeof(params));
// If there were top/left cropping, it could be taken into
// account here.
input_region = (VARectangle) {
.x = 0,
.y = 0,
.width = input_frame->width,
.height = input_frame->height,
};
params.surface = input_surface;
params.surface_region = 0;
params.surface_region = &input_region;
params.surface_color_standard =
vaapi_proc_colour_standard(input_frame->colorspace);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment