FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_midequalizer.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  MidEqualizerContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (midequalizer)
 
static int query_formats (AVFilterContext *ctx)
 
static int process_frame (FFFrameSync *fs)
 
static void compute_histogram8 (const uint8_t *src, ptrdiff_t linesize, int w, int h, float *histogram, size_t hsize)
 
static void compute_histogram16 (const uint16_t *src, ptrdiff_t linesize, int w, int h, float *histogram, size_t hsize)
 
static void compute_contrast_change (float *histogram1, float *histogram2, unsigned *cchange, size_t hsize)
 
static void midequalizer8 (const uint8_t *in0, const uint8_t *in1, uint8_t *dst, ptrdiff_t linesize1, ptrdiff_t linesize2, ptrdiff_t dlinesize, int w0, int h0, int w1, int h1, float *histogram1, float *histogram2, unsigned *cchange, size_t hsize)
 
static void midequalizer16 (const uint8_t *in0, const uint8_t *in1, uint8_t *dst, ptrdiff_t linesize1, ptrdiff_t linesize2, ptrdiff_t dlinesize, int w0, int h0, int w1, int h1, float *histogram1, float *histogram2, unsigned *cchange, size_t hsize)
 
static int config_input0 (AVFilterLink *inlink)
 
static int config_input1 (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption midequalizer_options []
 
static const AVFilterPad midequalizer_inputs []
 
static const AVFilterPad midequalizer_outputs []
 
AVFilter ff_vf_midequalizer
 

Macro Definition Documentation

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

Definition at line 50 of file vf_midequalizer.c.

Definition at line 51 of file vf_midequalizer.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( midequalizer  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 60 of file vf_midequalizer.c.

static int process_frame ( FFFrameSync fs)
static

Definition at line 84 of file vf_midequalizer.c.

Referenced by config_output().

static void compute_histogram8 ( const uint8_t src,
ptrdiff_t  linesize,
int  w,
int  h,
float *  histogram,
size_t  hsize 
)
static

Definition at line 130 of file vf_midequalizer.c.

Referenced by midequalizer8().

static void compute_histogram16 ( const uint16_t *  src,
ptrdiff_t  linesize,
int  w,
int  h,
float *  histogram,
size_t  hsize 
)
static

Definition at line 151 of file vf_midequalizer.c.

Referenced by midequalizer16().

static void compute_contrast_change ( float *  histogram1,
float *  histogram2,
unsigned *  cchange,
size_t  hsize 
)
static

Definition at line 172 of file vf_midequalizer.c.

Referenced by midequalizer16(), and midequalizer8().

static void midequalizer8 ( const uint8_t in0,
const uint8_t in1,
uint8_t dst,
ptrdiff_t  linesize1,
ptrdiff_t  linesize2,
ptrdiff_t  dlinesize,
int  w0,
int  h0,
int  w1,
int  h1,
float *  histogram1,
float *  histogram2,
unsigned *  cchange,
size_t  hsize 
)
static

Definition at line 186 of file vf_midequalizer.c.

Referenced by config_input0().

static void midequalizer16 ( const uint8_t in0,
const uint8_t in1,
uint8_t dst,
ptrdiff_t  linesize1,
ptrdiff_t  linesize2,
ptrdiff_t  dlinesize,
int  w0,
int  h0,
int  w1,
int  h1,
float *  histogram1,
float *  histogram2,
unsigned *  cchange,
size_t  hsize 
)
static

Definition at line 212 of file vf_midequalizer.c.

Referenced by config_input0().

static int config_input0 ( AVFilterLink inlink)
static

Definition at line 240 of file vf_midequalizer.c.

static int config_input1 ( AVFilterLink inlink)
static

Definition at line 274 of file vf_midequalizer.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 294 of file vf_midequalizer.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 332 of file vf_midequalizer.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 338 of file vf_midequalizer.c.

Variable Documentation

const AVOption midequalizer_options[]
static
Initial value:
= {
{ "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ NULL }
}
#define OFFSET(x)
#define NULL
Definition: coverity.c:32
#define FLAGS

Definition at line 53 of file vf_midequalizer.c.

const AVFilterPad midequalizer_inputs[]
static
Initial value:
= {
{
.name = "in0",
.config_props = config_input0,
},
{
.name = "in1",
.config_props = config_input1,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input0(AVFilterLink *inlink)
static int config_input1(AVFilterLink *inlink)

Definition at line 348 of file vf_midequalizer.c.

const AVFilterPad midequalizer_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 362 of file vf_midequalizer.c.

AVFilter ff_vf_midequalizer
Initial value:
= {
.name = "midequalizer",
.description = NULL_IF_CONFIG_SMALL("Apply Midway Equalization."),
.priv_size = sizeof(MidEqualizerContext),
.priv_class = &midequalizer_class,
}
static const AVFilterPad midequalizer_inputs[]
static int activate(AVFilterContext *ctx)
static int flags
Definition: log.c:57
static int query_formats(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:389
static const AVFilterPad midequalizer_outputs[]
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:379
static av_cold void uninit(AVFilterContext *ctx)
#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:133

Definition at line 371 of file vf_midequalizer.c.