changeset 4440:b80ad08b0f68 libavcodec

Add code to testcode to ease comparing with liblzo.
author reimar
date Wed, 31 Jan 2007 09:37:02 +0000
parents 3af19e140d67
children fdb91110889b
files lzo.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lzo.c	Wed Jan 31 00:34:56 2007 +0000
+++ b/lzo.c	Wed Jan 31 09:37:02 2007 +0000
@@ -255,7 +255,13 @@
     for (i = 0; i < 300; i++) {
 START_TIMER
         inlen = clen; outlen = MAXSZ;
+#ifdef LIBLZO
+        if (lzo1x_decompress_safe(comp, inlen, decomp, &outlen, NULL))
+#elif defined(LIBLZO_UNSAFE)
+        if (lzo1x_decompress(comp, inlen, decomp, &outlen, NULL))
+#else
         if (lzo1x_decode(decomp, &outlen, comp, &inlen))
+#endif
             av_log(NULL, AV_LOG_ERROR, "decompression error\n");
 STOP_TIMER("lzod")
     }