FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_datascope.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/xga_font_data.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  DatascopeContext
 
struct  ThreadData
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (datascope)
 
static int query_formats (AVFilterContext *ctx)
 
static void draw_text (DatascopeContext *s, AVFrame *frame, FFDrawColor *color, int x0, int y0, const uint8_t *text, int vertical)
 
static void pick_color (FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
 
static void reverse_color (FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
 
static int filter_color2 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_color (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_mono (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 

Variables

static const AVOption datascope_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_datascope
 

Macro Definition Documentation

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

Definition at line 52 of file vf_datascope.c.

Definition at line 53 of file vf_datascope.c.

Function Documentation

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

Definition at line 70 of file vf_datascope.c.

static void draw_text ( DatascopeContext s,
AVFrame frame,
FFDrawColor color,
int  x0,
int  y0,
const uint8_t text,
int  vertical 
)
static

Definition at line 75 of file vf_datascope.c.

Referenced by filter_color(), filter_color2(), filter_frame(), and filter_mono().

static void pick_color ( FFDrawContext draw,
FFDrawColor color,
AVFrame in,
int  x,
int  y,
int *  value 
)
static

Definition at line 98 of file vf_datascope.c.

Referenced by filter_color(), filter_color2(), and filter_mono().

static void reverse_color ( FFDrawContext draw,
FFDrawColor color,
FFDrawColor reverse 
)
static

Definition at line 128 of file vf_datascope.c.

Referenced by filter_color2().

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

Definition at line 156 of file vf_datascope.c.

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

Definition at line 198 of file vf_datascope.c.

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

Definition at line 236 of file vf_datascope.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 273 of file vf_datascope.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 337 of file vf_datascope.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 359 of file vf_datascope.c.

Variable Documentation

const AVOption datascope_options[]
static
Initial value:
= {
{ "size", "set output size", OFFSET(ow), AV_OPT_TYPE_IMAGE_SIZE, {.str="hd720"}, 0, 0, FLAGS },
{ "s", "set output size", OFFSET(ow), AV_OPT_TYPE_IMAGE_SIZE, {.str="hd720"}, 0, 0, FLAGS },
{ "x", "set x offset", OFFSET(x), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "y", "set y offset", OFFSET(y), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, FLAGS },
{ "mode", "set scope mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 2, FLAGS, "mode" },
{ "mono", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "mode" },
{ "color", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "mode" },
{ "color2", NULL, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, "mode" },
{ "axis", "draw column/row numbers", OFFSET(axis), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_datascope.c:52
mode
Definition: f_perms.c:27
#define FLAGS
Definition: vf_datascope.c:53
offset must point to two consecutive integers
Definition: opt.h:232

Definition at line 55 of file vf_datascope.c.

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

Definition at line 370 of file vf_datascope.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: vf_datascope.c:359

Definition at line 380 of file vf_datascope.c.

AVFilter ff_vf_datascope
Initial value:
= {
.name = "datascope",
.description = NULL_IF_CONFIG_SMALL("Video data analysis."),
.priv_size = sizeof(DatascopeContext),
.priv_class = &datascope_class,
}
static const AVFilterPad inputs[]
Definition: vf_datascope.c:370
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:114
static int query_formats(AVFilterContext *ctx)
Definition: vf_datascope.c:70
static const AVFilterPad outputs[]
Definition: vf_datascope.c:380
static int flags
Definition: cpu.c:47

Definition at line 389 of file vf_datascope.c.