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 "formats.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)
 

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_POS, VAR_SCENE, VAR_CONCATDEC_SELECT,
  VAR_VARS_NB, VAR_N, VAR_T, VAR_POS,
  VAR_PTS, VAR_TS, VAR_TE, VAR_TI,
  VAR_W, VAR_H, 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_POS, 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_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_POS, 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_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_N,
  VAR_SAR, VAR_T, VAR_TEXT_H, VAR_TH,
  VAR_TEXT_W, VAR_TW, VAR_X, VAR_Y,
  VAR_PICT_TYPE, VAR_PKT_POS, VAR_PKT_SIZE, VAR_DURATION,
  VAR_VARS_NB, VAR_N, VAR_POS, 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_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_POS, 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_POS, 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_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_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_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_N, VAR_S2R_MAIN_T,
  VAR_S2R_MAIN_POS, 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,
  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, NB_PRESETS
}
 

Functions

static double limit (double x)
 
static double solarfun (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 []
 
static const AVFilterPad outputs []
 
const AVFilter ff_vf_pseudocolor
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 230 of file vf_pseudocolor.c.

◆ FLAGS

Definition at line 231 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 296 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 562 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 566 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 570 of file vf_pseudocolor.c.

Typedef Documentation

◆ curve_fun

typedef double(* curve_fun) (double x)

Definition at line 93 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_PRE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.c.

◆ Curves

enum Curves
Enumerator
MAGMA 
INFERNO 
PLASMA 
VIRIDIS 
TURBO 
CIVIDIS 
SOLAR 
SPECTRAL 
NB_CURVES 

Definition at line 62 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 
NB_PRESETS 

Definition at line 74 of file vf_pseudocolor.c.

Function Documentation

◆ limit()

static double limit ( double  x)
static

Definition at line 130 of file vf_pseudocolor.c.

Referenced by acolor16(), add_sorted(), autocorr_max(), avformat_find_stream_info(), bidir_refine(), bit_allocation(), 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(), queue_packet(), 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 135 of file vf_pseudocolor.c.

◆ lerpf()

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

Definition at line 291 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 303 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 327 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 350 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 373 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 397 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 421 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 448 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 475 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 502 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 532 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 574 of file vf_pseudocolor.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 585 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 834 of file vf_pseudocolor.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 860 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 883 of file vf_pseudocolor.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 910 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 32 of file vf_pseudocolor.c.

Referenced by config_input().

◆ full_range

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

Definition at line 116 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 117 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 118 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 119 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 120 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 121 of file vf_pseudocolor.c.

◆ shadows_range

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

Definition at line 122 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 123 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 125 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 126 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 127 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 128 of file vf_pseudocolor.c.

◆ curves

const Curve curves[]
static

◆ presets

const Preset presets[]
static

◆ pseudocolor_options

const AVOption pseudocolor_options[]
static
Initial value:
= {
{ "c0", "set component #0 expression", OFFSET(comp_expr_str[0]), AV_OPT_TYPE_STRING, {.str="val"}, .flags = FLAGS },
{ "c1", "set component #1 expression", OFFSET(comp_expr_str[1]), AV_OPT_TYPE_STRING, {.str="val"}, .flags = FLAGS },
{ "c2", "set component #2 expression", OFFSET(comp_expr_str[2]), AV_OPT_TYPE_STRING, {.str="val"}, .flags = FLAGS },
{ "c3", "set component #3 expression", OFFSET(comp_expr_str[3]), AV_OPT_TYPE_STRING, {.str="val"}, .flags = FLAGS },
{ "index", "set component as base", OFFSET(index), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, .flags = FLAGS },
{ "i", "set component as base", OFFSET(index), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, .flags = FLAGS },
{ "preset", "set preset", OFFSET(preset), AV_OPT_TYPE_INT, {.i64=-1},-1, NB_PRESETS-1, .flags = FLAGS, "preset" },
{ "p", "set preset", OFFSET(preset), AV_OPT_TYPE_INT, {.i64=-1},-1, NB_PRESETS-1, .flags = FLAGS, "preset" },
{ "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64=-1}, .flags = FLAGS, "preset" },
{ "magma", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_MAGMA}, .flags = FLAGS, "preset" },
{ "inferno", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_INFERNO}, .flags = FLAGS, "preset" },
{ "plasma", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_PLASMA}, .flags = FLAGS, "preset" },
{ "viridis", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_VIRIDIS}, .flags = FLAGS, "preset" },
{ "turbo", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_TURBO}, .flags = FLAGS, "preset" },
{ "cividis", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_CIVIDIS}, .flags = FLAGS, "preset" },
{ "range1", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_RANGE1}, .flags = FLAGS, "preset" },
{ "range2", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_RANGE2}, .flags = FLAGS, "preset" },
{ "shadows", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_SHADOWS}, .flags = FLAGS, "preset" },
{ "highlights", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_HIGHLIGHTS},.flags=FLAGS, "preset" },
{ "solar", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_SOLAR}, .flags=FLAGS, "preset" },
{ "nominal", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_NOMINAL}, .flags=FLAGS, "preset" },
{ "preferred", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_PREFERRED},.flags=FLAGS,"preset" },
{ "total", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_TOTAL}, .flags=FLAGS, "preset" },
{ "spectral", NULL, 0, AV_OPT_TYPE_CONST, {.i64=PRESET_SPECTRAL},.flags = FLAGS, "preset" },
{ "opacity", "set pseudocolor opacity",OFFSET(opacity), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 1, .flags = FLAGS },
{ NULL }
}

