summaryrefslogtreecommitdiff
path: root/src/render/Renderer.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-03-15 15:23:11 -0500
committerVaxry <vaxry@vaxry.net>2026-03-15 15:23:21 -0500
commit902e8de7f0a8cf60ed175f63506d5644605a8e44 (patch)
treed6dc1540bcb5c54b92126b860d3b3e8c683b5a1c /src/render/Renderer.cpp
parent94bd4123c6e8fd3162e245b0d568c9d6dfd75780 (diff)
source: c-f for new clang version
Diffstat (limited to 'src/render/Renderer.cpp')
-rw-r--r--src/render/Renderer.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index ad0ebeac..1c9dde53 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -2220,8 +2220,8 @@ SCMSettings IHyprRenderer::getCMSettings(const NColorManagement::PImageDescripti
const bool needsSDRmod = modifySDR && isSDR2HDR(imageDescription->value(), targetImageDescription->value());
const bool needsHDRmod = !needsSDRmod && isHDR2SDR(imageDescription->value(), targetImageDescription->value());
const float maxLuminance = needsHDRmod ?
- imageDescription->value().getTFMaxLuminance(-1) :
- (imageDescription->value().luminances.max > 0 ? imageDescription->value().luminances.max : imageDescription->value().luminances.reference);
+ imageDescription->value().getTFMaxLuminance(-1) :
+ (imageDescription->value().luminances.max > 0 ? imageDescription->value().luminances.max : imageDescription->value().luminances.reference);
const auto dstMaxLuminance = targetImageDescription->value().luminances.max > 0 ? targetImageDescription->value().luminances.max : 10000;
auto matrix = imageDescription->getPrimaries()->convertMatrix(targetImageDescription->getPrimaries());
@@ -2556,30 +2556,30 @@ static hdr_output_metadata createHDRMetadata(SImageDescription settings, S
auto colorimetry = settings.getPrimaries();
auto luminances = settings.masteringLuminances.max > 0 ? settings.masteringLuminances :
- (settings.luminances != SImageDescription::SPCLuminances{} ?
- SImageDescription::SPCMasteringLuminances{.min = settings.luminances.min, .max = settings.luminances.max} :
- SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)});
+ (settings.luminances != SImageDescription::SPCLuminances{} ?
+ SImageDescription::SPCMasteringLuminances{.min = settings.luminances.min, .max = settings.luminances.max} :
+ SImageDescription::SPCMasteringLuminances{.min = monitor->minLuminance(), .max = monitor->maxLuminance(10000)});
Log::logger->log(Log::TRACE, "ColorManagement primaries {},{} {},{} {},{} {},{}", colorimetry.red.x, colorimetry.red.y, colorimetry.green.x, colorimetry.green.y,
- colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y);
+ colorimetry.blue.x, colorimetry.blue.y, colorimetry.white.x, colorimetry.white.y);
Log::logger->log(Log::TRACE, "ColorManagement min {}, max {}, cll {}, fall {}", luminances.min, luminances.max, settings.maxCLL, settings.maxFALL);
return hdr_output_metadata{
- .metadata_type = 0,
- .hdmi_metadata_type1 =
+ .metadata_type = 0,
+ .hdmi_metadata_type1 =
hdr_metadata_infoframe{
- .eotf = eotf,
- .metadata_type = 0,
- .display_primaries =
- {
+ .eotf = eotf,
+ .metadata_type = 0,
+ .display_primaries =
+ {
{.x = to16Bit(colorimetry.red.x), .y = to16Bit(colorimetry.red.y)},
{.x = to16Bit(colorimetry.green.x), .y = to16Bit(colorimetry.green.y)},
{.x = to16Bit(colorimetry.blue.x), .y = to16Bit(colorimetry.blue.y)},
},
- .white_point = {.x = to16Bit(colorimetry.white.x), .y = to16Bit(colorimetry.white.y)},
- .max_display_mastering_luminance = toNits(luminances.max),
- .min_display_mastering_luminance = toNits(luminances.min * 10000),
- .max_cll = toNits(settings.maxCLL > 0 ? settings.maxCLL : monitor->maxCLL()),
- .max_fall = toNits(settings.maxFALL > 0 ? settings.maxFALL : monitor->maxFALL()),
+ .white_point = {.x = to16Bit(colorimetry.white.x), .y = to16Bit(colorimetry.white.y)},
+ .max_display_mastering_luminance = toNits(luminances.max),
+ .min_display_mastering_luminance = toNits(luminances.min * 10000),
+ .max_cll = toNits(settings.maxCLL > 0 ? settings.maxCLL : monitor->maxCLL()),
+ .max_fall = toNits(settings.maxFALL > 0 ? settings.maxFALL : monitor->maxFALL()),
},
};
}