31#include "AMF/components/VQEnhancer.h"
58 ctx->common.color_profile = AMF_VIDEO_CONVERTER_COLOR_PROFILE_UNKNOWN;
59 ctx->common.shader_input = 1;
81 AMFComponent *amf_filter =
NULL;
86 enum AMF_MEMORY_TYPE mem_type = AMF_MEMORY_UNKNOWN;
113 AMF_ASSIGN_PROPERTY_INT64(res, amf_filter, AMF_VIDEO_ENHANCER_ENGINE_TYPE, vqe_ctx->
engine_type);
114 }
else if (mem_type != AMF_MEMORY_UNKNOWN)
115 AMF_ASSIGN_PROPERTY_INT64(res, amf_filter, AMF_VIDEO_ENHANCER_ENGINE_TYPE, mem_type);
117 AMF_ASSIGN_PROPERTY_DOUBLE(res, amf_filter, AMF_VE_FCR_ATTENUATION, vqe_ctx->
attenuation);
126#define OFFSET(x) offsetof(AMFVQEFilterContext, x)
127#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
129 {
"engine_type",
"Engine type",
OFFSET(engine_type),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, AMF_MEMORY_DX12, .flags =
FLAGS,
"engine_type" },
159 .p.priv_class = &vqe_amf_class,
const FFFilter ff_vf_vqe_amf
#define AMF_RETURN_IF_FALSE(avctx, exp, ret_value,...)
Error handling helper.
static AVFormatContext * ctx
Main libavfilter public API header.
int(* init)(AVBSFContext *ctx)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
#define AVFILTER_FLAG_HWDEVICE
The filter can create hardware frames using AVFilterContext.hw_device_ctx.
#define AVERROR_FILTER_NOT_FOUND
Filter not found.
#define AVERROR_UNKNOWN
Unknown error, typically from an external library.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
enum AMF_MEMORY_TYPE av_amf_get_memory_type(AVAMFDeviceContext *amf_ctx)
enum AMF_SURFACE_FORMAT av_av_to_amf_format(enum AVPixelFormat fmt)
#define AMF_IFACE_CALL(this, function,...)
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
#define FILTER_QUERY_FUNC(func)
#define AVFILTER_DEFINE_CLASS(fname)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
AVPixelFormat
Pixel format.
@ 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...
@ AV_PIX_FMT_DXVA2_VLD
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer.
@ AV_PIX_FMT_D3D11
Hardware surfaces for Direct3D11.
@ AV_PIX_FMT_AMF_SURFACE
HW acceleration through AMF.
static const float attenuation[10]
enum AVPixelFormat format
AVAMFDeviceContext * amf_device_ctx
This struct is allocated as AVHWDeviceContext.hwctx.
AVFilterLink ** inputs
array of pointers to input links
void * priv
private data for use by the filter
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
AVFilterContext * src
source filter
A filter pad used for either input or output.
int amf_setup_input_output_formats(AVFilterContext *avctx, const enum AVPixelFormat *input_pix_fmts)
int amf_filter_activate(AVFilterContext *avctx)
int amf_init_filter_config(AVFilterLink *outlink, enum AVPixelFormat *in_format)
enum AVPixelFormat amf_inlink_sw_format(AVFilterLink *inlink)
void amf_filter_uninit(AVFilterContext *avctx)
static const AVFilterPad amf_filter_inputs[]
static int amf_filter_query_formats(AVFilterContext *avctx)
static const AVFilterPad amf_filter_outputs[]
static int amf_vqe_filter_config_output(AVFilterLink *outlink)
static int amf_filter_query_formats(AVFilterContext *avctx)
static const AVOption vqe_amf_options[]
static int amf_vqe_init(AVFilterContext *avctx)