FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static int request_frame (AVFilterLink *outlink)
 
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

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

Definition at line 30 of file vf_maskedclamp.c.

Definition at line 31 of file vf_maskedclamp.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( maskedclamp  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 61 of file vf_maskedclamp.c.

static int process_frame ( FFFrameSync fs)
static

Definition at line 87 of file vf_maskedclamp.c.

Referenced by config_output().

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 132 of file vf_maskedclamp.c.

Referenced by config_input().

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 158 of file vf_maskedclamp.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 193 of file vf_maskedclamp.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 219 of file vf_maskedclamp.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 286 of file vf_maskedclamp.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 292 of file vf_maskedclamp.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 298 of file vf_maskedclamp.c.

Variable Documentation

const AVOption maskedclamp_options[]
static
Initial value:
= {
{ "undershoot", "set undershoot", OFFSET(undershoot), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "overshoot", "set overshoot", OFFSET(overshoot), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_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)

Definition at line 52 of file vf_maskedclamp.c.

const AVFilterPad maskedclamp_inputs[]
static
Initial value:
= {
{
.name = "base",
.filter_frame = filter_frame,
.config_props = config_input,
},
{
.name = "dark",
.filter_frame = filter_frame,
},
{
.name = "bright",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)

Definition at line 305 of file vf_maskedclamp.c.

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

Definition at line 325 of file vf_maskedclamp.c.

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 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:176
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
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 flags
Definition: cpu.c:47

Definition at line 335 of file vf_maskedclamp.c.