1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg 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 * FFmpeg 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 FFmpeg; 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 * Intel Quick Sync Video VPP base function
22 */
23
24 #ifndef AVFILTER_QSVVPP_H
25 #define AVFILTER_QSVVPP_H
26
27 #include <mfxvideo.h>
28
33
34 #define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads))
35 #define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
36
37 #define QSV_VERSION_ATLEAST(MAJOR, MINOR) \
38 (MFX_VERSION_MAJOR > (MAJOR) || \
39 MFX_VERSION_MAJOR == (MAJOR) && MFX_VERSION_MINOR >= (MINOR))
40
41 #define QSV_RUNTIME_VERSION_ATLEAST(MFX_VERSION, MAJOR, MINOR) \
42 ((MFX_VERSION.Major > (MAJOR)) || \
43 (MFX_VERSION.Major == (MAJOR) && MFX_VERSION.Minor >= (MINOR)))
44
45 #define QSV_ONEVPL QSV_VERSION_ATLEAST(2, 0)
46 #define QSV_HAVE_OPAQUE !QSV_ONEVPL
47
54
55 #define QSVVPP_MAX_FRAME_EXTBUFS 8
56
58 /* To fill with MFX enhanced filter configurations */
62
65
72
73 /** members related to the input/output surface */
82
83 #if QSV_HAVE_OPAQUE
84 /** MFXVPP extern parameters */
86 #endif
87 /** store sequence parameters */
90
91 /** store all parameters for vpp execution, including parameters per frame */
94
98 /** order with frame_out, sync */
100
104
107 int x,
y,
w,
h;
///< Crop rectangle
109
111 /* default is ff_filter_frame */
114
115 /* To fill with MFX enhanced filter configurations */
118
119 /* Real output format */
121
122 /* Crop information for each input, if needed */
126
127 /* create and initialize the QSV session */
129
130 /* release the resources (eg.surfaces) */
132
133 /* vpp filter frame and call the cb if needed */
135
137 const char *extra_string);
138
140 const char *error_string);
141
143 const char *warning_string);
144
146 mfxVersion *pver, mfxSession *psession);
147
149 #endif /* AVFILTER_QSVVPP_H */