FFmpeg
Functions | Variables
colorspace.c File Reference
#include "libavutil/frame.h"
#include "libavutil/mastering_display_metadata.h"
#include "libavutil/pixdesc.h"
#include "colorspace.h"

Go to the source code of this file.

Functions

void ff_matrix_invert_3x3 (const double in[3][3], double out[3][3])
 
void ff_matrix_mul_3x3 (double dst[3][3], const double src1[3][3], const double src2[3][3])
 
void ff_matrix_mul_3x3_vec (double dst[3], const double vec[3], const double mat[3][3])
 
void ff_fill_rgb2xyz_table (const AVPrimaryCoefficients *coeffs, const AVWhitepointCoefficients *wp, double rgb2xyz[3][3])
 
void ff_fill_rgb2yuv_table (const AVLumaCoefficients *coeffs, double rgb2yuv[3][3])
 
double ff_determine_signal_peak (AVFrame *in)
 
void ff_update_hdr_metadata (AVFrame *in, double peak)
 

Variables

static const double ycgco_matrix [3][3]
 
static const double gbr_matrix [3][3]
 

Function Documentation

◆ ff_matrix_invert_3x3()

void ff_matrix_invert_3x3 ( const double  in[3][3],
double  out[3][3] 
)

◆ ff_matrix_mul_3x3()

void ff_matrix_mul_3x3 ( double  dst[3][3],
const double  src1[3][3],
const double  src2[3][3] 
)

Definition at line 54 of file colorspace.c.

Referenced by create_filtergraph(), fill_whitepoint_conv_table(), and get_rgb2rgb_matrix().

◆ ff_matrix_mul_3x3_vec()

void ff_matrix_mul_3x3_vec ( double  dst[3],
const double  vec[3],
const double  mat[3][3] 
)

Definition at line 66 of file colorspace.c.

Referenced by ff_draw_color(), and init_filter().

◆ ff_fill_rgb2xyz_table()

void ff_fill_rgb2xyz_table ( const AVPrimaryCoefficients coeffs,
const AVWhitepointCoefficients wp,
double  rgb2xyz[3][3] 
)

Definition at line 79 of file colorspace.c.

Referenced by create_filtergraph(), and get_rgb2rgb_matrix().

◆ ff_fill_rgb2yuv_table()

void ff_fill_rgb2yuv_table ( const AVLumaCoefficients coeffs,
double  rgb2yuv[3][3] 
)

Definition at line 125 of file colorspace.c.

Referenced by create_filtergraph(), ff_draw_init2(), init_filter(), and tonemap_opencl_init().

◆ ff_determine_signal_peak()

double ff_determine_signal_peak ( AVFrame in)

Definition at line 153 of file colorspace.c.

Referenced by filter_frame(), and tonemap_opencl_filter_frame().

◆ ff_update_hdr_metadata()

void ff_update_hdr_metadata ( AVFrame in,
double  peak 
)

Definition at line 178 of file colorspace.c.

Referenced by filter_frame(), and tonemap_opencl_filter_frame().

Variable Documentation

◆ ycgco_matrix

const double ycgco_matrix[3][3]
static
Initial value:
=
{
{ 0.25, 0.5, 0.25 },
{ -0.25, 0.5, -0.25 },
{ 0.5, 0, -0.5 },
}

Definition at line 111 of file colorspace.c.

Referenced by ff_fill_rgb2yuv_table().

◆ gbr_matrix

const double gbr_matrix[3][3]
static
Initial value:
=
{
{ 0, 1, 0 },
{ 0, -0.5, 0.5 },
{ 0.5, -0.5, 0 },
}

Definition at line 118 of file colorspace.c.

Referenced by ff_fill_rgb2yuv_table().