2020-01-21 21:50:13 +01:00
|
|
|
#include "huffmanstream.h"
|
|
|
|
|
2021-04-10 15:27:40 +02:00
|
|
|
using namespace IMG;
|
|
|
|
|
2021-11-04 23:01:33 +01:00
|
|
|
bool HuffmanDeltaStreamF::init(bool line)
|
2020-01-21 21:50:13 +01:00
|
|
|
{
|
|
|
|
if (line) {
|
|
|
|
if (!(sign(_lonSign) && sign(_latSign)))
|
2020-06-27 22:46:26 +02:00
|
|
|
return false;
|
2020-01-21 21:50:13 +01:00
|
|
|
} else {
|
|
|
|
_lonSign = 0;
|
|
|
|
_latSign = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
quint32 eb;
|
2021-11-04 23:01:33 +01:00
|
|
|
if (!read(1, eb))
|
2020-06-27 22:46:26 +02:00
|
|
|
return false;
|
2020-09-29 22:03:26 +02:00
|
|
|
|
|
|
|
Q_ASSERT(!eb);
|
|
|
|
if (eb)
|
2020-01-21 21:50:13 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2021-11-04 23:01:33 +01:00
|
|
|
bool HuffmanDeltaStreamR::init()
|
2020-01-21 21:50:13 +01:00
|
|
|
{
|
2020-06-27 22:46:26 +02:00
|
|
|
if (!(sign(_lonSign) && sign(_latSign)))
|
2020-02-02 09:03:35 +01:00
|
|
|
return false;
|
2020-01-21 21:50:13 +01:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2020-09-18 20:56:00 +02:00
|
|
|
|
2021-11-04 23:01:33 +01:00
|
|
|
bool HuffmanDeltaStreamR::init(quint32 data, quint32 dataSize)
|
2020-09-18 20:56:00 +02:00
|
|
|
{
|
|
|
|
_symbolData = data;
|
|
|
|
_symbolDataSize = dataSize;
|
|
|
|
|
2021-11-04 23:01:33 +01:00
|
|
|
if (!(sign(_lonSign) && sign(_latSign)))
|
|
|
|
return false;
|
|
|
|
|
2020-09-18 20:56:00 +02:00
|
|
|
return true;
|
|
|
|
}
|