mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
Merge commit 'bdf7610eb266fd3de650040c97328791868abd82'
* commit 'bdf7610eb266fd3de650040c97328791868abd82': vf_scale_vaapi: Crop input surface to active region Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
commit
bc1023eb36
@ -273,6 +273,7 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
|
|||||||
VASurfaceID input_surface, output_surface;
|
VASurfaceID input_surface, output_surface;
|
||||||
VAProcPipelineParameterBuffer params;
|
VAProcPipelineParameterBuffer params;
|
||||||
VABufferID params_id;
|
VABufferID params_id;
|
||||||
|
VARectangle input_region;
|
||||||
VAStatus vas;
|
VAStatus vas;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
@ -306,8 +307,17 @@ static int scale_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame)
|
|||||||
|
|
||||||
memset(¶ms, 0, sizeof(params));
|
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,
|
||||||
|
};
|
||||||
|
|
||||||
params.surface = input_surface;
|
params.surface = input_surface;
|
||||||
params.surface_region = 0;
|
params.surface_region = &input_region;
|
||||||
params.surface_color_standard =
|
params.surface_color_standard =
|
||||||
vaapi_proc_colour_standard(input_frame->colorspace);
|
vaapi_proc_colour_standard(input_frame->colorspace);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user