From 71ddf7f7cf2feb5a300de8efc93bfab3a69350c7 Mon Sep 17 00:00:00 2001 From: Filippo Leonardi Date: Thu, 28 Nov 2024 12:44:31 +0100 Subject: [PATCH 1/2] Correctly interpret a gamma of 0 to set no gamma correction --- applications/_plugins/cfilter/boxfilter.cpp | 2 +- cmp_framework/common/cmp_boxfilter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/_plugins/cfilter/boxfilter.cpp b/applications/_plugins/cfilter/boxfilter.cpp index 129dd290e..f095c2fd8 100644 --- a/applications/_plugins/cfilter/boxfilter.cpp +++ b/applications/_plugins/cfilter/boxfilter.cpp @@ -203,7 +203,7 @@ int Plugin_BoxFilter::TC_CFilter(MipSet* pMipSet, CMP_MipSet* pMipSetDst, CMP_CF #endif } - if (pCFilterParams->fGammaCorrection != 1.0f) + if (pCFilterParams->fGammaCorrection != 1.0f && pCFilterParams->fGammaCorrection != 0.0f) CMP_SetMipSetGamma(pMipSet, pCFilterParams->fGammaCorrection); return result; diff --git a/cmp_framework/common/cmp_boxfilter.cpp b/cmp_framework/common/cmp_boxfilter.cpp index 8c7c4d016..2cf1ec3a5 100644 --- a/cmp_framework/common/cmp_boxfilter.cpp +++ b/cmp_framework/common/cmp_boxfilter.cpp @@ -424,7 +424,7 @@ CMP_INT CMP_API CMP_GenerateMIPLevelsEx(CMP_MipSet* pMipSet, CMP_CFilterParams* break; } - if (CFilterParam->fGammaCorrection != 1.0f) + if (CFilterParam->fGammaCorrection != 1.0f && CFilterParam->fGammaCorrection != 0.0f) CMP_SetMipSetGamma(pMipSet, CFilterParam->fGammaCorrection); return CMP_OK; From e111695e250b55e6a88faa45d0dba93e63c4276f Mon Sep 17 00:00:00 2001 From: Filippo Leonardi Date: Thu, 28 Nov 2024 12:47:48 +0100 Subject: [PATCH 2/2] Fix typos --- cmp_compressonatorlib/compressonator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmp_compressonatorlib/compressonator.h b/cmp_compressonatorlib/compressonator.h index b78cdd918..a38907161 100644 --- a/cmp_compressonatorlib/compressonator.h +++ b/cmp_compressonatorlib/compressonator.h @@ -577,8 +577,8 @@ typedef struct // Setting that applies to a CAS Filter float fSharpness; // Uses Fidelity Fx CAS sharpness, default 0 No sharpness set - int destWidth; // Scale source texture width to destWidth default 0 no scaleing - int destHeight; // Scale source texture height to destHeight default 0 no scalwing + int destWidth; // Scale source texture width to destWidth default 0 no scaling + int destHeight; // Scale source texture height to destHeight default 0 no scaling bool useSRGB; // if set true process image as SRGB else use linear color space. Default is false } CMP_CFilterParams; @@ -592,7 +592,7 @@ typedef enum typedef struct { CMP_VISION_PROCESS nProcessType; // Type of image processing to perform - CMP_BOOL Auto; // Use Auto stting to align and crop images + CMP_BOOL Auto; // Use Auto setting to align and crop images CMP_BOOL AlignImages; // Align the Test image with the source image CMP_BOOL ShowImages; // Display processed images CMP_BOOL SaveMatch; // Save auto match image