changeset 2060:d5ea82da40ab

Add some disabled BR1 encoder test code.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 04 Dec 2018 20:20:33 +0200
parents 5b7f5505267c
children 221a95caa91e
files tests/encbr1test.c
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/encbr1test.c	Tue Dec 04 19:22:56 2018 +0200
+++ b/tests/encbr1test.c	Tue Dec 04 20:20:33 2018 +0200
@@ -189,6 +189,7 @@
     dmf_open_stdio_stream(stderr, &fp);
 #endif
 
+#if 1
     static const Uint8 test[] =
     {
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -230,6 +231,36 @@
         printf("\n--\n");
     }
 
+#else
+
+#if 1
+#    include "TEST03.cdump"
+#else
+#    include "BABYFACE.cdump"
+#    undef SET_WIDTH
+#    define SET_WIDTH 80
+#endif
+
+    printf("DATA = %" DM_PRIu_SIZE_T "\n", sizeof(img_data));
+    for (int yc = 0; yc < sizeof(img_data) / SET_WIDTH; yc++)
+    {
+        Uint8 *nptr = img_data + (yc * SET_WIDTH);
+        int cnt = 0;
+
+        printf("#%03d\n", yc);
+        for (int xc = 0; xc < SET_WIDTH; xc++)
+        {
+            if (cnt == 0) printf("%04x | ", xc);
+            printf("%02x ", *(nptr + xc));
+            if (cnt++ >= 15) { printf("\n"); cnt = 0; }
+        }
+        printf("\n\n");
+
+        dmIFFEncodeByteRun1Row(fp, nptr, SET_WIDTH);
+        printf("\n--\n");
+    }
+#endif
+
 #ifdef BR_WRITE
     dmf_close(fp);
 #endif