#include <float.h>
#include "config_components.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavutil/file_open.h"
#include "libavutil/intfloat.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "drawutils.h"
#include "filters.h"
#include "video.h"
#include "lut3d.h"
Go to the source code of this file.
|
static float | sanitizef (float f) |
|
static float | lerpf (float v0, float v1, float f) |
|
static struct rgbvec | lerp (const struct rgbvec *v0, const struct rgbvec *v1, float f) |
|
static struct rgbvec | interp_nearest (const LUT3DContext *lut3d, const struct rgbvec *s) |
| Get the nearest defined point. More...
|
|
static struct rgbvec | interp_trilinear (const LUT3DContext *lut3d, const struct rgbvec *s) |
| Interpolate using the 8 vertices of a cube. More...
|
|
static struct rgbvec | interp_pyramid (const LUT3DContext *lut3d, const struct rgbvec *s) |
|
static struct rgbvec | interp_prism (const LUT3DContext *lut3d, const struct rgbvec *s) |
|
static struct rgbvec | interp_tetrahedral (const LUT3DContext *lut3d, const struct rgbvec *s) |
| Tetrahedral interpolation. More...
|
|
static float | prelut_interp_1d_linear (const Lut3DPreLut *prelut, int idx, const float s) |
|
static struct rgbvec | apply_prelut (const Lut3DPreLut *prelut, const struct rgbvec *s) |
|
static int | skip_line (const char *p) |
|
static char * | fget_next_word (char *dst, int max, FILE *f) |
|
static int | allocate_3dlut (AVFilterContext *ctx, int lutsize, int prelut) |
|
static int | parse_dat (AVFilterContext *ctx, FILE *f) |
|
static int | parse_cube (AVFilterContext *ctx, FILE *f) |
|
static int | parse_3dl (AVFilterContext *ctx, FILE *f) |
|
static int | parse_m3d (AVFilterContext *ctx, FILE *f) |
|
static int | nearest_sample_index (float *data, float x, int low, int hi) |
|
static int | parse_cinespace (AVFilterContext *ctx, FILE *f) |
|
static int | set_identity_matrix (AVFilterContext *ctx, int size) |
|
3D Lookup table filter
Definition in file vf_lut3d.c.
◆ OFFSET
◆ FLAGS
◆ TFLAGS
◆ COMMON_OPTIONS
◆ EXPONENT_MASK
#define EXPONENT_MASK 0x7F800000 |
◆ MANTISSA_MASK
#define MANTISSA_MASK 0x007FFFFF |
◆ SIGN_MASK
#define SIGN_MASK 0x80000000 |
◆ NEAR
#define NEAR |
( |
|
x | ) |
((int)((x) + .5)) |
◆ PREV
#define PREV |
( |
|
x | ) |
((int)(x)) |
◆ NEXT
#define NEXT |
( |
|
x | ) |
(FFMIN((int)(x) + 1, lut3d->lutsize - 1)) |
◆ DEFINE_INTERP_FUNC_PLANAR
#define DEFINE_INTERP_FUNC_PLANAR |
( |
|
name, |
|
|
|
nbits, |
|
|
|
depth |
|
) |
| |
◆ DEFINE_INTERP_FUNC_PLANAR_FLOAT
#define DEFINE_INTERP_FUNC_PLANAR_FLOAT |
( |
|
name, |
|
|
|
depth |
|
) |
| |
◆ DEFINE_INTERP_FUNC
#define DEFINE_INTERP_FUNC |
( |
|
name, |
|
|
|
nbits |
|
) |
| |
◆ MAX_LINE_SIZE
#define MAX_LINE_SIZE 512 |
◆ NEXT_LINE
#define NEXT_LINE |
( |
|
loop_cond | ) |
|
Value: do { \
} \
} while (loop_cond)
Definition at line 590 of file vf_lut3d.c.
◆ NEXT_LINE_OR_GOTO
#define NEXT_LINE_OR_GOTO |
( |
|
loop_cond, |
|
|
|
label |
|
) |
| |
Value: do { \
goto label; \
} \
} while (loop_cond)
Definition at line 597 of file vf_lut3d.c.
◆ SET_COLOR
Value: do { \
p++; \
case
'r': rgb_map[
id] = 0;
break; \
case
'g': rgb_map[
id] = 1;
break; \
case
'b': rgb_map[
id] = 2;
break; \
} \
p++; \
} while (0)
◆ NEXT_FLOAT_OR_GOTO
#define NEXT_FLOAT_OR_GOTO |
( |
|
value, |
|
|
|
label |
|
) |
| |
Value:
goto label; \
} \
goto label; \
}
Definition at line 865 of file vf_lut3d.c.
◆ sanitizef()
◆ lerpf()
◆ lerp()
◆ interp_nearest()
Get the nearest defined point.
Definition at line 103 of file vf_lut3d.c.
◆ interp_trilinear()
◆ interp_pyramid()
◆ interp_prism()
◆ interp_tetrahedral()
◆ prelut_interp_1d_linear()
◆ apply_prelut()
◆ skip_line()
static int skip_line |
( |
const char * |
p | ) |
|
|
static |
◆ fget_next_word()
static char* fget_next_word |
( |
char * |
dst, |
|
|
int |
max, |
|
|
FILE * |
f |
|
) |
| |
|
static |
◆ allocate_3dlut()
static int allocate_3dlut |
( |
AVFilterContext * |
ctx, |
|
|
int |
lutsize, |
|
|
int |
prelut |
|
) |
| |
|
static |
◆ parse_dat()
◆ parse_cube()
◆ parse_3dl()
◆ parse_m3d()
◆ nearest_sample_index()
static int nearest_sample_index |
( |
float * |
data, |
|
|
float |
x, |
|
|
int |
low, |
|
|
int |
hi |
|
) |
| |
|
static |
◆ parse_cinespace()
◆ set_identity_matrix()
◆ pix_fmts
#define AV_PIX_FMT_GBRAP16
static av_const int av_isspace(int c)
Locale-independent conversion of ASCII isspace.
@ AV_PIX_FMT_BGR24
packed RGB 8:8:8, 24bpp, BGRBGR...
@ AV_PIX_FMT_BGRA
packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
#define AV_PIX_FMT_GBRP14
@ AV_PIX_FMT_GBRAP
planar GBRA 4:4:4:4 32bpp
#define AV_PIX_FMT_GBRP10
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define AV_PIX_FMT_GBRAP10
#define AV_PIX_FMT_GBRAP12
static char * fget_next_word(char *dst, int max, FILE *f)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
#define AV_PIX_FMT_GBRP16
#define AV_PIX_FMT_RGBA64
int av_sscanf(const char *string, const char *format,...)
See libc sscanf manual for more information.
@ AV_PIX_FMT_BGR0
packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
@ AV_PIX_FMT_ABGR
packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
#define AV_PIX_FMT_GBRPF32
@ AV_PIX_FMT_RGB0
packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
static int interpolation(DeclickChannel *c, const double *src, int ar_order, double *acoefficients, int *index, int nb_errors, double *auxiliary, double *interpolated)
@ AV_PIX_FMT_ARGB
packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
#define AV_PIX_FMT_BGRA64
#define AV_PIX_FMT_GBRP12
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default value
@ AV_PIX_FMT_0BGR
packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
@ AV_OPT_TYPE_INT
Underlying C type is int.
#define AV_PIX_FMT_GBRAPF32
@ AV_PIX_FMT_GBRP
planar GBR 4:4:4 24bpp
@ AV_PIX_FMT_0RGB
packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
@ INTERPOLATE_TETRAHEDRAL
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.