From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 2/2] avcodec/pngenc: fix mDCv typo
Date: Tue, 2 Jul 2024 17:54:24 +0200
Message-ID: <GV1P250MB07372F4640D078CCD1FA8AE88FDC2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAPBf_O=1DL3pL2uruTFb8R8B1GWpE-eNZSTDprxOPYjVvMRMpQ@mail.gmail.com>
Sean McGovern:
> Hi Andreas,
>
>
> On Tue, Jul 2, 2024, 11:48 Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> wrote:
>
>> Sean McGovern:
>>> Hi Leo,
>>>
>>>
>>> On Tue, Jul 2, 2024, 09:44 Leo Izen <leo.izen@gmail.com> wrote:
>>>
>>>> When mDCv support was added, there was a typo in both variable names
>>>> and also the MKTAG itself, incorrectly listing it as mDVc. The tag name
>>>> stands for Mastering Display Color Volume so mDCv is correct.
>>>>
>>>> Typo originally introduced in 78949041417caaef0c82b2b23d7defdd88aa2378.
>>>>
>>>> Signed-off-by: Leo Izen <leo.izen@gmail.com>
>>>> Reported-by: Ramiro Polla <ramiro.polla@gmail.com>
>>>> ---
>>>> libavcodec/pngenc.c | 18 +++++++++---------
>>>> 1 file changed, 9 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
>>>> index 89c3d5b83e..7ae16fa2c5 100644
>>>> --- a/libavcodec/pngenc.c
>>>> +++ b/libavcodec/pngenc.c
>>>> @@ -450,17 +450,17 @@ static int encode_headers(AVCodecContext *avctx,
>>>> const AVFrame *pict)
>>>>
>>>> side_data = av_frame_get_side_data(pict,
>>>> AV_FRAME_DATA_MASTERING_DISPLAY_METADATA);
>>>> if (side_data) {
>>>> - AVMasteringDisplayMetadata *mdvc = (AVMasteringDisplayMetadata
>> *)
>>>> side_data->data;
>>>> - if (mdvc->has_luminance && mdvc->has_primaries) {
>>>> + AVMasteringDisplayMetadata *mdcv = (AVMasteringDisplayMetadata
>> *)
>>>> side_data->data;
>>>> + if (mdcv->has_luminance && mdcv->has_primaries) {
>>>> for (int i = 0; i < 3; i++) {
>>>> - AV_WB16(s->buf + 2*i,
>>>> PNG_Q2D(mdvc->display_primaries[i][0], 50000));
>>>> - AV_WB16(s->buf + 2*i + 2,
>>>> PNG_Q2D(mdvc->display_primaries[i][1], 50000));
>>>> + AV_WB16(s->buf + 2*i,
>>>> PNG_Q2D(mdcv->display_primaries[i][0], 50000));
>>>> + AV_WB16(s->buf + 2*i + 2,
>>>> PNG_Q2D(mdcv->display_primaries[i][1], 50000));
>>>> }
>>>> - AV_WB16(s->buf + 12, PNG_Q2D(mdvc->white_point[0], 50000));
>>>> - AV_WB16(s->buf + 14, PNG_Q2D(mdvc->white_point[1], 50000));
>>>> - AV_WB32(s->buf + 16, PNG_Q2D(mdvc->max_luminance, 10000));
>>>> - AV_WB32(s->buf + 20, PNG_Q2D(mdvc->min_luminance, 10000));
>>>> - png_write_chunk(&s->bytestream, MKTAG('m', 'D', 'V', 'c'),
>>>> s->buf, 24);
>>>> + AV_WB16(s->buf + 12, PNG_Q2D(mdcv->white_point[0], 50000));
>>>> + AV_WB16(s->buf + 14, PNG_Q2D(mdcv->white_point[1], 50000));
>>>> + AV_WB32(s->buf + 16, PNG_Q2D(mdcv->max_luminance, 10000));
>>>> + AV_WB32(s->buf + 20, PNG_Q2D(mdcv->min_luminance, 10000));
>>>> + png_write_chunk(&s->bytestream, MKTAG('m', 'D', 'C', 'v'),
>>>> s->buf, 24);
>>>> }
>>>> }
>>>>
>>>> --
>>>> 2.45.2
>>>>
>>>> _______________________________________________
>>>> 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".
>>>>
>>>
>>> This did also land on the 7.0 branch so I assume it will get a backport
>> if
>>> approved?
>>>
>>
>> Why should it be backported? This patch has no user-facing consequences.
>>
>> - Andreas
>>
>> _______________________________________________
>> 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".
>>
>
> Even though it fixes the written tag in the call to png_write_chunk()?
>
Ok, I overlooked that tags. Ignore my above post.
- Andreas
_______________________________________________
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".
next prev parent reply other threads:[~2024-07-02 15:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 13:44 [FFmpeg-devel] [PATCH 1/2] avcodec/pngdec: " Leo Izen
2024-07-02 13:44 ` [FFmpeg-devel] [PATCH 2/2] avcodec/pngenc: " Leo Izen
2024-07-02 15:14 ` Sean McGovern
2024-07-02 15:48 ` Andreas Rheinhardt
2024-07-02 15:52 ` Sean McGovern
2024-07-02 15:54 ` Andreas Rheinhardt [this message]
2024-07-03 14:25 ` Leo Izen
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=GV1P250MB07372F4640D078CCD1FA8AE88FDC2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.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