FFmpeg
Classes | Macros | Typedefs | Enumerations | Functions | Variables
vf_colormatrix.c File Reference

ColorMatrix 2.0 is based on the original ColorMatrix filter by Wilbert Dijkhof. More...

#include <float.h>
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"

Classes

struct  ColorMatrixContext
 
struct  ThreadData
 

Macros

#define NS(n)   ((n) < 0 ? (int)((n)*65536.0-0.5+DBL_EPSILON) : (int)((n)*65536.0+0.5))
 
#define CB(n)   av_clip_uint8(n)
 
#define OFFSET(x)   offsetof(ColorMatrixContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define ma   m[0][0]
 
#define mb   m[0][1]
 
#define mc   m[0][2]
 
#define md   m[1][0]
 
#define me   m[1][1]
 
#define mf   m[1][2]
 
#define mg   m[2][0]
 
#define mh   m[2][1]
 
#define mi   m[2][2]
 
#define ima   im[0][0]
 
#define imb   im[0][1]
 
#define imc   im[0][2]
 
#define imd   im[1][0]
 
#define ime   im[1][1]
 
#define imf   im[1][2]
 
#define img   im[2][0]
 
#define imh   im[2][1]
 
#define imi   im[2][2]
 

Typedefs

typedef struct ColorMatrixContext ColorMatrixContext
 
typedef struct ThreadData ThreadData
 

Enumerations

enum  ColorMode {
  CHANNEL, INTENSITY, RAINBOW, MORELAND,
  NEBULAE, FIRE, FIERY, FRUIT,
  COOL, NB_CLMODES, COLOR_MODE_NONE = -1, COLOR_MODE_BT709,
  COLOR_MODE_FCC, COLOR_MODE_BT601, COLOR_MODE_SMPTE240M, COLOR_MODE_BT2020,
  COLOR_MODE_COUNT
}
 

Functions

 AVFILTER_DEFINE_CLASS (colormatrix)
 

Variables

AVFilter ff_vf_colormatrix
 

Detailed Description

ColorMatrix 2.0 is based on the original ColorMatrix filter by Wilbert Dijkhof.

It adds the ability to convert between any of: Rec.709, FCC, Rec.601, and SMPTE 240M. It also makes pre and post clipping optional, adds an option to use scaled or non-scaled coefficients, and more...

Variable Documentation

§ ff_vf_colormatrix

AVFilter ff_vf_colormatrix
Initial value:
= {
.name = "colormatrix",
.description = NULL_IF_CONFIG_SMALL("Convert color matrix."),
.priv_size = sizeof(ColorMatrixContext),
.init = init,
.query_formats = query_formats,
.inputs = colormatrix_inputs,
.outputs = colormatrix_outputs,
.priv_class = &colormatrix_class,
}
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
Definition: vf_colormatrix.c:61
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116