Mercurial > hg > dmlib
comparison tests/encbr1test.c @ 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 | c67d863384a5 |
children | 8cd012260976 |
comparison
equal
deleted
inserted
replaced
2059:5b7f5505267c | 2060:d5ea82da40ab |
---|---|
187 | 187 |
188 #ifdef BR_WRITE | 188 #ifdef BR_WRITE |
189 dmf_open_stdio_stream(stderr, &fp); | 189 dmf_open_stdio_stream(stderr, &fp); |
190 #endif | 190 #endif |
191 | 191 |
192 #if 1 | |
192 static const Uint8 test[] = | 193 static const Uint8 test[] = |
193 { | 194 { |
194 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, | 195 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, |
195 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, | 196 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, |
196 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, | 197 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, |
228 | 229 |
229 dmIFFEncodeByteRun1Row(fp, test, sizeof(test)); | 230 dmIFFEncodeByteRun1Row(fp, test, sizeof(test)); |
230 printf("\n--\n"); | 231 printf("\n--\n"); |
231 } | 232 } |
232 | 233 |
234 #else | |
235 | |
236 #if 1 | |
237 # include "TEST03.cdump" | |
238 #else | |
239 # include "BABYFACE.cdump" | |
240 # undef SET_WIDTH | |
241 # define SET_WIDTH 80 | |
242 #endif | |
243 | |
244 printf("DATA = %" DM_PRIu_SIZE_T "\n", sizeof(img_data)); | |
245 for (int yc = 0; yc < sizeof(img_data) / SET_WIDTH; yc++) | |
246 { | |
247 Uint8 *nptr = img_data + (yc * SET_WIDTH); | |
248 int cnt = 0; | |
249 | |
250 printf("#%03d\n", yc); | |
251 for (int xc = 0; xc < SET_WIDTH; xc++) | |
252 { | |
253 if (cnt == 0) printf("%04x | ", xc); | |
254 printf("%02x ", *(nptr + xc)); | |
255 if (cnt++ >= 15) { printf("\n"); cnt = 0; } | |
256 } | |
257 printf("\n\n"); | |
258 | |
259 dmIFFEncodeByteRun1Row(fp, nptr, SET_WIDTH); | |
260 printf("\n--\n"); | |
261 } | |
262 #endif | |
263 | |
233 #ifdef BR_WRITE | 264 #ifdef BR_WRITE |
234 dmf_close(fp); | 265 dmf_close(fp); |
235 #endif | 266 #endif |
236 | 267 |
237 return 0; | 268 return 0; |