[vlc-commits] png: reduce encoding time

Tristan Matthews git at videolan.org
Sun May 10 22:55:12 CEST 2015


vlc/vlc-2.2 | branch: master | Tristan Matthews <tmatth at videolan.org> | Tue May  5 20:41:24 2015 -0400| [151c579117a22473b0981e0661c7e6ba7206b842] | committer: Jean-Baptiste Kempf

png: reduce encoding time

(cherry picked from commit f71713fb624d510b88b8dda460fa927bc7c079e1)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=151c579117a22473b0981e0661c7e6ba7206b842
---

 modules/codec/png.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/codec/png.c b/modules/codec/png.c
index 33f7515..36ed444 100644
--- a/modules/codec/png.c
+++ b/modules/codec/png.c
@@ -372,6 +372,11 @@ static block_t *EncodeBlock(encoder_t *p_enc, picture_t *p_pic)
         return NULL;
     }
 
+    /* Disable filtering to speed-up encoding */
+    png_set_filter( p_png, 0, PNG_NO_FILTERS );
+    /* 1 == best speed */
+    png_set_compression_level( p_png, 1 );
+
     /* save buffer start */
     uint8_t *p_start = p_block->p_buffer;
     size_t i_start = p_block->i_buffer;



More information about the vlc-commits mailing list