FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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  ThreadData
 Used for passing data between threads. More...
 
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_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
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

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

Definition at line 49 of file vf_limiter.c.

Definition at line 50 of file vf_limiter.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( limiter  )
static av_cold int init ( AVFilterContext ctx)
static

Definition at line 61 of file vf_limiter.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 70 of file vf_limiter.c.

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 99 of file vf_limiter.c.

Referenced by config_props().

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 115 of file vf_limiter.c.

Referenced by config_props().

static int config_props ( AVFilterLink inlink)
static

Definition at line 136 of file vf_limiter.c.

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

Definition at line 169 of file vf_limiter.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 202 of file vf_limiter.c.

Variable Documentation

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:49
static const struct @304 planes[]
#define FLAGS
Definition: vf_limiter.c:50
float min

Definition at line 52 of file vf_limiter.c.

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:202
static int config_props(AVFilterLink *inlink)
Definition: vf_limiter.c:136

Definition at line 231 of file vf_limiter.c.

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

Definition at line 241 of file vf_limiter.c.

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:61
#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:231
static const AVFilterPad outputs[]
Definition: vf_limiter.c:241
#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 int query_formats(AVFilterContext *ctx)
Definition: vf_limiter.c:70
#define flags(name, subs,...)
Definition: cbs_av1.c:596

Definition at line 249 of file vf_limiter.c.