FFmpeg
Data Structures | Macros | Functions | Variables
vf_vidstabdetect.c File Reference
#include <vid.stab/libvidstab.h>
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avfilter.h"
#include "internal.h"
#include "vidstabutils.h"

Go to the source code of this file.

Data Structures

struct  StabData
 

Macros

#define DEFAULT_RESULT_NAME   "transforms.trf"
 
#define OFFSET(x)   offsetof(StabData, x)
 
#define OFFSETC(x)   (offsetof(StabData, conf)+offsetof(VSMotionDetectConfig, x))
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (vidstabdetect)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption vidstabdetect_options []
 
static const AVFilterPad avfilter_vf_vidstabdetect_inputs []
 
static const AVFilterPad avfilter_vf_vidstabdetect_outputs []
 
AVFilter ff_vf_vidstabdetect
 

Macro Definition Documentation

#define DEFAULT_RESULT_NAME   "transforms.trf"

Definition at line 21 of file vf_vidstabdetect.c.

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

Definition at line 44 of file vf_vidstabdetect.c.

#define OFFSETC (   x)    (offsetof(StabData, conf)+offsetof(VSMotionDetectConfig, x))

Definition at line 45 of file vf_vidstabdetect.c.

Definition at line 46 of file vf_vidstabdetect.c.

Function Documentation

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

Definition at line 63 of file vf_vidstabdetect.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 72 of file vf_vidstabdetect.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 85 of file vf_vidstabdetect.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 102 of file vf_vidstabdetect.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 159 of file vf_vidstabdetect.c.

Variable Documentation

const AVOption vidstabdetect_options[]
static
Initial value:
= {
{"result", "path to the file used to write the transforms", OFFSET(result), AV_OPT_TYPE_STRING, {.str = DEFAULT_RESULT_NAME}, .flags = FLAGS},
{"shakiness", "how shaky is the video and how quick is the camera?"
" 1: little (fast) 10: very strong/quick (slow)", OFFSETC(shakiness), AV_OPT_TYPE_INT, {.i64 = 5}, 1, 10, FLAGS},
{"accuracy", "(>=shakiness) 1: low 15: high (slow)", OFFSETC(accuracy), AV_OPT_TYPE_INT, {.i64 = 15}, 1, 15, FLAGS},
{"stepsize", "region around minimum is scanned with 1 pixel resolution", OFFSETC(stepSize), AV_OPT_TYPE_INT, {.i64 = 6}, 1, 32, FLAGS},
{"mincontrast", "below this contrast a field is discarded (0-1)", OFFSETC(contrastThreshold), AV_OPT_TYPE_DOUBLE, {.dbl = 0.25}, 0.0, 1.0, FLAGS},
{"show", "0: draw nothing; 1,2: show fields and transforms", OFFSETC(show), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 2, FLAGS},
{"tripod", "virtual tripod mode (if >0): motion is compared to a reference"
" reference frame (frame # is the value)", OFFSETC(virtualTripod), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS},
{NULL}
}
#define NULL
Definition: coverity.c:32
#define FLAGS
#define OFFSET(x)
#define DEFAULT_RESULT_NAME
#define OFFSETC(x)
and forward the result(frame or status change) to the corresponding input.If nothing is possible

Definition at line 48 of file vf_vidstabdetect.c.

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

Definition at line 192 of file vf_vidstabdetect.c.

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

Definition at line 202 of file vf_vidstabdetect.c.

AVFilter ff_vf_vidstabdetect
Initial value:
= {
.name = "vidstabdetect",
.description = NULL_IF_CONFIG_SMALL("Extract relative transformations, "
"pass 1 of 2 for stabilization "
"(see vidstabtransform for pass 2)."),
.priv_size = sizeof(StabData),
.init = init,
.priv_class = &vidstabdetect_class,
}
static av_cold int init(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad avfilter_vf_vidstabdetect_outputs[]
#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[]
Definition: af_acontrast.c:203
static const AVFilterPad avfilter_vf_vidstabdetect_inputs[]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 210 of file vf_vidstabdetect.c.