94 typedef struct Range {
111 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}}};
112 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}}};
114 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}}};
119 {-7.5631093e-16, 7.4289183e-13, -2.8525484e-10, 5.4446085e-08, -5.5596238e-06, 3.0569325e-04, -2.3137421e-03, 1.2152095e-02 },
120 { 1.3217636e-15, -1.2214648e-12, 4.4319712e-10, -8.0197993e-08, 7.6598370e-06, -3.6523704e-04, 8.4836670e-03, -2.5536888e-02 },
121 {-1.1446568e-15, 1.0013446e-12, -3.5651575e-10, 6.6775016e-08, -6.7120346e-06, 2.7346619e-04, 4.7969657e-03, 1.1971441e-02 },
124 {-3.9848859e-18, 9.4821649e-14, -6.7371977e-11, 1.8469937e-08, -2.5359307e-06, 1.7959053e-04, 3.9782564e-04, 2.8845935e-04 },
125 { 6.8408539e-16, -6.5499979e-13, 2.4562526e-10, -4.5989298e-08, 4.5723324e-06, -2.2111913e-04, 5.2023164e-03, -1.1226064e-02 },
126 {-2.9921470e-15, 2.5864165e-12, -8.7403799e-10, 1.4713388e-07, -1.2701505e-05, 4.5159935e-04, 3.1087989e-03, 1.9122831e-02 },
129 { 3.6196089e-16, -3.3623041e-13, 1.2324010e-10, -2.2769060e-08, 2.2297792e-06, -1.2567829e-04, 9.9791629e-03, 5.7247918e-02 },
130 { 5.0262888e-16, -5.3193896e-13, 2.2451715e-10, -4.7529623e-08, 5.1374873e-06, -2.3260136e-04, 3.1502825e-03, 1.5362491e-02 },
131 {-1.7782261e-16, 2.2487839e-13, -1.0610236e-10, 2.4112644e-08, -2.6331623e-06, 8.9499751e-05, 2.1386328e-03, 5.3824268e-01 },
134 { 9.4850045e-16, -8.6629383e-13, 3.0310944e-10, -5.1340396e-08, 4.6024275e-06, -2.2744239e-04, 4.5559993e-03, 2.5662350e-01 },
135 { 9.6461041e-17, -6.9209477e-14, 1.7625397e-11, -2.0229773e-09, 1.4900110e-07, -1.9315187e-05, 5.8967339e-03, 3.9544827e-03 },
136 { 5.1785449e-16, -3.6663004e-13, 1.0249990e-10, -1.5431998e-08, 1.5007941e-06, -1.2001502e-04, 7.6951526e-03, 3.2292815e-01 },
139 {-4.3683890e-15, 3.7020347e-12, -1.1712592e-09, 1.6401790e-07, -8.6842919e-06, -1.8542465e-06, 8.4485325e-03, 1.6267077e-01 },
140 {-4.0011069e-16, 2.7861423e-13, -6.3388921e-11, 5.8872238e-09, -5.4466522e-07, 1.8037114e-05, 1.0599869e-02, 7.6914696e-02 },
141 {-2.8242609e-15, 2.9234108e-12, -1.1726546e-09, 2.2552115e-07, -2.0059387e-05, 5.0595552e-04, 1.7714932e-02, 2.7271836e-01 },
144 {-9.5484131e-16, 9.6988184e-13, -4.0058766e-10, 8.5743924e-08, -9.9644797e-06, 5.9197908e-04, -1.0361579e-02, 3.3164429e-02 },
145 { 1.2731941e-17, -9.4238449e-15, 2.2808841e-12, -1.1548296e-10, -2.3888913e-08, 3.8986680e-06, 2.5879330e-03, 1.2769733e-01 },
146 { 4.6004608e-16, -5.0686849e-13, 2.2753449e-10, -5.3074099e-08, 6.7196096e-06, -4.4120020e-04, 1.3435551e-02, 2.8293355e-01 },
189 #define OFFSET(x) offsetof(PseudoColorContext, x)
190 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
253 static inline float lerpf(
float v0,
float v1,
float f)
255 return v0 + (v1 -
v0) *
f;
258 #define PCLIP(v, max, dst, src, x) \
259 if (v >= 0 && v <= max) { \
260 dst[x] = lerpf(src[x], v, opacity);\
277 for (y = 0; y <
height; y++) {
278 for (x = 0; x <
width; x++) {
279 int v = lut[
index[x]];
301 for (y = 0; y <
height; y++) {
302 for (x = 0; x <
width; x++) {
303 int v = lut[
index[(y << 1) * ilinesize + (x << 1)]];
324 for (y = 0; y <
height; y++) {
325 for (x = 0; x <
width; x++) {
326 int v = lut[
index[(y >> 1) * ilinesize + (x >> 1)]];
347 for (y = 0; y <
height; y++) {
348 for (x = 0; x <
width; x++) {
349 int v = lut[
index[x << 1]];
371 for (y = 0; y <
height; y++) {
372 for (x = 0; x <
width; x++) {
373 int v = lut[
index[x >> 1]];
393 const uint16_t *
index = (
const uint16_t *)iindex;
394 const uint16_t *
src = (
const uint16_t *)ssrc;
395 uint16_t *dst = (uint16_t *)ddst;
398 for (y = 0; y <
height; y++) {
399 for (x = 0; x <
width; x++) {
400 int v = lut[
index[x]];
404 index += ilinesize / 2;
405 src += slinesize / 2;
406 dst += dlinesize / 2;
420 const uint16_t *
index = (
const uint16_t *)iindex;
421 const uint16_t *
src = (
const uint16_t *)ssrc;
422 uint16_t *dst = (uint16_t *)ddst;
425 for (y = 0; y <
height; y++) {
426 for (x = 0; x <
width; x++) {
427 int v = lut[
index[x << 1]];
431 index += ilinesize / 2;
432 src += slinesize / 2;
433 dst += dlinesize / 2;
447 const uint16_t *
index = (
const uint16_t *)iindex;
448 const uint16_t *
src = (
const uint16_t *)ssrc;
449 uint16_t *dst = (uint16_t *)ddst;
452 for (y = 0; y <
height; y++) {
453 for (x = 0; x <
width; x++) {
454 int v = lut[
index[x >> 1]];
458 index += ilinesize / 2;
459 src += slinesize / 2;
460 dst += dlinesize / 2;
474 const uint16_t *
index = (
const uint16_t *)iindex;
475 const uint16_t *
src = (
const uint16_t *)ssrc;
476 uint16_t *dst = (uint16_t *)ddst;
483 for (y = 0; y <
height; y++) {
484 for (x = 0; x <
width; x++) {
485 int v = lut[
index[(y << 1) * ilinesize + (x << 1)]];
504 const uint16_t *
index = (
const uint16_t *)iindex;
505 const uint16_t *
src = (
const uint16_t *)ssrc;
506 uint16_t *dst = (uint16_t *)ddst;
513 for (y = 0; y <
height; y++) {
514 for (x = 0; x <
width; x++) {
515 int v = lut[
index[(y >> 1) * ilinesize + (x >> 1)]];
524 #define RGB_TO_Y_BT709(r, g, b) \
525 ((0.21260*219.0/255.0) * (r) + (0.71520*219.0/255.0) * (g) + \
526 (0.07220*219.0/255.0) * (b))
528 #define RGB_TO_U_BT709(r1, g1, b1, max) \
529 (-(0.11457*224.0/255.0) * r1 - (0.38543*224.0/255.0) * g1 + \
530 (0.50000*224.0/255.0) * b1 + max * 0.5)
532 #define RGB_TO_V_BT709(r1, g1, b1, max) \
533 ((0.50000*224.0/255.0) * r1 - (0.45415*224.0/255.0) * g1 - \
534 (0.04585*224.0/255.0) * b1 + max * 0.5)
536 static double poly_eval(
const double *
const poly,
double x)
540 for (
int i = 0;
i < 8;
i++) {
541 res += pow(x,
i) * poly[7-
i];
555 depth =
desc->comp[0].depth;
556 factor = 1 << (depth - 8);
557 s->max = (1 << depth) - 1;
560 if (
s->index >=
s->nb_planes) {
569 vsub =
desc->log2_chroma_h;
571 s->height[0] =
s->height[3] = inlink->
h;
573 s->width[0] =
s->width[3] = inlink->
w;
575 s->var_values[
VAR_W] = inlink->
w;
576 s->var_values[
VAR_H] = inlink->
h;
578 s->var_values[
VAR_YMIN] = 16 * (1 << (depth - 8));
579 s->var_values[
VAR_UMIN] = 16 * (1 << (depth - 8));
580 s->var_values[
VAR_VMIN] = 16 * (1 << (depth - 8));
582 s->var_values[
VAR_YMAX] = 235 * (1 << (depth - 8));
583 s->var_values[
VAR_UMAX] = 240 * (1 << (depth - 8));
584 s->var_values[
VAR_VMAX] = 240 * (1 << (depth - 8));
598 "Error when parsing the expression '%s' for the component %d and color %d.\n",
610 "Error when evaluating the expression '%s' for the value %d for the component %d.\n",
618 if (
s->preset >= 0) {
621 for (
int seg = 0; seg < nb_segments; seg++) {
625 for (
int i = start;
i < end;
i++) {
629 for (
int j = 0; j <
factor; j++) {
637 if (
g >= 0.f &&
b >= 0.f &&
r >= 0.f) {
661 for (
int j = 0; j <
factor; j++) {
662 const double lf = j / (double)
factor;
808 for (
int plane = 0; plane <
s->nb_planes; plane++) {
809 const int slice_start = (
s->height[plane] * jobnr) / nb_jobs;
810 const int slice_end = (
s->height[plane] * (jobnr+1)) / nb_jobs;
811 const int islice_start = (
s->height[
s->index] * jobnr) / nb_jobs;
812 ptrdiff_t ilinesize =
in->linesize[
s->index];
813 ptrdiff_t slinesize =
in->linesize[plane];
814 ptrdiff_t dlinesize =
out->linesize[plane];
816 const uint8_t *
src =
in->data[plane] + slice_start * slinesize;
817 uint8_t *dst =
out->data[plane] + slice_start * dlinesize;
819 s->filter[plane](
s->max,
s->width[plane],
slice_end - slice_start,
820 index,
src, dst, ilinesize, slinesize,
821 dlinesize,
s->lut[plane],
s->opacity);
850 char *res,
int res_len,
int flags)
883 for (
i = 0;
i < 4;
i++) {
892 .
name =
"pseudocolor",
895 .priv_class = &pseudocolor_class,
static double val(void *priv, double ch)
Macro definitions for various function/variable attributes.
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(const uint8_t *) pi - 0x80) *(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(const int16_t *) pi >> 8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t, *(const int16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(const int32_t *) pi >> 24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t, *(const int32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(const float *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(const float *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(const float *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(const double *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(const double *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(const double *) pi *(1U<< 31)))) #define SET_CONV_FUNC_GROUP(ofmt, ifmt) static void set_generic_function(AudioConvert *ac) { } void ff_audio_convert_free(AudioConvert **ac) { if(! *ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);} AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels, int sample_rate, int apply_map) { AudioConvert *ac;int in_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) return NULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method !=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt) > 2) { ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc) { av_free(ac);return NULL;} return ac;} in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar) { ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar ? ac->channels :1;} else if(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;else ac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);return ac;} int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) { int use_generic=1;int len=in->nb_samples;int p;if(ac->dc) { av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));return ff_convert_dither(ac-> in
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Main libavfilter public API header.
#define flags(name, subs,...)
#define u(width, name, range_min, range_max)
common internal and external API header
#define AV_CEIL_RSHIFT(a, b)
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
simple arithmetic expression evaluator
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width)
Fill plane linesizes for an image with pixel format pix_fmt and width width.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
#define AV_PIX_FMT_GBRAP12
#define AV_PIX_FMT_YUV420P16
#define AV_PIX_FMT_YUV444P12
#define AV_PIX_FMT_YUV444P9
#define AV_PIX_FMT_YUV420P10
#define AV_PIX_FMT_GBRAP16
#define AV_PIX_FMT_YUV422P9
#define AV_PIX_FMT_YUVA444P10
#define AV_PIX_FMT_YUVA420P16
#define AV_PIX_FMT_YUV420P12
#define AV_PIX_FMT_YUVA420P10
#define AV_PIX_FMT_YUVA422P9
#define AV_PIX_FMT_YUV422P12
#define AV_PIX_FMT_GBRP10
#define AV_PIX_FMT_YUV422P10
#define AV_PIX_FMT_GRAY12
#define AV_PIX_FMT_GBRP12
#define AV_PIX_FMT_YUV420P9
#define AV_PIX_FMT_YUVA420P9
#define AV_PIX_FMT_YUVA422P10
#define AV_PIX_FMT_YUV420P14
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
#define AV_PIX_FMT_YUV422P14
#define AV_PIX_FMT_GRAY10
#define AV_PIX_FMT_GRAY14
#define AV_PIX_FMT_YUV422P16
#define AV_PIX_FMT_GRAY16
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_YUVA444P16
#define AV_PIX_FMT_YUVA422P16
#define AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_YUV444P14
#define AV_PIX_FMT_YUVA444P9
#define AV_PIX_FMT_GBRP14
#define AV_PIX_FMT_YUV444P16
#define AV_PIX_FMT_YUV444P10
typedef void(RENAME(mix_any_func_type))
static const SheerTable rgb[2]
#define FF_ARRAY_ELEMS(a)
Describe the class of an AVClass context structure.
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
AVFilterContext * dst
dest filter
int format
agreed upon media format
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
AVFormatInternal * internal
An opaque field for libavformat internal usage.
This structure describes decoded (raw) audio or video data.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
double var_values[VAR_VARS_NB]
void(* filter[4])(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)
Used for passing data between threads.
static const int factor[16]
static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static double poly_eval(const double *const poly, double x)
#define PCLIP(v, max, dst, src, x)
static const AVOption pseudocolor_options[]
#define RGB_TO_Y_BT709(r, g, b)
static const Range shadows_range[]
#define RGB_TO_U_BT709(r1, g1, b1, max)
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_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 int query_formats(AVFilterContext *ctx)
static int config_input(AVFilterLink *inlink)
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 const AVFilterPad inputs[]
static const AVFilterPad outputs[]
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 const Fill spec2_fills[]
static const Preset presets[]
static const Range highlights_range[]
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFilter ff_vf_pseudocolor
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 const Range full_range
static const Curve curves[]
static enum AVPixelFormat pix_fmts[]
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 float lerpf(float v0, float v1, float f)
static const char *const var_names[]
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 int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
#define RGB_TO_V_BT709(r1, g1, b1, max)
static av_cold void uninit(AVFilterContext *ctx)
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 const Fill shadows_fills[]
static const Fill spec1_fills[]
static const Range spec1_range[]
static const Fill highlights_fills[]
AVFILTER_DEFINE_CLASS(pseudocolor)
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 const Range spec2_range[]
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.