FFmpeg
Data Structures | Macros | Functions | Variables
vf_maskedminmax.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  MaskedMinMaxContext
 

Macros

#define OFFSET(x)   offsetof(MaskedMinMaxContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define maskedmin_options   maskedminmax_options
 
#define maskedmax_options   maskedminmax_options
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static void maskedmin8 (const uint8_t *src, uint8_t *dst, const uint8_t *f1, const uint8_t *f2, int w)
 
static void maskedmax8 (const uint8_t *src, uint8_t *dst, const uint8_t *f1, const uint8_t *f2, int w)
 
static void maskedmin16 (const uint8_t *ssrc, uint8_t *ddst, const uint8_t *ff1, const uint8_t *ff2, int w)
 
static void maskedmax16 (const uint8_t *ssrc, uint8_t *ddst, const uint8_t *ff1, const uint8_t *ff2, int w)
 
static int config_input (AVFilterLink *inlink)
 
static int maskedminmax_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int process_frame (FFFrameSync *fs)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (maskedmin)
 
 AVFILTER_DEFINE_CLASS (maskedmax)
 

Variables

static const AVOption maskedminmax_options []
 
static const AVFilterPad maskedminmax_inputs []
 
static const AVFilterPad maskedminmax_outputs []
 
AVFilter ff_vf_maskedmin
 
AVFilter ff_vf_maskedmax
 

Macro Definition Documentation

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

Definition at line 30 of file vf_maskedminmax.c.

Definition at line 31 of file vf_maskedminmax.c.

#define maskedmin_options   maskedminmax_options

Definition at line 328 of file vf_maskedminmax.c.

#define maskedmax_options   maskedminmax_options

Definition at line 345 of file vf_maskedminmax.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 57 of file vf_maskedminmax.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 66 of file vf_maskedminmax.c.

static void maskedmin8 ( const uint8_t src,
uint8_t dst,
const uint8_t f1,
const uint8_t f2,
int  w 
)
static

Definition at line 93 of file vf_maskedminmax.c.

Referenced by config_input().

static void maskedmax8 ( const uint8_t src,
uint8_t dst,
const uint8_t f1,
const uint8_t f2,
int  w 
)
static

Definition at line 99 of file vf_maskedminmax.c.

Referenced by config_input().

static void maskedmin16 ( const uint8_t ssrc,
uint8_t ddst,
const uint8_t ff1,
const uint8_t ff2,
int  w 
)
static

Definition at line 105 of file vf_maskedminmax.c.

Referenced by config_input().

static void maskedmax16 ( const uint8_t ssrc,
uint8_t ddst,
const uint8_t ff1,
const uint8_t ff2,
int  w 
)
static

Definition at line 116 of file vf_maskedminmax.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 127 of file vf_maskedminmax.c.

static int maskedminmax_slice ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 156 of file vf_maskedminmax.c.

Referenced by process_frame().

static int process_frame ( FFFrameSync fs)
static

Definition at line 194 of file vf_maskedminmax.c.

Referenced by config_output().

static int config_output ( AVFilterLink outlink)
static

Definition at line 232 of file vf_maskedminmax.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 289 of file vf_maskedminmax.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 295 of file vf_maskedminmax.c.

AVFILTER_DEFINE_CLASS ( maskedmin  )
AVFILTER_DEFINE_CLASS ( maskedmax  )

Variable Documentation

const AVOption maskedminmax_options[]
static
Initial value:
= {
{ "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 @323 planes[]

Definition at line 52 of file vf_maskedminmax.c.

const AVFilterPad maskedminmax_inputs[]
static
Initial value:
= {
{
.name = "source",
.config_props = config_input,
},
{
.name = "filter1",
},
{
.name = "filter2",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)

Definition at line 302 of file vf_maskedminmax.c.

const AVFilterPad maskedminmax_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 319 of file vf_maskedminmax.c.

AVFilter ff_vf_maskedmin
Initial value:
= {
.name = "maskedmin",
.description = NULL_IF_CONFIG_SMALL("Apply filtering with minimum difference of two streams."),
.priv_class = &maskedmin_class,
.priv_size = sizeof(MaskedMinMaxContext),
.init = init,
}
static av_cold int init(AVFilterContext *ctx)
static int activate(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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 maskedminmax_outputs[]
#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:134
#define flags(name, subs,...)
Definition: cbs_av1.c:560
static const AVFilterPad maskedminmax_inputs[]
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 331 of file vf_maskedminmax.c.

AVFilter ff_vf_maskedmax
Initial value:
= {
.name = "maskedmax",
.description = NULL_IF_CONFIG_SMALL("Apply filtering with maximum difference of two streams."),
.priv_class = &maskedmax_class,
.priv_size = sizeof(MaskedMinMaxContext),
.init = init,
}
static av_cold int init(AVFilterContext *ctx)
static int activate(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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 maskedminmax_outputs[]
#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:134
#define flags(name, subs,...)
Definition: cbs_av1.c:560
static const AVFilterPad maskedminmax_inputs[]
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 348 of file vf_maskedminmax.c.