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

Go to the source code of this file.

Data Structures

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

Macros

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

Functions

static int query_formats (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static int comparei (const void *p1, const void *p2)
 
static int median_frames16 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int median_frames8 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int process_frame (FFFrameSync *fs)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int activate (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (xmedian)
 

Variables

static const AVOption xmedian_options []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_xmedian
 

Macro Definition Documentation

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

Definition at line 320 of file vf_xmedian.c.

Definition at line 321 of file vf_xmedian.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 54 of file vf_xmedian.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 86 of file vf_xmedian.c.

static int comparei ( const void p1,
const void p2 
)
static

Definition at line 117 of file vf_xmedian.c.

Referenced by median_frames16(), and median_frames8().

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

Definition at line 124 of file vf_xmedian.c.

Referenced by config_output().

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

Definition at line 168 of file vf_xmedian.c.

Referenced by config_output().

static int process_frame ( FFFrameSync fs)
static

Definition at line 210 of file vf_xmedian.c.

Referenced by config_output().

static int config_output ( AVFilterLink outlink)
static

Definition at line 237 of file vf_xmedian.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 303 of file vf_xmedian.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 314 of file vf_xmedian.c.

AVFILTER_DEFINE_CLASS ( xmedian  )

Variable Documentation

const AVOption xmedian_options[]
static
Initial value:
= {
{ "inputs", "set number of inputs", OFFSET(nb_inputs), AV_OPT_TYPE_INT, {.i64=3}, 3, 255, .flags = FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags = FLAGS },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_xmedian.c:320
static const struct @317 planes[]
#define FLAGS
Definition: vf_xmedian.c:321

Definition at line 323 of file vf_xmedian.c.

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

Definition at line 329 of file vf_xmedian.c.

AVFilter ff_vf_xmedian
Initial value:
= {
.name = "xmedian",
.description = NULL_IF_CONFIG_SMALL("Pick median pixels from several video inputs."),
.priv_size = sizeof(XMedianContext),
.priv_class = &xmedian_class,
.init = init,
}
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:105
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_xmedian.c:303
static int activate(AVFilterContext *ctx)
Definition: vf_xmedian.c:314
static int query_formats(AVFilterContext *ctx)
Definition: vf_xmedian.c:54
static av_cold int init(AVFilterContext *ctx)
Definition: vf_xmedian.c:86
static const AVFilterPad outputs[]
Definition: vf_xmedian.c:329
#define flags(name, subs,...)
Definition: cbs_av1.c:561

Definition at line 340 of file vf_xmedian.c.