FFmpeg
Data Structures | Macros | Functions | Variables
vf_cas.c File Reference
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  CASContext
 

Macros

#define OFFSET(x)   offsetof(CASContext, x)
 
#define VF   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static float lerpf (float v0, float v1, float f)
 
static int cas_slice8 (AVFilterContext *avctx, void *arg, int jobnr, int nb_jobs)
 
static int cas_slice16 (AVFilterContext *avctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold int query_formats (AVFilterContext *avctx)
 
static av_cold int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (cas)
 

Variables

static const AVFilterPad cas_inputs []
 
static const AVFilterPad cas_outputs []
 
static const AVOption cas_options []
 
AVFilter ff_vf_cas
 

Macro Definition Documentation

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

Definition at line 278 of file vf_cas.c.

Definition at line 279 of file vf_cas.c.

Function Documentation

static float lerpf ( float  v0,
float  v1,
float  f 
)
inlinestatic

Definition at line 43 of file vf_cas.c.

Referenced by cas_slice16(), and cas_slice8().

static int cas_slice8 ( AVFilterContext avctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 48 of file vf_cas.c.

Referenced by config_input().

static int cas_slice16 ( AVFilterContext avctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 114 of file vf_cas.c.

Referenced by config_input().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 181 of file vf_cas.c.

static av_cold int query_formats ( AVFilterContext avctx)
static

Definition at line 204 of file vf_cas.c.

static av_cold int config_input ( AVFilterLink inlink)
static

Definition at line 242 of file vf_cas.c.

AVFILTER_DEFINE_CLASS ( cas  )

Variable Documentation

const AVFilterPad cas_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static av_cold int config_input(AVFilterLink *inlink)
Definition: vf_cas.c:242
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_cas.c:181

Definition at line 260 of file vf_cas.c.

const AVFilterPad cas_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 270 of file vf_cas.c.

const AVOption cas_options[]
static
Initial value:
= {
{ "strength", "set the sharpening strength", OFFSET(strength), AV_OPT_TYPE_FLOAT, {.dbl=0}, 0, 1, VF },
{ "planes", "set what planes to filter", OFFSET(planes), AV_OPT_TYPE_FLAGS, {.i64=7}, 0, 15, VF },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define VF
Definition: vf_cas.c:279
#define OFFSET(x)
Definition: vf_cas.c:278
static const struct @315 planes[]

Definition at line 281 of file vf_cas.c.

AVFilter ff_vf_cas
Initial value:
= {
.name = "cas",
.description = NULL_IF_CONFIG_SMALL("Contrast Adaptive Sharpen."),
.priv_size = sizeof(CASContext),
.priv_class = &cas_class,
}
static const AVFilterPad cas_inputs[]
Definition: vf_cas.c:260
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options...
Definition: avfilter.c:869
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold int query_formats(AVFilterContext *avctx)
Definition: vf_cas.c:204
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static const AVFilterPad cas_outputs[]
Definition: vf_cas.c:270
#define flags(name, subs,...)
Definition: cbs_av1.c:564
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_afftdn.c:1374

Definition at line 289 of file vf_cas.c.