summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2022-06-28 14:25:15 +0200
committerNiklas Haas <git@haasn.dev>2022-07-30 11:42:06 +0200
commit61ffa23c2e42887b32d469d9e69e9eb887b29e9c (patch)
tree623b89e032f132f05ac78654606e05e44d56454f /libavcodec/pngdec.c
parent1cbd4552fe3bcdc36b76304d11b883d061cc23ee (diff)
downloadffmpeg-61ffa23c2e42887b32d469d9e69e9eb887b29e9c.tar.gz
avcodec/codec_internal: add cap for ICC profile support
Codecs that can read/write ICC profiles deserve a special capability so the common logic in encode.c/decode.c can decide whether or not there needs to be any special handling for ICC profiles. The motivation here is to be able to use it to decide whether or not an ICC profile needs to be generated in the encode path, but it might as well get added to decoders as well for purely informative reasons. It's not entirely clear to me whether the "thp" and "smvjpeg" variants of "mjpeg" should have this capability set or not, given that the code technically supports it but I somehow doubt these files may contain them. In either case, this cap is purely informative for decoders so it doesn't matter too much either way. It's also not entirely clear whether the "amv" encoder should signal ICC profile support, but again erring on the side of caution, we probably *shouldn't* be generating (and encoding!) ICC profiles for this type of media file. Signed-off-by: Niklas Haas <git@haasn.dev>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 6e1214401d..3b888199d4 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1727,7 +1727,8 @@ const FFCodec ff_apng_decoder = {
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP |
- FF_CODEC_CAP_ALLOCATE_PROGRESS,
+ FF_CODEC_CAP_ALLOCATE_PROGRESS |
+ FF_CODEC_CAP_ICC_PROFILES,
};
#endif
@@ -1744,6 +1745,7 @@ const FFCodec ff_png_decoder = {
.update_thread_context = ONLY_IF_THREADS_ENABLED(update_thread_context),
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/,
.caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM |
- FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP,
+ FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP |
+ FF_CODEC_CAP_ICC_PROFILES,
};
#endif