FFmpeg
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
vf_pseudocolor.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  Curve
 
struct  Fill
 
struct  Range
 
struct  Preset
 
struct  PseudoColorContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(PseudoColorContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define PCLIP(v, max, dst, src, x)
 
#define RGB_TO_Y_BT709(r, g, b)
 
#define RGB_TO_U_BT709(r1, g1, b1, max)
 
#define RGB_TO_V_BT709(r1, g1, b1, max)
 
#define Wr   0.2126
 
#define Wb   0.0722
 
#define Wg   (1 - Wr - Wb)
 
#define Umax   0.436
 
#define Vmax   0.615
 
#define YUV_BT709_TO_R(y, u, v, max)   ((y + v * (1 - Wr) / Vmax) * max)
 
#define YUV_BT709_TO_G(y, u, v, max)   ((y - (u * Wb * (1 - Wb) / (Umax * Wg)) - (v * Wr * (1 - Wr) / (Vmax * Wg))) * max)
 
#define YUV_BT709_TO_B(y, u, v, max)   ((y + u * (1 - Wb) / Umax) * max)
 

Typedefs

typedef double(* curve_fun) (double x)
 

Enumerations

enum  var_name {
  VAR_N, VAR_TB, VAR_PTS, VAR_DTS,
  VAR_NOPTS, VAR_STARTPTS, VAR_STARTDTS, VAR_DURATION,
  VAR_D, VAR_POS, VAR_SIZE, VAR_KEY,
  VAR_STATE, VAR_VARS_NB, VAR_N, VAR_TS,
  VAR_POS, VAR_PREV_INPTS, VAR_PREV_INDTS, VAR_PREV_INDUR,
  VAR_PREV_OUTPTS, VAR_PREV_OUTDTS, VAR_PREV_OUTDUR, VAR_NEXT_PTS,
  VAR_NEXT_DTS, VAR_NEXT_DUR, VAR_PTS, VAR_DTS,
  VAR_DURATION, VAR_STARTPTS, VAR_STARTDTS, VAR_TB,
  VAR_TB_OUT, VAR_SR, VAR_NOPTS, VAR_VARS_NB,
  VAR_CH, VAR_N, VAR_NB_IN_CHANNELS, VAR_NB_OUT_CHANNELS,
  VAR_T, VAR_S, VAR_VARS_NB, VAR_CH,
  VAR_SN, VAR_NB_CHANNELS, VAR_T, VAR_SR,
  VAR_P, VAR_F, VAR_VARS_NB, VAR_CH,
  VAR_SN, VAR_NB_CHANNELS, VAR_T, VAR_SR,
  VAR_P, VAR_VARS_NB, VAR_W, VAR_H,
  VAR_CW, VAR_CH, VAR_HSUB, VAR_VSUB,
  VARS_NB, VAR_VALUE1, VAR_VALUE2, VAR_FRAMEVAL,
  VAR_USERVAL, VAR_VARS_NB, VAR_TB, VAR_PTS,
  VAR_START_PTS, VAR_PREV_PTS, VAR_PREV_SELECTED_PTS, VAR_T,
  VAR_START_T, VAR_PREV_T, VAR_PREV_SELECTED_T, VAR_PICT_TYPE,
  VAR_I, VAR_P, VAR_B, VAR_S,
  VAR_SI, VAR_SP, VAR_BI, VAR_PICT_TYPE_I,
  VAR_PICT_TYPE_P, VAR_PICT_TYPE_B, VAR_PICT_TYPE_S, VAR_PICT_TYPE_SI,
  VAR_PICT_TYPE_SP, VAR_PICT_TYPE_BI, VAR_INTERLACE_TYPE, VAR_INTERLACE_TYPE_P,
  VAR_INTERLACE_TYPE_T, VAR_INTERLACE_TYPE_B, VAR_CONSUMED_SAMPLES_N, VAR_SAMPLES_N,
  VAR_SAMPLE_RATE, VAR_N, VAR_SELECTED_N, VAR_PREV_SELECTED_N,
  VAR_KEY, VAR_SCENE, VAR_CONCATDEC_SELECT, VAR_IH,
  VAR_IW, VAR_VARS_NB, VAR_N, VAR_T,
  VAR_PTS, VAR_TS, VAR_TE, VAR_TI,
  VAR_W, VAR_H, VAR_VARS_NB, VAR_dar,
  VAR_duration, VAR_hsub, VAR_vsub, VAR_main_h,
  VAR_H, VAR_main_w, VAR_W, VAR_n,
  VAR_pict_type, VAR_qr_w, VAR_w, VAR_rendered_padded_qr_w,
  VAR_Q, VAR_rendered_qr_w, VAR_q, VAR_sar,
  VAR_t, VAR_x, VAR_y, VAR_VARS_NB,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VAR_OHSUB, VAR_OVSUB, VARS_NB,
  VAR_FRAME_RATE, VAR_INTERLACED, VAR_N, VAR_NB_CONSUMED_SAMPLES,
  VAR_NB_SAMPLES, VAR_PREV_INPTS, VAR_PREV_INT, VAR_PREV_OUTPTS,
  VAR_PREV_OUTT, VAR_PTS, VAR_SAMPLE_RATE, VAR_STARTPTS,
  VAR_STARTT, VAR_T, VAR_TB, VAR_RTCTIME,
  VAR_RTCSTART, VAR_S, VAR_SR, VAR_FR,
  VAR_T_CHANGE, VAR_VARS_NB, VAR_AVTB, VAR_INTB,
  VAR_SR, VAR_VARS_NB, VAR_W, VAR_H,
  VAR_A, VAR_DAR, VAR_SAR, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_A, VAR_SAR,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VAR_X,
  VAR_Y, VAR_N, VAR_T, VAR_VARS_NB,
  VAR_X, VAR_Y, VAR_W, VAR_H,
  VAR_N, VAR_T, VAR_VARS_NB, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_IN_H, VAR_IH,
  VAR_IN_W, VAR_IW, VAR_SAR, VAR_X,
  VAR_Y, VAR_H, VAR_W, VAR_T,
  VAR_MAX, VARS_NB, VAR_IN_H, VAR_IH,
  VAR_IN_W, VAR_IW, VAR_X, VAR_Y,
  VAR_H, VAR_W, VAR_T, VAR_MAX,
  VARS_NB, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VAR_LINE_H, VAR_LH, VAR_MAIN_H, VAR_h,
  VAR_H, VAR_MAIN_W, VAR_w, VAR_W,
  VAR_MAX_GLYPH_A, VAR_ASCENT, VAR_MAX_GLYPH_D, VAR_DESCENT,
  VAR_MAX_GLYPH_H, VAR_MAX_GLYPH_W, VAR_FONT_A, VAR_FONT_D,
  VAR_TOP_A, VAR_BOTTOM_D, VAR_N, VAR_SAR,
  VAR_T, VAR_TEXT_H, VAR_TH, VAR_TEXT_W,
  VAR_TW, VAR_X, VAR_Y, VAR_PICT_TYPE,
  VAR_DURATION, VAR_VARS_NB, VAR_N, VAR_R,
  VAR_T, VAR_NB, VAR_SOURCE_FPS, VAR_FPS_NTSC,
  VAR_FPS_PAL, VAR_FPS_FILM, VAR_FPS_NTSC_FILM, VARS_NB,
  VAR_N, VAR_PTS, VAR_R, VAR_T,
  VAR_TB, VAR_NB, VAR_IN_IDX, VAR_IDX,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_CROP_W, VAR_CW, VAR_CROP_H, VAR_CH,
  VAR_POS_W, VAR_PW, VAR_POS_H, VAR_PH,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VAR_OHSUB, VAR_OVSUB, VAR_IN_T,
  VAR_T, VAR_OUT_T, VAR_OT, VAR_N,
  VAR_VARS_NB, VAR_W, VAR_H, VAR_VAL,
  VAR_MAXVAL, VAR_MINVAL, VAR_NEGVAL, VAR_CLIPVAL,
  VAR_VARS_NB, VAR_W, VAR_H, VAR_X,
  VAR_Y, VAR_BITDEPTHX, VAR_BITDEPTHY, VAR_VARS_NB,
  VAR_MAIN_W, VAR_MW, VAR_MAIN_H, VAR_MH,
  VAR_OVERLAY_W, VAR_OW, VAR_OVERLAY_H, VAR_OH,
  VAR_HSUB, VAR_VSUB, VAR_X, VAR_Y,
  VAR_N, VAR_T, VAR_VARS_NB, VAR_MAIN_W,
  VAR_MW, VAR_MAIN_H, VAR_MH, VAR_OVERLAY_W,
  VAR_OW, VAR_OVERLAY_H, VAR_OH, VAR_X,
  VAR_Y, VAR_N, VAR_T, VAR_VARS_NB,
  VAR_MAIN_iW, VAR_MW, VAR_MAIN_iH, VAR_MH,
  VAR_OVERLAY_iW, VAR_OVERLAY_iH, VAR_OVERLAY_X, VAR_OX,
  VAR_OVERLAY_Y, VAR_OY, VAR_OVERLAY_W, VAR_OW,
  VAR_OVERLAY_H, VAR_OH, VAR_VARS_NB, VAR_MAIN_IW,
  VAR_MW, VAR_MAIN_IH, VAR_MH, VAR_OVERLAY_IW,
  VAR_OVERLAY_IH, VAR_OVERLAY_X, VAR_OX, VAR_OVERLAY_Y,
  VAR_OY, VAR_OVERLAY_W, VAR_OW, VAR_OVERLAY_H,
  VAR_OH, VAR_VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_X, VAR_Y,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_X, VAR_Y,
  VAR_A, VAR_SAR, VAR_DAR, VARS_NB,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_X, VAR_Y, VAR_A, VAR_SAR,
  VAR_DAR, VARS_NB, VAR_W, VAR_H,
  VAR_VAL, VAR_YMIN, VAR_UMIN, VAR_VMIN,
  VAR_AMIN, VAR_YMAX, VAR_UMAX, VAR_VMAX,
  VAR_AMAX, VAR_VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_HSUB, VAR_VSUB,
  VAR_N, VAR_T, VAR_VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_SAR, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VAR_OHSUB, VAR_OVSUB, VAR_N, VAR_T,
  VAR_REF_W, VAR_RW, VAR_REF_H, VAR_RH,
  VAR_REF_A, VAR_REF_SAR, VAR_REF_DAR, VAR_RDAR,
  VAR_REF_HSUB, VAR_REF_VSUB, VAR_REF_N, VAR_REF_T,
  VAR_REF_POS, VAR_S2R_MAIN_W, VAR_S2R_MAIN_H, VAR_S2R_MAIN_A,
  VAR_S2R_MAIN_SAR, VAR_S2R_MAIN_DAR, VAR_S2R_MDAR, VAR_S2R_MAIN_HSUB,
  VAR_S2R_MAIN_VSUB, VAR_S2R_MAIN_N, VAR_S2R_MAIN_T, VAR_S2R_MAIN_POS,
  VARS_NB, VAR_IN_W, VAR_IW, VAR_IN_H,
  VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H,
  VAR_OH, VAR_A, VAR_SAR, VAR_DAR,
  VAR_N, VAR_T, VAR_S2R_MAIN_W, VAR_S2R_MAIN_H,
  VAR_S2R_MAIN_A, VAR_S2R_MAIN_SAR, VAR_S2R_MAIN_DAR, VAR_S2R_MDAR,
  VAR_S2R_MAIN_N, VAR_S2R_MAIN_T, VARS_NB, VAR_W,
  VAR_H, VAR_N, VAR_PTS, VAR_R,
  VAR_T, VAR_TB, VAR_NB, VAR_IW,
  VAR_IN_W, VAR_IH, VAR_IN_H, VAR_OW,
  VAR_OUT_W, VAR_W, VAR_OH, VAR_OUT_H,
  VAR_H, VAR_CW, VAR_CH, VAR_CX,
  VAR_CY, VAR_A, VAR_DAR, VAR_SAR,
  VAR_VARS_NB, VAR_IN_W, VAR_IW, VAR_IN_H,
  VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H,
  VAR_OH, VAR_IN, VAR_ON, VAR_DURATION,
  VAR_PDURATION, VAR_IN_TIME, VAR_IT, VAR_TIME,
  VAR_OUT_TIME, VAR_OT, VAR_FRAME, VAR_ZOOM,
  VAR_PZOOM, VAR_X, VAR_PX, VAR_Y,
  VAR_PY, VAR_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_SAR, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VAR_OHSUB, VAR_OVSUB, VARS_NB, VAR_X,
  VAR_Y, VAR_W, VAR_H, VAR_TIME,
  VAR_SPEED, VAR_TEMPO, VAR_ORDER, VAR_PATTERN,
  VAR_ROW, VAR_VARS_NB
}
 
enum  Curves {
  MAGMA, INFERNO, PLASMA, VIRIDIS,
  TURBO, CIVIDIS, SOLAR, SPECTRAL,
  COOL, HEAT, FIERY, BLUES,
  GREEN, HELIX, NB_CURVES
}
 
enum  Presets {
  PRESET_MAGMA, PRESET_INFERNO, PRESET_PLASMA, PRESET_VIRIDIS,
  PRESET_TURBO, PRESET_CIVIDIS, PRESET_RANGE1, PRESET_RANGE2,
  PRESET_SHADOWS, PRESET_HIGHLIGHTS, PRESET_SOLAR, PRESET_NOMINAL,
  PRESET_PREFERRED, PRESET_TOTAL, PRESET_SPECTRAL, PRESET_COOL,
  PRESET_HEAT, PRESET_FIERY, PRESET_BLUES, PRESET_GREEN,
  PRESET_HELIX, NB_PRESETS
}
 

Functions

static double limit (double x)
 
static double solarfun (double x)
 
static double coolfunu (double x)
 
static double coolfunv (double x)
 
static double heatfunu (double x)
 
static double heatfunv (double x)
 
static double fieryfunu (double x)
 
static double fieryfunv (double x)
 
static double helixfunu (double x)
 
static double helixfunv (double x)
 
static float lerpf (float v0, float v1, float f)
 
static void pseudocolor_filter (int max, int width, int height, const uint8_t *index, const uint8_t *src, uint8_t *dst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_11 (int max, int width, int height, const uint8_t *index, const uint8_t *src, uint8_t *dst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_11d (int max, int width, int height, const uint8_t *index, const uint8_t *src, uint8_t *dst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_10 (int max, int width, int height, const uint8_t *index, const uint8_t *src, uint8_t *dst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_10d (int max, int width, int height, const uint8_t *index, const uint8_t *src, uint8_t *dst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_16 (int max, int width, int height, const uint8_t *iindex, const uint8_t *ssrc, uint8_t *ddst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_16_10 (int max, int width, int height, const uint8_t *iindex, const uint8_t *ssrc, uint8_t *ddst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_16_10d (int max, int width, int height, const uint8_t *iindex, const uint8_t *ssrc, uint8_t *ddst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_16_11 (int max, int width, int height, const uint8_t *iindex, const uint8_t *ssrc, uint8_t *ddst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static void pseudocolor_filter_16_11d (int max, int width, int height, const uint8_t *iindex, const uint8_t *ssrc, uint8_t *ddst, ptrdiff_t ilinesize, ptrdiff_t slinesize, ptrdiff_t dlinesize, float *lut, float opacity)
 
static double poly_eval (const double *const poly, double x, curve_fun fun)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (pseudocolor)
 

Variables

static const char *const var_names []
 
static const Range full_range = {{0, 1}, {1, 1}}
 
static const Range nominal_range [] = {{{0, 1}, {4096, 65536}}, {{4096, 65536}, {60161, 65536}}, {{60161, 65536}, {1, 1}}}
 
static const Range preferred_range [] = {{{0, 1}, {1280, 65536}}, {{1280, 65536}, {62977, 65536}}, {{62977, 65536}, {1, 1}}}
 
static const Range total_range [] = {{{0, 1}, {256, 65536}}, {{256, 65536}, {65280, 65536}}, {{65280, 65536}, {1, 1}}}
 
static const Range spec1_range [] = {{{0, 1}, {16, 256}}, {{16, 256}, {236, 256}}, {{236, 256}, {256, 256}}}
 
static const Range spec2_range [] = {{{0, 1}, {16, 256}}, {{16, 256}, {22, 256}}, {{22, 256}, {226, 256}}, {{226, 256}, {236, 256}}, {{236, 256}, {256, 256}}}
 
static const Range shadows_range [] = {{{0, 1}, {32, 256}}, {{32, 256}, {256, 256}}}
 
static const Range highlights_range [] = {{{0,1}, {214,256}}, {{214, 256}, {224, 256}}, {{224, 256}, {256, 256}}}
 
static const Fill spec1_fills [] = {{{0.5f, 0.f, .5f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 0.f, 0.f, 1.f}}}
 
static const Fill spec2_fills [] = {{{0.5f, 0.f, .5f, 1.f}}, {{0.f, 1.f, 1.f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 1.f, 0.f, 1.f}}, {{1.f, 0.f, 0.f, 1.f}}}
 
static const Fill shadows_fills [] = {{{0.8f, 0.4f, .8f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}}
 
static const Fill highlights_fills [] = {{{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 0.3f, 0.6f, 1.f}}, {{1.f, 0.2f, .5f, 1.f}}}
 
static const Curve curves []
 
static const Preset presets []
 
static const AVOption pseudocolor_options []
 
static enum AVPixelFormat pix_fmts []
 
static const AVFilterPad inputs []
 
const AVFilter ff_vf_pseudocolor
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 336 of file vf_pseudocolor.c.

◆ FLAGS

Definition at line 337 of file vf_pseudocolor.c.

◆ PCLIP

#define PCLIP (   v,
  max,
  dst,
  src,
 
)
Value:
if (v >= 0 && v <= max) { \
dst[x] = lerpf(src[x], v, opacity);\
} else { \
dst[x] = src[x]; \
}

Definition at line 408 of file vf_pseudocolor.c.

◆ RGB_TO_Y_BT709

#define RGB_TO_Y_BT709 (   r,
  g,
  b 
)
Value:
((0.21260*219.0/255.0) * (r) + (0.71520*219.0/255.0) * (g) + \
(0.07220*219.0/255.0) * (b))

Definition at line 674 of file vf_pseudocolor.c.

◆ RGB_TO_U_BT709

#define RGB_TO_U_BT709 (   r1,
  g1,
  b1,
  max 
)
Value:
(-(0.11457*224.0/255.0) * r1 - (0.38543*224.0/255.0) * g1 + \
(0.50000*224.0/255.0) * b1 + max * 0.5)

Definition at line 678 of file vf_pseudocolor.c.

◆ RGB_TO_V_BT709

#define RGB_TO_V_BT709 (   r1,
  g1,
  b1,
  max 
)
Value:
((0.50000*224.0/255.0) * r1 - (0.45415*224.0/255.0) * g1 - \
(0.04585*224.0/255.0) * b1 + max * 0.5)

Definition at line 682 of file vf_pseudocolor.c.

◆ Wr

#define Wr   0.2126

Definition at line 686 of file vf_pseudocolor.c.

◆ Wb

#define Wb   0.0722

Definition at line 687 of file vf_pseudocolor.c.

◆ Wg

#define Wg   (1 - Wr - Wb)

Definition at line 688 of file vf_pseudocolor.c.

◆ Umax

#define Umax   0.436

Definition at line 689 of file vf_pseudocolor.c.

◆ Vmax

#define Vmax   0.615

Definition at line 690 of file vf_pseudocolor.c.

◆ YUV_BT709_TO_R

#define YUV_BT709_TO_R (   y,
  u,
  v,
  max 
)    ((y + v * (1 - Wr) / Vmax) * max)

Definition at line 692 of file vf_pseudocolor.c.

◆ YUV_BT709_TO_G

#define YUV_BT709_TO_G (   y,
  u,
  v,
  max 
)    ((y - (u * Wb * (1 - Wb) / (Umax * Wg)) - (v * Wr * (1 - Wr) / (Vmax * Wg))) * max)

Definition at line 694 of file vf_pseudocolor.c.

◆ YUV_BT709_TO_B

#define YUV_BT709_TO_B (   y,
  u,
  v,
  max 
)    ((y + u * (1 - Wb) / Umax) * max)

Definition at line 696 of file vf_pseudocolor.c.

Typedef Documentation

◆ curve_fun

typedef double(* curve_fun) (double x)

Definition at line 104 of file vf_pseudocolor.c.

Enumeration Type Documentation

◆ var_name

enum var_name
Enumerator
VAR_N 
VAR_TB 
VAR_PTS 
VAR_DTS 
VAR_NOPTS 
VAR_STARTPTS 
VAR_STARTDTS 
VAR_DURATION 
VAR_D 
VAR_POS 
VAR_SIZE 
VAR_KEY 
VAR_STATE 
VAR_VARS_NB 
VAR_N 
VAR_TS 
VAR_POS 
VAR_PREV_INPTS 
VAR_PREV_INDTS 
VAR_PREV_INDUR 
VAR_PREV_OUTPTS 
VAR_PREV_OUTDTS 
VAR_PREV_OUTDUR 
VAR_NEXT_PTS 
VAR_NEXT_DTS 
VAR_NEXT_DUR 
VAR_PTS 
VAR_DTS 
VAR_DURATION 
VAR_STARTPTS 
VAR_STARTDTS 
VAR_TB 
VAR_TB_OUT 
VAR_SR 
VAR_NOPTS 
VAR_VARS_NB 
VAR_CH 
VAR_N 
VAR_NB_IN_CHANNELS 
VAR_NB_OUT_CHANNELS 
VAR_T 
VAR_S 
VAR_VARS_NB 
VAR_CH 
VAR_SN 
VAR_NB_CHANNELS 
VAR_T 
VAR_SR 
VAR_P 
VAR_F 
VAR_VARS_NB 
VAR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AR_ON 
VAR_DURATION 
VAR_PDURATION 
VAR_IN_TIME 
VAR_IT 
VAR_TIME 
VAR_OUT_TIME 
VAR_OT 
VAR_FRAME 
VAR_ZOOM 
VAR_PZOOM 
VAR_X 
VAR_PX 
VAR_Y 
VAR_PY 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VAR_OHSUB 
VAR_OVSUB 
VARS_NB 
VAR_X 
VAR_Y 
VAR_W 
VAR_H 
VAR_TIME 
VAR_SPEED 
VAR_TEMPO 
VAR_ORDER 
VAR_PATTERN 
VAR_ROW 
VAR_VARS_NB 

Definition at line 46 of file vf_pseudocolor.c.

◆ Curves

enum Curves
Enumerator
MAGMA 
INFERNO 
PLASMA 
VIRIDIS 
TURBO 
CIVIDIS 
SOLAR 
SPECTRAL 
COOL 
HEAT 
FIERY 
BLUES 
GREEN 
HELIX 
NB_CURVES 

Definition at line 61 of file vf_pseudocolor.c.

◆ Presets

enum Presets
Enumerator
PRESET_MAGMA 
PRESET_INFERNO 
PRESET_PLASMA 
PRESET_VIRIDIS 
PRESET_TURBO 
PRESET_CIVIDIS 
PRESET_RANGE1 
PRESET_RANGE2 
PRESET_SHADOWS 
PRESET_HIGHLIGHTS 
PRESET_SOLAR 
PRESET_NOMINAL 
PRESET_PREFERRED 
PRESET_TOTAL 
PRESET_SPECTRAL 
PRESET_COOL 
PRESET_HEAT 
PRESET_FIERY 
PRESET_BLUES 
PRESET_GREEN 
PRESET_HELIX 
NB_PRESETS 

Definition at line 79 of file vf_pseudocolor.c.

Function Documentation

◆ limit()

static double limit ( double  x)
static

Definition at line 142 of file vf_pseudocolor.c.

Referenced by acolor16(), add_sorted(), apply_prof(), apply_prof_uni(), apply_prof_uni_w(), autocorr_max(), avformat_find_stream_info(), bidir_refine(), bit_allocation(), check_pixel_ptr(), chroma16(), clip_to_window(), color16(), decode_frame_header(), deflate(), deflate16(), dilation(), dilation16(), distance_limited(), do_adaptive_prediction(), encode_low(), envelope_instant16(), envelope_peak16(), erosion(), erosion16(), ff_find_last_ts(), ff_loop_filter_h_48_16_lsx(), ff_loop_filter_h_48_16_msa(), ff_loop_filter_h_4_8_lsx(), ff_loop_filter_h_4_8_msa(), ff_loop_filter_h_84_16_lsx(), ff_loop_filter_h_84_16_msa(), ff_loop_filter_h_88_16_lsx(), ff_loop_filter_h_88_16_msa(), ff_loop_filter_h_8_8_lsx(), ff_loop_filter_h_8_8_msa(), ff_loop_filter_v_16_8_lsx(), ff_loop_filter_v_16_8_msa(), ff_loop_filter_v_48_16_lsx(), ff_loop_filter_v_48_16_msa(), ff_loop_filter_v_4_8_lsx(), ff_loop_filter_v_4_8_msa(), ff_loop_filter_v_84_16_lsx(), ff_loop_filter_v_84_16_msa(), ff_loop_filter_v_88_16_lsx(), ff_loop_filter_v_88_16_msa(), ff_loop_filter_v_8_8_lsx(), ff_loop_filter_v_8_8_msa(), ff_vp8_h_loop_filter16_inner_lsx(), ff_vp8_h_loop_filter16_inner_msa(), ff_vp8_h_loop_filter16_lsx(), ff_vp8_h_loop_filter16_msa(), ff_vp8_h_loop_filter8uv_inner_msa(), ff_vp8_h_loop_filter8uv_lsx(), ff_vp8_h_loop_filter8uv_msa(), ff_vp8_v_loop_filter16_inner_lsx(), ff_vp8_v_loop_filter16_inner_msa(), ff_vp8_v_loop_filter16_lsx(), ff_vp8_v_loop_filter16_msa(), ff_vp8_v_loop_filter8uv_inner_msa(), ff_vp8_v_loop_filter8uv_lsx(), ff_vp8_v_loop_filter8uv_msa(), filter_block2d(), filter_block3d1(), filter_block3d2(), filter_frame(), flat16(), generate_joint_tables(), get_rdelta(), get_sr_golomb(), get_sr_golomb_flac(), get_ur_golomb(), get_ur_golomb_jpegls(), inflate(), inflate16(), log2mono(), log2sample(), log2stereo(), lowpass16(), process_frame(), set_sr_golomb(), set_ur_golomb(), set_ur_golomb_jpegls(), svq3_decode_block(), update16(), update_gain_history(), vp9_hz_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_16w(), and vp9_vt_lpf_t4_and_t8_8w().

◆ solarfun()

static double solarfun ( double  x)
static

Definition at line 147 of file vf_pseudocolor.c.

◆ coolfunu()

static double coolfunu ( double  x)
static

Definition at line 152 of file vf_pseudocolor.c.

◆ coolfunv()

static double coolfunv ( double  x)
static

Definition at line 157 of file vf_pseudocolor.c.

◆ heatfunu()

static double heatfunu ( double  x)
static

Definition at line 162 of file vf_pseudocolor.c.

◆ heatfunv()

static double heatfunv ( double  x)
static

Definition at line 167 of file vf_pseudocolor.c.

◆ fieryfunu()

static double fieryfunu ( double  x)
static

Definition at line 172 of file vf_pseudocolor.c.

◆ fieryfunv()

static double fieryfunv ( double  x)
static

Definition at line 177 of file vf_pseudocolor.c.

◆ helixfunu()

static double helixfunu ( double  x)
static

Definition at line 182 of file vf_pseudocolor.c.

◆ helixfunv()

static double helixfunv ( double  x)
static

Definition at line 187 of file vf_pseudocolor.c.

◆ lerpf()

static float lerpf ( float  v0,
float  v1,
float  f 
)
inlinestatic

Definition at line 403 of file vf_pseudocolor.c.

◆ pseudocolor_filter()

static void pseudocolor_filter ( int  max,
int  width,
int  height,
const uint8_t *  index,
const uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 415 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_11()

static void pseudocolor_filter_11 ( int  max,
int  width,
int  height,
const uint8_t *  index,
const uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 439 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_11d()

static void pseudocolor_filter_11d ( int  max,
int  width,
int  height,
const uint8_t *  index,
const uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 462 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_10()

static void pseudocolor_filter_10 ( int  max,
int  width,
int  height,
const uint8_t *  index,
const uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 485 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_10d()

static void pseudocolor_filter_10d ( int  max,
int  width,
int  height,
const uint8_t *  index,
const uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 509 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_16()

static void pseudocolor_filter_16 ( int  max,
int  width,
int  height,
const uint8_t *  iindex,
const uint8_t *  ssrc,
uint8_t *  ddst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 533 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_16_10()

static void pseudocolor_filter_16_10 ( int  max,
int  width,
int  height,
const uint8_t *  iindex,
const uint8_t *  ssrc,
uint8_t *  ddst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 560 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_16_10d()

static void pseudocolor_filter_16_10d ( int  max,
int  width,
int  height,
const uint8_t *  iindex,
const uint8_t *  ssrc,
uint8_t *  ddst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 587 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_16_11()

static void pseudocolor_filter_16_11 ( int  max,
int  width,
int  height,
const uint8_t *  iindex,
const uint8_t *  ssrc,
uint8_t *  ddst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 614 of file vf_pseudocolor.c.

Referenced by config_input().

◆ pseudocolor_filter_16_11d()

static void pseudocolor_filter_16_11d ( int  max,
int  width,
int  height,
const uint8_t *  iindex,
const uint8_t *  ssrc,
uint8_t *  ddst,
ptrdiff_t  ilinesize,
ptrdiff_t  slinesize,
ptrdiff_t  dlinesize,
float lut,
float  opacity 
)
static

Definition at line 644 of file vf_pseudocolor.c.

Referenced by config_input().

◆ poly_eval()

static double poly_eval ( const double *const  poly,
double  x,
curve_fun  fun 
)
static

Definition at line 699 of file vf_pseudocolor.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 710 of file vf_pseudocolor.c.

Referenced by process_command().

◆ filter_slice()

static int filter_slice ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 976 of file vf_pseudocolor.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 1002 of file vf_pseudocolor.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 1025 of file vf_pseudocolor.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 1045 of file vf_pseudocolor.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( pseudocolor  )

Variable Documentation

◆ var_names

const char* const var_names[]
static
Initial value:
= {
"w",
"h",
"val",
"ymin",
"umin",
"vmin",
"amin",
"ymax",
"umax",
"vmax",
"amax",
}

Definition at line 31 of file vf_pseudocolor.c.

Referenced by config_input().

◆ full_range

const Range full_range = {{0, 1}, {1, 1}}
static

Definition at line 128 of file vf_pseudocolor.c.

◆ nominal_range

const Range nominal_range[] = {{{0, 1}, {4096, 65536}}, {{4096, 65536}, {60161, 65536}}, {{60161, 65536}, {1, 1}}}
static

Definition at line 129 of file vf_pseudocolor.c.

◆ preferred_range

const Range preferred_range[] = {{{0, 1}, {1280, 65536}}, {{1280, 65536}, {62977, 65536}}, {{62977, 65536}, {1, 1}}}
static

Definition at line 130 of file vf_pseudocolor.c.

◆ total_range

const Range total_range[] = {{{0, 1}, {256, 65536}}, {{256, 65536}, {65280, 65536}}, {{65280, 65536}, {1, 1}}}
static

Definition at line 131 of file vf_pseudocolor.c.

◆ spec1_range

const Range spec1_range[] = {{{0, 1}, {16, 256}}, {{16, 256}, {236, 256}}, {{236, 256}, {256, 256}}}
static

Definition at line 132 of file vf_pseudocolor.c.

◆ spec2_range

const Range spec2_range[] = {{{0, 1}, {16, 256}}, {{16, 256}, {22, 256}}, {{22, 256}, {226, 256}}, {{226, 256}, {236, 256}}, {{236, 256}, {256, 256}}}
static

Definition at line 133 of file vf_pseudocolor.c.

◆ shadows_range

const Range shadows_range[] = {{{0, 1}, {32, 256}}, {{32, 256}, {256, 256}}}
static

Definition at line 134 of file vf_pseudocolor.c.

◆ highlights_range

const Range highlights_range[] = {{{0,1}, {214,256}}, {{214, 256}, {224, 256}}, {{224, 256}, {256, 256}}}
static

Definition at line 135 of file vf_pseudocolor.c.

◆ spec1_fills

const Fill spec1_fills[] = {{{0.5f, 0.f, .5f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 0.f, 0.f, 1.f}}}
static

Definition at line 137 of file vf_pseudocolor.c.

◆ spec2_fills

const Fill spec2_fills[] = {{{0.5f, 0.f, .5f, 1.f}}, {{0.f, 1.f, 1.f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 1.f, 0.f, 1.f}}, {{1.f, 0.f, 0.f, 1.f}}}
static

Definition at line 138 of file vf_pseudocolor.c.

◆ shadows_fills

const Fill shadows_fills[] = {{{0.8f, 0.4f, .8f, 1.f}}, {{-1.f, -1.f, -1.f, 1.f}}}
static

Definition at line 139 of file vf_pseudocolor.c.

◆ highlights_fills

const Fill highlights_fills[] = {{{-1.f, -1.f, -1.f, 1.f}}, {{1.f, 0.3f, 0.6f, 1.f}}, {{1.f, 0.2f, .5f, 1.f}}}
static

Definition at line 140 of file vf_pseudocolor.c.

◆ curves

const Curve curves[]
static

◆ presets

const Preset presets[]
static

◆ pseudocolor_options

const AVOption pseudocolor_options[]
static

Definition at line 339 of file vf_pseudocolor.c.

◆ pix_fmts

enum AVPixelFormat pix_fmts[]
static

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}

Definition at line 1036 of file vf_pseudocolor.c.

◆ ff_vf_pseudocolor

const AVFilter ff_vf_pseudocolor
Initial value:
= {
.name = "pseudocolor",
.description = NULL_IF_CONFIG_SMALL("Make pseudocolored video frames."),
.priv_size = sizeof(PseudoColorContext),
.priv_class = &pseudocolor_class,
.process_command = process_command,
}

Definition at line 1058 of file vf_pseudocolor.c.

process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: vf_pseudocolor.c:1025
PRESET_VIRIDIS
@ PRESET_VIRIDIS
Definition: vf_pseudocolor.c:83
AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P16
Definition: pixfmt.h:522
AV_PIX_FMT_GBRAP16
#define AV_PIX_FMT_GBRAP16
Definition: pixfmt.h:501
r
const char * r
Definition: vf_curves.c:127
curves
static const Curve curves[]
Definition: vf_pseudocolor.c:192
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: internal.h:162
spec2_fills
static const Fill spec2_fills[]
Definition: vf_pseudocolor.c:138
AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUVA422P9
Definition: pixfmt.h:514
AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P16
Definition: pixfmt.h:521
spec1_range
static const Range spec1_range[]
Definition: vf_pseudocolor.c:132
AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUVA420P10
Definition: pixfmt.h:516
PRESET_NOMINAL
@ PRESET_NOMINAL
Definition: vf_pseudocolor.c:91
b
#define b
Definition: input.c:41
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:478
TURBO
@ TURBO
Definition: vf_pseudocolor.c:66
PRESET_GREEN
@ PRESET_GREEN
Definition: vf_pseudocolor.c:99
lerpf
static float lerpf(float v0, float v1, float f)
Definition: vf_pseudocolor.c:403
max
#define max(a, b)
Definition: cuda_runtime.h:33
PRESET_RANGE1
@ PRESET_RANGE1
Definition: vf_pseudocolor.c:86
HELIX
@ HELIX
Definition: vf_pseudocolor.c:75
AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA422P10
Definition: pixfmt.h:517
SPECTRAL
@ SPECTRAL
Definition: vf_pseudocolor.c:69
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:458
PRESET_RANGE2
@ PRESET_RANGE2
Definition: vf_pseudocolor.c:87
AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_YUVA420P9
Definition: pixfmt.h:513
FIERY
@ FIERY
Definition: vf_pseudocolor.c:72
AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_GBRP14
Definition: pixfmt.h:496
COOL
@ COOL
Definition: vf_pseudocolor.c:70
GREEN
@ GREEN
Definition: vf_pseudocolor.c:74
b1
static double b1(void *priv, double x, double y)
Definition: vf_xfade.c:2035
VIRIDIS
@ VIRIDIS
Definition: vf_pseudocolor.c:65
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:212
highlights_fills
static const Fill highlights_fills[]
Definition: vf_pseudocolor.c:140
AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_GBRP10
Definition: pixfmt.h:494
PRESET_TOTAL
@ PRESET_TOTAL
Definition: vf_pseudocolor.c:93
AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUVA444P16
Definition: pixfmt.h:523
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:476
PRESET_SHADOWS
@ PRESET_SHADOWS
Definition: vf_pseudocolor.c:88
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:462
PRESET_BLUES
@ PRESET_BLUES
Definition: vf_pseudocolor.c:98
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:481
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:490
PRESET_HIGHLIGHTS
@ PRESET_HIGHLIGHTS
Definition: vf_pseudocolor.c:89
ff_video_default_filterpad
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition: video.c:37
AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP10
Definition: pixfmt.h:498
PLASMA
@ PLASMA
Definition: vf_pseudocolor.c:64
AV_PIX_FMT_GBRAP14
#define AV_PIX_FMT_GBRAP14
Definition: pixfmt.h:500
AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_GBRAP12
Definition: pixfmt.h:499
AV_PIX_FMT_YUVA420P
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
Definition: pixfmt.h:108
AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:491
PRESET_COOL
@ PRESET_COOL
Definition: vf_pseudocolor.c:95
g
const char * g
Definition: vf_curves.c:128
PRESET_FIERY
@ PRESET_FIERY
Definition: vf_pseudocolor.c:97
SOLAR
@ SOLAR
Definition: vf_pseudocolor.c:68
nominal_range
static const Range nominal_range[]
Definition: vf_pseudocolor.c:129
shadows_fills
static const Fill shadows_fills[]
Definition: vf_pseudocolor.c:139
AV_PIX_FMT_YUVA444P12
#define AV_PIX_FMT_YUVA444P12
Definition: pixfmt.h:520
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:475
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:489
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:461
AV_PIX_FMT_YUV420P
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:73
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:459
AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GBRP16
Definition: pixfmt.h:497
shadows_range
static const Range shadows_range[]
Definition: vf_pseudocolor.c:134
CIVIDIS
@ CIVIDIS
Definition: vf_pseudocolor.c:67
NULL
#define NULL
Definition: coverity.c:32
PRESET_SPECTRAL
@ PRESET_SPECTRAL
Definition: vf_pseudocolor.c:94
MAGMA
@ MAGMA
Definition: vf_pseudocolor.c:62
spec2_range
static const Range spec2_range[]
Definition: vf_pseudocolor.c:133
HEAT
@ HEAT
Definition: vf_pseudocolor.c:71
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:479
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:81
AV_PIX_FMT_GBRP9
#define AV_PIX_FMT_GBRP9
Definition: pixfmt.h:493
total_range
static const Range total_range[]
Definition: vf_pseudocolor.c:131
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:483
PRESET_HEAT
@ PRESET_HEAT
Definition: vf_pseudocolor.c:96
PRESET_MAGMA
@ PRESET_MAGMA
Definition: vf_pseudocolor.c:80
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:485
AV_PIX_FMT_YUVA444P
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
Definition: pixfmt.h:174
AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUVA444P10
Definition: pixfmt.h:518
PRESET_HELIX
@ PRESET_HELIX
Definition: vf_pseudocolor.c:100
PseudoColorContext
Definition: vf_pseudocolor.c:311
full_range
static const Range full_range
Definition: vf_pseudocolor.c:128
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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:147
PRESET_PLASMA
@ PRESET_PLASMA
Definition: vf_pseudocolor.c:82
PRESET_CIVIDIS
@ PRESET_CIVIDIS
Definition: vf_pseudocolor.c:85
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_pseudocolor.c:1045
AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_GBRP12
Definition: pixfmt.h:495
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_pseudocolor.c:374
inputs
static const AVFilterPad inputs[]
Definition: vf_pseudocolor.c:1036
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:477
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_pseudocolor.c:710
PRESET_TURBO
@ PRESET_TURBO
Definition: vf_pseudocolor.c:84
AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUVA444P9
Definition: pixfmt.h:515
PRESET_SOLAR
@ PRESET_SOLAR
Definition: vf_pseudocolor.c:90
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:482
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:487
spec1_fills
static const Fill spec1_fills[]
Definition: vf_pseudocolor.c:137
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
AV_PIX_FMT_YUVA422P12
#define AV_PIX_FMT_YUVA422P12
Definition: pixfmt.h:519
BLUES
@ BLUES
Definition: vf_pseudocolor.c:73
AV_PIX_FMT_YUV444P
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Definition: pixfmt.h:78
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:165
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_YUV422P
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
Definition: pixfmt.h:77
INFERNO
@ INFERNO
Definition: vf_pseudocolor.c:63
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
PRESET_INFERNO
@ PRESET_INFERNO
Definition: vf_pseudocolor.c:81
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_pseudocolor.c:1002
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:488
preferred_range
static const Range preferred_range[]
Definition: vf_pseudocolor.c:130
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:460
highlights_range
static const Range highlights_range[]
Definition: vf_pseudocolor.c:135
AV_PIX_FMT_YUVA422P
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
Definition: pixfmt.h:173
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:486
PRESET_PREFERRED
@ PRESET_PREFERRED
Definition: vf_pseudocolor.c:92