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 1E613437AE for ; Tue, 28 Jun 2022 13:42:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F1FFC68B97D; Tue, 28 Jun 2022 16:42:24 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2349F68B912 for ; Tue, 28 Jun 2022 16:42:17 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id DB4EE4A5E5; Tue, 28 Jun 2022 15:42:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1656423736; bh=piXmwqSCDE0/pOS0s5u5bHu09a4hNKR8T94bx4HEGgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=la823KNfNVt7bn7qXh0+cvc7NkvRNQRv89fIVSBZoChZR1VSii2i7tBOuFl6RVn8O LtGy6C8JqKGQWz2rj5fB+x8/q1HqnNiAly4zI1vseQOUo0lwJu4bqKpWIzMqTcEUDY Mi9z+5n7G8hwkfLDWNrciARw7eCqITyBXGVRM6og= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Tue, 28 Jun 2022 15:41:08 +0200 Message-Id: <20220628134110.87770-4-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220628134110.87770-1-ffmpeg@haasn.xyz> References: <20220628134110.87770-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 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".