summaryrefslogtreecommitdiff
path: root/libavfilter/qsvvpp.h
diff options
context:
space:
mode:
authorHaihao Xiang <haihao.xiang@intel.com>2023-01-09 15:12:10 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-01-17 10:10:52 +0800
commit749154532008e5062ea58c74dff9a94a8e2f020c (patch)
tree31a7e1a697a17749d0de351850808365f1303c8f /libavfilter/qsvvpp.h
parent3763635ef40c59ce02e79efc0f117e1298a775d9 (diff)
downloadffmpeg-749154532008e5062ea58c74dff9a94a8e2f020c.tar.gz
lavfi/qsv: use QSVVPPContext as base context in vf_vpp_qsv/vf_overlay_qsv
The same members between QSVVPPContext and VPPContext are removed from VPPContext, and async_depth is moved from QSVVPPParam to QSVVPPContext so that all QSV filters using QSVVPPContext may support async depth. In addition, we may use QSVVPPContext as base context in other QSV filters in the future so that we may re-use functions defined in qsvvpp.c for other QSV filters. This commit shouldn't change the functionality of vpp_qsv / overlay_qsv. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'libavfilter/qsvvpp.h')
-rw-r--r--libavfilter/qsvvpp.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/qsvvpp.h b/libavfilter/qsvvpp.h
index 6f7c9bfc15..3b32193744 100644
--- a/libavfilter/qsvvpp.h
+++ b/libavfilter/qsvvpp.h
@@ -53,6 +53,8 @@ typedef struct QSVFrame {
} QSVFrame;
typedef struct QSVVPPContext {
+ const AVClass *class;
+
mfxSession session;
int (*filter_frame) (AVFilterLink *outlink, AVFrame *frame); /**< callback */
enum AVPixelFormat out_sw_format; /**< Real output format */
@@ -102,15 +104,13 @@ typedef struct QSVVPPParam {
/* Crop information for each input, if needed */
int num_crop;
QSVVPPCrop *crop;
-
- int async_depth;
} QSVVPPParam;
/* create and initialize the QSV session */
-int ff_qsvvpp_create(AVFilterContext *avctx, QSVVPPContext **vpp, QSVVPPParam *param);
+int ff_qsvvpp_init(AVFilterContext *avctx, QSVVPPParam *param);
/* release the resources (eg.surfaces) */
-int ff_qsvvpp_free(QSVVPPContext **vpp);
+int ff_qsvvpp_close(AVFilterContext *avctx);
/* vpp filter frame and call the cb if needed */
int ff_qsvvpp_filter_frame(QSVVPPContext *vpp, AVFilterLink *inlink, AVFrame *frame);