Commit Graph

3 Commits

Author SHA1 Message Date
Leo Izen 719a93f4e4 avutil/{color_utils, csp}: merge color_utils into csp and expose API
libavutil/color_utils contains some avpriv_ symbols that map
enum AVTransferCharacteristic values to gamma-curve approximations and
to the actual transfer functions to invert them (i.e. -> linear).

There's two issues with this:
(1) avpriv is evil and should be avoided whenever possible
(2) libavutil/csp.h exposes a public API for handling color that
    already handles primaries and matricies

I don't see any reason this API has to be private, so this commit takes
the functionality from avutil/color_utils and merges it into avutil/csp
with an exposed av_ API rather than the previous avpriv_ API.

Every reference to the previous API has been updated to point to the
new one. color_utils.h has been deleted as well. This should not break
any applications as it only contained avpriv_ symbols in the first
place, so nothing in that header could be referenced by other
applications.

Signed-off-by: Leo Izen <leo.izen@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:35:14 +01:00
Kevin Wheatley bac9048265 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>
2015-09-10 23:53:05 +02:00
Kevin Wheatley 86b59e6a50 avutil: Extract gamma determination from PNG encoder for future use. Adds private avpriv_get_gamma_from_trc() function to libavutil.
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-05 12:26:22 +01:00