Go to the source code of this file.
|
| AVFILTER_DEFINE_CLASS (grayworld) |
|
static void | apply_matrix (const float matrix[3][3], const float input[3], float output[3]) |
|
static void | rgb2lab (const float rgb[3], float lab[3]) |
| Convert from Linear RGB to logspace LAB. More...
|
|
static void | lab2rgb (const float lab[3], float rgb[3]) |
| Convert from Logspace LAB to Linear RGB. More...
|
|
static int | convert_frame (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
| Convert a frame from linear RGB to logspace LAB, and accumulate channel totals for each row Convert from RGB -> lms using equation 4 in color transfer paper. More...
|
|
static void | compute_correction (GrayWorldContext *s, ThreadData *td) |
| Sum the channel totals and compute the mean for each channel. More...
|
|
static int | correct_frame (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) |
| Subtract the mean logspace AB values from each pixel. More...
|
|
static int | config_input (AVFilterLink *inlink) |
|
static av_cold void | uninit (AVFilterContext *ctx) |
|
static int | filter_frame (AVFilterLink *inlink, AVFrame *in) |
|
◆ OFFSET
◆ FLAGS
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
grayworld |
| ) |
|
◆ apply_matrix()
static void apply_matrix |
( |
const float |
matrix[3][3], |
|
|
const float |
input[3], |
|
|
float |
output[3] |
|
) |
| |
|
static |
◆ rgb2lab()
static void rgb2lab |
( |
const float |
rgb[3], |
|
|
float |
lab[3] |
|
) |
| |
|
static |
Convert from Linear RGB to logspace LAB.
- Parameters
-
rgb | Input array of rgb components |
lab | output array of lab components |
Definition at line 94 of file vf_grayworld.c.
Referenced by convert_frame().
◆ lab2rgb()
static void lab2rgb |
( |
const float |
lab[3], |
|
|
float |
rgb[3] |
|
) |
| |
|
static |
Convert from Logspace LAB to Linear RGB.
- Parameters
-
lab | input array of lab components |
rgb | output array of rgb components |
Definition at line 111 of file vf_grayworld.c.
Referenced by correct_frame().
◆ convert_frame()
Convert a frame from linear RGB to logspace LAB, and accumulate channel totals for each row Convert from RGB -> lms using equation 4 in color transfer paper.
- Parameters
-
ctx | Filter context |
arg | Thread data pointer |
jobnr | job number |
nb_jobs | number of jobs |
Definition at line 131 of file vf_grayworld.c.
Referenced by filter_frame().
◆ compute_correction()
◆ correct_frame()
Subtract the mean logspace AB values from each pixel.
- Parameters
-
ctx | Filter context |
arg | Thread data pointer |
jobnr | job number |
nb_jobs | number of jobs |
Definition at line 199 of file vf_grayworld.c.
Referenced by filter_frame().
◆ config_input()
◆ uninit()
◆ filter_frame()
◆ grayworld_options
◆ lms2lab
const float lms2lab[3][3] |
|
static |
Initial value:= {
{0.5774, 0.5774, 0.5774},
{0.40825, 0.40825, -0.816458},
{0.707, -0.707, 0}
}
Definition at line 64 of file vf_grayworld.c.
Referenced by rgb2lab().
◆ lab2lms
const float lab2lms[3][3] |
|
static |
Initial value:= {
{0.57735, 0.40825, 0.707},
{0.57735, 0.40825, -0.707},
{0.57735, -0.8165, 0}
}
Definition at line 70 of file vf_grayworld.c.
Referenced by lab2rgb().
◆ rgb2lms
const float rgb2lms[3][3] |
|
static |
Initial value:= {
{0.3811, 0.5783, 0.0402},
{0.1967, 0.7244, 0.0782},
{0.0241, 0.1288, 0.8444}
}
Definition at line 76 of file vf_grayworld.c.
Referenced by rgb2lab().
◆ lms2rgb
const float lms2rgb[3][3] |
|
static |
Initial value:= {
{4.4679, -3.5873, 0.1193},
{-1.2186, 2.3809, -0.1624},
{0.0497, -0.2439, 1.2045}
}
Definition at line 82 of file vf_grayworld.c.
Referenced by lab2rgb().
◆ grayworld_inputs
Initial value:= {
{
.name = "default",
}
}
Definition at line 300 of file vf_grayworld.c.
◆ ff_vf_grayworld
Initial value:= {
.name = "grayworld",
.priv_class = &grayworld_class,
}
Definition at line 309 of file vf_grayworld.c.