Allow switch vector to span
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "Image/ExifBuilder.hpp"
|
||||
#include "Image/XmpBuilder.hpp"
|
||||
#include "Image/JpegWithTagsWriter.hpp"
|
||||
#include <array>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#if __has_include("turbojpeg.h")
|
||||
@@ -137,7 +138,7 @@ namespace OpenVulkano::AR
|
||||
colorWriter->AddFile(fileName.c_str(), outBuffer, size);
|
||||
if (jpgWriter) [[unlikely]]
|
||||
{
|
||||
jpgWriter->WriteImageData({ outBuffer, size }, false); // Keep open, livetime is managed outside
|
||||
jpgWriter->WriteImageData({ outBuffer, size }, false); // Keep open, lifetime is managed outside
|
||||
}
|
||||
}
|
||||
tjFree(outBuffer);
|
||||
@@ -150,7 +151,7 @@ namespace OpenVulkano::AR
|
||||
//BlockProfiler profile("Save AR Frame - Depth");
|
||||
if (!depthWriter || !confWriter) return;
|
||||
auto depthImg = arFrame->GetDepthImage();
|
||||
std::vector<std::pair<const void*, size_t>> buffers(2);
|
||||
std::array<std::pair<const void*, size_t>, 2> buffers;
|
||||
{ // TODO handle alternative depth formats!!!!
|
||||
//BlockProfiler profile("Save AR Frame - Depth");
|
||||
PfmHeader depthHeader(static_cast<uint32_t>(depthImg.depth.resolution.x), static_cast<uint32_t>(depthImg.depth.resolution.y), 5.0f, false);
|
||||
|
||||
Reference in New Issue
Block a user