diff options
author | Kevin Wheatley <kevin.j.wheatley@gmail.com> | 2015-09-01 11:41:38 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-10 23:53:05 +0200 |
commit | bac90482654219cfdde65680726b85516dcbdc66 (patch) | |
tree | b963954a424c05a621d2478a45f226838096eb7f /libavutil/color_utils.h | |
parent | f6e598afa8229d25bc8b84c954282d74147d6265 (diff) | |
download | ffmpeg-bac90482654219cfdde65680726b85516dcbdc66.tar.gz |
avutil/color_utils: Add basic transfer functions for each AVColorTransferCharacteristic
Most functions are valid over a domain and range of [0.0-1.0] but
some are defined over greater. This patch does not deal with
AVColorRange and assumes AVCOL_RANGE_JPEG for the returned values.
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Diffstat (limited to 'libavutil/color_utils.h')
-rw-r--r-- | libavutil/color_utils.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavutil/color_utils.h b/libavutil/color_utils.h index 3600a72d10..9529006452 100644 --- a/libavutil/color_utils.h +++ b/libavutil/color_utils.h @@ -36,4 +36,21 @@ */ double avpriv_get_gamma_from_trc(enum AVColorTransferCharacteristic trc); + +typedef double (*avpriv_trc_function)(double); + +/** + * 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. + * + * @return Will return pointer to the function matching the + * supplied Transfer Characteristic. If unspecified will + * return NULL: + */ +avpriv_trc_function avpriv_get_trc_function_from_trc(enum AVColorTransferCharacteristic trc); + #endif |