Hermes 0.7.0
Linux game streaming host
Loading...
Searching...
No Matches
video_colorspace.h File Reference

Declarations for colorspace functions. More...

#include <libavutil/pixfmt.h>
Include dependency graph for video_colorspace.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  video::sunshine_colorspace_t
struct  video::avcodec_colorspace_t
struct  video::color_t

Enumerations

enum class  video::colorspace_e { rec601 , rec709 , bt2020sdr , bt2020 }

Functions

bool video::colorspace_is_hdr (const sunshine_colorspace_t &colorspace)
sunshine_colorspace_t video::colorspace_from_client_config (const config_t &config, bool hdr_display)
avcodec_colorspace_t video::avcodec_colorspace_from_sunshine_colorspace (const sunshine_colorspace_t &sunshine_colorspace)
const color_t * video::color_vectors_from_colorspace (const sunshine_colorspace_t &colorspace)
const color_t * video::color_vectors_from_colorspace (colorspace_e colorspace, bool full_range)
const color_t * video::new_color_vectors_from_colorspace (const sunshine_colorspace_t &colorspace)
 New version of color_vectors_from_colorspace() function that better adheres to the standards. Returned vectors are used to perform RGB->YUV conversion. Unlike its predecessor, color vectors will produce output in UINT range, not UNORM range. Input is still in UNORM range. Returned vectors won't modify color primaries and color transfer function.

Detailed Description

Declarations for colorspace functions.

Definition in file video_colorspace.h.

Enumeration Type Documentation

◆ colorspace_e

enum class video::colorspace_e
strong
Enumerator
rec601 

Rec. 601.

rec709 

Rec. 709.

bt2020sdr 

Rec. 2020 SDR.

bt2020 

Rec. 2020 HDR.

Definition at line 13 of file video_colorspace.h.

Function Documentation

◆ avcodec_colorspace_from_sunshine_colorspace()

avcodec_colorspace_t video::avcodec_colorspace_from_sunshine_colorspace ( const sunshine_colorspace_t & sunshine_colorspace)

Definition at line 81 of file video_colorspace.cpp.

◆ color_vectors_from_colorspace() [1/2]

const color_t * video::color_vectors_from_colorspace ( colorspace_e colorspace,
bool full_range )

Definition at line 129 of file video_colorspace.cpp.

◆ color_vectors_from_colorspace() [2/2]

const color_t * video::color_vectors_from_colorspace ( const sunshine_colorspace_t & colorspace)

Definition at line 125 of file video_colorspace.cpp.

◆ colorspace_from_client_config()

sunshine_colorspace_t video::colorspace_from_client_config ( const config_t & config,
bool hdr_display )

Definition at line 22 of file video_colorspace.cpp.

◆ colorspace_is_hdr()

bool video::colorspace_is_hdr ( const sunshine_colorspace_t & colorspace)

Definition at line 18 of file video_colorspace.cpp.

◆ new_color_vectors_from_colorspace()

const color_t * video::new_color_vectors_from_colorspace ( const sunshine_colorspace_t & colorspace)

New version of color_vectors_from_colorspace() function that better adheres to the standards. Returned vectors are used to perform RGB->YUV conversion. Unlike its predecessor, color vectors will produce output in UINT range, not UNORM range. Input is still in UNORM range. Returned vectors won't modify color primaries and color transfer function.

Parameters
colorspaceTargeted YUV colorspace.
Returns
const color_t* that contains RGB->YUV transformation vectors. Components range_y and range_uv are there for backwards compatibility and can be ignored in the computation.

Definition at line 183 of file video_colorspace.cpp.