From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id B899043A44 for ; Wed, 6 Jul 2022 13:35:07 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8F97468BA6C; Wed, 6 Jul 2022 16:35:05 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C47EA68B8F7 for ; Wed, 6 Jul 2022 16:34:58 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 0F33A240179; Wed, 6 Jul 2022 15:34:58 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id lNm1pDFbMnOT; Wed, 6 Jul 2022 15:34:55 +0200 (CEST) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 4F0292400F5; Wed, 6 Jul 2022 15:34:55 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 80D3A1601B2; Wed, 6 Jul 2022 15:34:55 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20220629101251.13236-4-ffmpeg@haasn.xyz> References: <20220629101251.13236-1-ffmpeg@haasn.xyz> <20220629101251.13236-4-ffmpeg@haasn.xyz> Mail-Followup-To: FFmpeg development discussions and patches , Niklas Haas Date: Wed, 06 Jul 2022 15:34:55 +0200 Message-ID: <165711449549.31466.6057377629914030474@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH v2 3/6] avcodec: add API for automatic handling of icc profiles X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Quoting Niklas Haas (2022-06-29 12:12:48) > From: Niklas Haas > > This functionally already exists, but as pointed out in #9672 and #9673, > requiring users to manually include filters is clumsy, error-prone and > hard to use together with tools like ffplay. > > To streamline ICC profile support, add a new AVCodecContext option to > globally enable reading and writing ICC profiles, automatically, for all > appropriate media types. > > Note that this commit only includes the new API. The implementation is > split off to separate commits for readability. > > Signed-off-by: Niklas Haas > --- > doc/APIchanges | 4 ++++ > libavcodec/avcodec.h | 10 ++++++++++ > libavcodec/version.h | 2 +- > 3 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/doc/APIchanges b/doc/APIchanges > index 20b944933a..b8acf86352 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -14,6 +14,10 @@ libavutil: 2021-04-27 > > API changes, most recent first: > > +2022-06-28 - xxxxxxxxx - lavc 59.35.100 - avcodec.h > + Add the icc_profiles option to AVCodecContext, to enable automatic reading > + and writing of embedded ICC profiles in image files. > + > 2022-06-12 - xxxxxxxxxx - lavf 59.25.100 - avio.h > Add avio_vprintf(), similar to avio_printf() but allow to use it > from within a function taking a variable argument list as input. > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index 4dae23d06e..8ee9be22d0 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -979,6 +979,16 @@ typedef struct AVCodecContext { > */ > enum AVChromaLocation chroma_sample_location; > > + /** > + * Whether to decode/encode ICC profiles. If set, libavcodec will > + * generate/parse ICC profiles as appropriate for the type of file. No > + * effect on codecs which cannot contain embedded ICC profiles, or when > + * compiled without support for lcms2. > + * - encoding: Set by user > + * - decoding: Set by user > + */ > + int icc_profiles; This is an ABI break. You could also just add a new AV_CODEC_FLAG instead. Also, why should this not be enabled by default? -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".