63 uint16_t
lut[4][256 * 256];
83 #define OFFSET(x) offsetof(LutContext, x)
84 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
106 for (
i = 0;
i < 4;
i++) {
113 #define YUV_FORMATS \
114 AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, \
115 AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, \
116 AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P, \
117 AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, \
118 AV_PIX_FMT_YUVJ440P, \
119 AV_PIX_FMT_YUV444P9LE, AV_PIX_FMT_YUV422P9LE, AV_PIX_FMT_YUV420P9LE, \
120 AV_PIX_FMT_YUV444P10LE, AV_PIX_FMT_YUV422P10LE, AV_PIX_FMT_YUV420P10LE, AV_PIX_FMT_YUV440P10LE, \
121 AV_PIX_FMT_YUV444P12LE, AV_PIX_FMT_YUV422P12LE, AV_PIX_FMT_YUV420P12LE, AV_PIX_FMT_YUV440P12LE, \
122 AV_PIX_FMT_YUV444P14LE, AV_PIX_FMT_YUV422P14LE, AV_PIX_FMT_YUV420P14LE, \
123 AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV420P16LE, \
124 AV_PIX_FMT_YUVA444P16LE, AV_PIX_FMT_YUVA422P16LE, AV_PIX_FMT_YUVA420P16LE
126 #define RGB_FORMATS \
127 AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, \
128 AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, \
129 AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, \
130 AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGBA64LE, \
131 AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, \
132 AV_PIX_FMT_GBRP9LE, AV_PIX_FMT_GBRP10LE, \
133 AV_PIX_FMT_GBRAP10LE, \
134 AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRP14LE, \
135 AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRAP12LE, \
138 #define GRAY_FORMATS \
139 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9LE, AV_PIX_FMT_GRAY10LE, \
140 AV_PIX_FMT_GRAY12LE, AV_PIX_FMT_GRAY14LE, AV_PIX_FMT_GRAY16LE
182 return pow((
val-minval)/(maxval-minval), gamma) * (maxval-minval)+minval;
194 double level = (
val - minval) / (maxval - minval);
196 : 1.099 * pow(
level, 1.0 / gamma) - 0.099;
197 return level * (maxval - minval) + minval;
200 static double (*
const funcs1[])(
void *, double) = {
223 s->hsub =
desc->log2_chroma_w;
224 s->vsub =
desc->log2_chroma_h;
226 s->var_values[
VAR_W] = inlink->
w;
227 s->var_values[
VAR_H] = inlink->
h;
228 s->is_16bit =
desc->comp[0].depth > 8;
266 min[
Y] = 16 * (1 << (
desc->comp[0].depth - 8));
267 min[
U] = 16 * (1 << (
desc->comp[1].depth - 8));
268 min[
V] = 16 * (1 << (
desc->comp[2].depth - 8));
270 max[
Y] = 235 * (1 << (
desc->comp[0].depth - 8));
271 max[
U] = 240 * (1 << (
desc->comp[1].depth - 8));
272 max[
V] = 240 * (1 << (
desc->comp[2].depth - 8));
273 max[
A] = (1 <<
desc->comp[0].depth) - 1;
285 s->is_yuv =
s->is_rgb = 0;
294 s->step =
s->step >> 1;
309 "Error when parsing the expression '%s' for the component %d and color %d.\n",
328 "Error when evaluating the expression '%s' for the value %d for the component %d.\n",
348 #define LOAD_PACKED_COMMON\
349 LutContext *s = ctx->priv;\
350 const struct thread_data *td = arg;\
353 const int w = td->w;\
354 const int h = td->h;\
355 AVFrame *in = td->in;\
356 AVFrame *out = td->out;\
357 const uint16_t (*tab)[256*256] = (const uint16_t (*)[256*256])s->lut;\
358 const int step = s->step;\
360 const int slice_start = (h * jobnr ) / nb_jobs;\
361 const int slice_end = (h * (jobnr+1)) / nb_jobs;\
368 uint16_t *inrow, *outrow, *inrow0, *outrow0;
369 const int in_linesize =
in->linesize[0] / 2;
370 const int out_linesize =
out->linesize[0] / 2;
371 inrow0 = (uint16_t *)
in ->
data[0];
372 outrow0 = (uint16_t *)
out->data[0];
375 inrow = inrow0 +
i * in_linesize;
376 outrow = outrow0 +
i * out_linesize;
377 for (j = 0; j <
w; j++) {
386 case 4: outrow[3] =
tab[3][inrow[3]];
387 case 3: outrow[2] =
tab[2][inrow[2]];
388 case 2: outrow[1] =
tab[1][inrow[1]];
389 default: outrow[0] =
tab[0][inrow[0]];
405 uint8_t *inrow, *outrow, *inrow0, *outrow0;
406 const int in_linesize =
in->linesize[0];
407 const int out_linesize =
out->linesize[0];
408 inrow0 =
in ->data[0];
409 outrow0 =
out->data[0];
412 inrow = inrow0 +
i * in_linesize;
413 outrow = outrow0 +
i * out_linesize;
414 for (j = 0; j <
w; j++) {
416 case 4: outrow[3] =
tab[3][inrow[3]];
417 case 3: outrow[2] =
tab[2][inrow[2]];
418 case 2: outrow[1] =
tab[1][inrow[1]];
419 default: outrow[0] =
tab[0][inrow[0]];
429 #define LOAD_PLANAR_COMMON\
430 LutContext *s = ctx->priv;\
431 const struct thread_data *td = arg;\
433 AVFrame *in = td->in;\
434 AVFrame *out = td->out;\
436 #define PLANAR_COMMON\
437 int vsub = plane == 1 || plane == 2 ? s->vsub : 0;\
438 int hsub = plane == 1 || plane == 2 ? s->hsub : 0;\
439 int h = AV_CEIL_RSHIFT(td->h, vsub);\
440 int w = AV_CEIL_RSHIFT(td->w, hsub);\
441 const uint16_t *tab = s->lut[plane];\
443 const int slice_start = (h * jobnr ) / nb_jobs;\
444 const int slice_end = (h * (jobnr+1)) / nb_jobs;\
451 uint16_t *inrow, *outrow;
453 for (plane = 0; plane < 4 &&
in->data[plane] &&
in->linesize[plane]; plane++) {
456 const int in_linesize =
in->linesize[plane] / 2;
457 const int out_linesize =
out->linesize[plane] / 2;
459 inrow = (uint16_t *)
in ->
data[plane] + slice_start * in_linesize;
460 outrow = (uint16_t *)
out->data[plane] + slice_start * out_linesize;
463 for (j = 0; j <
w; j++) {
467 outrow[j] =
tab[inrow[j]];
470 inrow += in_linesize;
471 outrow += out_linesize;
485 for (plane = 0; plane < 4 &&
in->data[plane] &&
in->linesize[plane]; plane++) {
488 const int in_linesize =
in->linesize[plane];
489 const int out_linesize =
out->linesize[plane];
491 inrow =
in ->data[plane] + slice_start * in_linesize;
492 outrow =
out->data[plane] + slice_start * out_linesize;
495 for (j = 0; j <
w; j++)
496 outrow[j] =
tab[inrow[j]];
497 inrow += in_linesize;
498 outrow += out_linesize;
505 #define PACKED_THREAD_DATA\
506 struct thread_data td = {\
513 #define PLANAR_THREAD_DATA\
514 struct thread_data td = {\
541 if (
s->is_rgb &&
s->is_16bit && !
s->is_planar) {
546 }
else if (
s->is_rgb && !
s->is_planar) {
551 }
else if (
s->is_16bit) {
570 char *res,
int res_len,
int flags)
595 #define DEFINE_LUT_FILTER(name_, description_) \
596 AVFilter ff_vf_##name_ = { \
598 .description = NULL_IF_CONFIG_SMALL(description_), \
599 .priv_size = sizeof(LutContext), \
600 .priv_class = &name_ ## _class, \
601 .init = name_##_init, \
603 .query_formats = query_formats, \
605 .outputs = outputs, \
606 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | \
607 AVFILTER_FLAG_SLICE_THREADS, \
608 .process_command = process_command, \
611 #if CONFIG_LUT_FILTER
613 #define lut_options options
621 DEFINE_LUT_FILTER(lut,
"Compute and apply a lookup table to the RGB/YUV input video.");
624 #if CONFIG_LUTYUV_FILTER
626 #define lutyuv_options options
638 DEFINE_LUT_FILTER(lutyuv,
"Compute and apply a lookup table to the YUV input video.");
641 #if CONFIG_LUTRGB_FILTER
643 #define lutrgb_options options
655 DEFINE_LUT_FILTER(lutrgb,
"Compute and apply a lookup table to the RGB input video.");
658 #if CONFIG_NEGATE_FILTER
660 static const AVOption negate_options[] = {
671 for (
int i = 0;
i < 4;
i++) {
672 s->comp_expr_str[
i] =
av_strdup((
i == 3 && !
s->negate_alpha) ?
674 if (!
s->comp_expr_str[
i])
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,...)
common internal and external API header
int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt)
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
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
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
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_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
char * av_strdup(const char *s)
Duplicate a string.
static void direct(const float *in, const FFTComplex *ir, int len, float *out)
#define AVFILTER_DEFINE_CLASS(fname)
common internal API header
static enum AVPixelFormat pix_fmts[]
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
static int slice_end(AVCodecContext *avctx, AVFrame *pict)
Handle slice ends.
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_PLANAR
At least one pixel component is not in the first data plane.
AVPixelFormat
Pixel format.
@ AV_PIX_FMT_YUV420P14LE
planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
@ AV_PIX_FMT_YUV440P
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
@ AV_PIX_FMT_YUVA444P9LE
planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
@ AV_PIX_FMT_YUVA444P10LE
planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
@ AV_PIX_FMT_YUVA422P9LE
planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
@ AV_PIX_FMT_YUV420P9LE
planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUVA420P10LE
planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_YUVA420P
planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
@ AV_PIX_FMT_YUVA422P10LE
planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUV420P10LE
planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
@ AV_PIX_FMT_RGBA64LE
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
@ AV_PIX_FMT_YUV411P
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
@ AV_PIX_FMT_YUV422P16LE
planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV444P14LE
planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUV422P12LE
planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV440P12LE
planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_YUVA420P9LE
planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
@ AV_PIX_FMT_YUV444P
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
@ AV_PIX_FMT_YUV444P9LE
planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA444P
planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
@ AV_PIX_FMT_YUVA444P16LE
planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUVA420P16LE
planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
@ AV_PIX_FMT_RGB48LE
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
@ AV_PIX_FMT_YUV420P12LE
planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV422P9LE
planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV422P10LE
planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
@ AV_PIX_FMT_YUV422P14LE
planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
@ AV_PIX_FMT_YUV440P10LE
planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
@ AV_PIX_FMT_YUV444P16LE
planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUVA422P16LE
planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
@ AV_PIX_FMT_YUV444P10LE
planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
@ AV_PIX_FMT_YUV420P16LE
planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
@ AV_PIX_FMT_YUV444P12LE
planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
#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.
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...
uint16_t lut[4][256 *256]
lookup table for each component
double var_values[VAR_VARS_NB]
static const struct twinvq_data tab
static enum AVPixelFormat all_pix_fmts[]
static int lut_packed_8bits(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
#define PACKED_THREAD_DATA
static double(*const funcs1[])(void *, double)
#define LOAD_PLANAR_COMMON
static const AVOption options[]
#define PLANAR_THREAD_DATA
static enum AVPixelFormat rgb_pix_fmts[]
static const char *const funcs1_names[]
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
static int lut_planar_8bits(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int lut_packed_16bits(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int lut_planar_16bits(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static double compute_gammaval709(void *opaque, double gamma)
Compute ITU Rec.709 gamma correction of value val.
static int config_props(AVFilterLink *inlink)
static const char *const var_names[]
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
#define LOAD_PACKED_COMMON
static av_cold void uninit(AVFilterContext *ctx)
#define DEFINE_LUT_FILTER(name_, description_)
static double compute_gammaval(void *opaque, double gamma)
Compute gamma correction for value val, assuming the minval-maxval range, val is clipped to a value c...
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
static enum AVPixelFormat yuv_pix_fmts[]
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.