FFmpeg
|
#include <stdint.h>
#include "libavutil/csp.h"
#include "libavutil/pixfmt.h"
#include "cms.h"
#include "csputils.h"
#include "utils.h"
Go to the source code of this file.
Data Structures | |
struct | SwsLut3D |
Enumerations | |
enum | { INPUT_LUT_BITS = 6, INPUT_LUT_SIZE = (1 << INPUT_LUT_BITS) + 1, TONE_LUT_BITS = 8, TONE_LUT_SIZE = (1 << TONE_LUT_BITS) + 1, OUTPUT_LUT_BITS_I = 6, OUTPUT_LUT_BITS_PT = 7, OUTPUT_LUT_SIZE_I = (1 << OUTPUT_LUT_BITS_I) + 1, OUTPUT_LUT_SIZE_PT = (1 << OUTPUT_LUT_BITS_PT) + 1 } |
Functions | |
SwsLut3D * | sws_lut3d_alloc (void) |
void | sws_lut3d_free (SwsLut3D **lut3d) |
bool | sws_lut3d_test_fmt (enum AVPixelFormat fmt, int output) |
Test to see if a given format is supported by the 3DLUT input/output code. More... | |
enum AVPixelFormat | sws_lut3d_pick_pixfmt (SwsFormat fmt, int output) |
Pick the best compatible pixfmt for a given SwsFormat. More... | |
int | sws_lut3d_generate (SwsLut3D *lut3d, enum AVPixelFormat fmt_in, enum AVPixelFormat fmt_out, const SwsColorMap *map) |
Recalculate the (static) 3DLUT state with new settings. More... | |
void | sws_lut3d_update (SwsLut3D *lut3d, const SwsColor *new_src) |
Update the tone mapping state. More... | |
void | sws_lut3d_apply (const SwsLut3D *lut3d, const uint8_t *in, int in_stride, uint8_t *out, int out_stride, int w, int h) |
Applies a color transformation to a plane. More... | |
anonymous enum |
SwsLut3D* sws_lut3d_alloc | ( | void | ) |
Definition at line 32 of file lut3d.c.
Referenced by adapt_colors().
void sws_lut3d_free | ( | SwsLut3D ** | lut3d | ) |
Definition at line 42 of file lut3d.c.
Referenced by adapt_colors(), and free_lut3d().
bool sws_lut3d_test_fmt | ( | enum AVPixelFormat | fmt, |
int | output | ||
) |
Test to see if a given format is supported by the 3DLUT input/output code.
Definition at line 47 of file lut3d.c.
Referenced by sws_lut3d_generate().
enum AVPixelFormat sws_lut3d_pick_pixfmt | ( | SwsFormat | fmt, |
int | output | ||
) |
Pick the best compatible pixfmt for a given SwsFormat.
Definition at line 52 of file lut3d.c.
Referenced by adapt_colors().
int sws_lut3d_generate | ( | SwsLut3D * | lut3d, |
enum AVPixelFormat | fmt_in, | ||
enum AVPixelFormat | fmt_out, | ||
const SwsColorMap * | map | ||
) |
Recalculate the (static) 3DLUT state with new settings.
This will recompute everything. To only update per-frame tone mapping state, instead call sws_lut3d_update().
Returns 0 or a negative error code.
Definition at line 224 of file lut3d.c.
Referenced by adapt_colors().
Update the tone mapping state.
This will only use per-frame metadata. The static metadata is ignored.
Definition at line 252 of file lut3d.c.
Referenced by setup_lut3d(), and sws_lut3d_generate().
void sws_lut3d_apply | ( | const SwsLut3D * | lut3d, |
const uint8_t * | in, | ||
int | in_stride, | ||
uint8_t * | out, | ||
int | out_stride, | ||
int | w, | ||
int | h | ||
) |
Applies a color transformation to a plane.
The format must match the format provided during sws_lut3d_update().
Definition at line 263 of file lut3d.c.
Referenced by run_lut3d().