Mercurial > hg > dmlib
diff tools/lib64gfx.h @ 2606:92909caccc9e
Rename various compression related internal constants.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 25 Nov 2023 15:56:18 +0200 |
parents | f2fffa7b9137 |
children | 8315e713c35e |
line wrap: on
line diff
--- a/tools/lib64gfx.h Sat Nov 25 06:06:18 2023 +0200 +++ b/tools/lib64gfx.h Sat Nov 25 15:56:18 2023 +0200 @@ -324,35 +324,34 @@ } DMC64ImageFormat; -// // Compression types -// enum { - DM_COMP_RLE_MARKER = 1, // RLE with a separate marker byte - DM_COMP_RLE_MASK = 2, // RLE that has marker bits and lower part acts as run length + DM_COMP_TYPE_RLE_MARKER = 1, // RLE with a separate marker byte + DM_COMP_TYPE_RLE_MASK = 2, // RLE that has marker bits and lower part acts as run length }; // Compression flags enum { - DM_RLE_BYTE_RUNS = 0x0001, // Uses one-byte run lengths - DM_RLE_WORD_RUNS = 0x0002, // Uses two-byte (word) run lengths - DM_RLE_RUNS_MASK = 0x000f, + DM_COMP_RLE_BYTE_RUNS = 0x000010, // Uses one-byte run lengths + DM_COMP_RLE_WORD_RUNS = 0x000020, // Uses two-byte (word) run lengths + DM_COMP_RLE_RUNS_MASK = 0x0000f0, - DM_RLE_ORDER_1 = 0x0010, // Order: <marker>, <count/run length>, <data> - DM_RLE_ORDER_2 = 0x0020, // Order: <marker>, <data>, <count/run length> - DM_RLE_ORDER_MASK = 0x00f0, + DM_COMP_RLE_ORDER_1 = 0x000100, // Order: <marker>, <count/run length>, <data> + DM_COMP_RLE_ORDER_2 = 0x000200, // Order: <marker>, <data>, <count/run length> + DM_COMP_RLE_ORDER_MASK = 0x000f00, - DM_RLE_BACKWARDS_INPUT = 0x0100, // Input is read backwards - DM_RLE_BACKWARDS_OUTPUT = 0x0200, // Output is written backwards - DM_RLE_ZERO_COUNT_MAX = 0x0400, // Zero "count" / run length value is max run (2^8, 2^16) + DM_COMP_RLE_ZERO_COUNT_MAX = 0x001000, // Zero "count" / run length value is max run (2^8, 2^16) + + DM_COMP_INPUT_BACKWARDS = 0x010000, // Input stream is read backwards + DM_COMP_OUTPUT_BACKWARDS = 0x020000, // Output stream is written backwards - DM_OUT_CROP_NONE = 0x0000, - DM_OUT_CROP_START = 0x1000, - DM_OUT_CROP_END = 0x2000, - DM_OUT_CROP_MASK = 0xf000, + DM_COMP_OUTPUT_CROP_NONE = 0x000000, + DM_COMP_OUTPUT_CROP_START = 0x100000, + DM_COMP_OUTPUT_CROP_END = 0x200000, + DM_COMP_OUTPUT_CROP_MASK = 0xf00000, }; @@ -360,15 +359,15 @@ { char *func; size_t cropOutLen; - int type; // DM_COMP_* - int flags; // + int type; // Compression type DM_COMP_ + int flags; // Compression flags Uint8 - // DM_COMP_RLE_MARKER mode - rleMarkerB, // Marker byte for byte length runs (if DM_RLE_BYTE_RUNS used) - rleMarkerW, // Marker byte for word length runs (if DM_RLE_WORD_RUNS used) + // DM_COMP_TYPE_RLE_MARKER mode + rleMarkerB, // Marker byte for byte length runs (if DM_COMP_RLE_BYTE_RUNS used) + rleMarkerW, // Marker byte for word length runs (if DM_COMP_RLE_WORD_RUNS used) - // DM_COMP_RLE_MASK mode + // DM_COMP_TYPE_RLE_MASK mode rleMarkerBits, rleMarkerMask, // Mask bits for marker: data & rleMarkerMask == rleMarkerBits rleCountMask; // Mask bits for length: count = data & rleCountMask