From 464734cb7d27fdd2a490883920e28c5a0afb5ef0 Mon Sep 17 00:00:00 2001 From: Awawa Date: Tue, 22 Mar 2022 15:42:17 +0100 Subject: [PATCH] Flatbuffers: allow alt. name (flat_lut_lin_tables.3d) and to load compact 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 --- sources/flatbufserver/FlatBufferServer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sources/flatbufserver/FlatBufferServer.cpp b/sources/flatbufserver/FlatBufferServer.cpp index 2b4c1cdc3..758e9a93d 100644 --- a/sources/flatbufserver/FlatBufferServer.cpp +++ b/sources/flatbufserver/FlatBufferServer.cpp @@ -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 files({ fileName1, fileName2 }); + QList 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 @@ -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