Mercurial > hg > dmlib
comparison tools/gfxconv.c @ 1891:91b80990043c
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 25 Jun 2018 17:56:35 +0300 |
parents | ee95059b4c18 |
children | 334501b6cce5 |
comparison
equal
deleted
inserted
replaced
1890:ee95059b4c18 | 1891:91b80990043c |
---|---|
1105 | 1105 |
1106 int dmConvertC64Bitmap(DMC64Image **pdst, const DMC64Image *src, | 1106 int dmConvertC64Bitmap(DMC64Image **pdst, const DMC64Image *src, |
1107 const DMC64ImageFormat *dstFmt, const DMC64ImageFormat *srcFmt) | 1107 const DMC64ImageFormat *dstFmt, const DMC64ImageFormat *srcFmt) |
1108 { | 1108 { |
1109 DMC64Image *dst; | 1109 DMC64Image *dst; |
1110 DMC64MemBlock *srcBlk = NULL, *dstBlk = NULL; | |
1111 const char *blkname = NULL; | |
1110 | 1112 |
1111 if (pdst == NULL || dstFmt == NULL || src == NULL || srcFmt == NULL) | 1113 if (pdst == NULL || dstFmt == NULL || src == NULL || srcFmt == NULL) |
1112 return DMERR_NULLPTR; | 1114 return DMERR_NULLPTR; |
1113 | 1115 |
1114 // Allocate the destination image | 1116 // Allocate the destination image |
1141 | 1143 |
1142 // Do per opcode copies | 1144 // Do per opcode copies |
1143 for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++) | 1145 for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++) |
1144 { | 1146 { |
1145 const DMC64EncDecOp *op = fmtGetEncDecOp(dstFmt, i); | 1147 const DMC64EncDecOp *op = fmtGetEncDecOp(dstFmt, i); |
1146 DMC64MemBlock *srcBlk = NULL, *dstBlk = NULL; | |
1147 const char *blkname = NULL; | |
1148 size_t size; | 1148 size_t size; |
1149 | 1149 |
1150 if (op->type == DO_LAST) | 1150 if (op->type == DO_LAST) |
1151 break; | 1151 break; |
1152 | 1152 |
1348 spec->planar ? "planar/interleaved" : "non-interleaved"); | 1348 spec->planar ? "planar/interleaved" : "non-interleaved"); |
1349 dmMsg(2, "%s datafile '%s', ID prefix '%s'.\n", | 1349 dmMsg(2, "%s datafile '%s', ID prefix '%s'.\n", |
1350 fmt->fmtid == DM_IMGFMT_ARAW ? "ARAW" : "RAW", | 1350 fmt->fmtid == DM_IMGFMT_ARAW ? "ARAW" : "RAW", |
1351 hdrFilename, prefix); | 1351 hdrFilename, prefix); |
1352 } | 1352 } |
1353 | |
1353 res = dmWriteIFFMasterRAWHeaderFile( | 1354 res = dmWriteIFFMasterRAWHeaderFile( |
1354 hdrFilename, filename, prefix, image, spec, fmt->fmtid); | 1355 hdrFilename, filename, prefix, image, spec, fmt->fmtid); |
1355 | 1356 |
1356 dmFree(prefix); | 1357 dmFree(prefix); |
1357 dmFree(hdrFilename); | 1358 dmFree(hdrFilename); |