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

Go to the source code of this file.

Data Structures

struct  ThreadData
 Used for passing data between threads. More...
 
struct  MaskedClampContext
 

Macros

#define OFFSET(x)   offsetof(MaskedClampContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (maskedclamp)
 
static int query_formats (AVFilterContext *ctx)
 
static int process_frame (FFFrameSync *fs)
 
static int maskedclamp8 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int maskedclamp16 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption maskedclamp_options []
 
static const AVFilterPad maskedclamp_inputs []
 
static const AVFilterPad maskedclamp_outputs []
 
AVFilter ff_vf_maskedclamp
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 30 of file vf_maskedclamp.c.

◆ FLAGS

Definition at line 31 of file vf_maskedclamp.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( maskedclamp  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 62 of file vf_maskedclamp.c.

◆ process_frame()

static int process_frame ( FFFrameSync fs)
static

Definition at line 88 of file vf_maskedclamp.c.

Referenced by config_output().

◆ maskedclamp8()

static int maskedclamp8 ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 126 of file vf_maskedclamp.c.

Referenced by config_input().

◆ maskedclamp16()

static int maskedclamp16 ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 175 of file vf_maskedclamp.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 224 of file vf_maskedclamp.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 253 of file vf_maskedclamp.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 310 of file vf_maskedclamp.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 316 of file vf_maskedclamp.c.

Variable Documentation

◆ maskedclamp_options

const AVOption maskedclamp_options[]
static
Initial value:
= {
{ "undershoot", "set undershoot", OFFSET(undershoot), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
{ "overshoot", "set overshoot", OFFSET(overshoot), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
{ "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ NULL }
}

Definition at line 53 of file vf_maskedclamp.c.

◆ maskedclamp_inputs

const AVFilterPad maskedclamp_inputs[]
static
Initial value:
= {
{
.name = "base",
.config_props = config_input,
},
{
.name = "dark",
},
{
.name = "bright",
},
{ NULL }
}

Definition at line 323 of file vf_maskedclamp.c.

◆ maskedclamp_outputs

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

Definition at line 340 of file vf_maskedclamp.c.

◆ ff_vf_maskedclamp

AVFilter ff_vf_maskedclamp
Initial value:
= {
.name = "maskedclamp",
.description = NULL_IF_CONFIG_SMALL("Clamp first stream with second stream and third stream."),
.priv_size = sizeof(MaskedClampContext),
.priv_class = &maskedclamp_class,
}

Definition at line 349 of file vf_maskedclamp.c.

OFFSET
#define OFFSET(x)
Definition: vf_maskedclamp.c:30
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_maskedclamp.c:224
maskedclamp_inputs
static const AVFilterPad maskedclamp_inputs[]
Definition: vf_maskedclamp.c:323
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_maskedclamp.c:62
activate
static int activate(AVFilterContext *ctx)
Definition: vf_maskedclamp.c:310
FLAGS
#define FLAGS
Definition: vf_maskedclamp.c:31
maskedclamp_outputs
static const AVFilterPad maskedclamp_outputs[]
Definition: vf_maskedclamp.c:340
MaskedClampContext
Definition: vf_maskedclamp.c:37
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
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
planes
static const struct @314 planes[]
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:188
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_maskedclamp.c:253
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
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:116
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_maskedclamp.c:316
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:133
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565