Re: [hatari-devel] [patch] AVI recording PNG compression level

[ Thread Index | Date Index | More Archives ]

Le 09/11/2014 16:56, Eero Tamminen a écrit :

Douglas commented that depending on (Falcon screen) content,
AVI recording performance can drastically change:

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 ?

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)

	- Eero

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

-> 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.


Mail converted by MHonArc 2.6.19+