# HG changeset patch # User Matti Hamalainen # Date 1543947633 -7200 # Node ID d5ea82da40ab44ed7908821de23b01c44f0d9f76 # Parent 5b7f5505267c9be21b03d3a0f9f89574ed422509 Add some disabled BR1 encoder test code. diff -r 5b7f5505267c -r d5ea82da40ab tests/encbr1test.c --- 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