FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Functions
color_utils.h File Reference
#include "libavutil/pixfmt.h"

Go to the source code of this file.

Typedefs

typedef double(* avpriv_trc_function )(double)
 

Functions

double avpriv_get_gamma_from_trc (enum AVColorTransferCharacteristic trc)
 Determine a suitable 'gamma' value to match the supplied AVColorTransferCharacteristic. More...
 
avpriv_trc_function avpriv_get_trc_function_from_trc (enum AVColorTransferCharacteristic trc)
 Determine the function needed to apply the given AVColorTransferCharacteristic to linear input. More...
 

Typedef Documentation

typedef double(* avpriv_trc_function)(double)

Definition at line 40 of file color_utils.h.

Function Documentation

double avpriv_get_gamma_from_trc ( enum AVColorTransferCharacteristic  trc)

Determine a suitable 'gamma' value to match the supplied AVColorTransferCharacteristic.

See Apple Technical Note TN2257 (https://developer.apple.com/library/mac/technotes/tn2257/_index.html)

Returns
Will return an approximation to the simple gamma function matching the supplied Transfer Characteristic, Will return 0.0 for any we cannot reasonably match against.

Definition at line 28 of file color_utils.c.

Referenced by mov_write_gama_tag(), and png_get_gama().

avpriv_trc_function avpriv_get_trc_function_from_trc ( enum AVColorTransferCharacteristic  trc)

Determine the function needed to apply the given AVColorTransferCharacteristic to linear input.

The function returned should expect a nominal domain and range of [0.0-1.0] values outside of this range maybe valid depending on the chosen characteristic function.

Returns
Will return pointer to the function matching the supplied Transfer Characteristic. If unspecified will return NULL:

Definition at line 170 of file color_utils.c.

Referenced by decode_block(), decode_init(), and main().