[FFmpeg-devel] [RFC] allow setting png compression level, coder_type misuse?
Sat Oct 6 23:05:59 CEST 2007
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?
-------------- next part --------------
--- libavcodec/pngenc.c (revision 10668)
+++ libavcodec/pngenc.c (working copy)
@@ -187,7 +187,7 @@
s->zstream.zalloc = ff_png_zalloc;
s->zstream.zfree = ff_png_zfree;
s->zstream.opaque = NULL;
- ret = deflateInit2(&s->zstream, Z_DEFAULT_COMPRESSION,
+ ret = deflateInit2(&s->zstream, avctx->coder_type,
Z_DEFLATED, 15, 8, Z_DEFAULT_STRATEGY);
if (ret != Z_OK)
More information about the ffmpeg-devel