mbox series

[FFmpeg-devel,v3,0/3] PNG color tagging improvements

Message ID 20230202150938.22297-1-leo.izen@gmail.com
Headers show
Series PNG color tagging improvements | expand


Leo Izen Feb. 2, 2023, 3:09 p.m. UTC
The first patch fixes a FATE issue with cICP and iCCP.

The second patch was discussed on IRC. I got a LGTM from Kasper, but sending to ML here and applying in a few days if there's no objections.

A few things discussed:
1) There's no need to expose the gamma table as another function as it's only used here.
2) This patch includes the patch on the ML sent as "avcodec/pngdec: warn when reading tv-range cICP chunks" which got a LGTM from Lynne on IRC. If this is applied that one has no need to be applied.

Changes from v2:
- Split off the gAMA chunk handling into a second patch at Andreas' suggestion.

Changes from v1:
- The second patch broke FATE because I didn't change the fate ref to accommodate the new metadata. I've since updated the fate reference.

Leo Izen (3):
  avcodec/pngenc: avoid writing cICP when inappropriate
  avcodec/pngdec: read colorspace info when decoding with AVDISCARD_ALL
  avcodec/pngdec: populate enum transfer values from gAMA chunk

 libavcodec/pngdec.c          | 128 +++++++++++++++++++++--------------
 libavcodec/pngenc.c          |  21 ++++--
 tests/ref/fate/png-icc       |   8 +--
 tests/ref/fate/png-side-data |   2 +-
 4 files changed, 96 insertions(+), 63 deletions(-)