FFmpeg
4.2.2
|
3D Lookup table filter More...
#include "libavutil/opt.h"
#include "libavutil/file.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"
#include "libavutil/pixdesc.h"
#include "libavutil/avstring.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "framesync.h"
#include "internal.h"
#include "video.h"
Go to the source code of this file.
Data Structures | |
struct | rgbvec |
struct | LUT3DContext |
struct | ThreadData |
Used for passing data between threads. More... | |
Macros | |
#define | R 0 |
#define | G 1 |
#define | B 2 |
#define | A 3 |
#define | MAX_LEVEL 128 |
#define | OFFSET(x) offsetof(LUT3DContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
#define | COMMON_OPTIONS |
#define | NEAR(x) ((int)((x) + .5)) |
#define | PREV(x) ((int)(x)) |
#define | NEXT(x) (FFMIN((int)(x) + 1, lut3d->lutsize - 1)) |
#define | DEFINE_INTERP_FUNC_PLANAR(name, nbits, depth) |
#define | DEFINE_INTERP_FUNC(name, nbits) |
#define | MAX_LINE_SIZE 512 |
#define | NEXT_LINE(loop_cond) |
#define | SET_COLOR(id) |
#define | SET_FUNC(name) |
Enumerations | |
enum | interp_mode { INTERPOLATE_NEAREST, INTERPOLATE_TRILINEAR, INTERPOLATE_TETRAHEDRAL, NB_INTERP_MODE } |
Functions | |
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_tetrahedral (const LUT3DContext *lut3d, const struct rgbvec *s) |
Tetrahedral interpolation. More... | |
static int | skip_line (const char *p) |
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 | parse_cinespace (AVFilterContext *ctx, FILE *f) |
static void | set_identity_matrix (LUT3DContext *lut3d, int size) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_input (AVFilterLink *inlink) |
static AVFrame * | apply_lut (AVFilterLink *inlink, AVFrame *in) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
3D Lookup table filter
Definition in file vf_lut3d.c.
#define R 0 |
Definition at line 40 of file vf_lut3d.c.
#define G 1 |
Definition at line 41 of file vf_lut3d.c.
#define B 2 |
Definition at line 42 of file vf_lut3d.c.
#define A 3 |
Definition at line 43 of file vf_lut3d.c.
#define MAX_LEVEL 128 |
Definition at line 58 of file vf_lut3d.c.
Referenced by filter_frame(), parse_cinespace(), parse_cube(), parse_dat(), and parse_m3d().
#define OFFSET | ( | x | ) | offsetof(LUT3DContext, x) |
Definition at line 84 of file vf_lut3d.c.
Referenced by filter_frame().
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM |
Definition at line 85 of file vf_lut3d.c.
Referenced by filter_frame().
#define COMMON_OPTIONS |
Definition at line 86 of file vf_lut3d.c.
Referenced by filter_frame().
#define NEAR | ( | x | ) | ((int)((x) + .5)) |
Definition at line 106 of file vf_lut3d.c.
Referenced by filter_frame(), and interp_nearest().
#define PREV | ( | x | ) | ((int)(x)) |
Definition at line 107 of file vf_lut3d.c.
Referenced by filter_frame(), interp_tetrahedral(), and interp_trilinear().
Definition at line 108 of file vf_lut3d.c.
Referenced by interp_tetrahedral(), and interp_trilinear().
#define DEFINE_INTERP_FUNC_PLANAR | ( | name, | |
nbits, | |||
depth | |||
) |
Definition at line 204 of file vf_lut3d.c.
#define DEFINE_INTERP_FUNC | ( | name, | |
nbits | |||
) |
Definition at line 283 of file vf_lut3d.c.
#define MAX_LINE_SIZE 512 |
Definition at line 333 of file vf_lut3d.c.
Referenced by filter_frame(), parse_3dl(), parse_cinespace(), parse_cube(), parse_dat(), and parse_m3d().
#define NEXT_LINE | ( | loop_cond | ) |
Definition at line 342 of file vf_lut3d.c.
Referenced by filter_frame(), parse_3dl(), parse_cinespace(), parse_cube(), parse_dat(), and parse_m3d().
#define SET_COLOR | ( | id | ) |
Referenced by parse_m3d().
#define SET_FUNC | ( | name | ) |
Referenced by config_input().
enum interp_mode |
Enumerator | |
---|---|
INTERPOLATE_NEAREST | |
INTERPOLATE_TRILINEAR | |
INTERPOLATE_TETRAHEDRAL | |
NB_INTERP_MODE |
Definition at line 45 of file vf_lut3d.c.
|
inlinestatic |
Definition at line 93 of file vf_lut3d.c.
Referenced by filter_frame(), and lerp().
Definition at line 98 of file vf_lut3d.c.
Referenced by interp_trilinear().
|
static |
Get the nearest defined point.
Definition at line 113 of file vf_lut3d.c.
|
static |
Interpolate using the 8 vertices of a cube.
Definition at line 123 of file vf_lut3d.c.
|
static |
Tetrahedral interpolation.
Based on code found in Truelight Software Library paper.
Definition at line 151 of file vf_lut3d.c.
|
static |
Definition at line 335 of file vf_lut3d.c.
Referenced by filter_frame(), parse_3dl(), parse_cinespace(), parse_cube(), and parse_dat().
|
static |
Definition at line 351 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 384 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 441 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 470 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 533 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 627 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 645 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 669 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 727 of file vf_lut3d.c.
Referenced by filter_frame().
|
static |
Definition at line 756 of file vf_lut3d.c.