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 []
 
const AVFilter ff_vf_cas
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 278 of file vf_cas.c.

◆ VF

Definition at line 279 of file vf_cas.c.

Function Documentation

◆ lerpf()

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().

◆ 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().

◆ cas_slice16()

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().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 181 of file vf_cas.c.

◆ query_formats()

static av_cold int query_formats ( AVFilterContext avctx)
static

Definition at line 204 of file vf_cas.c.

◆ config_input()

static av_cold int config_input ( AVFilterLink inlink)
static

Definition at line 242 of file vf_cas.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( cas  )

Variable Documentation

◆ cas_inputs

const AVFilterPad cas_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}

Definition at line 260 of file vf_cas.c.

◆ cas_outputs

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

Definition at line 270 of file vf_cas.c.

◆ cas_options

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 }
}

Definition at line 281 of file vf_cas.c.

◆ ff_vf_cas

const AVFilter ff_vf_cas
Initial value:
= {
.name = "cas",
.description = NULL_IF_CONFIG_SMALL("Contrast Adaptive Sharpen."),
.priv_size = sizeof(CASContext),
.priv_class = &cas_class,
}

Definition at line 289 of file vf_cas.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_cas.c:181
inputs
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
Definition: filter_design.txt:243
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
config_input
static av_cold int config_input(AVFilterLink *inlink)
Definition: vf_cas.c:242
NULL
#define NULL
Definition: coverity.c:32
OFFSET
#define OFFSET(x)
Definition: vf_cas.c:278
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:117
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
ff_filter_process_command
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:842
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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:126
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
cas_outputs
static const AVFilterPad cas_outputs[]
Definition: vf_cas.c:270
query_formats
static av_cold int query_formats(AVFilterContext *avctx)
Definition: vf_cas.c:204
planes
static const struct @322 planes[]
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
CASContext
Definition: vf_cas.c:26
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:224
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
cas_inputs
static const AVFilterPad cas_inputs[]
Definition: vf_cas.c:260
VF
#define VF
Definition: vf_cas.c:279