Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Niklas Haas <git@haasn.dev>
Subject: Re: [FFmpeg-devel] [PATCH v2 3/6] avcodec: add API for automatic handling of icc profiles
Date: Wed, 06 Jul 2022 15:34:55 +0200
Message-ID: <165711449549.31466.6057377629914030474@lain.khirnov.net> (raw)
In-Reply-To: <20220629101251.13236-4-ffmpeg@haasn.xyz>

Quoting Niklas Haas (2022-06-29 12:12:48)
> From: Niklas Haas <git@haasn.dev>
> 
> 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 <git@haasn.dev>
> ---
>  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".

  reply	other threads:[~2022-07-06 13:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29 10:12 [FFmpeg-devel] [PATCH v2 0/6] ICC profile support in avcodec Niklas Haas
2022-06-29 10:12 ` [FFmpeg-devel] [PATCH v2 1/6] fflcms2: move to libavcodec Niklas Haas
2022-07-06 14:18   ` Andreas Rheinhardt
2022-07-12 12:09     ` Niklas Haas
2022-06-29 10:12 ` [FFmpeg-devel] [PATCH v2 2/6] avcodec/codec_internal: add cap for ICC profile support Niklas Haas
2022-06-29 10:12 ` [FFmpeg-devel] [PATCH v2 3/6] avcodec: add API for automatic handling of icc profiles Niklas Haas
2022-07-06 13:34   ` Anton Khirnov [this message]
2022-06-29 10:12 ` [FFmpeg-devel] [PATCH v2 4/6] avcodec: add common fflcms2 boilerplate Niklas Haas
2022-06-29 10:12 ` [FFmpeg-devel] [PATCH v2 5/6] avcodec/decode: parse ICC profiles Niklas Haas
2022-06-29 10:12 ` [FFmpeg-devel] [PATCH v2 6/6] avcodec/encode:: generate " Niklas Haas
2022-07-06 13:35   ` Anton Khirnov
2022-07-19 12:18     ` Niklas Haas
2022-07-02 21:05 ` [FFmpeg-devel] [PATCH v2 0/6] ICC profile support in avcodec Niklas Haas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165711449549.31466.6057377629914030474@lain.khirnov.net \
    --to=anton@khirnov.net \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=git@haasn.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git