FFmpeg  4.0
Data Structures | Macros | Functions | Variables
vf_limiter.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "limiter.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  LimiterContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (limiter)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static void limiter8 (const uint8_t *src, uint8_t *dst, ptrdiff_t slinesize, ptrdiff_t dlinesize, int w, int h, int min, int max)
 
static void limiter16 (const uint8_t *ssrc, uint8_t *ddst, ptrdiff_t slinesize, ptrdiff_t dlinesize, int w, int h, int min, int max)
 
static int config_props (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption limiter_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_limiter
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 44 of file vf_limiter.c.

◆ FLAGS

Definition at line 45 of file vf_limiter.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( limiter  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 56 of file vf_limiter.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 65 of file vf_limiter.c.

◆ limiter8()

static void limiter8 ( const uint8_t src,
uint8_t dst,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  min,
int  max 
)
static

Definition at line 94 of file vf_limiter.c.

Referenced by config_props().

◆ limiter16()

static void limiter16 ( const uint8_t ssrc,
uint8_t ddst,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
int  w,
int  h,
int  min,
int  max 
)
static

Definition at line 110 of file vf_limiter.c.

Referenced by config_props().

◆ config_props()

static int config_props ( AVFilterLink inlink)
static

Definition at line 131 of file vf_limiter.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 164 of file vf_limiter.c.

Variable Documentation

◆ limiter_options

const AVOption limiter_options[]
static
Initial value:
= {
{ "min", "set min value", OFFSET(min), AV_OPT_TYPE_INT, {.i64=0}, 0, 65535, .flags = FLAGS },
{ "max", "set max value", OFFSET(max), AV_OPT_TYPE_INT, {.i64=65535}, 0, 65535, .flags = FLAGS },
{ "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, .flags = FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_limiter.c:44
#define FLAGS
Definition: vf_limiter.c:45
static const struct @272 planes[]
float min

Definition at line 47 of file vf_limiter.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_props,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_limiter.c:164
static int config_props(AVFilterLink *inlink)
Definition: vf_limiter.c:131

Definition at line 203 of file vf_limiter.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 213 of file vf_limiter.c.

◆ ff_vf_limiter

AVFilter ff_vf_limiter
Initial value:
= {
.name = "limiter",
.description = NULL_IF_CONFIG_SMALL("Limit pixels components to the specified range."),
.priv_size = sizeof(LimiterContext),
.priv_class = &limiter_class,
.init = init,
}
static av_cold int init(AVFilterContext *ctx)
Definition: vf_limiter.c:56
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
static const AVFilterPad inputs[]
Definition: vf_limiter.c:203
static int flags
Definition: log.c:55
static const AVFilterPad outputs[]
Definition: vf_limiter.c:213
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int query_formats(AVFilterContext *ctx)
Definition: vf_limiter.c:65

Definition at line 221 of file vf_limiter.c.