FFmpeg
Data Structures | Macros | Functions | Variables
vf_unsharp_opencl.c File Reference
#include "libavutil/common.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
#include "opencl.h"
#include "opencl_source.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  UnsharpOpenCLContext
 

Macros

#define MAX_DIAMETER   23
 
#define OFFSET(x)   offsetof(UnsharpOpenCLContext, x)
 
#define FLAGS   (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM)
 

Functions

static int unsharp_opencl_init (AVFilterContext *avctx)
 
static int unsharp_opencl_make_filter_params (AVFilterContext *avctx)
 
static int unsharp_opencl_filter_frame (AVFilterLink *inlink, AVFrame *input)
 
static av_cold void unsharp_opencl_uninit (AVFilterContext *avctx)
 
 AVFILTER_DEFINE_CLASS (unsharp_opencl)
 

Variables

static const AVOption unsharp_opencl_options []
 
static const AVFilterPad unsharp_opencl_inputs []
 
static const AVFilterPad unsharp_opencl_outputs []
 
const AVFilter ff_vf_unsharp_opencl
 

Macro Definition Documentation

◆ MAX_DIAMETER

#define MAX_DIAMETER   23

Definition at line 31 of file vf_unsharp_opencl.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(UnsharpOpenCLContext, x)

Definition at line 336 of file vf_unsharp_opencl.c.

◆ FLAGS

Definition at line 337 of file vf_unsharp_opencl.c.

Function Documentation

◆ unsharp_opencl_init()

static int unsharp_opencl_init ( AVFilterContext avctx)
static

Definition at line 66 of file vf_unsharp_opencl.c.

Referenced by unsharp_opencl_filter_frame().

◆ unsharp_opencl_make_filter_params()

static int unsharp_opencl_make_filter_params ( AVFilterContext avctx)
static

Definition at line 104 of file vf_unsharp_opencl.c.

Referenced by unsharp_opencl_filter_frame().

◆ unsharp_opencl_filter_frame()

static int unsharp_opencl_filter_frame ( AVFilterLink inlink,
AVFrame input 
)
static

Definition at line 209 of file vf_unsharp_opencl.c.

◆ unsharp_opencl_uninit()

static av_cold void unsharp_opencl_uninit ( AVFilterContext avctx)
static

Definition at line 304 of file vf_unsharp_opencl.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( unsharp_opencl  )

Variable Documentation

◆ unsharp_opencl_options

const AVOption unsharp_opencl_options[]
static

Definition at line 338 of file vf_unsharp_opencl.c.

◆ unsharp_opencl_inputs

const AVFilterPad unsharp_opencl_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = &unsharp_opencl_filter_frame,
},
}

Definition at line 382 of file vf_unsharp_opencl.c.

◆ unsharp_opencl_outputs

const AVFilterPad unsharp_opencl_outputs[]
static
Initial value:
= {
{
.name = "default",
},
}

Definition at line 391 of file vf_unsharp_opencl.c.

◆ ff_vf_unsharp_opencl

const AVFilter ff_vf_unsharp_opencl
Initial value:
= {
.name = "unsharp_opencl",
.description = NULL_IF_CONFIG_SMALL("Apply unsharp mask to input video"),
.priv_size = sizeof(UnsharpOpenCLContext),
.priv_class = &unsharp_opencl_class,
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
}

Definition at line 399 of file vf_unsharp_opencl.c.

FF_FILTER_FLAG_HWFRAME_AWARE
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:374
unsharp_opencl_filter_frame
static int unsharp_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input)
Definition: vf_unsharp_opencl.c:209
ff_opencl_filter_config_output
int ff_opencl_filter_config_output(AVFilterLink *outlink)
Create a suitable hardware frames context for the output.
Definition: opencl.c:82
unsharp_opencl_outputs
static const AVFilterPad unsharp_opencl_outputs[]
Definition: vf_unsharp_opencl.c:391
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:194
AV_PIX_FMT_OPENCL
@ AV_PIX_FMT_OPENCL
Hardware surfaces for OpenCL.
Definition: pixfmt.h:355
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:115
UnsharpOpenCLContext
Definition: vf_unsharp_opencl.c:33
ff_opencl_filter_config_input
int ff_opencl_filter_config_input(AVFilterLink *inlink)
Check that the input link contains a suitable hardware frames context and extract the device from it.
Definition: opencl.c:46
FILTER_SINGLE_PIXFMT
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
Definition: internal.h:184
ff_opencl_filter_init
int ff_opencl_filter_init(AVFilterContext *avctx)
Initialise an OpenCL filter context.
Definition: opencl.c:133
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
unsharp_opencl_uninit
static av_cold void unsharp_opencl_uninit(AVFilterContext *avctx)
Definition: vf_unsharp_opencl.c:304
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:195
uninit
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:285
unsharp_opencl_inputs
static const AVFilterPad unsharp_opencl_inputs[]
Definition: vf_unsharp_opencl.c:382