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

Go to the source code of this file.

Data Structures

struct  VectorscopeContext
 

Macros

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

Enumerations

enum  VectorscopeMode {
  GRAY, COLOR, COLOR2, COLOR3,
  COLOR4, MODE_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (vectorscope)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static void envelope_instant (VectorscopeContext *s, AVFrame *out)
 
static void envelope_peak (VectorscopeContext *s, AVFrame *out)
 
static void envelope (VectorscopeContext *s, AVFrame *out)
 
static void vectorscope (VectorscopeContext *s, AVFrame *in, AVFrame *out, int pd)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption vectorscope_options []
 
static enum AVPixelFormat out_yuv_pix_fmts []
 
static enum AVPixelFormat out_rgb_pix_fmts []
 
static enum AVPixelFormat in1_pix_fmts []
 
static enum AVPixelFormat in2_pix_fmts []
 
static const uint8_t black_yuva_color [4] = { 0, 127, 127, 0 }
 
static const uint8_t black_gbrp_color [4] = { 0, 0, 0, 0 }
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_vectorscope
 

Macro Definition Documentation

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

Definition at line 54 of file vf_vectorscope.c.

Definition at line 55 of file vf_vectorscope.c.

Enumeration Type Documentation

Enumerator
GRAY 
COLOR 
COLOR2 
COLOR3 
COLOR4 
MODE_NB 

Definition at line 30 of file vf_vectorscope.c.

Function Documentation

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

Definition at line 106 of file vf_vectorscope.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 150 of file vf_vectorscope.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 187 of file vf_vectorscope.c.

static void envelope_instant ( VectorscopeContext s,
AVFrame out 
)
static

Definition at line 199 of file vf_vectorscope.c.

Referenced by envelope(), and envelope_peak().

static void envelope_peak ( VectorscopeContext s,
AVFrame out 
)
static

Definition at line 219 of file vf_vectorscope.c.

Referenced by envelope().

static void envelope ( VectorscopeContext s,
AVFrame out 
)
static

Definition at line 249 of file vf_vectorscope.c.

Referenced by vectorscope().

static void vectorscope ( VectorscopeContext s,
AVFrame in,
AVFrame out,
int  pd 
)
static

Definition at line 260 of file vf_vectorscope.c.

Referenced by avfilter_register_all(), and filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 408 of file vf_vectorscope.c.

Variable Documentation

const AVOption vectorscope_options[]
static
Initial value:
= {
{ "mode", "set vectorscope mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, MODE_NB-1, FLAGS, "mode"},
{ "m", "set vectorscope mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, MODE_NB-1, FLAGS, "mode"},
{ "gray", 0, 0, AV_OPT_TYPE_CONST, {.i64=GRAY}, 0, 0, FLAGS, "mode" },
{ "color", 0, 0, AV_OPT_TYPE_CONST, {.i64=COLOR}, 0, 0, FLAGS, "mode" },
{ "color2", 0, 0, AV_OPT_TYPE_CONST, {.i64=COLOR2}, 0, 0, FLAGS, "mode" },
{ "color3", 0, 0, AV_OPT_TYPE_CONST, {.i64=COLOR3}, 0, 0, FLAGS, "mode" },
{ "color4", 0, 0, AV_OPT_TYPE_CONST, {.i64=COLOR4}, 0, 0, FLAGS, "mode" },
{ "x", "set color component on X axis", OFFSET(x), AV_OPT_TYPE_INT, {.i64=1}, 0, 2, FLAGS},
{ "y", "set color component on Y axis", OFFSET(y), AV_OPT_TYPE_INT, {.i64=2}, 0, 2, FLAGS},
{ "intensity", "set intensity", OFFSET(fintensity), AV_OPT_TYPE_FLOAT, {.dbl=0.004}, 0, 1, FLAGS},
{ "i", "set intensity", OFFSET(fintensity), AV_OPT_TYPE_FLOAT, {.dbl=0.004}, 0, 1, FLAGS},
{ "envelope", "set envelope", OFFSET(envelope), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS, "envelope"},
{ "e", "set envelope", OFFSET(envelope), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS, "envelope"},
{ "none", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "envelope" },
{ "instant", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "envelope" },
{ "peak", 0, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, "envelope" },
{ "peak+instant", 0, 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, FLAGS, "envelope" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
mode
Definition: f_perms.c:27
static void envelope(VectorscopeContext *s, AVFrame *out)
float y
#define FLAGS

Definition at line 57 of file vf_vectorscope.c.

enum AVPixelFormat out_yuv_pix_fmts[]
static
Initial value:
= {
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:68
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:280

Definition at line 80 of file vf_vectorscope.c.

Referenced by query_formats().

enum AVPixelFormat out_rgb_pix_fmts[]
static
Initial value:
= {
}
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:188
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:299

Definition at line 85 of file vf_vectorscope.c.

Referenced by query_formats().

enum AVPixelFormat in1_pix_fmts[]
static
Initial value:
= {
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:68
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:188
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:280
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:299
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:77

Definition at line 90 of file vf_vectorscope.c.

Referenced by query_formats().

enum AVPixelFormat in2_pix_fmts[]
static
Initial value:
= {
}
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:68
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:188
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:103
planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting col...
Definition: pixfmt.h:76
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:281
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:67
planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting col...
Definition: pixfmt.h:75
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:280
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
Definition: pixfmt.h:69
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:299
planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting col...
Definition: pixfmt.h:77
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
Definition: pixfmt.h:70
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor ...
Definition: pixfmt.h:302
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
Definition: pixfmt.h:101

Definition at line 96 of file vf_vectorscope.c.

Referenced by query_formats().

const uint8_t black_yuva_color[4] = { 0, 127, 127, 0 }
static

Definition at line 147 of file vf_vectorscope.c.

Referenced by config_input().

const uint8_t black_gbrp_color[4] = { 0, 0, 0, 0 }
static

Definition at line 148 of file vf_vectorscope.c.

Referenced by config_input().

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

Definition at line 436 of file vf_vectorscope.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 446 of file vf_vectorscope.c.

AVFilter ff_vf_vectorscope
Initial value:
= {
.name = "vectorscope",
.description = NULL_IF_CONFIG_SMALL("Video vectorscope."),
.priv_size = sizeof(VectorscopeContext),
.priv_class = &vectorscope_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
static int query_formats(AVFilterContext *ctx)

Definition at line 455 of file vf_vectorscope.c.