From: Niklas Haas <ffmpeg@haasn.xyz>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/pngenc: support writing iCCP chunks
Date: Fri, 11 Mar 2022 14:37:20 +0100
Message-ID: <20220311143720.GC98298@haasn.xyz> (raw)
In-Reply-To: <AM7PR03MB6660DE23419DE359048AB3F78F0C9@AM7PR03MB6660.eurprd03.prod.outlook.com>
On Fri, 11 Mar 2022 12:18:13 +0100 Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote:
> 1. This is not how should work with an AVBPrint -- you are throwing the
> small-string optimization away here.
Noted, though consider: many ICC profiles used in practice are small
enough to fit inside the 1000 byte buffer. Especially the (absurdly
common) case of an embedded sRGB profile.
As an example, exporting a blank image in GIMP to PNG using the default
settings produces a file with a 388-byte deflate compressed iCCP chunk.
But I don't think this is performance critical enough to warrant
skipping the `malloc` call, and it's definitely to allocate once than
re-allocate in a loop.
> 2. Using an AVBPrint with its dynamic reallocations is probably not good
> here at all: It is easy to get a good upper bound via deflateBound()
> which allows to omit the reallocations/the loop. (I should probably have
> applied
This is a good idea. I didn't realize this existed. I'll switch to using
this function.
_______________________________________________
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:[~2022-03-11 13:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 10:14 [FFmpeg-devel] [PATCH] " Niklas Haas
2022-03-11 10:17 ` [FFmpeg-devel] [PATCH v2] " Niklas Haas
2022-03-11 10:21 ` Niklas Haas
2022-03-11 11:05 ` Andreas Rheinhardt
2022-03-11 13:11 ` Niklas Haas Haas
2022-03-11 11:18 ` Andreas Rheinhardt
2022-03-11 13:37 ` Niklas Haas [this message]
2022-03-12 11:10 ` Niklas Haas
2022-03-12 12:04 ` [FFmpeg-devel] [PATCH v3] " Niklas Haas
2022-03-15 6:44 ` Andreas Rheinhardt
2022-03-15 11:10 ` [FFmpeg-devel] [PATCH v4] " Niklas Haas
2022-03-15 11:34 ` [FFmpeg-devel] [PATCH v5] " 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=20220311143720.GC98298@haasn.xyz \
--to=ffmpeg@haasn.xyz \
--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