Definition at line 233 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 894 of file vf_pseudocolor.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
},
}

Definition at line 903 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 923 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:883
PRESET_VIRIDIS
@ PRESET_VIRIDIS
Definition: vf_pseudocolor.c:78
AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_YUVA422P16
Definition: pixfmt.h:502
AV_PIX_FMT_GBRAP16
#define AV_PIX_FMT_GBRAP16
Definition: pixfmt.h:481
r
const char * r
Definition: vf_curves.c:126
curves
static const Curve curves[]
Definition: vf_pseudocolor.c:140
FILTER_PIXFMTS_ARRAY
#define FILTER_PIXFMTS_ARRAY(array)
Definition: internal.h:174
spec2_fills
static const Fill spec2_fills[]
Definition: vf_pseudocolor.c:126
AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUVA422P9
Definition: pixfmt.h:494
AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUVA420P16
Definition: pixfmt.h:501
spec1_range
static const Range spec1_range[]
Definition: vf_pseudocolor.c:120
AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUVA420P10
Definition: pixfmt.h:496
PRESET_NOMINAL
@ PRESET_NOMINAL
Definition: vf_pseudocolor.c:86
b
#define b
Definition: input.c:41
AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_YUV420P10
Definition: pixfmt.h:459
TURBO
@ TURBO
Definition: vf_pseudocolor.c:67
lerpf
static float lerpf(float v0, float v1, float f)
Definition: vf_pseudocolor.c:291
max
#define max(a, b)
Definition: cuda_runtime.h:33
PRESET_RANGE1
@ PRESET_RANGE1
Definition: vf_pseudocolor.c:81
AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUVA422P10
Definition: pixfmt.h:497
SPECTRAL
@ SPECTRAL
Definition: vf_pseudocolor.c:70
AV_PIX_FMT_GRAY9
#define AV_PIX_FMT_GRAY9
Definition: pixfmt.h:439
PRESET_RANGE2
@ PRESET_RANGE2
Definition: vf_pseudocolor.c:82
AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_YUVA420P9
Definition: pixfmt.h:493
AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_GBRP14
Definition: pixfmt.h:477
b1
static double b1(void *priv, double x, double y)
Definition: vf_xfade.c:1771
VIRIDIS
@ VIRIDIS
Definition: vf_pseudocolor.c:66
AV_PIX_FMT_GBRAP
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
Definition: pixfmt.h:205
highlights_fills
static const Fill highlights_fills[]
Definition: vf_pseudocolor.c:128
AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_GBRP10
Definition: pixfmt.h:475
PRESET_TOTAL
@ PRESET_TOTAL
Definition: vf_pseudocolor.c:88
AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUVA444P16
Definition: pixfmt.h:503
AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUV422P9
Definition: pixfmt.h:457
PRESET_SHADOWS
@ PRESET_SHADOWS
Definition: vf_pseudocolor.c:83
AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GRAY16
Definition: pixfmt.h:443
AV_PIX_FMT_YUV444P10
#define AV_PIX_FMT_YUV444P10
Definition: pixfmt.h:462
preset
preset
Definition: vf_curves.c:46
AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_YUV422P16
Definition: pixfmt.h:471
PRESET_HIGHLIGHTS
@ PRESET_HIGHLIGHTS
Definition: vf_pseudocolor.c:84
AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP10
Definition: pixfmt.h:479
PLASMA
@ PLASMA
Definition: vf_pseudocolor.c:65
AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_GBRAP12
Definition: pixfmt.h:480
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:101
AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P16
Definition: pixfmt.h:472
g
const char * g
Definition: vf_curves.c:127
SOLAR
@ SOLAR
Definition: vf_pseudocolor.c:69
nominal_range
static const Range nominal_range[]
Definition: vf_pseudocolor.c:117
shadows_fills
static const Fill shadows_fills[]
Definition: vf_pseudocolor.c:127
AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUV420P9
Definition: pixfmt.h:456
AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV420P16
Definition: pixfmt.h:470
AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_GRAY14
Definition: pixfmt.h:442
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:66
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:194
AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY10
Definition: pixfmt.h:440
AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_GBRP16
Definition: pixfmt.h:478
shadows_range
static const Range shadows_range[]
Definition: vf_pseudocolor.c:122
CIVIDIS
@ CIVIDIS
Definition: vf_pseudocolor.c:68
NULL
#define NULL
Definition: coverity.c:32
PRESET_SPECTRAL
@ PRESET_SPECTRAL
Definition: vf_pseudocolor.c:89
outputs
static const AVFilterPad outputs[]
Definition: vf_pseudocolor.c:903
MAGMA
@ MAGMA
Definition: vf_pseudocolor.c:63
spec2_range
static const Range spec2_range[]
Definition: vf_pseudocolor.c:121
NB_PRESETS
@ NB_PRESETS
Definition: vf_pseudocolor.c:90
OFFSET
#define OFFSET(x)
Definition: vf_pseudocolor.c:230
AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_YUV422P10
Definition: pixfmt.h:460
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
AV_PIX_FMT_GBRP9
#define AV_PIX_FMT_GBRP9
Definition: pixfmt.h:474
FLAGS
#define FLAGS
Definition: vf_pseudocolor.c:231
index
int index
Definition: gxfenc.c:89
total_range
static const Range total_range[]
Definition: vf_pseudocolor.c:119
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:115
AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_YUV422P12
Definition: pixfmt.h:464
PRESET_MAGMA
@ PRESET_MAGMA
Definition: vf_pseudocolor.c:75
AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P12
Definition: pixfmt.h:466
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:167
AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUVA444P10
Definition: pixfmt.h:498
PseudoColorContext
Definition: vf_pseudocolor.c:205
full_range
static const Range full_range
Definition: vf_pseudocolor.c:116
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:142
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
PRESET_PLASMA
@ PRESET_PLASMA
Definition: vf_pseudocolor.c:77
PRESET_CIVIDIS
@ PRESET_CIVIDIS
Definition: vf_pseudocolor.c:80
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_pseudocolor.c:910
AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_GBRP12
Definition: pixfmt.h:476
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: vf_pseudocolor.c:262
inputs
static const AVFilterPad inputs[]
Definition: vf_pseudocolor.c:894
AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV444P9
Definition: pixfmt.h:458
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_pseudocolor.c:585
PRESET_TURBO
@ PRESET_TURBO
Definition: vf_pseudocolor.c:79
AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_YUVA444P9
Definition: pixfmt.h:495
PRESET_SOLAR
@ PRESET_SOLAR
Definition: vf_pseudocolor.c:85
AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUV420P12
Definition: pixfmt.h:463
AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_YUV422P14
Definition: pixfmt.h:468
spec1_fills
static const Fill spec1_fills[]
Definition: vf_pseudocolor.c:125
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
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:71
AV_PIX_FMT_GBRP
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
Definition: pixfmt.h:158
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:70
INFERNO
@ INFERNO
Definition: vf_pseudocolor.c:64
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:195
PRESET_INFERNO
@ PRESET_INFERNO
Definition: vf_pseudocolor.c:76
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_pseudocolor.c:860
AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUV444P14
Definition: pixfmt.h:469
preferred_range
static const Range preferred_range[]
Definition: vf_pseudocolor.c:118
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GRAY12
Definition: pixfmt.h:441
highlights_range
static const Range highlights_range[]
Definition: vf_pseudocolor.c:123
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234
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:166
AV_PIX_FMT_YUV420P14
#define AV_PIX_FMT_YUV420P14
Definition: pixfmt.h:467
PRESET_PREFERRED
@ PRESET_PREFERRED
Definition: vf_pseudocolor.c:87