avutil/csp: add av_csp_trc_inv_from_id()

Mathematical inverse of av_csp_trc_from_id(), plus testing to make sure it
roundtrips correctly with the corresponding TRC.
This commit is contained in:
Niklas Haas 2024-11-25 13:35:34 +01:00
parent 28f217780b
commit bf0a6c4111
6 changed files with 471 additions and 319 deletions

View file

@ -147,6 +147,11 @@ double av_csp_approximate_trc_gamma(enum AVColorTransferCharacteristic trc);
*/
av_csp_trc_function av_csp_trc_func_from_id(enum AVColorTransferCharacteristic trc);
/**
* Returns the mathematical inverse of the corresponding TRC function.
*/
av_csp_trc_function av_csp_trc_func_inv_from_id(enum AVColorTransferCharacteristic trc);
/**
* @}
*/