From: Soft Works <softworkz@hotmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: "Clément Bœsch" <u@pkh.me> Subject: Re: [FFmpeg-devel] [PATCH] Revert "avfilter/vf_palette(gen|use): support palettes with alpha" Date: Mon, 31 Oct 2022 20:41:30 +0000 Message-ID: <DM8P223MB036510F5B0583D55D439E955BA379@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM> (raw) In-Reply-To: <Y2AZMJa+SYGt5Z6v@ssq0.pkh.me> > -----Original Message----- > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of > Clément Bœsch > Sent: Monday, October 31, 2022 7:51 PM > To: FFmpeg development discussions and patches <ffmpeg- > devel@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] Revert > "avfilter/vf_palette(gen|use): support palettes with alpha" > > On Mon, Oct 31, 2022 at 03:11:13PM +0000, Soft Works wrote: > [...] > > And pngquant doing the impossible as well: > > > > > Interestingly, pngquant which is supposed to have the best open > source > > > quantization algorithms > > Says who? That's the result of my research I did at that time. Feel free to do your own research. > https://github.com/ImageOptim/libimagequant/blob/a16c9ca66a24158496da > 02d86925cc0167831205/pam.h#L163-L182 > > > https://github.com/ImageOptim/libimagequant/blob/a16c9ca66a24158496da > 02d86925cc0167831205/mediancut.c#L29-L49 > > > https://github.com/ImageOptim/libimagequant/blob/a16c9ca66a24158496da > 02d86925cc0167831205/mediancut.c#L449-L476 > > > > I'd rather not look too much into that code. Do they mess up the > alpha > channel as well? When working on this, you should at least be familiar with the quality of results it provides, even when you don't want to look at the code. > > If you want to improve the way it works that's another story. > > > > But at this point, we're talking about removal. And I disagree to > that. > > You may disagree but: > - the option causes many transparency artifacts > - the option is fundamentally flawed and need to be rewritten > differently > - handling the alpha should be by default if such a feature was > existing > - the option is preventing improvements to the code > > I will send a patchset in the coming days, which depends on its > removal. > You'll be free to propose again a patch to support alpha quantization I'll take that as a joke.. > properly, but I'll ask for it to be reliable enough so that it's > enabled > by default. That's not acceptable either, because the filter may also be used to create animated GIFs where only a single palette entry may exist which indicates full transparency and all others are fully opaque. I don't want to be just negative and rejective and I'm really welcoming patches that provide improvement. But I think that a prerequisite for working on this subject is to be familiar with state-of-the art implementations of image color quantization. The best implementations I'm aware of can be found in PhotoShop (closed source) and pngquant (open source). The quantization that vf_elbg (with use_alpha) does get very close to the aforementioned, but it comes at the price of relatively high computational cost. If you would come up with an implementation for palettegen/-use that provides comparable results in an efficient way like pngquant, that would be really awesome! > but I'll ask for it to be reliable enough so that it's I'll ask for your patch to support alpha in the same optional way like it is supported right now. (actually something that should go without saying) Best regards, softworkz _______________________________________________ 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-10-31 20:41 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-30 17:58 Clément Bœsch 2022-10-30 21:19 ` Soft Works 2022-10-30 21:30 ` Clément Bœsch 2022-10-30 21:37 ` Clément Bœsch 2022-10-30 21:41 ` Soft Works 2022-10-30 22:55 ` Soft Works 2022-10-31 0:29 ` Clément Bœsch 2022-10-31 1:43 ` Soft Works 2022-10-31 10:57 ` Clément Bœsch 2022-10-31 11:58 ` Paul B Mahol 2022-10-31 12:41 ` Clément Bœsch 2022-10-31 15:11 ` Soft Works 2022-10-31 18:51 ` Clément Bœsch 2022-10-31 20:41 ` Soft Works [this message] 2022-10-31 21:58 ` Michael Niedermayer 2022-10-31 23:34 ` Soft Works 2022-11-01 10:18 ` Clément Bœsch 2022-10-31 2:09 ` Soft Works
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=DM8P223MB036510F5B0583D55D439E955BA379@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM \ --to=softworkz@hotmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=u@pkh.me \ /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