GNOME Bugzilla – Bug 512544
preallocate output buffer in pngenc
Last modified: 2008-01-29 18:43:35 UTC
pngenc does (g_memdup() + memcpy() + gst_buffer_merge()) * image->height during encoding. The patch preallocates the output buffer so that g_memdup() and gst_buffer_merge() aren't needed anymore. This greatly improves performances.
Created attachment 103872 [details] [review] pre-allocate the output buffer
Patch by: Alessandro Decina <alessandro at nnva dot org> * ext/libpng/gstpngenc.c: (user_write_data), (gst_pngenc_chain): * ext/libpng/gstpngenc.h: Preallocate the output buffer so that g_memdup() and gst_buffer_merge() aren't needed anymore. This greatly improves performances and fixes #512544.