FFmpeg
Data Structures | Macros | Functions | Variables
af_axcorrelate.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "filters.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AudioXCorrelateContext
 

Macros

#define AF   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define OFFSET(x)   offsetof(AudioXCorrelateContext, x)
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static float mean_sum (const float *in, int size)
 
static float square_sum (const float *x, const float *y, int size)
 
static float xcorrelate (const float *x, const float *y, float sumx, float sumy, int size)
 
static int xcorrelate_slow (AVFilterContext *ctx, AVFrame *out)
 
static int xcorrelate_fast (AVFilterContext *ctx, AVFrame *out)
 
static int activate (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (axcorrelate)
 

Variables

static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
static const AVOption axcorrelate_options []
 
AVFilter ff_af_axcorrelate
 

Macro Definition Documentation

Definition at line 355 of file af_axcorrelate.c.

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

Definition at line 356 of file af_axcorrelate.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 50 of file af_axcorrelate.c.

static float mean_sum ( const float *  in,
int  size 
)
static

Definition at line 80 of file af_axcorrelate.c.

static float square_sum ( const float *  x,
const float *  y,
int  size 
)
static

Definition at line 90 of file af_axcorrelate.c.

Referenced by vp6_block_variance(), and xcorrelate_fast().

static float xcorrelate ( const float *  x,
const float *  y,
float  sumx,
float  sumy,
int  size 
)
static

Definition at line 100 of file af_axcorrelate.c.

static int xcorrelate_slow ( AVFilterContext ctx,
AVFrame out 
)
static

Definition at line 120 of file af_axcorrelate.c.

Referenced by config_output().

static int xcorrelate_fast ( AVFilterContext ctx,
AVFrame out 
)
static

Definition at line 153 of file af_axcorrelate.c.

Referenced by config_output().

static int activate ( AVFilterContext ctx)
static

Definition at line 197 of file af_axcorrelate.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 287 of file af_axcorrelate.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 319 of file af_axcorrelate.c.

AVFILTER_DEFINE_CLASS ( axcorrelate  )

Variable Documentation

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

Definition at line 334 of file af_axcorrelate.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 at line 346 of file af_axcorrelate.c.

const AVOption axcorrelate_options[]
static
Initial value:
= {
{ "size", "set segment size", OFFSET(size), AV_OPT_TYPE_INT, {.i64=256}, 2, 131072, AF },
{ "algo", "set alghorithm", OFFSET(algo), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, AF, "algo" },
{ "slow", "slow algorithm", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "algo" },
{ "fast", "fast algorithm", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "algo" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
ptrdiff_t size
Definition: opengl_enc.c:100
Definition: dct.c:52
#define AF

Definition at line 358 of file af_axcorrelate.c.

AVFilter ff_af_axcorrelate
Initial value:
= {
.name = "axcorrelate",
.description = NULL_IF_CONFIG_SMALL("Cross-correlate two audio streams."),
.priv_size = sizeof(AudioXCorrelateContext),
.priv_class = &axcorrelate_class,
}
static const AVFilterPad inputs[]
static av_cold void uninit(AVFilterContext *ctx)
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:186
static const AVFilterPad outputs[]
static int activate(AVFilterContext *ctx)

Definition at line 368 of file af_axcorrelate.c.