h264_metadata: Add option to delete filler data
[libav.git] / libavfilter / vf_scale_qsv.c
1 /*
2 * This file is part of Libav.
3 *
4 * Libav is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * Libav is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with Libav; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 /**
20 * @file
21 * scale video filter - QSV
22 */
23
24 #include <mfx/mfxvideo.h>
25
26 #include <stdio.h>
27 #include <string.h>
28
29 #include "libavutil/avstring.h"
30 #include "libavutil/common.h"
31 #include "libavutil/eval.h"
32 #include "libavutil/hwcontext.h"
33 #include "libavutil/hwcontext_qsv.h"
34 #include "libavutil/internal.h"
35 #include "libavutil/mathematics.h"
36 #include "libavutil/opt.h"
37 #include "libavutil/pixdesc.h"
38 #include "libavutil/time.h"
39
40 #include "avfilter.h"
41 #include "formats.h"
42 #include "internal.h"
43 #include "video.h"
44
45 static const char *const var_names[] = {
46 "PI",
47 "PHI",
48 "E",
49 "in_w", "iw",
50 "in_h", "ih",
51 "out_w", "ow",
52 "out_h", "oh",
53 "a", "dar",
54 "sar",
55 NULL
56 };
57
58 enum var_name {
59 VAR_PI,
60 VAR_PHI,
61 VAR_E,
62 VAR_IN_W, VAR_IW,
63 VAR_IN_H, VAR_IH,
64 VAR_OUT_W, VAR_OW,
65 VAR_OUT_H, VAR_OH,
66 VAR_A, VAR_DAR,
67 VAR_SAR,
68 VARS_NB
69 };
70
71 typedef struct QSVScaleContext {
72 const AVClass *class;
73
74 /* a clone of the main session, used internally for scaling */
75 mfxSession session;
76
77 mfxMemId *mem_ids_in;
78 int nb_mem_ids_in;
79
80 mfxMemId *mem_ids_out;
81 int nb_mem_ids_out;
82
83 mfxFrameSurface1 **surface_ptrs_in;
84 int nb_surface_ptrs_in;
85
86 mfxFrameSurface1 **surface_ptrs_out;
87 int nb_surface_ptrs_out;
88
89 mfxExtOpaqueSurfaceAlloc opaque_alloc;
90 mfxExtBuffer *ext_buffers[1];
91
92 int shift_width, shift_height;
93
94 /**
95 * New dimensions. Special values are:
96 * 0 = original width/height
97 * -1 = keep original aspect
98 */
99 int w, h;
100
101 /**
102 * Output sw format. AV_PIX_FMT_NONE for no conversion.
103 */
104 enum AVPixelFormat format;
105
106 char *w_expr; ///< width expression string
107 char *h_expr; ///< height expression string
108 char *format_str;
109 } QSVScaleContext;
110
111 static int qsvscale_init(AVFilterContext *ctx)
112 {
113 QSVScaleContext *s = ctx->priv;
114
115 if (!strcmp(s->format_str, "same")) {
116 s->format = AV_PIX_FMT_NONE;
117 } else {
118 s->format = av_get_pix_fmt(s->format_str);
119 if (s->format == AV_PIX_FMT_NONE) {
120 av_log(ctx, AV_LOG_ERROR, "Unrecognized pixel format: %s\n", s->format_str);
121 return AVERROR(EINVAL);
122 }
123 }
124
125 return 0;
126 }
127
128 static void qsvscale_uninit(AVFilterContext *ctx)
129 {
130 QSVScaleContext *s = ctx->priv;
131
132 if (s->session) {
133 MFXClose(s->session);
134 s->session = NULL;
135 }
136
137 av_freep(&s->mem_ids_in);
138 av_freep(&s->mem_ids_out);
139 s->nb_mem_ids_in = 0;
140 s->nb_mem_ids_out = 0;
141
142 av_freep(&s->surface_ptrs_in);
143 av_freep(&s->surface_ptrs_out);
144 s->nb_surface_ptrs_in = 0;
145 s->nb_surface_ptrs_out = 0;
146 }
147
148 static int qsvscale_query_formats(AVFilterContext *ctx)
149 {
150 static const enum AVPixelFormat pixel_formats[] = {
151 AV_PIX_FMT_QSV, AV_PIX_FMT_NONE,
152 };
153 AVFilterFormats *pix_fmts = ff_make_format_list(pixel_formats);
154
155 ff_set_common_formats(ctx, pix_fmts);
156
157 return 0;
158 }
159
160 static int init_out_pool(AVFilterContext *ctx,
161 int out_width, int out_height)
162 {
163 QSVScaleContext *s = ctx->priv;
164 AVFilterLink *outlink = ctx->outputs[0];
165
166 AVHWFramesContext *in_frames_ctx;
167 AVHWFramesContext *out_frames_ctx;
168 AVQSVFramesContext *in_frames_hwctx;
169 AVQSVFramesContext *out_frames_hwctx;
170 enum AVPixelFormat in_format;
171 enum AVPixelFormat out_format;
172 int i, ret;
173
174 /* check that we have a hw context */
175 if (!ctx->inputs[0]->hw_frames_ctx) {
176 av_log(ctx, AV_LOG_ERROR, "No hw context provided on input\n");
177 return AVERROR(EINVAL);
178 }
179 in_frames_ctx = (AVHWFramesContext*)ctx->inputs[0]->hw_frames_ctx->data;
180 in_frames_hwctx = in_frames_ctx->hwctx;
181
182 in_format = in_frames_ctx->sw_format;
183 out_format = (s->format == AV_PIX_FMT_NONE) ? in_format : s->format;
184
185 outlink->hw_frames_ctx = av_hwframe_ctx_alloc(in_frames_ctx->device_ref);
186 if (!outlink->hw_frames_ctx)
187 return AVERROR(ENOMEM);
188 out_frames_ctx = (AVHWFramesContext*)outlink->hw_frames_ctx->data;
189 out_frames_hwctx = out_frames_ctx->hwctx;
190
191 out_frames_ctx->format = AV_PIX_FMT_QSV;
192 out_frames_ctx->width = FFALIGN(out_width, 32);
193 out_frames_ctx->height = FFALIGN(out_height, 32);
194 out_frames_ctx->sw_format = out_format;
195 out_frames_ctx->initial_pool_size = 4;
196
197 out_frames_hwctx->frame_type = in_frames_hwctx->frame_type;
198
199 ret = ff_filter_init_hw_frames(ctx, outlink, 32);
200 if (ret < 0)
201 return ret;
202
203 ret = av_hwframe_ctx_init(outlink->hw_frames_ctx);
204 if (ret < 0)
205 return ret;
206
207 for (i = 0; i < out_frames_hwctx->nb_surfaces; i++) {
208 mfxFrameInfo *info = &out_frames_hwctx->surfaces[i].Info;
209 info->CropW = out_width;
210 info->CropH = out_height;
211 }
212
213 return 0;
214 }
215
216 static mfxStatus frame_alloc(mfxHDL pthis, mfxFrameAllocRequest *req,
217 mfxFrameAllocResponse *resp)
218 {
219 AVFilterContext *ctx = pthis;
220 QSVScaleContext *s = ctx->priv;
221
222 if (!(req->Type & MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET) ||
223 !(req->Type & (MFX_MEMTYPE_FROM_VPPIN | MFX_MEMTYPE_FROM_VPPOUT)) ||
224 !(req->Type & MFX_MEMTYPE_EXTERNAL_FRAME))
225 return MFX_ERR_UNSUPPORTED;
226
227 if (req->Type & MFX_MEMTYPE_FROM_VPPIN) {
228 resp->mids = s->mem_ids_in;
229 resp->NumFrameActual = s->nb_mem_ids_in;
230 } else {
231 resp->mids = s->mem_ids_out;
232 resp->NumFrameActual = s->nb_mem_ids_out;
233 }
234
235 return MFX_ERR_NONE;
236 }
237
238 static mfxStatus frame_free(mfxHDL pthis, mfxFrameAllocResponse *resp)
239 {
240 return MFX_ERR_NONE;
241 }
242
243 static mfxStatus frame_lock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
244 {
245 return MFX_ERR_UNSUPPORTED;
246 }
247
248 static mfxStatus frame_unlock(mfxHDL pthis, mfxMemId mid, mfxFrameData *ptr)
249 {
250 return MFX_ERR_UNSUPPORTED;
251 }
252
253 static mfxStatus frame_get_hdl(mfxHDL pthis, mfxMemId mid, mfxHDL *hdl)
254 {
255 *hdl = mid;
256 return MFX_ERR_NONE;
257 }
258
259 static const mfxHandleType handle_types[] = {
260 MFX_HANDLE_VA_DISPLAY,
261 MFX_HANDLE_D3D9_DEVICE_MANAGER,
262 MFX_HANDLE_D3D11_DEVICE,
263 };
264
265 static int init_out_session(AVFilterContext *ctx)
266 {
267
268 QSVScaleContext *s = ctx->priv;
269 AVHWFramesContext *in_frames_ctx = (AVHWFramesContext*)ctx->inputs[0]->hw_frames_ctx->data;
270 AVHWFramesContext *out_frames_ctx = (AVHWFramesContext*)ctx->outputs[0]->hw_frames_ctx->data;
271 AVQSVFramesContext *in_frames_hwctx = in_frames_ctx->hwctx;
272 AVQSVFramesContext *out_frames_hwctx = out_frames_ctx->hwctx;
273 AVQSVDeviceContext *device_hwctx = in_frames_ctx->device_ctx->hwctx;
274
275 int opaque = !!(in_frames_hwctx->frame_type & MFX_MEMTYPE_OPAQUE_FRAME);
276
277 mfxHDL handle = NULL;
278 mfxHandleType handle_type;
279 mfxVersion ver;
280 mfxIMPL impl;
281 mfxVideoParam par;
282 mfxStatus err;
283 int i;
284
285 /* extract the properties of the "master" session given to us */
286 err = MFXQueryIMPL(device_hwctx->session, &impl);
287 if (err == MFX_ERR_NONE)
288 err = MFXQueryVersion(device_hwctx->session, &ver);
289 if (err != MFX_ERR_NONE) {
290 av_log(ctx, AV_LOG_ERROR, "Error querying the session attributes\n");
291 return AVERROR_UNKNOWN;
292 }
293
294 for (i = 0; i < FF_ARRAY_ELEMS(handle_types); i++) {
295 err = MFXVideoCORE_GetHandle(device_hwctx->session, handle_types[i], &handle);
296 if (err == MFX_ERR_NONE) {
297 handle_type = handle_types[i];
298 break;
299 }
300 }
301
302 /* create a "slave" session with those same properties, to be used for
303 * actual scaling */
304 err = MFXInit(impl, &ver, &s->session);
305 if (err != MFX_ERR_NONE) {
306 av_log(ctx, AV_LOG_ERROR, "Error initializing a session for scaling\n");
307 return AVERROR_UNKNOWN;
308 }
309
310 if (handle) {
311 err = MFXVideoCORE_SetHandle(s->session, handle_type, handle);
312 if (err != MFX_ERR_NONE)
313 return AVERROR_UNKNOWN;
314 }
315
316 memset(&par, 0, sizeof(par));
317
318 if (opaque) {
319 s->surface_ptrs_in = av_mallocz_array(in_frames_hwctx->nb_surfaces,
320 sizeof(*s->surface_ptrs_in));
321 if (!s->surface_ptrs_in)
322 return AVERROR(ENOMEM);
323 for (i = 0; i < in_frames_hwctx->nb_surfaces; i++)
324 s->surface_ptrs_in[i] = in_frames_hwctx->surfaces + i;
325 s->nb_surface_ptrs_in = in_frames_hwctx->nb_surfaces;
326
327 s->surface_ptrs_out = av_mallocz_array(out_frames_hwctx->nb_surfaces,
328 sizeof(*s->surface_ptrs_out));
329 if (!s->surface_ptrs_out)
330 return AVERROR(ENOMEM);
331 for (i = 0; i < out_frames_hwctx->nb_surfaces; i++)
332 s->surface_ptrs_out[i] = out_frames_hwctx->surfaces + i;
333 s->nb_surface_ptrs_out = out_frames_hwctx->nb_surfaces;
334
335 s->opaque_alloc.In.Surfaces = s->surface_ptrs_in;
336 s->opaque_alloc.In.NumSurface = s->nb_surface_ptrs_in;
337 s->opaque_alloc.In.Type = in_frames_hwctx->frame_type;
338
339 s->opaque_alloc.Out.Surfaces = s->surface_ptrs_out;
340 s->opaque_alloc.Out.NumSurface = s->nb_surface_ptrs_out;
341 s->opaque_alloc.Out.Type = out_frames_hwctx->frame_type;
342
343 s->opaque_alloc.Header.BufferId = MFX_EXTBUFF_OPAQUE_SURFACE_ALLOCATION;
344 s->opaque_alloc.Header.BufferSz = sizeof(s->opaque_alloc);
345
346 s->ext_buffers[0] = (mfxExtBuffer*)&s->opaque_alloc;
347
348 par.ExtParam = s->ext_buffers;
349 par.NumExtParam = FF_ARRAY_ELEMS(s->ext_buffers);
350
351 par.IOPattern = MFX_IOPATTERN_IN_OPAQUE_MEMORY | MFX_IOPATTERN_OUT_OPAQUE_MEMORY;
352 } else {
353 mfxFrameAllocator frame_allocator = {
354 .pthis = ctx,
355 .Alloc = frame_alloc,
356 .Lock = frame_lock,
357 .Unlock = frame_unlock,
358 .GetHDL = frame_get_hdl,
359 .Free = frame_free,
360 };
361
362 s->mem_ids_in = av_mallocz_array(in_frames_hwctx->nb_surfaces,
363 sizeof(*s->mem_ids_in));
364 if (!s->mem_ids_in)
365 return AVERROR(ENOMEM);
366 for (i = 0; i < in_frames_hwctx->nb_surfaces; i++)
367 s->mem_ids_in[i] = in_frames_hwctx->surfaces[i].Data.MemId;
368 s->nb_mem_ids_in = in_frames_hwctx->nb_surfaces;
369
370 s->mem_ids_out = av_mallocz_array(out_frames_hwctx->nb_surfaces,
371 sizeof(*s->mem_ids_out));
372 if (!s->mem_ids_out)
373 return AVERROR(ENOMEM);
374 for (i = 0; i < out_frames_hwctx->nb_surfaces; i++)
375 s->mem_ids_out[i] = out_frames_hwctx->surfaces[i].Data.MemId;
376 s->nb_mem_ids_out = out_frames_hwctx->nb_surfaces;
377
378 err = MFXVideoCORE_SetFrameAllocator(s->session, &frame_allocator);
379 if (err != MFX_ERR_NONE)
380 return AVERROR_UNKNOWN;
381
382 par.IOPattern = MFX_IOPATTERN_IN_VIDEO_MEMORY | MFX_IOPATTERN_OUT_VIDEO_MEMORY;
383 }
384
385 par.AsyncDepth = 1; // TODO async
386
387 par.vpp.In = in_frames_hwctx->surfaces[0].Info;
388 par.vpp.Out = out_frames_hwctx->surfaces[0].Info;
389
390 /* Apparently VPP requires the frame rate to be set to some value, otherwise
391 * init will fail (probably for the framerate conversion filter). Since we
392 * are only doing scaling here, we just invent an arbitrary
393 * value */
394 par.vpp.In.FrameRateExtN = 25;
395 par.vpp.In.FrameRateExtD = 1;
396 par.vpp.Out.FrameRateExtN = 25;
397 par.vpp.Out.FrameRateExtD = 1;
398
399 err = MFXVideoVPP_Init(s->session, &par);
400 if (err != MFX_ERR_NONE) {
401 av_log(ctx, AV_LOG_ERROR, "Error opening the VPP for scaling\n");
402 return AVERROR_UNKNOWN;
403 }
404
405 return 0;
406 }
407
408 static int init_scale_session(AVFilterContext *ctx, int in_width, int in_height,
409 int out_width, int out_height)
410 {
411 int ret;
412
413 qsvscale_uninit(ctx);
414
415 ret = init_out_pool(ctx, out_width, out_height);
416 if (ret < 0)
417 return ret;
418
419 ret = init_out_session(ctx);
420 if (ret < 0)
421 return ret;
422
423 return 0;
424 }
425
426 static int qsvscale_config_props(AVFilterLink *outlink)
427 {
428 AVFilterContext *ctx = outlink->src;
429 AVFilterLink *inlink = outlink->src->inputs[0];
430 QSVScaleContext *s = ctx->priv;
431 int64_t w, h;
432 double var_values[VARS_NB], res;
433 char *expr;
434 int ret;
435
436 var_values[VAR_PI] = M_PI;
437 var_values[VAR_PHI] = M_PHI;
438 var_values[VAR_E] = M_E;
439 var_values[VAR_IN_W] = var_values[VAR_IW] = inlink->w;
440 var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h;
441 var_values[VAR_OUT_W] = var_values[VAR_OW] = NAN;
442 var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN;
443 var_values[VAR_A] = (double) inlink->w / inlink->h;
444 var_values[VAR_SAR] = inlink->sample_aspect_ratio.num ?
445 (double) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1;
446 var_values[VAR_DAR] = var_values[VAR_A] * var_values[VAR_SAR];
447
448 /* evaluate width and height */
449 av_expr_parse_and_eval(&res, (expr = s->w_expr),
450 var_names, var_values,
451 NULL, NULL, NULL, NULL, NULL, 0, ctx);
452 s->w = var_values[VAR_OUT_W] = var_values[VAR_OW] = res;
453 if ((ret = av_expr_parse_and_eval(&res, (expr = s->h_expr),
454 var_names, var_values,
455 NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
456 goto fail;
457 s->h = var_values[VAR_OUT_H] = var_values[VAR_OH] = res;
458 /* evaluate again the width, as it may depend on the output height */
459 if ((ret = av_expr_parse_and_eval(&res, (expr = s->w_expr),
460 var_names, var_values,
461 NULL, NULL, NULL, NULL, NULL, 0, ctx)) < 0)
462 goto fail;
463 s->w = res;
464
465 w = s->w;
466 h = s->h;
467
468 /* sanity check params */
469 if (w < -1 || h < -1) {
470 av_log(ctx, AV_LOG_ERROR, "Size values less than -1 are not acceptable.\n");
471 return AVERROR(EINVAL);
472 }
473 if (w == -1 && h == -1)
474 s->w = s->h = 0;
475
476 if (!(w = s->w))
477 w = inlink->w;
478 if (!(h = s->h))
479 h = inlink->h;
480 if (w == -1)
481 w = av_rescale(h, inlink->w, inlink->h);
482 if (h == -1)
483 h = av_rescale(w, inlink->h, inlink->w);
484
485 if (w > INT_MAX || h > INT_MAX ||
486 (h * inlink->w) > INT_MAX ||
487 (w * inlink->h) > INT_MAX)
488 av_log(ctx, AV_LOG_ERROR, "Rescaled value for width or height is too big.\n");
489
490 outlink->w = w;
491 outlink->h = h;
492
493 ret = init_scale_session(ctx, inlink->w, inlink->h, w, h);
494 if (ret < 0)
495 return ret;
496
497 av_log(ctx, AV_LOG_VERBOSE, "w:%d h:%d -> w:%d h:%d\n",
498 inlink->w, inlink->h, outlink->w, outlink->h);
499
500 if (inlink->sample_aspect_ratio.num)
501 outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h*inlink->w,
502 outlink->w*inlink->h},
503 inlink->sample_aspect_ratio);
504 else
505 outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
506
507 return 0;
508
509 fail:
510 av_log(NULL, AV_LOG_ERROR,
511 "Error when evaluating the expression '%s'\n", expr);
512 return ret;
513 }
514
515 static int qsvscale_filter_frame(AVFilterLink *link, AVFrame *in)
516 {
517 AVFilterContext *ctx = link->dst;
518 QSVScaleContext *s = ctx->priv;
519 AVFilterLink *outlink = ctx->outputs[0];
520
521 mfxSyncPoint sync = NULL;
522 mfxStatus err;
523
524 AVFrame *out = NULL;
525 int ret = 0;
526
527 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
528 if (!out) {
529 ret = AVERROR(ENOMEM);
530 goto fail;
531 }
532
533 do {
534 err = MFXVideoVPP_RunFrameVPPAsync(s->session,
535 (mfxFrameSurface1*)in->data[3],
536 (mfxFrameSurface1*)out->data[3],
537 NULL, &sync);
538 if (err == MFX_WRN_DEVICE_BUSY)
539 av_usleep(1);
540 } while (err == MFX_WRN_DEVICE_BUSY);
541
542 if (err < 0 || !sync) {
543 av_log(ctx, AV_LOG_ERROR, "Error during scaling\n");
544 ret = AVERROR_UNKNOWN;
545 goto fail;
546 }
547
548 do {
549 err = MFXVideoCORE_SyncOperation(s->session, sync, 1000);
550 } while (err == MFX_WRN_IN_EXECUTION);
551 if (err < 0) {
552 av_log(ctx, AV_LOG_ERROR, "Error synchronizing the operation: %d\n", err);
553 ret = AVERROR_UNKNOWN;
554 goto fail;
555 }
556
557 ret = av_frame_copy_props(out, in);
558 if (ret < 0)
559 goto fail;
560
561 out->width = outlink->w;
562 out->height = outlink->h;
563
564 av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den,
565 (int64_t)in->sample_aspect_ratio.num * outlink->h * link->w,
566 (int64_t)in->sample_aspect_ratio.den * outlink->w * link->h,
567 INT_MAX);
568
569 av_frame_free(&in);
570 return ff_filter_frame(outlink, out);
571 fail:
572 av_frame_free(&in);
573 av_frame_free(&out);
574 return ret;
575 }
576
577 #define OFFSET(x) offsetof(QSVScaleContext, x)
578 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM
579 static const AVOption options[] = {
580 { "w", "Output video width", OFFSET(w_expr), AV_OPT_TYPE_STRING, { .str = "iw" }, .flags = FLAGS },
581 { "h", "Output video height", OFFSET(h_expr), AV_OPT_TYPE_STRING, { .str = "ih" }, .flags = FLAGS },
582 { "format", "Output pixel format", OFFSET(format_str), AV_OPT_TYPE_STRING, { .str = "same" }, .flags = FLAGS },
583
584 { NULL },
585 };
586
587 static const AVClass qsvscale_class = {
588 .class_name = "qsvscale",
589 .item_name = av_default_item_name,
590 .option = options,
591 .version = LIBAVUTIL_VERSION_INT,
592 };
593
594 static const AVFilterPad qsvscale_inputs[] = {
595 {
596 .name = "default",
597 .type = AVMEDIA_TYPE_VIDEO,
598 .filter_frame = qsvscale_filter_frame,
599 },
600 { NULL }
601 };
602
603 static const AVFilterPad qsvscale_outputs[] = {
604 {
605 .name = "default",
606 .type = AVMEDIA_TYPE_VIDEO,
607 .config_props = qsvscale_config_props,
608 },
609 { NULL }
610 };
611
612 AVFilter ff_vf_scale_qsv = {
613 .name = "scale_qsv",
614 .description = NULL_IF_CONFIG_SMALL("QuickSync video scaling and format conversion"),
615
616 .init = qsvscale_init,
617 .uninit = qsvscale_uninit,
618 .query_formats = qsvscale_query_formats,
619
620 .priv_size = sizeof(QSVScaleContext),
621 .priv_class = &qsvscale_class,
622
623 .inputs = qsvscale_inputs,
624 .outputs = qsvscale_outputs,
625
626 .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
627 };