Go to the documentation of this file.
30 #include "AMF/components/VQEnhancer.h"
84 output_pix_fmts = output_pix_fmts_default;
92 AMFComponent *amf_filter =
NULL;
114 AMF_ASSIGN_PROPERTY_INT64(res, amf_filter, AMF_VIDEO_ENHANCER_ENGINE_TYPE, vqe_ctx->
engine_type);
116 AMF_ASSIGN_PROPERTY_DOUBLE(res, amf_filter, AMF_VE_FCR_ATTENUATION, vqe_ctx->
attenuation);
125 #define OFFSET(x) offsetof(AMFVQEFilterContext, x)
126 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
128 {
"engine_type",
"Engine type",
OFFSET(engine_type),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, AMF_MEMORY_OPENCL, .flags =
FLAGS,
"engine_type" },
160 .p.priv_class = &vqe_amf_class,
static const AVFilterPad amf_filter_outputs[]
AVPixelFormat
Pixel format.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
int amf_setup_input_output_formats(AVFilterContext *avctx, const enum AVPixelFormat *input_pix_fmts, const enum AVPixelFormat *output_pix_fmts)
#define AMF_RETURN_IF_FALSE(avctx, exp, ret_value,...)
Error handling helper.
const char * name
Filter name.
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
A link between two filters.
@ AV_PIX_FMT_AMF_SURFACE
HW acceleration through AMF.
static const float attenuation[10]
void * priv
private data for use by the filter
static int amf_vqe_init(AVFilterContext *avctx)
enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt)
A filter pad used for either input or output.
AVFILTER_DEFINE_CLASS(vqe_amf)
#define FILTER_OUTPUTS(array)
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
static AVFormatContext * ctx
#define FILTER_QUERY_FUNC(func)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
static const AVFilterPad amf_filter_inputs[]
AVFilterLink ** inputs
array of pointers to input links
#define AMF_IFACE_CALL(this, function,...)
#define AV_PIX_FMT_X2BGR10
int(* init)(AVBSFContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
This struct is allocated as AVHWDeviceContext.hwctx.
AVFilterContext * src
source filter
int amf_filter_filter_frame(AVFilterLink *inlink, AVFrame *in)
void amf_filter_uninit(AVFilterContext *avctx)
static av_cold void uninit(AVBitStreamFilterContext *ctx)
const char * name
Pad name.
static const AVOption vqe_amf_options[]
@ AV_PIX_FMT_NV12
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
#define FILTER_INPUTS(array)
static int amf_filter_query_formats(AVFilterContext *avctx)
@ AV_OPT_TYPE_INT
Underlying C type is int.
int amf_init_filter_config(AVFilterLink *outlink, enum AVPixelFormat *in_format)
#define AVERROR_FILTER_NOT_FOUND
Filter not found.
AVFilter p
The public AVFilter.
#define AV_PIX_FMT_RGBAF16
AVAMFDeviceContext * amf_device_ctx
static int amf_vqe_filter_config_output(AVFilterLink *outlink)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.