mbox series

[FFmpeg-devel,v6,0/1] avutil/csp: create public API for colorspace structs

Message ID 20220525133257.829611-1-leo.izen@gmail.com
Headers show
Series avutil/csp: create public API for colorspace structs | expand

Message

Leo Izen May 25, 2022, 1:32 p.m. UTC
Changes in v6:
- Reordered avutil/csp.h functions to be in alphabetical order, as requested
  by Lynne on IRC (which also matches the order they occur in csp.c)
- Clarified that RGB->YUV matrix works for similar ones too e.g. YCoCg

Changes in v5:
- Unmark as [WIP], ready for review and merging
- rename public functions to namespace them via av_csp_,
  as requested by Anton K
- documented public API using Doxygen comments
- remove abs() from denominator in abs_sub_q, assuming denom is positive,
  as requested by Andreas R

Changes in v4:
- Provide the patch with an AVCIExy struct so we can discuss its
  potential pros and cons

Changes in v3:
- increase precision for AVR() macro to 100k, at haasn's request
- add #define AVUTIL_CSP_DENOM 100000
- add 0.5 to the AVR macro definition to get exact values from truncation

Leo Izen (1):
  avutil/csp: create public API for colorspace structs

 libavfilter/colorspace.c    | 143 ++++++++----------------------------
 libavfilter/colorspace.h    |  31 +-------
 libavfilter/fflcms2.c       |  33 +++++----
 libavfilter/fflcms2.h       |   4 +-
 libavfilter/vf_colorspace.c |  37 +++++-----
 libavfilter/vf_iccdetect.c  |   5 +-
 libavfilter/vf_tonemap.c    |  17 +----
 libavutil/Makefile          |   2 +
 libavutil/csp.c             | 128 ++++++++++++++++++++++++++++++++
 libavutil/csp.h             | 114 ++++++++++++++++++++++++++++
 libavutil/version.h         |   2 +-
 11 files changed, 325 insertions(+), 191 deletions(-)
 create mode 100644 libavutil/csp.c
 create mode 100644 libavutil/csp.h