Commit abf35afb authored by Mark Thompson's avatar Mark Thompson

vf_scale_vaapi: Apply cropping rectangle to input

parent ac993e73
...@@ -100,13 +100,13 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) ...@@ -100,13 +100,13 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
memset(&params, 0, sizeof(params)); memset(&params, 0, sizeof(params));
// If there were top/left cropping, it could be taken into
// account here.
input_region = (VARectangle) { input_region = (VARectangle) {
.x = 0, .x = input_frame->crop_left,
.y = 0, .y = input_frame->crop_top,
.width = input_frame->width, .width = input_frame->width -
.height = input_frame->height, (input_frame->crop_left + input_frame->crop_right),
.height = input_frame->height -
(input_frame->crop_top + input_frame->crop_bottom),
}; };
params.surface = input_surface; params.surface = input_surface;
......
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