FFmpeg  4.0
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  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 void maskedclamp8 (const uint8_t *bsrc, const uint8_t *darksrc, const uint8_t *brightsrc, uint8_t *dst, ptrdiff_t blinesize, ptrdiff_t darklinesize, ptrdiff_t brightlinesize, ptrdiff_t dlinesize, int w, int h, int undershoot, int overshoot)
 
static void maskedclamp16 (const uint8_t *bbsrc, const uint8_t *oosrc, const uint8_t *mmsrc, uint8_t *ddst, ptrdiff_t blinesize, ptrdiff_t darklinesize, ptrdiff_t brightlinesize, ptrdiff_t dlinesize, int w, int h, int undershoot, int overshoot)
 
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 void maskedclamp8 ( const uint8_t bsrc,
const uint8_t darksrc,
const uint8_t brightsrc,
uint8_t dst,
ptrdiff_t  blinesize,
ptrdiff_t  darklinesize,
ptrdiff_t  brightlinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  undershoot,
int  overshoot 
)
static

Definition at line 133 of file vf_maskedclamp.c.

Referenced by config_input().

◆ maskedclamp16()

static void maskedclamp16 ( const uint8_t bbsrc,
const uint8_t oosrc,
const uint8_t mmsrc,
uint8_t ddst,
ptrdiff_t  blinesize,
ptrdiff_t  darklinesize,
ptrdiff_t  brightlinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  undershoot,
int  overshoot 
)
static

Definition at line 159 of file vf_maskedclamp.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 194 of file vf_maskedclamp.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 223 of file vf_maskedclamp.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 278 of file vf_maskedclamp.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 284 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 }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)
static const struct @272 planes[]

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 }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)

Definition at line 291 of file vf_maskedclamp.c.

◆ maskedclamp_outputs

const AVFilterPad maskedclamp_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)

Definition at line 308 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,
}
static const AVFilterPad maskedclamp_outputs[]
static int flags
Definition: log.c:55
static const AVFilterPad maskedclamp_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
#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
static int activate(AVFilterContext *ctx)

Definition at line 317 of file vf_maskedclamp.c.