|Re: [hatari-devel] [patch] AVI recording PNG compression level|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On sunnuntai 09 marraskuu 2014, Nicolas Pomarède wrote:
> Le 09/11/2014 16:56, Eero Tamminen a écrit :
> > Douglas commented that depending on (Falcon screen) content,
> > AVI recording performance can drastically change:
> > http://www.atari-forum.com/viewtopic.php?f=68&t=26775&p=261461#p261358
> > Attached is patch allowing to specify PNG compression
> > level from command line, in case someone wants to
> > experiment with it.
> > According to png.h header, levels 3-6 would offer nearly
> > same compression for PNGs as Hatari's default (9, highest),
> > but potentially with significantly lower CPU overhead.
> patch looks fine to me, but maybe the option could be "--avi-png-level"
> instead, in case we later add more codecs, each one could have its own
> compression's level parameter.
> Or --avi-codec could be <x>[,n] with x =png or bmp and n is an optional
> compression level ?
I changed the option name to "--png-level", updated documentation
and commited it.
> Also, you could apply the png compression to screenshots too maybe ? (or
> leave it to 9, as it's not that cpu intensive as recording a video)
Screenshotting happens only once so there's no problem in it using
highest compression level. The problem with AVI compression is
that it can make emulation unusably slow (= ruin your recording).
PS. I also fixed an issue of joysticks not being checked at startup,
which resulted in statusbar showing bogus joystick information.
First I had wondered for quite a while why joystick doesn't work
and why options GUI shows different values...
> > PS. When we were (nearly decade ago) testing different
> > image format libraries for ARM and optimizing them, JPG
> > compression and decompression were in general clearly faster
> > than PNG. PNG was better just in not losing details from
> > images with high contrast / few colors. C-code for JPG
> > handling was also much more natural fit for SIMD
> > optimizations.
> > -> Especially for recording Falcon hi-color demos,
> > JPG compression could be better fit than PNG.
> I'm more in favor of doing lossless compression in Hatari (bmp or png)
> and then leave it to external programs (ffmpeg or others) to further
> compress the resulting video.
> But if someone feels like adding jpg compression, why not, but we might
> end with many dependancies.