[FFmpeg-devel] [PATCH] allow setting png compression level

Reimar Döffinger Reimar.Doeffinger
Sun Oct 7 11:35:23 CEST 2007


On Sun, Oct 07, 2007 at 11:15:54AM +0200, Benjamin Larsson wrote:
> Reimar D?ffinger wrote:
> > On Sat, Oct 06, 2007 at 11:42:30PM +0100, M?ns Rullg?rd wrote:
> >> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> >>> attached patch would allow setting png compression level via the
> >>> coder_type option. This might be considered a bit of a misuse, but I
> >>> personally find it preferable over adding a new option (and am not
> >>> completely sure if it is a misuse).
> >>> Other have suggested (mis-)using some other option like qscale or
> >>> md_decision but that seems like a complete misuse to me.
> >>> What are your opinions?
> >> What's wrong with the existing AVCodecContext.compression_level?
> > 
> > I didn't know about it (and assumed nothing exactly fitting existed
> > since it was not used).
> > So is attached patch ok?
> 
> Hi, why not always use the best compression ?

Because that's obviously slow? In most cases where I used PNG in the
past I used levels between 1-4, except the very few cases where the
generate pngs were actually for long-term storage. In which case it
might be a better idea to use pngcrush, it can still save quite a bit
against libpng, probably even more compared to our encoder.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list