h264_metadata: Add option to delete filler data
[libav.git] / libavfilter / qsvvpp.h
CommitLineData
a5a6ac1a
HZ
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 * Intel Quick Sync Video VPP base function
22 */
23
24#ifndef AVFILTER_QSVVPP_H
25#define AVFILTER_QSVVPP_H
26
27#include <mfx/mfxvideo.h>
28
29#include "avfilter.h"
30
31#define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads))
32#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
33
34typedef struct QSVVPPContext QSVVPPContext;
35
36typedef struct QSVVPPCrop {
37 int in_idx; ///< Input index
38 int x, y, w, h; ///< Crop rectangle
39} QSVVPPCrop;
40
41typedef struct QSVVPPParam {
42 /* default is ff_filter_frame */
43 int (*filter_frame)(AVFilterLink *outlink, AVFrame *frame);
44
45 /* To fill with MFX enhanced filter configurations */
46 int num_ext_buf;
47 mfxExtBuffer **ext_buf;
48
49 /* Real output format */
50 enum AVPixelFormat out_sw_format;
51
52 /* Crop information for each input, if needed */
53 int num_crop;
54 QSVVPPCrop *crop;
55} QSVVPPParam;
56
57/* create and initialize the QSV session */
58int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *param);
59
60/* release the resources (eg.surfaces) */
61int ff_qsvvpp_free(QSVVPPContext **vpp);
62
63/* vpp filter frame and call the cb if needed */
64int ff_qsvvpp_filter_frame(QSVVPPContext *vpp, AVFilterLink *inlink, AVFrame *frame);
65
66#endif /* AVFILTER_QSVVPP_H */