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

Compare commits

..

No commits in common. "c4b85ef49351f05083ac4aad50dbf83083ca8c6e" and "09d0b281c23322a828b57295419d44371eedef35" have entirely different histories.

3 changed files with 14 additions and 16 deletions

View File

@ -18,7 +18,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v3
- name: Install dependencies - name: Install dependencies
run: | run: |
@ -26,7 +26,7 @@ jobs:
sudo apt-get install qtbase5-dev qtbase5-private-dev qtbase5-dev-tools qt5-qmake qttools5-dev-tools libqt5opengl5-dev qtpositioning5-dev libqt5svg5-dev libqt5serialport5-dev sudo apt-get install qtbase5-dev qtbase5-private-dev qtbase5-dev-tools qt5-qmake qttools5-dev-tools libqt5opengl5-dev qtpositioning5-dev libqt5svg5-dev libqt5serialport5-dev
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a config file.
@ -37,9 +37,9 @@ jobs:
# queries: security-extended,security-and-quality # queries: security-extended,security-and-quality
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v3 uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 uses: github/codeql-action/analyze@v2
with: with:
category: "/language:${{matrix.language}}" category: "/language:${{matrix.language}}"

View File

@ -16,15 +16,15 @@ static const quint8 Z[] = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
}; };
static const quint8 J[] = { static const int J[] = {
0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15
}; };
JLS::JLS(quint16 maxval, quint16 near) JLS::JLS(quint16 diff, quint16 factor)
{ {
_maxval = maxval; _maxval = diff;
_near = near; _near = factor;
_range = ((_maxval + _near * 2) / (_near * 2 + 1)) + 1; _range = ((_maxval + _near * 2) / (_near * 2 + 1)) + 1;
_qbpp = ceil(log2(_range)); _qbpp = ceil(log2(_range));
@ -189,18 +189,16 @@ bool JLS::readLine(BitStream &bs)
else else
_b[1] = -((1 - _b[1]) >> 1); _b[1] = -((1 - _b[1]) >> 1);
_n[1] = 0x21; _n[1] = 0x21;
} else } else {
_n[1] = _n[1] + 1; _n[1] = _n[1] + 1;
}
if (_b[1] <= -_n[1]) { if (_b[1] <= -_n[1]) {
_b[1] = _b[1] + _n[1]; _b[1] = _b[1] + _n[1];
if (_b[1] <= -_n[1]) if (_b[1] <= -_n[1])
_b[1] = 1 - _n[1]; _b[1] = 1 - _n[1];
} else if (_b[1] > 0) { } else if (_b[1] > 0)
_b[1] = _b[1] - _n[1]; _b[1] = ((_b[1] - _n[1]) >> 0xf) & (_b[1] - _n[1]);
if (_b[1] > 0)
_b[1] = 0;
}
Rc = Rb; Rc = Rb;
Rb = _last[col + 1]; Rb = _last[col + 1];

View File

@ -2,15 +2,15 @@
#define IMG_JLS_H #define IMG_JLS_H
#include <QVector> #include <QVector>
#include "bitstream.h"
#include "map/matrix.h" #include "map/matrix.h"
#include "subfile.h"
namespace IMG { namespace IMG {
class JLS class JLS
{ {
public: public:
JLS(quint16 maxval, quint16 near); JLS(quint16 diff, quint16 factor);
bool decode(const SubFile *file, SubFile::Handle &hdl, Matrix<qint16> &img); bool decode(const SubFile *file, SubFile::Handle &hdl, Matrix<qint16> &img);