Mercurial > hg > dmlib
diff tools/lib64fmts.c @ 1661:dc3fbd130db7
RLE analyze was ran before setting up the compression config. Oops. Fixed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 30 May 2018 17:10:24 +0300 |
parents | 7555c8803529 |
children | 34d7c708649e |
line wrap: on
line diff
--- a/tools/lib64fmts.c Wed May 30 17:05:19 2018 +0300 +++ b/tools/lib64fmts.c Wed May 30 17:10:24 2018 +0300 @@ -139,12 +139,13 @@ goto out; // Analyze and setup RLE - dmGenericRLEAnalyze(tmp.data, tmp.len, &cfg); cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMinCountB = 3; cfg.rleMaxCountB = 255; + dmGenericRLEAnalyze(tmp.data, tmp.len, &cfg); + // Add the header bits if (!dmGrowBufPut(buf, magicID, strlen(magicID)) || !dmGrowBufPutU8(buf, cfg.rleMarkerB)) @@ -588,12 +589,13 @@ goto out; // Analyze and setup RLE - dmGenericRLEAnalyze(tmp.data, tmp.len, &cfg); cfg.type = DM_COMP_RLE_MARKER; cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMinCountB = 3; cfg.rleMaxCountB = 255; + dmGenericRLEAnalyze(tmp.data, tmp.len, &cfg); + // Add the header bits if (!dmGrowBufPut(buf, fmtFunPaint2MagicID, strlen(fmtFunPaint2MagicID)) || !dmGrowBufPutU8(buf, cfg.rleMarkerB))