diff options
author | Mark Thompson <sw@jkqxz.net> | 2018-02-14 21:48:44 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-03-22 23:19:04 +0000 |
commit | abf35afb6f70f2b1fdf99ce48112ad314bd8ca0f (patch) | |
tree | 0b402c5d72c6d514913ee7f9fe6af16ac07da4e9 /libavfilter | |
parent | ac993e73decab3dd5828b37bb1d5d8514c0d247a (diff) | |
download | ffmpeg-abf35afb6f70f2b1fdf99ce48112ad314bd8ca0f.tar.gz |
vf_scale_vaapi: Apply cropping rectangle to input
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_scale_vaapi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index c19e23ccd0..d6529d5235 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -100,13 +100,13 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame) memset(¶ms, 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, + .x = input_frame->crop_left, + .y = input_frame->crop_top, + .width = input_frame->width - + (input_frame->crop_left + input_frame->crop_right), + .height = input_frame->height - + (input_frame->crop_top + input_frame->crop_bottom), }; params.surface = input_surface; |