FFmpeg
|
#include <stdbool.h>
#include "libavutil/csp.h"
#include "csputils.h"
#include "swscale.h"
#include "utils.h"
Go to the source code of this file.
Data Structures | |
struct | SwsColorMap |
Macros | |
#define | PERCEPTUAL_KNEE_MIN 0.10f |
#define | PERCEPTUAL_KNEE_MAX 0.80f |
#define | PERCEPTUAL_KNEE_DEF 0.40f |
#define | PERCEPTUAL_ADAPTATION 0.40f |
#define | PERCEPTUAL_DEADZONE 0.30f |
#define | PERCEPTUAL_CONTRAST 0.50f |
#define | SLOPE_TUNING 1.50f /* [0,10] */ |
#define | SLOPE_OFFSET 0.20f /* [0,1] */ |
#define | PERCEPTUAL_STRENGTH 0.80f |
#define | SOFTCLIP_KNEE 0.70f |
#define | COLORIMETRIC_GAMMA 1.80f |
Functions | |
bool | sws_color_map_noop (const SwsColorMap *map) |
Returns true if the given color map is a semantic no-op - that is, the overall RGB end to end transform would an identity mapping. More... | |
int | sws_color_map_generate_static (v3u16_t *lut, int size, const SwsColorMap *map) |
Generates a single end-to-end color mapping 3DLUT embedding a static tone mapping curve. More... | |
int | sws_color_map_generate_dynamic (v3u16_t *input, v3u16_t *output, int size_input, int size_I, int size_PT, const SwsColorMap *map) |
Generates a split pair of 3DLUTS, going to IPT and back, allowing an arbitrary dynamic EETF to be nestled in between these two operations. More... | |
void | sws_tone_map_generate (v2u16_t *lut, int size, const SwsColorMap *map) |
Generate a 1D LUT of size size adapting intensity (I) levels from the source to the destination color space. More... | |
bool sws_color_map_noop | ( | const SwsColorMap * | map | ) |
Returns true if the given color map is a semantic no-op - that is, the overall RGB end to end transform would an identity mapping.
Definition at line 34 of file cms.c.
Referenced by adapt_colors().
int sws_color_map_generate_static | ( | v3u16_t * | lut, |
int | size, | ||
const SwsColorMap * | map | ||
) |
Generates a single end-to-end color mapping 3DLUT embedding a static tone mapping curve.
Returns 0 on success, or a negative error code on failure.
Definition at line 679 of file cms.c.
Referenced by sws_lut3d_generate().
int sws_color_map_generate_dynamic | ( | v3u16_t * | input, |
v3u16_t * | output, | ||
int | size_input, | ||
int | size_I, | ||
int | size_PT, | ||
const SwsColorMap * | map | ||
) |
Generates a split pair of 3DLUTS, going to IPT and back, allowing an arbitrary dynamic EETF to be nestled in between these two operations.
Returns 0 on success, or a negative error code on failure.
The IPT transform already implies an explicit white point adaptation from src to dst, so to get absolute colorimetric semantics we have to explicitly undo this adaptation with a * corresponding inverse.
Definition at line 684 of file cms.c.
Referenced by sws_color_map_generate_static(), and sws_lut3d_generate().
void sws_tone_map_generate | ( | v2u16_t * | lut, |
int | size, | ||
const SwsColorMap * | map | ||
) |
Generate a 1D LUT of size size
adapting intensity (I) levels from the source to the destination color space.
The LUT is normalized to the relevant intensity range directly. The second channel of each entry returns the corresponding 15-bit scaling factor for the P/T channels. The scaling factor k may be applied as (1 << 15) - k + (PT * k >> 15)
.
This is designed to be used with sws_gamut_map_generate_dynamic().
Returns 0 on success, or a negative error code on failure.
Definition at line 743 of file cms.c.
Referenced by sws_lut3d_update().