From: Leo Izen <leo.izen@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v4] avcodec/pngdec: read colorspace info when decoding with AVDISCARD_ALL
Date: Mon, 11 Dec 2023 06:54:32 -0500
Message-ID: <df44e0e8-b970-4923-ad94-c52780d8d989@gmail.com> (raw)
In-Reply-To: <CABPLASRV+LFjEVQRUk1jA231JE9mb2sMsujGBxrhKfr9pyfDqg@mail.gmail.com>
On 12/10/23 23:20, Kacper Michajlow wrote:
> On Tue, 28 Feb 2023 at 20:46, Leo Izen <leo.izen@gmail.com> wrote:
>>
>> On 2/27/23 11:34, Leo Izen wrote:
>>> On 2/21/23 17:35, Leo Izen wrote:
>>>> These chunks are lightweight and it's useful information to have when
>>>> running ffmpeg -i or ffprobe, for example.
>>>> ---
>>>> libavcodec/pngdec.c | 136 ++++++++++++++++++++++-------------
>>>> tests/ref/fate/png-icc | 8 +--
>>>> tests/ref/fate/png-side-data | 2 +-
>>>> 3 files changed, 91 insertions(+), 55 deletions(-)
>>>>
>>>> diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
>>>
>>> I will push this soon-ish if there's no other objections.
>>>
>>> - Leo Izen (thebombzen)
>>>
>>>
>>
>> Pushed as fadfa147f812a3fe9e68723347d37b9cccd6222d.
>
> Hi, Sorry for digging this old patch, but I'm curious.
>
> What does "unsupported tv-range cICP chunk\n" and "we only support
> pc-range RGB" mean?
>
> Before this patch the range was properly set:
> avctx->color_range = f->color_range =
> s->cicp_range == 0 ? AVCOL_RANGE_MPEG : AVCOL_RANGE_JPEG;
>
> Now it is ignored with a warning. Neither commit message, nor the
> comments in the code explain why the cICP range is now ignored in the
> decoder and the frames are no longer tagged with proper color range.
>
It means FFmpeg itself doesn't support tv-range RGB. The PNG format
supports it but FFmpeg does not. Since the PNG spec specifies the matrix
must equal zero (aka RGB), we can't support tv-range here and print a
warning.
- Leo Izen (Traneptora)
_______________________________________________
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".
prev parent reply other threads:[~2023-12-11 11:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 22:35 Leo Izen
2023-02-22 1:42 ` Ronald S. Bultje
2023-02-22 13:49 ` Leo Izen
2023-02-22 16:32 ` Ronald S. Bultje
2023-02-27 16:34 ` Leo Izen
2023-02-28 19:46 ` Leo Izen
2023-12-11 4:20 ` Kacper Michajlow
2023-12-11 11:54 ` Leo Izen [this message]
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=df44e0e8-b970-4923-ad94-c52780d8d989@gmail.com \
--to=leo.izen@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/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