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|AV_OPT_FLAG_RUNTIME_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 []
 
const AVFilter ff_vf_maskedmin
 
const AVFilter ff_vf_maskedmax
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 30 of file vf_maskedminmax.c.

◆ FLAGS

Definition at line 31 of file vf_maskedminmax.c.

◆ maskedmin_options

#define maskedmin_options   maskedminmax_options

Definition at line 328 of file vf_maskedminmax.c.

◆ maskedmax_options

#define maskedmax_options   maskedminmax_options

Definition at line 346 of file vf_maskedminmax.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 57 of file vf_maskedminmax.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 66 of file vf_maskedminmax.c.

◆ maskedmin8()

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

◆ maskedmax8()

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

◆ maskedmin16()

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

◆ maskedmax16()

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

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 127 of file vf_maskedminmax.c.

◆ maskedminmax_slice()

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

◆ process_frame()

static int process_frame ( FFFrameSync fs)
static

Definition at line 194 of file vf_maskedminmax.c.

Referenced by config_output().

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 232 of file vf_maskedminmax.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 289 of file vf_maskedminmax.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 295 of file vf_maskedminmax.c.

◆ AVFILTER_DEFINE_CLASS() [1/2]

AVFILTER_DEFINE_CLASS ( maskedmin  )

◆ AVFILTER_DEFINE_CLASS() [2/2]

AVFILTER_DEFINE_CLASS ( maskedmax  )

Variable Documentation

◆ maskedminmax_options

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

Definition at line 52 of file vf_maskedminmax.c.

◆ maskedminmax_inputs

const AVFilterPad maskedminmax_inputs[]
static
Initial value:
= {
{
.name = "source",
.config_props = config_input,
},
{
.name = "filter1",
},
{
.name = "filter2",
},
{ NULL }
}

Definition at line 302 of file vf_maskedminmax.c.

◆ maskedminmax_outputs

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

Definition at line 319 of file vf_maskedminmax.c.

◆ ff_vf_maskedmin

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

Definition at line 331 of file vf_maskedminmax.c.

◆ ff_vf_maskedmax

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

Definition at line 349 of file vf_maskedminmax.c.

uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_maskedminmax.c:295
maskedminmax_outputs
static const AVFilterPad maskedminmax_outputs[]
Definition: vf_maskedminmax.c:319
FLAGS
#define FLAGS
Definition: vf_maskedminmax.c:31
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
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_maskedminmax.c:57
NULL
#define NULL
Definition: coverity.c:32
MaskedMinMaxContext
Definition: vf_maskedminmax.c:37
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
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_maskedminmax.c:66
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_maskedminmax.c:232
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
OFFSET
#define OFFSET(x)
Definition: vf_maskedminmax.c:30
activate
static int activate(AVFilterContext *ctx)
Definition: vf_maskedminmax.c:289
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
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
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
maskedminmax_inputs
static const AVFilterPad maskedminmax_inputs[]
Definition: vf_maskedminmax.c:302
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:134
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_maskedminmax.c:127