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 D204540707 for ; Wed, 29 Jun 2022 10:13:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A620668B6FB; Wed, 29 Jun 2022 13:13:06 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9202C68B6A0 for ; Wed, 29 Jun 2022 13:12:58 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 4D89B4A7EB; Wed, 29 Jun 2022 12:12:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1656497578; bh=piXmwqSCDE0/pOS0s5u5bHu09a4hNKR8T94bx4HEGgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P+Ws/+1l69BUqz1AUJgDuakAntpKaHJ8tzUKo4WzBxqGqS/oC7XIp5HWPtheh7lqQ WljwO8J1xAOsl71lxWG9A5zGFOIEvp1k/3OABtYujzmSc3k+VWEKfmBZreBPSSZ/0J RHsHaQaYvRqf2yv1FWdQhCABFyfofWdLwS9qyJPc= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Wed, 29 Jun 2022 12:12:48 +0200 Message-Id: <20220629101251.13236-4-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220629101251.13236-1-ffmpeg@haasn.xyz> References: <20220629101251.13236-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [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: 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; + /** * Number of slices. * Indicates number of picture subdivisions. Used for parallelized diff --git a/libavcodec/version.h b/libavcodec/version.h index 0ef6c991f3..1008fead27 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include "version_major.h" -#define LIBAVCODEC_VERSION_MINOR 34 +#define LIBAVCODEC_VERSION_MINOR 35 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ -- 2.36.1 _______________________________________________ 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".