-
Notifications
You must be signed in to change notification settings - Fork 452
ComputeMSE
DirectXTex |
---|
Computes the mean-squared error for each component based on two input images.
HRESULT ComputeMSE(
const Image& image1, const Image& image2,
float& mse, float* mseV,
CMSE_FLAGS flags = CMSE_DEFAULT );
flags: a combination of the following flags
-
CMSE_DEFAULT
Default flags -
CMSE_IMAGE1_SRGB
Indicates image1 should have sRGB -> scRGB conversion applied before comparison. -
CMSE_IMAGE2_SRGB
Indicates image2 should have sRGB -> scRGB conversion applied before comparison. -
CMSE_IMAGE1_X2_BIAS
Indicates image1 should have the UNORM -> SNORM conversion applied before comparison. -
CMSE_IMAGE2_X2_BIAS
Indicates image2 should have the UNORM -> SNORM conversion applied before comparison. -
CMSE_IGNORE_RED
Indicates comparison should ignore differences in the RED (X) channel. -
CMSE_IGNORE_GREEN
Indicates comparison should ignore differences in the GREEN (Y) channel. -
CMSE_IGNORE_BLUE
Indicates comparison should ignore differences in the BLUE (Z) channel. -
CMSE_IGNORE_ALPHA
Indicates comparison should ignore differences in the ALPHA (W) channel.
mse: The sum of the channel mean-squared error.
mseV: Points to an array of 4 floats which holds the individual channel mean-squared error. Can be nullptr.
Image data is converted to DXGI_FORMAT_R32G32B32A32_FLOAT
for this operation. BC data is automatically decompressed.
This function cannot operate directly on a planar format image. See ConvertToSinglePlane for a method for converting planar data to a format that is supported by this routine.
All content and source code for this package are subject to the terms of the MIT License.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
- Universal Windows Platform apps
- Windows desktop apps
- Windows 11
- Windows 10
- Windows 8.1
- Xbox One
- Xbox Series X|S
- Windows Subsystem for Linux
- x86
- x64
- ARM64
- Visual Studio 2022
- Visual Studio 2019 (16.11)
- clang/LLVM v12 - v18
- GCC 10.5, 11.4, 12.3
- MinGW 12.2, 13.2
- CMake 3.20
DirectX Tool Kit for DirectX 11