Reduce jpg quality for AR recordings

This commit is contained in:
Georg Hagen
2024-10-18 00:11:11 +02:00
parent 97a73d0cc4
commit f936597150

View File

@@ -26,6 +26,7 @@ namespace OpenVulkano::AR
namespace
{
constexpr std::string_view RECORDING_METADATA_FILENAME = "ArRecording.xml";
constexpr int JPEG_QUALITY = 85;
std::filesystem::path GeneratePath(const std::filesystem::path& baseDir, std::string_view name)
{
@@ -95,7 +96,7 @@ namespace OpenVulkano::AR
uint8_t* outBuffer = nullptr;
unsigned long size = 0;
if (tjCompressFromYUVPlanes(handle, buffers, resX, nullptr, resY, TJSAMP_420, &outBuffer, &size, 95, TJFLAG_FASTDCT)) [[unlikely]]
if (tjCompressFromYUVPlanes(handle, buffers, resX, nullptr, resY, TJSAMP_420, &outBuffer, &size, JPEG_QUALITY, TJFLAG_FASTDCT)) [[unlikely]]
Logger::AR->error("Failed to create JPEG! {}", tjGetErrorStr());
else [[likely]]
{