lavfi: add vf_iccdetect for parsing ICC profiles

This filter is designed to parse embedded ICC profiles and attempt
extracting colorspace tags from them, updating the AVFrame metadata
accordingly.

This is intentionally made a separate filter, rather than being part of
libavcodec itself, so that it's an opt-in behavior for the time being.
This also gives the user more flexibility to e.g. first attach an ICC
profile and then also set the colorspace tags from it.

This makes #9673 possible, though not automatic.

Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas
2022-04-11 13:26:07 +02:00
parent 5cfeaeef0c
commit 2cb0cebd11
5 changed files with 159 additions and 0 deletions

View File

@@ -305,6 +305,7 @@ extern const AVFilter ff_vf_hwmap;
extern const AVFilter ff_vf_hwupload;
extern const AVFilter ff_vf_hwupload_cuda;
extern const AVFilter ff_vf_hysteresis;
extern const AVFilter ff_vf_iccdetect;
extern const AVFilter ff_vf_iccgen;
extern const AVFilter ff_vf_identity;
extern const AVFilter ff_vf_idet;