diff options
author | Niklas Haas <git@haasn.dev> | 2022-06-28 15:13:04 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2022-07-30 11:42:06 +0200 |
commit | c688ddc067e0d9ade731b3adb5c6fde259cbc5f6 (patch) | |
tree | bcd91c7df14d55ecebde29425ee1af4c6b0b509c /libavcodec/internal.h | |
parent | e1a0f2df3d8c150016bfa2f0dfde7d6b56c6bf3f (diff) |
avcodec: add common fflcms2 boilerplate
Handling this in general code makes more sense than handling it in
individual codec files, because it would be a lot of unnecessary code
duplication for the plenty of formats that support exporting ICC
profiles (jpg, png, tiff, webp, jxl, ...).
encode.c and decode.c will be in charge of initializing this state as
needed, so we merely need to make sure to uninit it afterwards from the
common destructor path.
Signed-off-by: Niklas Haas <git@haasn.dev>
Diffstat (limited to 'libavcodec/internal.h')
-rw-r--r-- | libavcodec/internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 6fb4e1b9af..8809a7079a 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -33,6 +33,10 @@ #include "avcodec.h" #include "config.h" +#if CONFIG_LCMS2 +# include "fflcms2.h" +#endif + #define FF_SANE_NB_CHANNELS 512U #if HAVE_SIMD_ALIGN_64 @@ -146,6 +150,10 @@ typedef struct AVCodecInternal { uint64_t initial_channel_layout; #endif AVChannelLayout initial_ch_layout; + +#if CONFIG_LCMS2 + FFIccContext icc; /* used to read and write embedded ICC profiles */ +#endif } AVCodecInternal; /** |