mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Code cleanup
This commit is contained in:
parent
7167fe3e81
commit
92bd37c481
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
using namespace IMG;
|
using namespace IMG;
|
||||||
|
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
|
||||||
|
|
||||||
static const quint8 Z[] = {
|
static const quint8 Z[] = {
|
||||||
8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
|
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,
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
|
||||||
@ -28,8 +26,8 @@ JLS::JLS(quint16 maxval, quint16 near)
|
|||||||
|
|
||||||
_range = ((_maxval + _near * 2) / (_near * 2 + 1)) + 1;
|
_range = ((_maxval + _near * 2) / (_near * 2 + 1)) + 1;
|
||||||
_qbpp = ceil(log2(_range));
|
_qbpp = ceil(log2(_range));
|
||||||
quint8 bpp = max(2, ceil(log2(_maxval + 1)));
|
quint8 bpp = qMax(2, qCeil(log2(_maxval + 1)));
|
||||||
quint8 LIMIT = 2 * (bpp + max(8, bpp));
|
quint8 LIMIT = 2 * (bpp + qMax(8u, bpp));
|
||||||
_limit = LIMIT - _qbpp - 1;
|
_limit = LIMIT - _qbpp - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,7 +310,7 @@ bool JLS::decode(const SubFile *file, SubFile::Handle &hdl, Matrix<qint16> &img)
|
|||||||
_rg = 1;
|
_rg = 1;
|
||||||
_lrk = 0;
|
_lrk = 0;
|
||||||
|
|
||||||
quint16 A = max(2, (_range + 32) / 64);
|
quint16 A = qMax(2, (_range + 32) / 64);
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
_a[i] = A;
|
_a[i] = A;
|
||||||
_b[i] = 0;
|
_b[i] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user