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_color8 (FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
 
static void pick_color16 (FFDrawContext *draw, FFDrawColor *color, AVFrame *in, int x, int y, int *value)
 
static void reverse_color8 (FFDrawContext *draw, FFDrawColor *color, FFDrawColor *reverse)
 
static void reverse_color16 (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 55 of file vf_datascope.c.

Definition at line 56 of file vf_datascope.c.

Function Documentation

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

Definition at line 74 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 79 of file vf_datascope.c.

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

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

Definition at line 102 of file vf_datascope.c.

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

Definition at line 120 of file vf_datascope.c.

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

Definition at line 138 of file vf_datascope.c.

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

Definition at line 150 of file vf_datascope.c.

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

Definition at line 170 of file vf_datascope.c.

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

Definition at line 212 of file vf_datascope.c.

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

Definition at line 250 of file vf_datascope.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 287 of file vf_datascope.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 351 of file vf_datascope.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 382 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 },
{ "opacity", "set background opacity", OFFSET(opacity), AV_OPT_TYPE_FLOAT, {.dbl=0.75}, 0, 1, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_datascope.c:55
mode
Definition: f_perms.c:27
#define FLAGS
Definition: vf_datascope.c:56
offset must point to two consecutive integers
Definition: opt.h:232

Definition at line 58 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:287
static int config_input(AVFilterLink *inlink)
Definition: vf_datascope.c:351

Definition at line 393 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:382

Definition at line 403 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:393
#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:116
static int query_formats(AVFilterContext *ctx)
Definition: vf_datascope.c:74
static const AVFilterPad outputs[]
Definition: vf_datascope.c:403
static int flags
Definition: cpu.c:47

Definition at line 412 of file vf_datascope.c.