Skip to content

Commit

Permalink
Flatbuffers: allow alt. name (flat_lut_lin_tables.3d) and to load com…
Browse files Browse the repository at this point in the history
…pact LUT table (size of 50331648 bytes)

We don't need second and third internal LUT table for other color-spaces so the LUT file can be truncated.
flat_lut_lin_tables.3d wont interfere with USB grabber lut_lin_tables.3d
  • Loading branch information
awawa-dev committed Mar 22, 2022
1 parent 65e49cd commit 464734c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sources/flatbufserver/FlatBufferServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,16 @@ QString FlatBufferServer::GetSharedLut()
// color should always be RGB24 for flatbuffers
void FlatBufferServer::loadLutFile()
{
QString fileName01 = QString("%1%2").arg(_configurationPath).arg("/flat_lut_lin_tables.3d");
QString fileName02 = QString("%1%2").arg(GetSharedLut()).arg("/flat_lut_lin_tables.3d");
QString fileName1 = QString("%1%2").arg(_configurationPath).arg("/lut_lin_tables.3d");
QString fileName2 = QString("%1%2").arg(GetSharedLut()).arg("/lut_lin_tables.3d");
QList<QString> files({ fileName1, fileName2 });
QList<QString> files({ fileName01, fileName02, fileName1, fileName2 });

#ifdef __linux__
QString fileName03 = QString("/usr/share/hyperhdr/lut/flat_lut_lin_tables.3d");
QString fileName3 = QString("/usr/share/hyperhdr/lut/lut_lin_tables.3d");
files.append(fileName03);
files.append(fileName3);
#endif

Expand All @@ -213,7 +217,7 @@ void FlatBufferServer::loadLutFile()

length = file.size();

if (length == LUT_FILE_SIZE * 3)
if (length == LUT_FILE_SIZE * 3 || length == LUT_FILE_SIZE)
{
qint64 index = 0; // RGB24

Expand Down

0 comments on commit 464734c

Please sign in to comment.