1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-20 09:40:49 +01:00

Compare commits

..

No commits in common. "0d44663570e1ddcc796304d64fcafb14a67c2f74" and "7167fe3e81a7e8e83b36048aec557c0f37edb2d7" have entirely different histories.

View File

@ -3,6 +3,8 @@
using namespace IMG;
#define max(a, b) ((a) > (b) ? (a) : (b))
static const quint8 Z[] = {
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
@ -25,9 +27,9 @@ JLS::JLS(quint16 maxval, quint16 near)
_near = near;
_range = ((_maxval + _near * 2) / (_near * 2 + 1)) + 1;
_qbpp = qCeil(log2(_range));
quint8 bpp = qMax(2, qCeil(log2(_maxval + 1)));
quint8 LIMIT = 2 * (bpp + qMax(8u, bpp));
_qbpp = ceil(log2(_range));
quint8 bpp = max(2, ceil(log2(_maxval + 1)));
quint8 LIMIT = 2 * (bpp + max(8, bpp));
_limit = LIMIT - _qbpp - 1;
}
@ -310,7 +312,7 @@ bool JLS::decode(const SubFile *file, SubFile::Handle &hdl, Matrix<qint16> &img)
_rg = 1;
_lrk = 0;
quint16 A = qMax(2, (_range + 32) / 64);
quint16 A = max(2, (_range + 32) / 64);
for (int i = 0; i < 4; i++) {
_a[i] = A;
_b[i] = 0;