FFmpeg  4.3.9
vaapi_vpp.h
Go to the documentation of this file.
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 #ifndef AVFILTER_VAAPI_VPP_H
20 #define AVFILTER_VAAPI_VPP_H
21 
22 #include <va/va.h>
23 #include <va/va_vpp.h>
24 
25 #include "libavutil/hwcontext.h"
27 
28 #include "avfilter.h"
29 
30 // ARGB black, for VAProcPipelineParameterBuffer.output_background_color.
31 #define VAAPI_VPP_BACKGROUND_BLACK 0xff000000
32 
33 typedef struct VAAPIVPPContext {
34  const AVClass *class;
35 
38 
39  int valid_ids;
40  VAConfigID va_config;
41  VAContextID va_context;
42 
45  VARectangle input_region;
46 
48  int output_width; // computed width
49  int output_height; // computed height
50 
51  VABufferID filter_buffers[VAProcFilterCount];
53 
55 
58 
60 
62 
64 
66 
68 
70 
72  VAProcPipelineParameterBuffer *params,
73  const AVFrame *input_frame,
75 
77  int type,
78  const void *data,
79  size_t size,
80  int count);
81 
83  VAProcPipelineParameterBuffer *params,
85 
86 #endif /* AVFILTER_VAAPI_VPP_H */
int ff_vaapi_vpp_config_input(AVFilterLink *inlink)
Definition: vaapi_vpp.c:70
void ff_vaapi_vpp_pipeline_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:44
int size
This structure describes decoded (raw) audio or video data.
Definition: frame.h:300
Main libavfilter public API header.
int nb_filter_buffers
Definition: vaapi_vpp.h:52
int ff_vaapi_vpp_make_param_buffers(AVFilterContext *avctx, int type, const void *data, size_t size, int count)
Definition: vaapi_vpp.c:563
API-specific header for AV_HWDEVICE_TYPE_VAAPI.
const char data[16]
Definition: mxf.c:91
AVBufferRef * input_frames_ref
Definition: vaapi_vpp.h:43
typedef void(RENAME(mix_any_func_type))
int ff_vaapi_vpp_render_picture(AVFilterContext *avctx, VAProcPipelineParameterBuffer *params, AVFrame *output_frame)
Definition: vaapi_vpp.c:592
VABufferID filter_buffers[VAProcFilterCount]
Definition: vaapi_vpp.h:51
static int output_frame(H264Context *h, AVFrame *dst, H264Picture *srcp)
Definition: h264dec.c:853
Describe the class of an AVClass context structure.
Definition: log.h:67
VAConfigID va_config
Definition: vaapi_vpp.h:40
This struct describes a set or pool of "hardware" frames (i.e.
Definition: hwcontext.h:124
cl_device_type type
VAContextID va_context
Definition: vaapi_vpp.h:41
enum AVPixelFormat output_format
Definition: vaapi_vpp.h:47
VARectangle input_region
Definition: vaapi_vpp.h:45
AVVAAPIDeviceContext * hwctx
Definition: vaapi_vpp.h:36
A reference to a data buffer.
Definition: buffer.h:81
int
void ff_vaapi_vpp_ctx_uninit(AVFilterContext *avctx)
Definition: vaapi_vpp.c:680
void ff_vaapi_vpp_ctx_init(AVFilterContext *avctx)
Definition: vaapi_vpp.c:666
AVHWFramesContext * input_frames
Definition: vaapi_vpp.h:44
VAAPI connection details.
An instance of a filter.
Definition: avfilter.h:338
AVBufferRef * device_ref
Definition: vaapi_vpp.h:37
int ff_vaapi_vpp_query_formats(AVFilterContext *avctx)
Definition: vaapi_vpp.c:27
int(* build_filter_params)(AVFilterContext *avctx)
Definition: vaapi_vpp.h:54
int ff_vaapi_vpp_config_output(AVFilterLink *outlink)
Definition: vaapi_vpp.c:95
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
void(* pipeline_uninit)(AVFilterContext *avctx)
Definition: vaapi_vpp.h:56
int ff_vaapi_vpp_init_params(AVFilterContext *avctx, VAProcPipelineParameterBuffer *params, const AVFrame *input_frame, AVFrame *output_frame)
Definition: vaapi_vpp.c:515