diff --git a/project/vc10/Nvidia.TextureTools/TextureTools.cs b/project/vc10/Nvidia.TextureTools/TextureTools.cs index 9b57249..3894da3 100644 --- a/project/vc10/Nvidia.TextureTools/TextureTools.cs +++ b/project/vc10/Nvidia.TextureTools/TextureTools.cs @@ -31,6 +31,14 @@ namespace Nvidia.TextureTools BC3n = DXT5n, BC4, BC5, + + DXT1n, // Not supported on CPU yet. + CTX1, // Not supported on CPU yet. + + BC6, + BC7, // Not supported yet. + + DXT1_Luma, } #endregion diff --git a/project/vc10/bc6-01-eigen-solver.vsp b/project/vc10/bc6-01-eigen-solver.vsp new file mode 100644 index 0000000..df0ec66 Binary files /dev/null and b/project/vc10/bc6-01-eigen-solver.vsp differ diff --git a/project/vc10/bc6-02-no-double.vsp b/project/vc10/bc6-02-no-double.vsp new file mode 100644 index 0000000..933baa4 Binary files /dev/null and b/project/vc10/bc6-02-no-double.vsp differ diff --git a/project/vc10/bc6.psess b/project/vc10/bc6.psess new file mode 100644 index 0000000..1b4f1f0 --- /dev/null +++ b/project/vc10/bc6.psess @@ -0,0 +1,105 @@ + + + + C:\nvtt\project\vc10\nvtt.sln + Sampling + None + true + true + false + false + Timestamp + Cycles + 10000000 + 10 + 10 + + false + false + + 0 + UnknownDisabled + 0 + + nvcompress + true + mpiexec.exe + true + + + + + + false + 500 + + \Memory\Pages/sec + \PhysicalDisk(_Total)\Avg. Disk Queue Length + \Processor(_Total)\% Processor Time + + + + true + false + + false + + + false + + + + C:\nvtt\project\vc10\Release.x64\bin\nvcompress.exe + 01/01/0001 00:00:00 + true + true + false + false + false + true + false + Executable + C:\nvtt\project\vc10\\Release.x64\bin\nvcompress.exe + C:\nvtt\project\vc10\nvcompress\ + -bc6 -nomips C:\nvtt\data\testsuite\kodak\kodim01.png C:\nvtt\data\testsuite\kodak\kodim01_bc6.dds + IIS + InternetExplorer + true + false + + false + + + false + + {88079E38-83AA-4E8A-B18A-66A78D1B058B}|nvcompress\nvcompress.vcxproj + C:\nvtt\project\vc10\nvcompress\nvcompress.vcxproj + nvcompress + + + + + C:\nvtt\project\vc10\bc6-01-eigen-solver.vsp + + + C:\nvtt\project\vc10\bc6-02-no-double.vsp + + + + + :PB:{88079E38-83AA-4E8A-B18A-66A78D1B058B}|nvcompress\nvcompress.vcxproj + + + + Mark One + Mark Two + Mark Three + Mark Four + Mark Five + Mark Six + Mark Seven + Mark Eight + Mark Nine + Mark Ten + + \ No newline at end of file diff --git a/project/vc10/nvassemble/nvassemble.vcxproj b/project/vc10/nvassemble/nvassemble.vcxproj index 4fc5bb0..6584357 100755 --- a/project/vc10/nvassemble/nvassemble.vcxproj +++ b/project/vc10/nvassemble/nvassemble.vcxproj @@ -178,6 +178,9 @@ + + {c33787e3-5564-4834-9fe3-a9020455a669} + {f143d180-d4c4-4037-b3de-be89a21c8d1d} false diff --git a/project/vc10/nvcompress/nvcompress.vcxproj b/project/vc10/nvcompress/nvcompress.vcxproj index a54b7ec..d94b560 100755 --- a/project/vc10/nvcompress/nvcompress.vcxproj +++ b/project/vc10/nvcompress/nvcompress.vcxproj @@ -352,6 +352,9 @@ + + {c33787e3-5564-4834-9fe3-a9020455a669} + {f143d180-d4c4-4037-b3de-be89a21c8d1d} false diff --git a/project/vc10/nvddsinfo/nvddsinfo.vcxproj b/project/vc10/nvddsinfo/nvddsinfo.vcxproj index 8a77d1f..47a8f8f 100755 --- a/project/vc10/nvddsinfo/nvddsinfo.vcxproj +++ b/project/vc10/nvddsinfo/nvddsinfo.vcxproj @@ -178,6 +178,9 @@ + + {c33787e3-5564-4834-9fe3-a9020455a669} + {f143d180-d4c4-4037-b3de-be89a21c8d1d} false diff --git a/project/vc10/nvdecompress/nvdecompress.vcxproj b/project/vc10/nvdecompress/nvdecompress.vcxproj index 151ca66..656398d 100755 --- a/project/vc10/nvdecompress/nvdecompress.vcxproj +++ b/project/vc10/nvdecompress/nvdecompress.vcxproj @@ -204,6 +204,9 @@ + + {c33787e3-5564-4834-9fe3-a9020455a669} + {f143d180-d4c4-4037-b3de-be89a21c8d1d} false diff --git a/project/vc10/nvimgdiff/nvimgdiff.vcxproj b/project/vc10/nvimgdiff/nvimgdiff.vcxproj index 930e382..88401d8 100755 --- a/project/vc10/nvimgdiff/nvimgdiff.vcxproj +++ b/project/vc10/nvimgdiff/nvimgdiff.vcxproj @@ -206,6 +206,9 @@ + + {c33787e3-5564-4834-9fe3-a9020455a669} + {f143d180-d4c4-4037-b3de-be89a21c8d1d} false diff --git a/project/vc10/nvtt.sln b/project/vc10/nvtt.sln index bb7a678..28334ac 100644 --- a/project/vc10/nvtt.sln +++ b/project/vc10/nvtt.sln @@ -3,6 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A08D9CB4-C9D8-46EF-A74D-0EAB11FE34C5}" ProjectSection(SolutionItems) = preProject + bc6.psess = bc6.psess nvconfig.h = nvconfig.h EndProjectSection EndProject @@ -239,25 +240,31 @@ Global {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|Win32.ActiveCfg = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|Win32.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|x64.ActiveCfg = Debug|Any CPU + {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|x64.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Win32.ActiveCfg = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Win32.Build.0 = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|x64.ActiveCfg = Release|Any CPU + {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|x64.Build.0 = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|Win32.ActiveCfg = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|Win32.Build.0 = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|x64.ActiveCfg = Release|Any CPU + {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|x64.Build.0 = Release|Any CPU {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|Win32.ActiveCfg = Debug|Win32 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|Win32.Build.0 = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|x64.ActiveCfg = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.Build.0 = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.ActiveCfg = Debug|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|x64.ActiveCfg = Debug|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|x64.Build.0 = Debug|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.ActiveCfg = Debug-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.Build.0 = Debug-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.ActiveCfg = Debug-CUDA|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.Build.0 = Debug-CUDA|x64 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|Win32.ActiveCfg = Release|Win32 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|Win32.Build.0 = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|x64.ActiveCfg = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.ActiveCfg = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.Build.0 = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.ActiveCfg = Release|x64 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.Build.0 = Release|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|x64.ActiveCfg = Release|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|x64.Build.0 = Release|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.ActiveCfg = Release-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.Build.0 = Release-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.ActiveCfg = Release-CUDA|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.Build.0 = Release-CUDA|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|Win32.ActiveCfg = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|Win32.Build.0 = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/project/vc10/nvtt/nvtt.vcxproj b/project/vc10/nvtt/nvtt.vcxproj index 9b40e02..4453155 100755 --- a/project/vc10/nvtt/nvtt.vcxproj +++ b/project/vc10/nvtt/nvtt.vcxproj @@ -148,7 +148,7 @@ Level3 - EditAndContinue + ProgramDatabase cudart.lib;%(AdditionalDependencies) @@ -242,6 +242,7 @@ $(SolutionDir)\$(Configuration).$(Platform)\lib\$(ProjectName).lib MachineX86 + true Copying header files... @@ -283,6 +284,7 @@ $(SolutionDir)\$(Configuration).$(Platform)\lib\$(ProjectName).lib MachineX64 + true 64 @@ -302,7 +304,7 @@ Level3 - EditAndContinue + ProgramDatabase %(AdditionalDependencies) @@ -355,8 +357,7 @@ Level3 - - + ProgramDatabase %(AdditionalDependencies) @@ -369,6 +370,7 @@ $(SolutionDir)\$(Configuration).$(Platform)\lib\$(ProjectName).lib MachineX86 + true Copying header files... @@ -384,6 +386,7 @@ WIN32;NDEBUG;_WINDOWS;_USRDLL;NVTT_EXPORTS;NVTT_SHARED;__SSE2__;__SSE__;__MMX__;%(PreprocessorDefinitions) MultiThreadedDLL Level3 + ProgramDatabase $(CUDA_LIB_PATH)\..\lib64;%(AdditionalLibraryDirectories) @@ -397,6 +400,7 @@ $(SolutionDir)\$(Configuration).$(Platform)\lib\$(ProjectName).lib MachineX64 %(AdditionalDependencies) + true @@ -415,16 +419,7 @@ - - true - true - true - true - true - true - true - true - + @@ -457,16 +452,7 @@ - - true - true - true - true - true - true - true - true - + diff --git a/project/vc10/nvzoom/nvzoom.vcxproj b/project/vc10/nvzoom/nvzoom.vcxproj index 3ced6cb..97416ec 100755 --- a/project/vc10/nvzoom/nvzoom.vcxproj +++ b/project/vc10/nvzoom/nvzoom.vcxproj @@ -197,6 +197,9 @@ + + {c33787e3-5564-4834-9fe3-a9020455a669} + {f143d180-d4c4-4037-b3de-be89a21c8d1d} false diff --git a/project/vc10/testsuite/testsuite.vcxproj b/project/vc10/testsuite/testsuite.vcxproj index af612b1..d1c211b 100755 --- a/project/vc10/testsuite/testsuite.vcxproj +++ b/project/vc10/testsuite/testsuite.vcxproj @@ -1,6 +1,14 @@  + + Debug-CUDA + Win32 + + + Debug-CUDA + x64 + Debug Win32 @@ -9,6 +17,14 @@ Debug x64 + + Release-CUDA + Win32 + + + Release-CUDA + x64 + Release Win32 @@ -30,19 +46,37 @@ Unicode true + + Application + Unicode + true + Application Unicode true + + Application + Unicode + true + Application Unicode + + Application + Unicode + Application Unicode + + Application + Unicode + @@ -50,33 +84,61 @@ + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 $(SolutionDir)\$(Configuration).$(Platform)\bin\ + $(SolutionDir)\$(Configuration).$(Platform)\bin\ $(SolutionDir)\$(Configuration).$(Platform)\bin\ + $(SolutionDir)\$(Configuration).$(Platform)\bin\ $(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\ $(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\ true + true true + true $(SolutionDir)\$(Configuration).$(Platform)\bin\ + $(SolutionDir)\$(Configuration).$(Platform)\bin\ $(SolutionDir)\$(Configuration).$(Platform)\bin\ + $(SolutionDir)\$(Configuration).$(Platform)\bin\ $(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\ $(Configuration)\$(Platform)\ + $(Configuration)\$(Platform)\ false + false false + false @@ -102,6 +164,30 @@ MachineX86 + + + Disabled + $(SolutionDir);$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\extern\poshlib;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + true + Console + false + + + MachineX86 + + Disabled @@ -124,6 +210,28 @@ + + + Disabled + $(SolutionDir);$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\extern\poshlib;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + true + Console + false + + + + $(SolutionDir);$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\extern\poshlib;%(AdditionalIncludeDirectories) @@ -151,6 +259,33 @@ MachineX86 + + + $(SolutionDir);$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\extern\poshlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + StreamingSIMDExtensions2 + + + Level3 + + + true + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + MachineX86 + + $(SolutionDir);$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\extern\poshlib;%(AdditionalIncludeDirectories) @@ -177,6 +312,32 @@ + + + $(SolutionDir);$(SolutionDir)\..\..\src;$(SolutionDir)\..\..\extern\poshlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDLL + StreamingSIMDExtensions2 + + + Level3 + + + true + + + %(AdditionalDependencies) + %(AdditionalLibraryDirectories) + true + Console + true + true + false + + + + diff --git a/project/vc9/Nvidia.TextureTools/TextureTools.cs b/project/vc9/Nvidia.TextureTools/TextureTools.cs index 9b57249..aabb184 100644 --- a/project/vc9/Nvidia.TextureTools/TextureTools.cs +++ b/project/vc9/Nvidia.TextureTools/TextureTools.cs @@ -31,7 +31,15 @@ namespace Nvidia.TextureTools BC3n = DXT5n, BC4, BC5, - } + + DXT1n, // Not supported on CPU yet. + CTX1, // Not supported on CPU yet. + + BC6, + BC7, // Not supported yet. + + DXT1_Luma, + } #endregion #region public enum Quality diff --git a/project/vc9/nvtt.sln b/project/vc9/nvtt.sln index 256cacb..5a52ecf 100644 --- a/project/vc9/nvtt.sln +++ b/project/vc9/nvtt.sln @@ -16,6 +16,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvcompress", "nvcompress\nv {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} {1AEB7681-57D8-48EE-813D-5C41CC38B647} = {1AEB7681-57D8-48EE-813D-5C41CC38B647} {4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531} + {C33787E3-5564-4834-9FE3-A9020455A669} = {C33787E3-5564-4834-9FE3-A9020455A669} {50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06} EndProjectSection EndProject @@ -36,6 +37,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvddsinfo", "nvddsinfo\nvdd ProjectSection(ProjectDependencies) = postProject {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} {4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531} + {C33787E3-5564-4834-9FE3-A9020455A669} = {C33787E3-5564-4834-9FE3-A9020455A669} {50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06} EndProjectSection EndProject @@ -43,6 +45,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvdecompress", "nvdecompres ProjectSection(ProjectDependencies) = postProject {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} {4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531} + {C33787E3-5564-4834-9FE3-A9020455A669} = {C33787E3-5564-4834-9FE3-A9020455A669} {50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06} EndProjectSection EndProject @@ -50,6 +53,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvimgdiff", "nvimgdiff\nvim ProjectSection(ProjectDependencies) = postProject {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} {4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531} + {C33787E3-5564-4834-9FE3-A9020455A669} = {C33787E3-5564-4834-9FE3-A9020455A669} {50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06} EndProjectSection EndProject @@ -57,6 +61,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvassemble", "nvassemble\nv ProjectSection(ProjectDependencies) = postProject {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} {4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531} + {C33787E3-5564-4834-9FE3-A9020455A669} = {C33787E3-5564-4834-9FE3-A9020455A669} {50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06} EndProjectSection EndProject @@ -64,6 +69,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nvzoom", "nvzoom\nvzoom.vcp ProjectSection(ProjectDependencies) = postProject {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} = {F143D180-D4C4-4037-B3DE-BE89A21C8D1D} {4046F392-A18B-4C66-9639-3EABFFF5D531} = {4046F392-A18B-4C66-9639-3EABFFF5D531} + {C33787E3-5564-4834-9FE3-A9020455A669} = {C33787E3-5564-4834-9FE3-A9020455A669} {50C465FE-B308-42BC-894D-89484482AF06} = {50C465FE-B308-42BC-894D-89484482AF06} EndProjectSection EndProject @@ -106,445 +112,302 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hdrtest", "hdrtest\hdrtest. EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Mixed Platforms = Debug|Mixed Platforms Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 - Debug-CUDA|Mixed Platforms = Debug-CUDA|Mixed Platforms Debug-CUDA|Win32 = Debug-CUDA|Win32 Debug-CUDA|x64 = Debug-CUDA|x64 - Release|Mixed Platforms = Release|Mixed Platforms Release|Win32 = Release|Win32 Release|x64 = Release|x64 - Release-CUDA|Mixed Platforms = Release-CUDA|Mixed Platforms Release-CUDA|Win32 = Release-CUDA|Win32 Release-CUDA|x64 = Release-CUDA|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Mixed Platforms.Build.0 = Debug|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Win32.ActiveCfg = Debug|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|Win32.Build.0 = Debug|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|x64.ActiveCfg = Debug|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug|x64.Build.0 = Debug|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug-CUDA|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug-CUDA|Mixed Platforms.Build.0 = Debug-CUDA|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug-CUDA|Win32.ActiveCfg = Debug-CUDA|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug-CUDA|Win32.Build.0 = Debug-CUDA|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug-CUDA|x64.ActiveCfg = Debug-CUDA|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Debug-CUDA|x64.Build.0 = Debug-CUDA|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Mixed Platforms.Build.0 = Release|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Win32.ActiveCfg = Release|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|Win32.Build.0 = Release|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|x64.ActiveCfg = Release|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release|x64.Build.0 = Release|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release-CUDA|Mixed Platforms.ActiveCfg = Release-CUDA|x64 - {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release-CUDA|Mixed Platforms.Build.0 = Release-CUDA|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release-CUDA|Win32.ActiveCfg = Release-CUDA|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release-CUDA|Win32.Build.0 = Release-CUDA|Win32 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release-CUDA|x64.ActiveCfg = Release-CUDA|x64 {1AEB7681-57D8-48EE-813D-5C41CC38B647}.Release-CUDA|x64.Build.0 = Release-CUDA|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Mixed Platforms.Build.0 = Debug|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Win32.ActiveCfg = Debug|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|Win32.Build.0 = Debug|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|x64.ActiveCfg = Debug|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug|x64.Build.0 = Debug|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug-CUDA|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug-CUDA|Mixed Platforms.Build.0 = Debug-CUDA|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug-CUDA|Win32.ActiveCfg = Debug-CUDA|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug-CUDA|Win32.Build.0 = Debug-CUDA|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug-CUDA|x64.ActiveCfg = Debug-CUDA|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Debug-CUDA|x64.Build.0 = Debug-CUDA|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Mixed Platforms.Build.0 = Release|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Win32.ActiveCfg = Release|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|Win32.Build.0 = Release|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|x64.ActiveCfg = Release|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release|x64.Build.0 = Release|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release-CUDA|Mixed Platforms.ActiveCfg = Release-CUDA|x64 - {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release-CUDA|Mixed Platforms.Build.0 = Release-CUDA|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release-CUDA|Win32.ActiveCfg = Release-CUDA|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release-CUDA|Win32.Build.0 = Release-CUDA|Win32 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release-CUDA|x64.ActiveCfg = Release-CUDA|x64 {88079E38-83AA-4E8A-B18A-66A78D1B058B}.Release-CUDA|x64.Build.0 = Release-CUDA|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Mixed Platforms.Build.0 = Debug|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Win32.ActiveCfg = Debug|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|Win32.Build.0 = Debug|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|x64.ActiveCfg = Debug|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug|x64.Build.0 = Debug|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Debug-CUDA|x64.Build.0 = Debug|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Mixed Platforms.Build.0 = Release|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Win32.ActiveCfg = Release|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|Win32.Build.0 = Release|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|x64.ActiveCfg = Release|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release|x64.Build.0 = Release|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release-CUDA|Win32.Build.0 = Release|Win32 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release-CUDA|x64.ActiveCfg = Release|x64 {4046F392-A18B-4C66-9639-3EABFFF5D531}.Release-CUDA|x64.Build.0 = Release|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Mixed Platforms.Build.0 = Debug|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Win32.ActiveCfg = Debug|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|Win32.Build.0 = Debug|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|x64.ActiveCfg = Debug|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug|x64.Build.0 = Debug|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Debug-CUDA|x64.Build.0 = Debug|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Mixed Platforms.Build.0 = Release|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Win32.ActiveCfg = Release|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|Win32.Build.0 = Release|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|x64.ActiveCfg = Release|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release|x64.Build.0 = Release|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release-CUDA|Win32.Build.0 = Release|Win32 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release-CUDA|x64.ActiveCfg = Release|x64 {F143D180-D4C4-4037-B3DE-BE89A21C8D1D}.Release-CUDA|x64.Build.0 = Release|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Debug|Mixed Platforms.Build.0 = Debug|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Debug|Win32.ActiveCfg = Debug|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Debug|Win32.Build.0 = Debug|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Debug|x64.ActiveCfg = Debug|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Debug|x64.Build.0 = Debug|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Debug-CUDA|x64.Build.0 = Debug|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Release|Mixed Platforms.Build.0 = Release|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Release|Win32.ActiveCfg = Release|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Release|Win32.Build.0 = Release|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Release|x64.ActiveCfg = Release|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Release|x64.Build.0 = Release|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {50C465FE-B308-42BC-894D-89484482AF06}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Release-CUDA|Win32.Build.0 = Release|Win32 {50C465FE-B308-42BC-894D-89484482AF06}.Release-CUDA|x64.ActiveCfg = Release|x64 {50C465FE-B308-42BC-894D-89484482AF06}.Release-CUDA|x64.Build.0 = Release|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Mixed Platforms.Build.0 = Debug|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Win32.ActiveCfg = Debug|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|Win32.Build.0 = Debug|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|x64.ActiveCfg = Debug|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug|x64.Build.0 = Debug|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Debug-CUDA|x64.Build.0 = Debug|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Mixed Platforms.Build.0 = Release|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Win32.ActiveCfg = Release|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|Win32.Build.0 = Release|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|x64.ActiveCfg = Release|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release|x64.Build.0 = Release|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release-CUDA|Win32.Build.0 = Release|Win32 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release-CUDA|x64.ActiveCfg = Release|x64 {CE017322-01FC-4851-9C8B-64E9A8E26C38}.Release-CUDA|x64.Build.0 = Release|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Mixed Platforms.Build.0 = Debug|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Win32.ActiveCfg = Debug|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|Win32.Build.0 = Debug|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|x64.ActiveCfg = Debug|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug|x64.Build.0 = Debug|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Debug-CUDA|x64.Build.0 = Debug|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Mixed Platforms.Build.0 = Release|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Win32.ActiveCfg = Release|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|Win32.Build.0 = Release|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|x64.ActiveCfg = Release|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release|x64.Build.0 = Release|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release-CUDA|Win32.Build.0 = Release|Win32 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release-CUDA|x64.ActiveCfg = Release|x64 {841B73C5-C679-4EEF-A50A-7D6106642B49}.Release-CUDA|x64.Build.0 = Release|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Mixed Platforms.Build.0 = Debug|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Win32.ActiveCfg = Debug|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|Win32.Build.0 = Debug|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|x64.ActiveCfg = Debug|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug|x64.Build.0 = Debug|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Debug-CUDA|x64.Build.0 = Debug|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Mixed Platforms.Build.0 = Release|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Win32.ActiveCfg = Release|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|Win32.Build.0 = Release|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|x64.ActiveCfg = Release|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release|x64.Build.0 = Release|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release-CUDA|Win32.Build.0 = Release|Win32 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release-CUDA|x64.ActiveCfg = Release|x64 {75A0527D-BFC9-49C3-B46B-CD1A901D5927}.Release-CUDA|x64.Build.0 = Release|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Mixed Platforms.Build.0 = Debug|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Win32.ActiveCfg = Debug|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|Win32.Build.0 = Debug|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|x64.ActiveCfg = Debug|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug|x64.Build.0 = Debug|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Debug-CUDA|x64.Build.0 = Debug|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Mixed Platforms.Build.0 = Release|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Win32.ActiveCfg = Release|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|Win32.Build.0 = Release|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|x64.ActiveCfg = Release|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release|x64.Build.0 = Release|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release-CUDA|Win32.Build.0 = Release|Win32 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release-CUDA|x64.ActiveCfg = Release|x64 {05A59E8B-EA70-4F22-89E8-E0927BA13064}.Release-CUDA|x64.Build.0 = Release|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Mixed Platforms.Build.0 = Debug|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Win32.ActiveCfg = Debug|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|Win32.Build.0 = Debug|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|x64.ActiveCfg = Debug|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug|x64.Build.0 = Debug|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Debug-CUDA|x64.Build.0 = Debug|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Mixed Platforms.Build.0 = Release|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Win32.ActiveCfg = Release|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|Win32.Build.0 = Release|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|x64.ActiveCfg = Release|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release|x64.Build.0 = Release|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release-CUDA|Win32.Build.0 = Release|Win32 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release-CUDA|x64.ActiveCfg = Release|x64 {3BC6D760-91E8-4FFB-BD0E-F86F367AD8EA}.Release-CUDA|x64.Build.0 = Release|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Mixed Platforms.Build.0 = Debug|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Win32.ActiveCfg = Debug|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|Win32.Build.0 = Debug|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|x64.ActiveCfg = Debug|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug|x64.Build.0 = Debug|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Debug-CUDA|x64.Build.0 = Debug|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Mixed Platforms.Build.0 = Release|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Win32.ActiveCfg = Release|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|Win32.Build.0 = Release|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|x64.ActiveCfg = Release|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release|x64.Build.0 = Release|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release-CUDA|Win32.Build.0 = Release|Win32 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release-CUDA|x64.ActiveCfg = Release|x64 {51999D3E-EF22-4BDD-965F-4201034D3DCE}.Release-CUDA|x64.Build.0 = Release|x64 - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Win32.ActiveCfg = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|Win32.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|x64.ActiveCfg = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug|x64.Build.0 = Debug|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|Win32.ActiveCfg = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|Win32.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|x64.ActiveCfg = Debug|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Debug-CUDA|x64.Build.0 = Debug|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Win32.ActiveCfg = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|Win32.Build.0 = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|x64.ActiveCfg = Release|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|Any CPU - {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|Mixed Platforms.Build.0 = Release|Any CPU + {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release|x64.Build.0 = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|Win32.ActiveCfg = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|Win32.Build.0 = Release|Any CPU {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|x64.ActiveCfg = Release|Any CPU - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {CAB55C39-8FA9-4912-98D9-E52669C8911D}.Release-CUDA|x64.Build.0 = Release|Any CPU {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|Win32.ActiveCfg = Debug|Win32 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|Win32.Build.0 = Debug|Win32 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|x64.ActiveCfg = Debug|x64 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug|x64.Build.0 = Debug|x64 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.Build.0 = Debug|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.ActiveCfg = Debug|x64 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.Build.0 = Debug|x64 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|Mixed Platforms.Build.0 = Release|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.ActiveCfg = Debug-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|Win32.Build.0 = Debug-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.ActiveCfg = Debug-CUDA|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Debug-CUDA|x64.Build.0 = Debug-CUDA|x64 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|Win32.ActiveCfg = Release|Win32 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|Win32.Build.0 = Release|Win32 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|x64.ActiveCfg = Release|x64 {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release|x64.Build.0 = Release|x64 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Mixed Platforms.Build.0 = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.ActiveCfg = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.Build.0 = Release|Win32 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.ActiveCfg = Release|x64 - {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.Build.0 = Release|x64 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.ActiveCfg = Release-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|Win32.Build.0 = Release-CUDA|Win32 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.ActiveCfg = Release-CUDA|x64 + {317B694E-B5C1-42A6-956F-FC12B69175A6}.Release-CUDA|x64.Build.0 = Release-CUDA|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|Win32.ActiveCfg = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|Win32.Build.0 = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|x64.ActiveCfg = Debug|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug|x64.Build.0 = Debug|x64 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|Win32 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Debug-CUDA|x64.Build.0 = Debug|x64 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release|Mixed Platforms.Build.0 = Release|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release|Win32.ActiveCfg = Release|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release|Win32.Build.0 = Release|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release|x64.ActiveCfg = Release|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release|x64.Build.0 = Release|x64 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|Win32 - {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release-CUDA|Mixed Platforms.Build.0 = Release|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release-CUDA|Win32.Build.0 = Release|Win32 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release-CUDA|x64.ActiveCfg = Release|x64 {7DCF280E-702B-49F3-84A7-AE7E146384D6}.Release-CUDA|x64.Build.0 = Release|x64 - {C33787E3-5564-4834-9FE3-A9020455A669}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 - {C33787E3-5564-4834-9FE3-A9020455A669}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug|Win32.ActiveCfg = Debug|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug|Win32.Build.0 = Debug|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug|x64.ActiveCfg = Debug|x64 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug|x64.Build.0 = Debug|x64 - {C33787E3-5564-4834-9FE3-A9020455A669}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|Win32 - {C33787E3-5564-4834-9FE3-A9020455A669}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {C33787E3-5564-4834-9FE3-A9020455A669}.Debug-CUDA|x64.Build.0 = Debug|x64 - {C33787E3-5564-4834-9FE3-A9020455A669}.Release|Mixed Platforms.ActiveCfg = Release|Win32 - {C33787E3-5564-4834-9FE3-A9020455A669}.Release|Mixed Platforms.Build.0 = Release|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Release|Win32.ActiveCfg = Release|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Release|Win32.Build.0 = Release|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Release|x64.ActiveCfg = Release|x64 {C33787E3-5564-4834-9FE3-A9020455A669}.Release|x64.Build.0 = Release|x64 - {C33787E3-5564-4834-9FE3-A9020455A669}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|Win32 - {C33787E3-5564-4834-9FE3-A9020455A669}.Release-CUDA|Mixed Platforms.Build.0 = Release|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Release-CUDA|Win32.Build.0 = Release|Win32 {C33787E3-5564-4834-9FE3-A9020455A669}.Release-CUDA|x64.ActiveCfg = Release|x64 {C33787E3-5564-4834-9FE3-A9020455A669}.Release-CUDA|x64.Build.0 = Release|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug|Mixed Platforms.Build.0 = Debug|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug|Win32.ActiveCfg = Debug|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug|Win32.Build.0 = Debug|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug|x64.ActiveCfg = Debug|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug|x64.Build.0 = Debug|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Debug-CUDA|x64.Build.0 = Debug|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release|Mixed Platforms.Build.0 = Release|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release|Win32.ActiveCfg = Release|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release|Win32.Build.0 = Release|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release|x64.ActiveCfg = Release|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release|x64.Build.0 = Release|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release-CUDA|Win32.Build.0 = Release|Win32 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release-CUDA|x64.ActiveCfg = Release|x64 {3DD3A43D-C6EA-460F-821B-6C339A03C5BB}.Release-CUDA|x64.Build.0 = Release|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug|Mixed Platforms.Build.0 = Debug|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug|Win32.ActiveCfg = Debug|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug|Win32.Build.0 = Debug|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug|x64.ActiveCfg = Debug|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug|x64.Build.0 = Debug|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Debug-CUDA|x64.Build.0 = Debug|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release|Mixed Platforms.Build.0 = Release|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release|Win32.ActiveCfg = Release|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release|Win32.Build.0 = Release|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release|x64.ActiveCfg = Release|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release|x64.Build.0 = Release|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release-CUDA|Win32.ActiveCfg = Release|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release-CUDA|Win32.Build.0 = Release|Win32 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release-CUDA|x64.ActiveCfg = Release|x64 {CFB3FEAC-5720-4B16-9D7E-039DB180B641}.Release-CUDA|x64.Build.0 = Release|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug|Mixed Platforms.Build.0 = Debug|x64 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug|Win32.ActiveCfg = Debug|Win32 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug|Win32.Build.0 = Debug|Win32 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug|x64.ActiveCfg = Debug|x64 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug|x64.Build.0 = Debug|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|Mixed Platforms.ActiveCfg = Debug|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|Mixed Platforms.Build.0 = Debug|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|Win32.ActiveCfg = Debug|x64 + {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|Win32.ActiveCfg = Debug|Win32 + {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|Win32.Build.0 = Debug|Win32 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|x64.ActiveCfg = Debug|x64 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Debug-CUDA|x64.Build.0 = Debug|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release|Mixed Platforms.ActiveCfg = Release|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release|Mixed Platforms.Build.0 = Release|x64 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release|Win32.ActiveCfg = Release|Win32 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release|Win32.Build.0 = Release|Win32 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release|x64.ActiveCfg = Release|x64 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release|x64.Build.0 = Release|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|Mixed Platforms.ActiveCfg = Release|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|Mixed Platforms.Build.0 = Release|x64 - {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|Win32.ActiveCfg = Release|x64 + {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|Win32.ActiveCfg = Release|Win32 + {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|Win32.Build.0 = Release|Win32 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|x64.ActiveCfg = Release|x64 {E493E368-A4CF-4A8D-99DD-E128CC3A27EF}.Release-CUDA|x64.Build.0 = Release|x64 EndGlobalSection diff --git a/project/vc9/nvtt/nvtt.vcproj b/project/vc9/nvtt/nvtt.vcproj index 88dce20..64c5b48 100644 --- a/project/vc9/nvtt/nvtt.vcproj +++ b/project/vc9/nvtt/nvtt.vcproj @@ -916,138 +916,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/nvimage/BlockDXT.cpp b/src/nvimage/BlockDXT.cpp index 24336d7..8d2a83c 100644 --- a/src/nvimage/BlockDXT.cpp +++ b/src/nvimage/BlockDXT.cpp @@ -26,6 +26,10 @@ #include "nvcore/Stream.h" #include "nvcore/Utils.h" // swap +#include "nvmath/Half.h" + +#include "nvtt/bc6h/zoh.h" +#include "nvtt/bc6h/utils.h" using namespace nv; @@ -610,6 +614,33 @@ void BlockCTX1::setIndices(int * idx) } +/// Decode BC6 block. +void BlockBC6::decodeBlock(ColorSet * set) const +{ + Tile tile(4, 4); + ZOH::decompress((const char *)data, tile); + + // Convert ZOH's tile struct back to NVTT's, and convert half to float. + set->allocate(4, 4); + for (uint y = 0; y < 4; ++y) + { + for (uint x = 0; x < 4; ++x) + { + uint16 rHalf = Tile::float2half(tile.data[y][x].x); + uint16 gHalf = Tile::float2half(tile.data[y][x].y); + uint16 bHalf = Tile::float2half(tile.data[y][x].z); + set->colors[y * 4 + x].x = to_float(rHalf); + set->colors[y * 4 + x].y = to_float(gHalf); + set->colors[y * 4 + x].z = to_float(bHalf); + set->colors[y * 4 + x].w = 1.0f; + + // Set indices in case someone uses them + set->indices[y * 4 + x] = y * 4 + x; + } + } +} + + /// Flip CTX1 block vertically. inline void BlockCTX1::flip4() { @@ -671,3 +702,8 @@ Stream & nv::operator<<(Stream & stream, BlockCTX1 & block) return stream; } +Stream & nv::operator<<(Stream & stream, BlockBC6 & block) +{ + stream.serialize(&block, sizeof(block)); + return stream; +} diff --git a/src/nvimage/BlockDXT.h b/src/nvimage/BlockDXT.h index df0541b..34f6474 100644 --- a/src/nvimage/BlockDXT.h +++ b/src/nvimage/BlockDXT.h @@ -32,6 +32,7 @@ namespace nv { struct ColorBlock; + struct ColorSet; class Stream; @@ -212,6 +213,15 @@ namespace nv void flip2(); }; + /// BC6 block. + struct BlockBC6 + { + uint8 data[16]; // Not even going to try to write a union for this thing. + void decodeBlock(ColorSet * set) const; + }; + + /// !!!UNDONE: BC7 block + // Serialization functions. NVIMAGE_API Stream & operator<<(Stream & stream, BlockDXT1 & block); @@ -222,6 +232,7 @@ namespace nv NVIMAGE_API Stream & operator<<(Stream & stream, BlockATI1 & block); NVIMAGE_API Stream & operator<<(Stream & stream, BlockATI2 & block); NVIMAGE_API Stream & operator<<(Stream & stream, BlockCTX1 & block); + NVIMAGE_API Stream & operator<<(Stream & stream, BlockBC6 & block); } // nv namespace diff --git a/src/nvimage/DirectDrawSurface.cpp b/src/nvimage/DirectDrawSurface.cpp index 002fd98..e95f2f0 100644 --- a/src/nvimage/DirectDrawSurface.cpp +++ b/src/nvimage/DirectDrawSurface.cpp @@ -950,7 +950,8 @@ bool DirectDrawSurface::isSupported() const header.header10.dxgiFormat == DXGI_FORMAT_BC2_UNORM || header.header10.dxgiFormat == DXGI_FORMAT_BC3_UNORM || header.header10.dxgiFormat == DXGI_FORMAT_BC4_UNORM || - header.header10.dxgiFormat == DXGI_FORMAT_BC5_UNORM) + header.header10.dxgiFormat == DXGI_FORMAT_BC5_UNORM || + header.header10.dxgiFormat == DXGI_FORMAT_BC6H_UF16) { return true; } @@ -1340,13 +1341,12 @@ void DirectDrawSurface::readBlock(ColorBlock * rgba) if (header.hasDX10Header()) { if (header.header10.dxgiFormat == DXGI_FORMAT_BC1_UNORM) fourcc = FOURCC_DXT1; - if (header.header10.dxgiFormat == DXGI_FORMAT_BC2_UNORM) fourcc = FOURCC_DXT3; - if (header.header10.dxgiFormat == DXGI_FORMAT_BC3_UNORM) fourcc = FOURCC_DXT5; - if (header.header10.dxgiFormat == DXGI_FORMAT_BC4_UNORM) fourcc = FOURCC_ATI1; - if (header.header10.dxgiFormat == DXGI_FORMAT_BC5_UNORM) fourcc = FOURCC_ATI2; + else if (header.header10.dxgiFormat == DXGI_FORMAT_BC2_UNORM) fourcc = FOURCC_DXT3; + else if (header.header10.dxgiFormat == DXGI_FORMAT_BC3_UNORM) fourcc = FOURCC_DXT5; + else if (header.header10.dxgiFormat == DXGI_FORMAT_BC4_UNORM) fourcc = FOURCC_ATI1; + else if (header.header10.dxgiFormat == DXGI_FORMAT_BC5_UNORM) fourcc = FOURCC_ATI2; } - if (fourcc == FOURCC_DXT1) { BlockDXT1 block; @@ -1389,6 +1389,31 @@ void DirectDrawSurface::readBlock(ColorBlock * rgba) *stream << block; block.decodeBlock(rgba); } + else if (header.hasDX10Header() && header.header10.dxgiFormat == DXGI_FORMAT_BC6H_UF16) + { + BlockBC6 block; + *stream << block; + ColorSet set; + block.decodeBlock(&set); + + // Clamp to [0, 1] and round to 8-bit + for (int y = 0; y < 4; ++y) + { + for (int x = 0; x < 4; ++x) + { + Vector4 px = set.colors[y*4 + x]; + rgba->color(x, y).setRGBA( + uint8(clamp(px.x, 0.0f, 1.0f) * 255.0f + 0.5f), + uint8(clamp(px.y, 0.0f, 1.0f) * 255.0f + 0.5f), + uint8(clamp(px.z, 0.0f, 1.0f) * 255.0f + 0.5f), + uint8(clamp(px.w, 0.0f, 1.0f) * 255.0f + 0.5f)); + } + } + } + else + { + nvDebugCheck(false); + } // If normal flag set, convert to normal. if (header.pf.flags & DDPF_NORMAL) diff --git a/src/nvimage/ErrorMetric.cpp b/src/nvimage/ErrorMetric.cpp index bd5902e..739d304 100644 --- a/src/nvimage/ErrorMetric.cpp +++ b/src/nvimage/ErrorMetric.cpp @@ -1,294 +1,294 @@ - -#include "ErrorMetric.h" -#include "FloatImage.h" -#include "Filter.h" - -#include "nvmath/Matrix.h" -#include "nvmath/Vector.inl" - -#include // FLT_MAX - -using namespace nv; - -float nv::rmsColorError(const FloatImage * img, const FloatImage * ref, bool alphaWeight) -{ - if (!sameLayout(img, ref)) { - return FLT_MAX; - } - nvDebugCheck(img->componentCount() == 4); - nvDebugCheck(ref->componentCount() == 4); - - double mse = 0; - - const uint count = img->pixelCount(); - for (uint i = 0; i < count; i++) - { - float r0 = img->pixel(i + count * 0); - float g0 = img->pixel(i + count * 1); - float b0 = img->pixel(i + count * 2); - //float a0 = img->pixel(i + count * 3); - float r1 = ref->pixel(i + count * 0); - float g1 = ref->pixel(i + count * 1); - float b1 = ref->pixel(i + count * 2); - float a1 = ref->pixel(i + count * 3); - - float r = r0 - r1; - float g = g0 - g1; - float b = b0 - b1; - - float a = 1; - if (alphaWeight) a = a1; - - mse += r * r * a; - mse += g * g * a; - mse += b * b * a; - } - - return float(sqrt(mse / count)); -} - -float nv::rmsAlphaError(const FloatImage * img, const FloatImage * ref) -{ - if (!sameLayout(img, ref)) { - return FLT_MAX; - } - nvDebugCheck(img->componentCount() == 4 && ref->componentCount() == 4); - - double mse = 0; - - const uint count = img->pixelCount(); - for (uint i = 0; i < count; i++) - { - float a0 = img->pixel(i + count * 3); - float a1 = ref->pixel(i + count * 3); - - float a = a0 - a1; - - mse += a * a; - } - - return float(sqrt(mse / count)); -} - - -float nv::averageColorError(const FloatImage * img, const FloatImage * ref, bool alphaWeight) -{ - if (!sameLayout(img, ref)) { - return FLT_MAX; - } - nvDebugCheck(img->componentCount() == 4); - nvDebugCheck(ref->componentCount() == 4); - - double mae = 0; - - const uint count = img->pixelCount(); - for (uint i = 0; i < count; i++) - { - float r0 = img->pixel(i + count * 0); - float g0 = img->pixel(i + count * 1); - float b0 = img->pixel(i + count * 2); - //float a0 = img->pixel(i + count * 3); - float r1 = ref->pixel(i + count * 0); - float g1 = ref->pixel(i + count * 1); - float b1 = ref->pixel(i + count * 2); - float a1 = ref->pixel(i + count * 3); - - float r = fabs(r0 - r1); - float g = fabs(g0 - g1); - float b = fabs(b0 - b1); - - float a = 1; - if (alphaWeight) a = a1; - - mae += r * a; - mae += g * a; - mae += b * a; - } - - return float(mae / count); -} - -float nv::averageAlphaError(const FloatImage * img, const FloatImage * ref) -{ - if (img == NULL || ref == NULL || img->width() != ref->width() || img->height() != ref->height()) { - return FLT_MAX; - } - nvDebugCheck(img->componentCount() == 4 && ref->componentCount() == 4); - - double mae = 0; - - const uint count = img->width() * img->height(); - for (uint i = 0; i < count; i++) - { - float a0 = img->pixel(i + count * 3); - float a1 = ref->pixel(i + count * 3); - - float a = a0 - a1; - - mae += fabs(a); - } - - return float(mae / count); -} - - -// Color space conversions based on: -// http://www.brucelindbloom.com/ - -// Assumes input is in *linear* sRGB color space. -static Vector3 rgbToXyz(Vector3::Arg c) -{ - Vector3 xyz; - xyz.x = 0.412453f * c.x + 0.357580f * c.y + 0.180423f * c.z; - xyz.y = 0.212671f * c.x + 0.715160f * c.y + 0.072169f * c.z; - xyz.z = 0.019334f * c.x + 0.119193f * c.y + 0.950227f * c.z; - return xyz; -} - -static Vector3 xyzToRgb(Vector3::Arg c) -{ - Vector3 rgb; - rgb.x = 3.2404542f * c.x - 1.5371385f * c.y - 0.4985314f * c.z; - rgb.y = -0.9692660f * c.x + 1.8760108f * c.y + 0.0415560f * c.z; - rgb.z = 0.0556434f * c.x - 0.2040259f * c.y + 1.0572252f * c.z; - return rgb; -} - -static float toLinear(float f) -{ - return powf(f, 2.2f); -} - -static float toGamma(float f) -{ - // @@ Use sRGB space? - return powf(f, 1.0f/2.2f); -} - -static Vector3 toLinear(Vector3::Arg c) -{ - return Vector3(toLinear(c.x), toLinear(c.y), toLinear(c.z)); -} - -static Vector3 toGamma(Vector3::Arg c) -{ - return Vector3(toGamma(c.x), toGamma(c.y), toGamma(c.z)); -} - -static float f(float t) -{ - const float epsilon = powf(6.0f/29.0f, 3); - - if (t > epsilon) { - return powf(t, 1.0f/3.0f); - } - else { - return 1.0f/3.0f * powf(29.0f/6.0f, 2) * t + 4.0f / 29.0f; - } -} - -static float finv(float t) -{ - if (t > 6.0f / 29.0f) { - return 3.0f * powf(6.0f / 29.0f, 2) * (t - 4.0f / 29.0f); - } - else { - return powf(t, 3.0f); - } -} - -static Vector3 xyzToCieLab(Vector3::Arg c) -{ - // Normalized white point. - const float Xn = 0.950456f; - const float Yn = 1.0f; - const float Zn = 1.088754f; - - float Xr = c.x / Xn; - float Yr = c.y / Yn; - float Zr = c.z / Zn; - - float fx = f(Xr); - float fy = f(Yr); - float fz = f(Zr); - - float L = 116 * fx - 16; - float a = 500 * (fx - fy); - float b = 200 * (fy - fz); - - return Vector3(L, a, b); -} - -static Vector3 rgbToCieLab(Vector3::Arg c) -{ - return xyzToCieLab(rgbToXyz(toLinear(c))); -} - + +#include "ErrorMetric.h" +#include "FloatImage.h" +#include "Filter.h" + +#include "nvmath/Matrix.h" +#include "nvmath/Vector.inl" + +#include // FLT_MAX + +using namespace nv; + +float nv::rmsColorError(const FloatImage * img, const FloatImage * ref, bool alphaWeight) +{ + if (!sameLayout(img, ref)) { + return FLT_MAX; + } + nvDebugCheck(img->componentCount() == 4); + nvDebugCheck(ref->componentCount() == 4); + + double mse = 0; + + const uint count = img->pixelCount(); + for (uint i = 0; i < count; i++) + { + float r0 = img->pixel(i + count * 0); + float g0 = img->pixel(i + count * 1); + float b0 = img->pixel(i + count * 2); + //float a0 = img->pixel(i + count * 3); + float r1 = ref->pixel(i + count * 0); + float g1 = ref->pixel(i + count * 1); + float b1 = ref->pixel(i + count * 2); + float a1 = ref->pixel(i + count * 3); + + float r = r0 - r1; + float g = g0 - g1; + float b = b0 - b1; + + float a = 1; + if (alphaWeight) a = a1; + + mse += r * r * a; + mse += g * g * a; + mse += b * b * a; + } + + return float(sqrt(mse / count)); +} + +float nv::rmsAlphaError(const FloatImage * img, const FloatImage * ref) +{ + if (!sameLayout(img, ref)) { + return FLT_MAX; + } + nvDebugCheck(img->componentCount() == 4 && ref->componentCount() == 4); + + double mse = 0; + + const uint count = img->pixelCount(); + for (uint i = 0; i < count; i++) + { + float a0 = img->pixel(i + count * 3); + float a1 = ref->pixel(i + count * 3); + + float a = a0 - a1; + + mse += a * a; + } + + return float(sqrt(mse / count)); +} + + +float nv::averageColorError(const FloatImage * img, const FloatImage * ref, bool alphaWeight) +{ + if (!sameLayout(img, ref)) { + return FLT_MAX; + } + nvDebugCheck(img->componentCount() == 4); + nvDebugCheck(ref->componentCount() == 4); + + double mae = 0; + + const uint count = img->pixelCount(); + for (uint i = 0; i < count; i++) + { + float r0 = img->pixel(i + count * 0); + float g0 = img->pixel(i + count * 1); + float b0 = img->pixel(i + count * 2); + //float a0 = img->pixel(i + count * 3); + float r1 = ref->pixel(i + count * 0); + float g1 = ref->pixel(i + count * 1); + float b1 = ref->pixel(i + count * 2); + float a1 = ref->pixel(i + count * 3); + + float r = fabs(r0 - r1); + float g = fabs(g0 - g1); + float b = fabs(b0 - b1); + + float a = 1; + if (alphaWeight) a = a1; + + mae += r * a; + mae += g * a; + mae += b * a; + } + + return float(mae / count); +} + +float nv::averageAlphaError(const FloatImage * img, const FloatImage * ref) +{ + if (img == NULL || ref == NULL || img->width() != ref->width() || img->height() != ref->height()) { + return FLT_MAX; + } + nvDebugCheck(img->componentCount() == 4 && ref->componentCount() == 4); + + double mae = 0; + + const uint count = img->width() * img->height(); + for (uint i = 0; i < count; i++) + { + float a0 = img->pixel(i + count * 3); + float a1 = ref->pixel(i + count * 3); + + float a = a0 - a1; + + mae += fabs(a); + } + + return float(mae / count); +} + + +// Color space conversions based on: +// http://www.brucelindbloom.com/ + +// Assumes input is in *linear* sRGB color space. +static Vector3 rgbToXyz(Vector3::Arg c) +{ + Vector3 xyz; + xyz.x = 0.412453f * c.x + 0.357580f * c.y + 0.180423f * c.z; + xyz.y = 0.212671f * c.x + 0.715160f * c.y + 0.072169f * c.z; + xyz.z = 0.019334f * c.x + 0.119193f * c.y + 0.950227f * c.z; + return xyz; +} + +static Vector3 xyzToRgb(Vector3::Arg c) +{ + Vector3 rgb; + rgb.x = 3.2404542f * c.x - 1.5371385f * c.y - 0.4985314f * c.z; + rgb.y = -0.9692660f * c.x + 1.8760108f * c.y + 0.0415560f * c.z; + rgb.z = 0.0556434f * c.x - 0.2040259f * c.y + 1.0572252f * c.z; + return rgb; +} + +static float toLinear(float f) +{ + return powf(f, 2.2f); +} + +static float toGamma(float f) +{ + // @@ Use sRGB space? + return powf(f, 1.0f/2.2f); +} + +static Vector3 toLinear(Vector3::Arg c) +{ + return Vector3(toLinear(c.x), toLinear(c.y), toLinear(c.z)); +} + +static Vector3 toGamma(Vector3::Arg c) +{ + return Vector3(toGamma(c.x), toGamma(c.y), toGamma(c.z)); +} + +static float f(float t) +{ + const float epsilon = powf(6.0f/29.0f, 3); + + if (t > epsilon) { + return powf(t, 1.0f/3.0f); + } + else { + return 1.0f/3.0f * powf(29.0f/6.0f, 2) * t + 4.0f / 29.0f; + } +} + +static float finv(float t) +{ + if (t > 6.0f / 29.0f) { + return 3.0f * powf(6.0f / 29.0f, 2) * (t - 4.0f / 29.0f); + } + else { + return powf(t, 3.0f); + } +} + +static Vector3 xyzToCieLab(Vector3::Arg c) +{ + // Normalized white point. + const float Xn = 0.950456f; + const float Yn = 1.0f; + const float Zn = 1.088754f; + + float Xr = c.x / Xn; + float Yr = c.y / Yn; + float Zr = c.z / Zn; + + float fx = f(Xr); + float fy = f(Yr); + float fz = f(Zr); + + float L = 116 * fx - 16; + float a = 500 * (fx - fy); + float b = 200 * (fy - fz); + + return Vector3(L, a, b); +} + +static Vector3 rgbToCieLab(Vector3::Arg c) +{ + return xyzToCieLab(rgbToXyz(toLinear(c))); +} + // h is hue-angle in radians static Vector3 cieLabToLCh(Vector3::Arg c) { return Vector3(c.x, sqrtf(c.y*c.y + c.z*c.z), atan2f(c.y, c.z)); } - -static void rgbToCieLab(const FloatImage * rgbImage, FloatImage * LabImage) -{ - nvDebugCheck(rgbImage != NULL && LabImage != NULL); - nvDebugCheck(rgbImage->width() == LabImage->width() && rgbImage->height() == LabImage->height()); - nvDebugCheck(rgbImage->componentCount() >= 3 && LabImage->componentCount() >= 3); - - const uint w = rgbImage->width(); - const uint h = LabImage->height(); - - const float * R = rgbImage->channel(0); - const float * G = rgbImage->channel(1); - const float * B = rgbImage->channel(2); - - float * L = LabImage->channel(0); - float * a = LabImage->channel(1); - float * b = LabImage->channel(2); - - const uint count = w*h; - for (uint i = 0; i < count; i++) - { - Vector3 Lab = rgbToCieLab(Vector3(R[i], G[i], B[i])); - L[i] = Lab.x; - a[i] = Lab.y; - b[i] = Lab.z; - } -} - - -// Assumes input images are in linear sRGB space. -float nv::cieLabError(const FloatImage * img0, const FloatImage * img1) -{ - if (!sameLayout(img0, img1)) return FLT_MAX; - nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); - - const float * r0 = img0->channel(0); - const float * g0 = img0->channel(1); - const float * b0 = img0->channel(2); - - const float * r1 = img1->channel(0); - const float * g1 = img1->channel(1); - const float * b1 = img1->channel(2); - - double error = 0.0f; - - const uint count = img0->pixelCount(); - for (uint i = 0; i < count; i++) - { - Vector3 lab0 = rgbToCieLab(Vector3(r0[i], g0[i], b0[i])); - Vector3 lab1 = rgbToCieLab(Vector3(r1[i], g1[i], b1[i])); - - // @@ Measure Delta E. - Vector3 delta = lab0 - lab1; - - error += length(delta); - } - - return float(error / count); -} - + +static void rgbToCieLab(const FloatImage * rgbImage, FloatImage * LabImage) +{ + nvDebugCheck(rgbImage != NULL && LabImage != NULL); + nvDebugCheck(rgbImage->width() == LabImage->width() && rgbImage->height() == LabImage->height()); + nvDebugCheck(rgbImage->componentCount() >= 3 && LabImage->componentCount() >= 3); + + const uint w = rgbImage->width(); + const uint h = LabImage->height(); + + const float * R = rgbImage->channel(0); + const float * G = rgbImage->channel(1); + const float * B = rgbImage->channel(2); + + float * L = LabImage->channel(0); + float * a = LabImage->channel(1); + float * b = LabImage->channel(2); + + const uint count = w*h; + for (uint i = 0; i < count; i++) + { + Vector3 Lab = rgbToCieLab(Vector3(R[i], G[i], B[i])); + L[i] = Lab.x; + a[i] = Lab.y; + b[i] = Lab.z; + } +} + + +// Assumes input images are in linear sRGB space. +float nv::cieLabError(const FloatImage * img0, const FloatImage * img1) +{ + if (!sameLayout(img0, img1)) return FLT_MAX; + nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); + + const float * r0 = img0->channel(0); + const float * g0 = img0->channel(1); + const float * b0 = img0->channel(2); + + const float * r1 = img1->channel(0); + const float * g1 = img1->channel(1); + const float * b1 = img1->channel(2); + + double error = 0.0f; + + const uint count = img0->pixelCount(); + for (uint i = 0; i < count; i++) + { + Vector3 lab0 = rgbToCieLab(Vector3(r0[i], g0[i], b0[i])); + Vector3 lab1 = rgbToCieLab(Vector3(r1[i], g1[i], b1[i])); + + // @@ Measure Delta E. + Vector3 delta = lab0 - lab1; + + error += length(delta); + } + + return float(error / count); +} + // Assumes input images are in linear sRGB space. float nv::cieLab94Error(const FloatImage * img0, const FloatImage * img1) { @@ -339,122 +339,122 @@ float nv::cieLab94Error(const FloatImage * img0, const FloatImage * img1) } return float(error / count); -} - -float nv::spatialCieLabError(const FloatImage * img0, const FloatImage * img1) -{ - if (img0 == NULL || img1 == NULL || img0->width() != img1->width() || img0->height() != img1->height()) { - return FLT_MAX; - } - nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); - - uint w = img0->width(); - uint h = img0->height(); - uint d = img0->depth(); - - FloatImage lab0, lab1; // Original images in CIE-Lab space. - lab0.allocate(3, w, h, d); - lab1.allocate(3, w, h, d); - - // Convert input images to CIE-Lab. - rgbToCieLab(img0, &lab0); - rgbToCieLab(img1, &lab1); - - // @@ Convolve each channel by the corresponding filter. - /* - GaussianFilter LFilter(5); - GaussianFilter aFilter(5); - GaussianFilter bFilter(5); - - lab0.convolve(0, LFilter); - lab0.convolve(1, aFilter); - lab0.convolve(2, bFilter); - - lab1.convolve(0, LFilter); - lab1.convolve(1, aFilter); - lab1.convolve(2, bFilter); - */ - // @@ Measure Delta E between lab0 and lab1. - - return 0.0f; -} - - -// Assumes input images are normal maps. -float nv::averageAngularError(const FloatImage * img0, const FloatImage * img1) -{ - if (img0 == NULL || img1 == NULL || img0->width() != img1->width() || img0->height() != img1->height()) { - return FLT_MAX; - } - nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); - - uint w = img0->width(); - uint h = img0->height(); - - const float * x0 = img0->channel(0); - const float * y0 = img0->channel(1); - const float * z0 = img0->channel(2); - - const float * x1 = img1->channel(0); - const float * y1 = img1->channel(1); - const float * z1 = img1->channel(2); - - double error = 0.0f; - - const uint count = w*h; - for (uint i = 0; i < count; i++) - { - Vector3 n0 = Vector3(x0[i], y0[i], z0[i]); - Vector3 n1 = Vector3(x1[i], y1[i], z1[i]); - - n0 = 2.0f * n0 - Vector3(1); - n1 = 2.0f * n1 - Vector3(1); - - n0 = normalizeSafe(n0, Vector3(0), 0.0f); - n1 = normalizeSafe(n1, Vector3(0), 0.0f); - - error += acos(clamp(dot(n0, n1), -1.0f, 1.0f)); - } - - return float(error / count); -} - -float nv::rmsAngularError(const FloatImage * img0, const FloatImage * img1) -{ - if (img0 == NULL || img1 == NULL || img0->width() != img1->width() || img0->height() != img1->height()) { - return FLT_MAX; - } - nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); - - uint w = img0->width(); - uint h = img0->height(); - - const float * x0 = img0->channel(0); - const float * y0 = img0->channel(1); - const float * z0 = img0->channel(2); - - const float * x1 = img1->channel(0); - const float * y1 = img1->channel(1); - const float * z1 = img1->channel(2); - - double error = 0.0f; - - const uint count = w*h; - for (uint i = 0; i < count; i++) - { - Vector3 n0 = Vector3(x0[i], y0[i], z0[i]); - Vector3 n1 = Vector3(x1[i], y1[i], z1[i]); - - n0 = 2.0f * n0 - Vector3(1); - n1 = 2.0f * n1 - Vector3(1); - - n0 = normalizeSafe(n0, Vector3(0), 0.0f); - n1 = normalizeSafe(n1, Vector3(0), 0.0f); - - float angle = acosf(clamp(dot(n0, n1), -1.0f, 1.0f)); - error += angle * angle; - } - - return float(sqrt(error / count)); -} - +} + +float nv::spatialCieLabError(const FloatImage * img0, const FloatImage * img1) +{ + if (img0 == NULL || img1 == NULL || img0->width() != img1->width() || img0->height() != img1->height()) { + return FLT_MAX; + } + nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); + + uint w = img0->width(); + uint h = img0->height(); + uint d = img0->depth(); + + FloatImage lab0, lab1; // Original images in CIE-Lab space. + lab0.allocate(3, w, h, d); + lab1.allocate(3, w, h, d); + + // Convert input images to CIE-Lab. + rgbToCieLab(img0, &lab0); + rgbToCieLab(img1, &lab1); + + // @@ Convolve each channel by the corresponding filter. + /* + GaussianFilter LFilter(5); + GaussianFilter aFilter(5); + GaussianFilter bFilter(5); + + lab0.convolve(0, LFilter); + lab0.convolve(1, aFilter); + lab0.convolve(2, bFilter); + + lab1.convolve(0, LFilter); + lab1.convolve(1, aFilter); + lab1.convolve(2, bFilter); + */ + // @@ Measure Delta E between lab0 and lab1. + + return 0.0f; +} + + +// Assumes input images are normal maps. +float nv::averageAngularError(const FloatImage * img0, const FloatImage * img1) +{ + if (img0 == NULL || img1 == NULL || img0->width() != img1->width() || img0->height() != img1->height()) { + return FLT_MAX; + } + nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); + + uint w = img0->width(); + uint h = img0->height(); + + const float * x0 = img0->channel(0); + const float * y0 = img0->channel(1); + const float * z0 = img0->channel(2); + + const float * x1 = img1->channel(0); + const float * y1 = img1->channel(1); + const float * z1 = img1->channel(2); + + double error = 0.0f; + + const uint count = w*h; + for (uint i = 0; i < count; i++) + { + Vector3 n0 = Vector3(x0[i], y0[i], z0[i]); + Vector3 n1 = Vector3(x1[i], y1[i], z1[i]); + + n0 = 2.0f * n0 - Vector3(1); + n1 = 2.0f * n1 - Vector3(1); + + n0 = normalizeSafe(n0, Vector3(0), 0.0f); + n1 = normalizeSafe(n1, Vector3(0), 0.0f); + + error += acos(clamp(dot(n0, n1), -1.0f, 1.0f)); + } + + return float(error / count); +} + +float nv::rmsAngularError(const FloatImage * img0, const FloatImage * img1) +{ + if (img0 == NULL || img1 == NULL || img0->width() != img1->width() || img0->height() != img1->height()) { + return FLT_MAX; + } + nvDebugCheck(img0->componentCount() == 4 && img0->componentCount() == 4); + + uint w = img0->width(); + uint h = img0->height(); + + const float * x0 = img0->channel(0); + const float * y0 = img0->channel(1); + const float * z0 = img0->channel(2); + + const float * x1 = img1->channel(0); + const float * y1 = img1->channel(1); + const float * z1 = img1->channel(2); + + double error = 0.0f; + + const uint count = w*h; + for (uint i = 0; i < count; i++) + { + Vector3 n0 = Vector3(x0[i], y0[i], z0[i]); + Vector3 n1 = Vector3(x1[i], y1[i], z1[i]); + + n0 = 2.0f * n0 - Vector3(1); + n1 = 2.0f * n1 - Vector3(1); + + n0 = normalizeSafe(n0, Vector3(0), 0.0f); + n1 = normalizeSafe(n1, Vector3(0), 0.0f); + + float angle = acosf(clamp(dot(n0, n1), -1.0f, 1.0f)); + error += angle * angle; + } + + return float(sqrt(error / count)); +} + diff --git a/src/nvmath/Fitting.cpp b/src/nvmath/Fitting.cpp index 5b43ede..9763b78 100644 --- a/src/nvmath/Fitting.cpp +++ b/src/nvmath/Fitting.cpp @@ -13,7 +13,7 @@ using namespace nv; // @@ Move to EigenSolver.h // @@ We should be able to do something cheaper... -static Vector3 estimatePrincipleComponent(const float * __restrict matrix) +static Vector3 estimatePrincipalComponent(const float * __restrict matrix) { const Vector3 row0(matrix[0], matrix[1], matrix[2]); const Vector3 row1(matrix[1], matrix[3], matrix[4]); @@ -36,7 +36,7 @@ static inline Vector3 firstEigenVector_PowerMethod(const float *__restrict matri return Vector3(0.0f); } - Vector3 v = estimatePrincipleComponent(matrix); + Vector3 v = estimatePrincipalComponent(matrix); const int NUM = 8; for (int i = 0; i < NUM; i++) @@ -136,7 +136,7 @@ Vector3 nv::Fit::computeCovariance(int n, const Vector3 *__restrict points, cons return centroid; } -Vector3 nv::Fit::computePrincipalComponent(int n, const Vector3 *__restrict points) +Vector3 nv::Fit::computePrincipalComponent_PowerMethod(int n, const Vector3 *__restrict points) { float matrix[6]; computeCovariance(n, points, matrix); @@ -144,7 +144,7 @@ Vector3 nv::Fit::computePrincipalComponent(int n, const Vector3 *__restrict poin return firstEigenVector_PowerMethod(matrix); } -Vector3 nv::Fit::computePrincipalComponent(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric) +Vector3 nv::Fit::computePrincipalComponent_PowerMethod(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric) { float matrix[6]; computeCovariance(n, points, weights, metric, matrix); @@ -153,6 +153,42 @@ Vector3 nv::Fit::computePrincipalComponent(int n, const Vector3 *__restrict poin } + +static inline Vector3 firstEigenVector_EigenSolver(const float *__restrict matrix) +{ + if (matrix[0] == 0 && matrix[3] == 0 && matrix[5] == 0) + { + return Vector3(0.0f); + } + + float eigenValues[3]; + Vector3 eigenVectors[3]; + if (!nv::Fit::eigenSolveSymmetric(matrix, eigenValues, eigenVectors)) + { + return Vector3(0.0f); + } + + return eigenVectors[0]; +} + +Vector3 nv::Fit::computePrincipalComponent_EigenSolver(int n, const Vector3 *__restrict points) +{ + float matrix[6]; + computeCovariance(n, points, matrix); + + return firstEigenVector_EigenSolver(matrix); +} + +Vector3 nv::Fit::computePrincipalComponent_EigenSolver(int n, const Vector3 *__restrict points, const float *__restrict weights, Vector3::Arg metric) +{ + float matrix[6]; + computeCovariance(n, points, weights, metric, matrix); + + return firstEigenVector_EigenSolver(matrix); +} + + + Plane nv::Fit::bestPlane(int n, const Vector3 *__restrict points) { // compute the centroid and covariance @@ -199,7 +235,7 @@ bool nv::Fit::isPlanar(int n, const Vector3 * points, float epsilon/*=NV_EPSILON static void EigenSolver_Tridiagonal(double mat[3][3],double * diag,double * subd); static bool EigenSolver_QLAlgorithm(double mat[3][3],double * diag,double * subd); -bool nv::Fit::eigenSolveSymmetric(float matrix[6], float eigenValues[3], Vector3 eigenVectors[3]) +bool nv::Fit::eigenSolveSymmetric(const float matrix[6], float eigenValues[3], Vector3 eigenVectors[3]) { nvDebugCheck(matrix != NULL && eigenValues != NULL && eigenVectors != NULL); diff --git a/src/nvmath/Fitting.h b/src/nvmath/Fitting.h index a99c4ac..a783753 100644 --- a/src/nvmath/Fitting.h +++ b/src/nvmath/Fitting.h @@ -17,13 +17,16 @@ namespace nv Vector3 computeCovariance(int n, const Vector3 * points, float * covariance); Vector3 computeCovariance(int n, const Vector3 * points, const float * weights, const Vector3 & metric, float * covariance); - Vector3 computePrincipalComponent(int n, const Vector3 * points); - Vector3 computePrincipalComponent(int n, const Vector3 * points, const float * weights, const Vector3 & metric); + Vector3 computePrincipalComponent_PowerMethod(int n, const Vector3 * points); + Vector3 computePrincipalComponent_PowerMethod(int n, const Vector3 * points, const float * weights, const Vector3 & metric); + + Vector3 computePrincipalComponent_EigenSolver(int n, const Vector3 * points); + Vector3 computePrincipalComponent_EigenSolver(int n, const Vector3 * points, const float * weights, const Vector3 & metric); Plane bestPlane(int n, const Vector3 * points); bool isPlanar(int n, const Vector3 * points, float epsilon = NV_EPSILON); - bool eigenSolveSymmetric (float matrix[6], float eigenValues[3], Vector3 eigenVectors[3]); + bool eigenSolveSymmetric (const float matrix[6], float eigenValues[3], Vector3 eigenVectors[3]); // Returns number of clusters [1-4]. diff --git a/src/nvmath/Half.h b/src/nvmath/Half.h index 9027618..f0e60c4 100644 --- a/src/nvmath/Half.h +++ b/src/nvmath/Half.h @@ -23,7 +23,9 @@ namespace nv { // http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf inline uint32 fast_half_to_float(uint16 h) { - nvDebugCheck(mantissa_table[0] == 0); // Make sure table was initialized. + // Initialize table if necessary. + if (mantissa_table[0] != 0) + half_init_tables(); uint exp = h >> 10; return mantissa_table[offset_table[exp] + (h & 0x3ff)] + exponent_table[exp]; } diff --git a/src/nvtt/ClusterFit.cpp b/src/nvtt/ClusterFit.cpp index ebe6ac1..f9444b5 100644 --- a/src/nvtt/ClusterFit.cpp +++ b/src/nvtt/ClusterFit.cpp @@ -57,14 +57,14 @@ void ClusterFit::setColourSet(const ColorSet * set) values[i] = set->colors[i].xyz(); } - Vector3 principle = Fit::computePrincipalComponent(m_count, values, set->weights, metric); + Vector3 principal = Fit::computePrincipalComponent_PowerMethod(m_count, values, set->weights, metric); // build the list of values int order[16]; float dps[16]; for (uint i = 0; i < m_count; ++i) { - dps[i] = dot(values[i], principle); + dps[i] = dot(values[i], principal); order[i] = i; } diff --git a/src/nvtt/CompressorDX11.cpp b/src/nvtt/CompressorDX11.cpp index 63635fe..ff78fd7 100644 --- a/src/nvtt/CompressorDX11.cpp +++ b/src/nvtt/CompressorDX11.cpp @@ -24,8 +24,11 @@ #include "CompressorDX11.h" +#include #include "nvtt.h" #include "CompressionOptions.h" +#include "nvimage/ColorBlock.h" +#include "nvmath/Half.h" #include "bc6h/zoh.h" #include "bc6h/utils.h" @@ -52,7 +55,26 @@ void CompressorBC6::compressBlock(ColorSet & tile, AlphaMode alphaMode, const Co Utils::FORMAT = SIGNED_F16; } - ZOH::compress(tile, (char *)output); + // Convert NVTT's tile struct to ZOH's, and convert float to half. + Tile zohTile(tile.w, tile.h); + memset(zohTile.data, 0, sizeof(zohTile.data)); + memset(zohTile.importance_map, 0, sizeof(zohTile.importance_map)); + for (uint y = 0; y < tile.h; ++y) + { + for (uint x = 0; x < tile.w; ++x) + { + Vector3 color = tile.color(x, y).xyz(); + uint16 rHalf = to_half(color.x); + uint16 gHalf = to_half(color.y); + uint16 bHalf = to_half(color.z); + zohTile.data[y][x].x = Tile::half2float(rHalf); + zohTile.data[y][x].y = Tile::half2float(gHalf); + zohTile.data[y][x].z = Tile::half2float(bHalf); + zohTile.importance_map[y][x] = 1.0f; + } + } + + ZOH::compress(zohTile, (char *)output); } diff --git a/src/nvtt/Context.cpp b/src/nvtt/Context.cpp index cd23dd8..10cf76a 100644 --- a/src/nvtt/Context.cpp +++ b/src/nvtt/Context.cpp @@ -485,32 +485,32 @@ bool Compressor::Private::outputHeader(nvtt::TextureType textureType, int w, int else { if (compressionOptions.format == Format_DXT1 || compressionOptions.format == Format_DXT1a || compressionOptions.format == Format_DXT1n) { - header.setDX10Format(70); // DXGI_FORMAT_BC1_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC1_UNORM); if (compressionOptions.format == Format_DXT1a) header.setHasAlphaFlag(true); if (isNormalMap) header.setNormalFlag(true); } else if (compressionOptions.format == Format_DXT3) { - header.setDX10Format(73); // DXGI_FORMAT_BC2_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC2_UNORM); } else if (compressionOptions.format == Format_DXT5) { - header.setDX10Format(76); // DXGI_FORMAT_BC3_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC3_UNORM); } else if (compressionOptions.format == Format_DXT5n) { - header.setDX10Format(76); // DXGI_FORMAT_BC3_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC3_UNORM); if (isNormalMap) header.setNormalFlag(true); } else if (compressionOptions.format == Format_BC4) { - header.setDX10Format(79); // DXGI_FORMAT_BC4_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC4_UNORM); } else if (compressionOptions.format == Format_BC5) { - header.setDX10Format(82); // DXGI_FORMAT_BC5_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC5_UNORM); if (isNormalMap) header.setNormalFlag(true); } else if (compressionOptions.format == Format_BC6) { - header.setDX10Format(94); // DXGI_FORMAT_BC6H_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC6H_UF16); } else if (compressionOptions.format == Format_BC7) { - header.setDX10Format(97); // DXGI_FORMAT_BC7_TYPELESS + header.setDX10Format(DXGI_FORMAT_BC7_UNORM); if (isNormalMap) header.setNormalFlag(true); } else { @@ -771,11 +771,12 @@ CompressorInterface * Compressor::Private::chooseCpuCompressor(const Compression } else if (compressionOptions.format == Format_BC6) { - // Not supported. + return new CompressorBC6; } else if (compressionOptions.format == Format_BC7) { - // Not supported. + // !!!UNDONE + //return new CompressorBC7; } return NULL; diff --git a/src/nvtt/Surface.cpp b/src/nvtt/Surface.cpp index a0534fa..9cc9e54 100644 --- a/src/nvtt/Surface.cpp +++ b/src/nvtt/Surface.cpp @@ -702,7 +702,12 @@ bool Surface::setImage(InputFormat format, int w, int h, int d, const void * r, // @@ Add support for compressed 3D textures. bool Surface::setImage2D(Format format, Decoder decoder, int w, int h, const void * data) { - if (format != nvtt::Format_BC1 && format != nvtt::Format_BC2 && format != nvtt::Format_BC3 && format != nvtt::Format_BC4 && format != nvtt::Format_BC5) + if (format != nvtt::Format_BC1 && + format != nvtt::Format_BC2 && + format != nvtt::Format_BC3 && + format != nvtt::Format_BC4 && + format != nvtt::Format_BC5 && + format != nvtt::Format_BC6) { return false; } @@ -723,84 +728,125 @@ bool Surface::setImage2D(Format format, Decoder decoder, int w, int h, const voi const uint8 * ptr = (const uint8 *)data; TRY { - for (int y = 0; y < bh; y++) - { - for (int x = 0; x < bw; x++) - { - ColorBlock colors; + if (format == nvtt::Format_BC6) + { + // BC6 format - decode directly to float - if (format == nvtt::Format_BC1) - { - const BlockDXT1 * block = (const BlockDXT1 *)ptr; + for (int y = 0; y < bh; y++) + { + for (int x = 0; x < bw; x++) + { + ColorSet colors; + const BlockBC6 * block = (const BlockBC6 *)ptr; + block->decodeBlock(&colors); - if (decoder == Decoder_D3D10) { - block->decodeBlock(&colors, false); - } - else if (decoder == Decoder_D3D9) { - block->decodeBlock(&colors, false); - } - else if (decoder == Decoder_NV5x) { - block->decodeBlockNV5x(&colors); - } - } - else if (format == nvtt::Format_BC2) - { - const BlockDXT3 * block = (const BlockDXT3 *)ptr; + for (int yy = 0; yy < 4; yy++) + { + for (int xx = 0; xx < 4; xx++) + { + Vector4 rgba = colors.colors[yy*4 + xx]; - if (decoder == Decoder_D3D10) { - block->decodeBlock(&colors, false); - } - else if (decoder == Decoder_D3D9) { - block->decodeBlock(&colors, false); - } - else if (decoder == Decoder_NV5x) { - block->decodeBlockNV5x(&colors); - } - } - else if (format == nvtt::Format_BC3) - { - const BlockDXT5 * block = (const BlockDXT5 *)ptr; + if (x * 4 + xx < w && y * 4 + yy < h) + { + m->image->pixel(0, x*4 + xx, y*4 + yy, 0) = rgba.x; + m->image->pixel(1, x*4 + xx, y*4 + yy, 0) = rgba.y; + m->image->pixel(2, x*4 + xx, y*4 + yy, 0) = rgba.z; + m->image->pixel(3, x*4 + xx, y*4 + yy, 0) = rgba.w; + } + } + } - if (decoder == Decoder_D3D10) { - block->decodeBlock(&colors, false); - } - else if (decoder == Decoder_D3D9) { - block->decodeBlock(&colors, false); - } - else if (decoder == Decoder_NV5x) { - block->decodeBlockNV5x(&colors); - } - } - else if (format == nvtt::Format_BC4) - { - const BlockATI1 * block = (const BlockATI1 *)ptr; - block->decodeBlock(&colors, decoder == Decoder_D3D9); - } - else if (format == nvtt::Format_BC5) - { - const BlockATI2 * block = (const BlockATI2 *)ptr; - block->decodeBlock(&colors, decoder == Decoder_D3D9); - } + ptr += bs; + } + } + } + else + { + // Non-BC6 - decode to 8-bit, then convert to float - for (int yy = 0; yy < 4; yy++) - { - for (int xx = 0; xx < 4; xx++) - { - Color32 c = colors.color(xx, yy); + for (int y = 0; y < bh; y++) + { + for (int x = 0; x < bw; x++) + { + ColorBlock colors; - if (x * 4 + xx < w && y * 4 + yy < h) - { - m->image->pixel(0, x*4 + xx, y*4 + yy, 0) = float(c.r) * 1.0f/255.0f; - m->image->pixel(1, x*4 + xx, y*4 + yy, 0) = float(c.g) * 1.0f/255.0f; - m->image->pixel(2, x*4 + xx, y*4 + yy, 0) = float(c.b) * 1.0f/255.0f; - m->image->pixel(3, x*4 + xx, y*4 + yy, 0) = float(c.a) * 1.0f/255.0f; - } - } - } + if (format == nvtt::Format_BC1) + { + const BlockDXT1 * block = (const BlockDXT1 *)ptr; - ptr += bs; - } - } + if (decoder == Decoder_D3D10) { + block->decodeBlock(&colors, false); + } + else if (decoder == Decoder_D3D9) { + block->decodeBlock(&colors, false); + } + else if (decoder == Decoder_NV5x) { + block->decodeBlockNV5x(&colors); + } + } + else if (format == nvtt::Format_BC2) + { + const BlockDXT3 * block = (const BlockDXT3 *)ptr; + + if (decoder == Decoder_D3D10) { + block->decodeBlock(&colors, false); + } + else if (decoder == Decoder_D3D9) { + block->decodeBlock(&colors, false); + } + else if (decoder == Decoder_NV5x) { + block->decodeBlockNV5x(&colors); + } + } + else if (format == nvtt::Format_BC3) + { + const BlockDXT5 * block = (const BlockDXT5 *)ptr; + + if (decoder == Decoder_D3D10) { + block->decodeBlock(&colors, false); + } + else if (decoder == Decoder_D3D9) { + block->decodeBlock(&colors, false); + } + else if (decoder == Decoder_NV5x) { + block->decodeBlockNV5x(&colors); + } + } + else if (format == nvtt::Format_BC4) + { + const BlockATI1 * block = (const BlockATI1 *)ptr; + block->decodeBlock(&colors, decoder == Decoder_D3D9); + } + else if (format == nvtt::Format_BC5) + { + const BlockATI2 * block = (const BlockATI2 *)ptr; + block->decodeBlock(&colors, decoder == Decoder_D3D9); + } + else + { + nvDebugCheck(false); + } + + for (int yy = 0; yy < 4; yy++) + { + for (int xx = 0; xx < 4; xx++) + { + Color32 c = colors.color(xx, yy); + + if (x * 4 + xx < w && y * 4 + yy < h) + { + m->image->pixel(0, x*4 + xx, y*4 + yy, 0) = float(c.r) * 1.0f/255.0f; + m->image->pixel(1, x*4 + xx, y*4 + yy, 0) = float(c.g) * 1.0f/255.0f; + m->image->pixel(2, x*4 + xx, y*4 + yy, 0) = float(c.b) * 1.0f/255.0f; + m->image->pixel(3, x*4 + xx, y*4 + yy, 0) = float(c.a) * 1.0f/255.0f; + } + } + } + + ptr += bs; + } + } + } } CATCH { return false; @@ -1455,7 +1501,7 @@ void Surface::scaleAlphaToCoverage(float coverage, float alphaRef/*= 0.5f*/) // Ideally you should compress/quantize the RGB and M portions independently. // Once you have M quantized, you would compute the corresponding RGB and quantize that. -void Surface::toRGBM(float range/*= 1*/, float threshold/*= 0.25*/) +void Surface::toRGBM(float range/*= 1*/, float threshold/*= 0.0f*/) { if (isNull()) return; @@ -1471,17 +1517,17 @@ void Surface::toRGBM(float range/*= 1*/, float threshold/*= 0.25*/) const uint count = img->pixelCount(); for (uint i = 0; i < count; i++) { - float R = nv::clamp(r[i], 0.0f, 1.0f); - float G = nv::clamp(g[i], 0.0f, 1.0f); - float B = nv::clamp(b[i], 0.0f, 1.0f); + float R = r[i]; + float G = g[i]; + float B = b[i]; #if 1 - float M = max(max(R, G), max(B, threshold)); + float M = nv::clamp(max(max(R, G), max(B, threshold)), 0.0f, range); - r[i] = R / M; - g[i] = G / M; - b[i] = B / M; + r[i] = nv::clamp(R / M, 0.0f, 1.0f); + g[i] = nv::clamp(G / M, 0.0f, 1.0f); + b[i] = nv::clamp(B / M, 0.0f, 1.0f); - a[i] = (M - threshold) / (1 - threshold); + a[i] = (M - threshold) / (range - threshold); #else @@ -1524,13 +1570,15 @@ void Surface::toRGBM(float range/*= 1*/, float threshold/*= 0.25*/) } -void Surface::fromRGBM(float range/*= 1*/) +void Surface::fromRGBM(float range/*= 1*/, float threshold/*= 0.0*/) { if (isNull()) return; detach(); - FloatImage * img = m->image; + threshold = ::clamp(threshold, 1e-6f, 1.0f); + + FloatImage * img = m->image; float * r = img->channel(0); float * g = img->channel(1); float * b = img->channel(2); @@ -1538,7 +1586,7 @@ void Surface::fromRGBM(float range/*= 1*/) const uint count = img->pixelCount(); for (uint i = 0; i < count; i++) { - float M = a[i] * range; + float M = a[i] * (range - threshold) + threshold; r[i] *= M; g[i] *= M; diff --git a/src/nvtt/bc6h/shapes_two.h b/src/nvtt/bc6h/shapes_two.h index 9d2e6cb..3d19a9f 100644 --- a/src/nvtt/bc6h/shapes_two.h +++ b/src/nvtt/bc6h/shapes_two.h @@ -19,7 +19,7 @@ See the License for the specific language governing permissions and limitations #define NSHAPES 64 #define SHAPEBITS 6 -static int shapes[NSHAPES*16] = +static const int shapes[NSHAPES*16] = { 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, @@ -105,7 +105,7 @@ static int shapes[NSHAPES*16] = #define REGION(x,y,si) shapes[((si)&3)*4+((si)>>2)*64+(x)+(y)*16] -static int shapeindex_to_compressed_indices[NSHAPES*2] = +static const int shapeindex_to_compressed_indices[NSHAPES*2] = { 0,15, 0,15, 0,15, 0,15, 0,15, 0,15, 0,15, 0,15, diff --git a/src/nvtt/bc6h/tile.h b/src/nvtt/bc6h/tile.h index 28e597c..b713bb8 100644 --- a/src/nvtt/bc6h/tile.h +++ b/src/nvtt/bc6h/tile.h @@ -23,7 +23,7 @@ See the License for the specific language governing permissions and limitations //#define USE_IMPORTANCE_MAP 1 // define this if you want to increase importance of some pixels in tile class Tile { -private: +public: // NOTE: this returns the appropriately-clamped BIT PATTERN of the half as an INTEGRAL float value static float half2float(uint16 h) { @@ -67,7 +67,6 @@ private: } #endif -public: Tile() {}; ~Tile(){}; Tile(int xs, int ys) {size_x = xs; size_y = ys;} diff --git a/src/nvtt/bc6h/utils.cpp b/src/nvtt/bc6h/utils.cpp index e2fe998..5bca41a 100644 --- a/src/nvtt/bc6h/utils.cpp +++ b/src/nvtt/bc6h/utils.cpp @@ -18,8 +18,8 @@ See the License for the specific language governing permissions and limitations using namespace nv; -static int denom7_weights_64[] = {0, 9, 18, 27, 37, 46, 55, 64}; // divided by 64 -static int denom15_weights_64[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}; // divided by 64 +static const int denom7_weights_64[] = {0, 9, 18, 27, 37, 46, 55, 64}; // divided by 64 +static const int denom15_weights_64[] = {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}; // divided by 64 /*static*/ Format Utils::FORMAT; @@ -28,7 +28,8 @@ int Utils::lerp(int a, int b, int i, int denom) nvDebugCheck (denom == 3 || denom == 7 || denom == 15); nvDebugCheck (i >= 0 && i <= denom); - int round = 32, shift = 6, *weights; + int round = 32, shift = 6; + const int *weights; switch(denom) { @@ -46,7 +47,8 @@ Vector3 Utils::lerp(const Vector3& a, const Vector3 &b, int i, int denom) nvDebugCheck (denom == 3 || denom == 7 || denom == 15); nvDebugCheck (i >= 0 && i <= denom); - int shift = 6, *weights; + int shift = 6; + const int *weights; switch(denom) { @@ -57,7 +59,7 @@ Vector3 Utils::lerp(const Vector3& a, const Vector3 &b, int i, int denom) } // no need to round these as this is an exact division - return (a*weights[denom-i] +b*weights[i]) / float(1 << shift); + return (a*float(weights[denom-i]) +b*float(weights[i])) / float(1 << shift); } @@ -254,117 +256,12 @@ int Utils::unquantize(int q, int prec) return unq; } -static int clamp(double r, double low, double high) -{ - if (r < low) return low; - else if (r > high) return high; - else return r; -} -// match the tonemapping function used by exrdisplay -/*static void tonemap(const Vector3 &in, double exposure, Vector3 &out) -{ - double r,g,b; - unsigned short h; - - // convert from bit pattern back to half and then to double - h = in.x; r = h; - h = in.y; g = h; - h = in.z; b = h; - - // 1) Compensate for fogging by subtracting defog - // from the raw pixel values. - // Response: We work with defog of 0.0, so this is a no-op - - // 2) Multiply the defogged pixel values by - // 2^(exposure + 2.47393). - double exposure_scale = pow(2.0, exposure + 2.47393); - r *= exposure_scale; - g *= exposure_scale; - b *= exposure_scale; - - // 3) Values, which are now 1.0, are called "middle gray". - // If defog and exposure are both set to 0.0, then - // middle gray corresponds to a raw pixel value of 0.18. - // In step 6, middle gray values will be mapped to an - // intensity 3.5 f-stops below the display's maximum - // intensity. - // Response: no apparent content. - - // 4) Apply a knee function. The knee function has two - // parameters, kneeLow and kneeHigh. Pixel values - // below 2^kneeLow are not changed by the knee - // function. Pixel values above kneeLow are lowered - // according to a logarithmic curve, such that the - // value 2^kneeHigh is mapped to 2^3.5 (in step 6, - // this value will be mapped to the the display's - // maximum intensity). - // Response: kneeLow = 0.0 (2^0.0 => 1); kneeHigh = 5.0 (2^5 =>32) - if (r > 1.0) - r = 1.0 + log ((r-1.0) * 0.184874 + 1) / 0.184874; - if (g > 1.0) - g = 1.0 + log ((g-1.0) * 0.184874 + 1) / 0.184874; - if (b > 1.0) - b = 1.0 + log ((b-1.0) * 0.184874 + 1) / 0.184874; -// -// 5) Gamma-correct the pixel values, assuming that the -// screen's gamma is 0.4545 (or 1/2.2). - r = pow (r, 0.4545); - g = pow (g, 0.4545); - b = pow (b, 0.4545); - -// 6) Scale the values such that pixels middle gray -// pixels are mapped to 84.66 (or 3.5 f-stops below -// the display's maximum intensity). -// -// 7) Clamp the values to [0, 255]. - r *= 84.66f; - g *= 84.66f; - b *= 84.66f; - - out.x = clamp (r, 0, 255); - out.y = clamp (g, 0, 255); - out.z = clamp (b, 0, 255); -}*/ - -static void mpsnrmap(const Vector3 &in, int exposure, Vector3 &out) -{ - double r,g,b; - uint16 h; - - // convert from bit pattern back to half and then to double - h = in.x; r = h; - h = in.y; g = h; - h = in.z; b = h; - - nvDebugCheck (exposure > -32 && exposure < 32); - if (exposure > 0) - { - r *= 1 << exposure; - g *= 1 << exposure; - b *= 1 << exposure; - } - else if (exposure < 0) - { - exposure = -exposure; - r /= 1 << exposure; - g /= 1 << exposure; - b /= 1 << exposure; - } - r = 255 * pow (r, 0.4545); - g = 255 * pow (g, 0.4545); - b = 255 * pow (b, 0.4545); - - out.x = clamp (r, 0, 255); - out.y = clamp (g, 0, 255); - out.z = clamp (b, 0, 255); -} - // pick a norm! #define NORM_EUCLIDEAN 1 -double Utils::norm(const Vector3 &a, const Vector3 &b) +float Utils::norm(const Vector3 &a, const Vector3 &b) { #ifdef NORM_EUCLIDEAN return lengthSquared(a - b); @@ -373,45 +270,6 @@ double Utils::norm(const Vector3 &a, const Vector3 &b) Vector3 err = a - b; return fabs(err.x) + fabs(err.y) + fabs(err.z); #endif -#ifdef NORM_EUCLIDEAN_EXPOSURE_UNWEIGHED - double toterr = 0; - Vector3 mapa, mapb, err; - for (int i=-6; i <= 6; i += 3) // figure how many exposure samples needed. I'd argue if you take too many it's same as euclidean - { - tonemap(a, i, mapa); - tonemap(b, i, mapb); - err = mapa - mapb; - toterr += err * err; - } - return toterr; -#endif -#ifdef NORM_EUCLIDEAN_EXPOSURE_WEIGHED - double toterr = 0; - Vector3 mapa, mapb, err; - double rwt = 0.299; - double gwt = 0.587; - double bwt = 0.114; - for (int i=-6; i <= 6; i += 3) // figure how many exposure samples needed. I'd argue if you take too many it's same as euclidean - { - tonemap(a, i, mapa); - tonemap(b, i, mapb); - mapa.x *= rwt; mapa.y *= gwt; mapa.z *= bwt; - mapb.x *= rwt; mapb.y *= gwt; mapb.z *= bwt; - err = mapa - mapb; - toterr += err * err; - } - return toterr; -#endif -} - -double Utils::mpsnr_norm(const Vector3 &a, int exposure, const Vector3 &b) -{ - Vector3 mapa, mapb; - - mpsnrmap(a, exposure, mapa); - mpsnrmap(b, exposure, mapb); - - return lengthSquared(mapa - mapb); } // parse [{:}]{,} diff --git a/src/nvtt/bc6h/utils.h b/src/nvtt/bc6h/utils.h index 605ceb6..87df603 100644 --- a/src/nvtt/bc6h/utils.h +++ b/src/nvtt/bc6h/utils.h @@ -47,8 +47,8 @@ public: static ::Format FORMAT; // this is a global -- we're either handling unsigned or unsigned half values // error metrics - static double norm(const nv::Vector3 &a, const nv::Vector3 &b); - static double mpsnr_norm(const nv::Vector3 &a, int exposure, const nv::Vector3 &b); + static float norm(const nv::Vector3 &a, const nv::Vector3 &b); + static float mpsnr_norm(const nv::Vector3 &a, int exposure, const nv::Vector3 &b); // conversion & clamp static int ushort_to_format(unsigned short input); diff --git a/src/nvtt/bc6h/zoh.cpp b/src/nvtt/bc6h/zoh.cpp index bd92c43..edf17cb 100644 --- a/src/nvtt/bc6h/zoh.cpp +++ b/src/nvtt/bc6h/zoh.cpp @@ -29,8 +29,8 @@ void ZOH::compress(const Tile &t, char *block) { char oneblock[ZOH::BLOCKSIZE], twoblock[ZOH::BLOCKSIZE]; - double mseone = ZOH::compressone(t, oneblock); - double msetwo = ZOH::compresstwo(t, twoblock); + float mseone = ZOH::compressone(t, oneblock); + float msetwo = ZOH::compresstwo(t, twoblock); if (mseone <= msetwo) memcpy(block, oneblock, ZOH::BLOCKSIZE); diff --git a/src/nvtt/bc6h/zoh.h b/src/nvtt/bc6h/zoh.h index 64adcc3..f3c2882 100644 --- a/src/nvtt/bc6h/zoh.h +++ b/src/nvtt/bc6h/zoh.h @@ -55,16 +55,16 @@ public: static void compress(const Tile &t, char *block); static void decompress(const char *block, Tile &t); - static double compressone(const Tile &t, char *block); - static double compresstwo(const Tile &t, char *block); + static float compressone(const Tile &t, char *block); + static float compresstwo(const Tile &t, char *block); static void decompressone(const char *block, Tile &t); static void decompresstwo(const char *block, Tile &t); - static double refinetwo(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS_TWO], char *block); - static double roughtwo(const Tile &tile, int shape, FltEndpts endpts[NREGIONS_TWO]); + static float refinetwo(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS_TWO], char *block); + static float roughtwo(const Tile &tile, int shape, FltEndpts endpts[NREGIONS_TWO]); - static double refineone(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS_ONE], char *block); - static double roughone(const Tile &tile, int shape, FltEndpts endpts[NREGIONS_ONE]); + static float refineone(const Tile &tile, int shapeindex_best, const FltEndpts endpts[NREGIONS_ONE], char *block); + static float roughone(const Tile &tile, int shape, FltEndpts endpts[NREGIONS_ONE]); static bool isone(const char *block); }; diff --git a/src/nvtt/bc6h/zohone.cpp b/src/nvtt/bc6h/zohone.cpp index aec1a30..39959d5 100644 --- a/src/nvtt/bc6h/zohone.cpp +++ b/src/nvtt/bc6h/zohone.cpp @@ -33,7 +33,7 @@ using namespace nv; #define NSHAPES 1 -static int shapes[NSHAPES] = +static const int shapes[NSHAPES] = { 0x0000 }; // only 1 shape @@ -64,7 +64,7 @@ struct Pattern #define NPATTERNS 4 -static Pattern patterns[NPATTERNS] = +static const Pattern patterns[NPATTERNS] = { 16,4, 16,4, 16,4, 1, 0x0f, 5, "bw[10],bw[11],bw[12],bw[13],bw[14],bw[15],bx[3:0],gw[10],gw[11],gw[12],gw[13],gw[14],gw[15],gx[3:0],rw[10],rw[11],rw[12],rw[13],rw[14],rw[15],rx[3:0],bw[9:0],gw[9:0],rw[9:0],m[4:0]", 12,8, 12,8, 12,8, 1, 0x0b, 5, "bw[10],bw[11],bx[7:0],gw[10],gw[11],gx[7:0],rw[10],rw[11],rx[7:0],bw[9:0],gw[9:0],rw[9:0],m[4:0]", @@ -73,7 +73,7 @@ static Pattern patterns[NPATTERNS] = }; // mapping of mode to the corresponding index in pattern -static int mode_to_pat[MAXMODES] = { +static const int mode_to_pat[MAXMODES] = { -1,-1,-1, 3, // 0x03 -1,-1,-1, @@ -199,12 +199,13 @@ static void write_header(const ComprEndpts endpts[NREGIONS_ONE], const Pattern & int rw = endpts[0].A[0], rx = endpts[0].B[0]; int gw = endpts[0].A[1], gx = endpts[0].B[1]; int bw = endpts[0].A[2], bx = endpts[0].B[2]; - int ptr = strlen(p.encoding); + int ptr = int(strlen(p.encoding)); while (ptr) { Field field; int endbit, len; + // !!!UNDONE: get rid of string parsing!!! Utils::parse(p.encoding, ptr, field, endbit, len); switch(field) { @@ -252,13 +253,14 @@ static void read_header(Bits &in, ComprEndpts endpts[NREGIONS_ONE], Pattern &p) gw = gx = 0; bw = bx = 0; - int ptr = strlen(p.encoding); + int ptr = int(strlen(p.encoding)); while (ptr) { Field field; int endbit, len; + // !!!UNDONE: get rid of string parsing!!! Utils::parse(p.encoding, ptr, field, endbit, len); switch(field) @@ -322,21 +324,21 @@ static void generate_palette_quantized(const IntEndpts &endpts, int prec, Vector // interpolate for (int i = 0; i < NINDICES; ++i) - palette[i].x = Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec); + palette[i].x = float(Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec)); a = Utils::unquantize(endpts.A[1], prec); b = Utils::unquantize(endpts.B[1], prec); // interpolate for (int i = 0; i < NINDICES; ++i) - palette[i].y = Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec); + palette[i].y = float(Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec)); a = Utils::unquantize(endpts.A[2], prec); b = Utils::unquantize(endpts.B[2], prec); // interpolate for (int i = 0; i < NINDICES; ++i) - palette[i].z = Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec); + palette[i].z = float(Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec)); } // position 0 was compressed @@ -382,17 +384,17 @@ void ZOH::decompressone(const char *block, Tile &t) } // given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr -static double map_colors(const Vector3 colors[], const float importance[], int np, const IntEndpts &endpts, int prec) +static float map_colors(const Vector3 colors[], const float importance[], int np, const IntEndpts &endpts, int prec) { Vector3 palette[NINDICES]; - double toterr = 0; + float toterr = 0; Vector3 err; generate_palette_quantized(endpts, prec, palette); for (int i = 0; i < np; ++i) { - double err, besterr; + float err, besterr; besterr = Utils::norm(colors[i], palette[0]) * importance[i]; @@ -412,7 +414,7 @@ static double map_colors(const Vector3 colors[], const float importance[], int n // assign indices given a tile, shape, and quantized endpoints, return toterr for each region static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NREGIONS_ONE], int prec, - int indices[Tile::TILE_H][Tile::TILE_W], double toterr[NREGIONS_ONE]) + int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS_ONE]) { // build list of possibles Vector3 palette[NREGIONS_ONE][NINDICES]; @@ -429,7 +431,7 @@ static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NR for (int x = 0; x < tile.size_x; x++) { int region = REGION(x,y,shapeindex); - double err, besterr; + float err, besterr; besterr = Utils::norm(tile.data[y][x], palette[region][0]); indices[y][x] = 0; @@ -450,8 +452,8 @@ static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NR } } -static double perturb_one(const Vector3 colors[], const float importance[], int np, int ch, int prec, const IntEndpts &old_endpts, IntEndpts &new_endpts, - double old_err, int do_b) +static float perturb_one(const Vector3 colors[], const float importance[], int np, int ch, int prec, const IntEndpts &old_endpts, IntEndpts &new_endpts, + float old_err, int do_b) { // we have the old endpoints: old_endpts // we have the perturbed endpoints: new_endpts @@ -504,9 +506,9 @@ static double perturb_one(const Vector3 colors[], const float importance[], int return min_err; } -static void optimize_one(const Vector3 colors[], const float importance[], int np, double orig_err, const IntEndpts &orig_endpts, int prec, IntEndpts &opt_endpts) +static void optimize_one(const Vector3 colors[], const float importance[], int np, float orig_err, const IntEndpts &orig_endpts, int prec, IntEndpts &opt_endpts) { - double opt_err = orig_err; + float opt_err = orig_err; for (int ch = 0; ch < NCHANNELS; ++ch) { opt_endpts.A[ch] = orig_endpts.A[ch]; @@ -576,12 +578,12 @@ static void optimize_one(const Vector3 colors[], const float importance[], int n } } -static void optimize_endpts(const Tile &tile, int shapeindex, const double orig_err[NREGIONS_ONE], +static void optimize_endpts(const Tile &tile, int shapeindex, const float orig_err[NREGIONS_ONE], const IntEndpts orig_endpts[NREGIONS_ONE], int prec, IntEndpts opt_endpts[NREGIONS_ONE]) { Vector3 pixels[Tile::TILE_TOTAL]; float importance[Tile::TILE_TOTAL]; - double err = 0; + float err = 0; for (int region=0; region0.0; ++i) { - double mse = roughone(t, i, tempendpts); + float mse = roughone(t, i, tempendpts); if (mse < msebest) { msebest = mse; diff --git a/src/nvtt/bc6h/zohtwo.cpp b/src/nvtt/bc6h/zohtwo.cpp index 2beda82..ce2dcee 100644 --- a/src/nvtt/bc6h/zohtwo.cpp +++ b/src/nvtt/bc6h/zohtwo.cpp @@ -90,7 +90,7 @@ struct Pattern #define NPATTERNS 10 -static Pattern patterns[NPATTERNS] = +static const Pattern patterns[NPATTERNS] = { 11,5,5,5, 11,4,4,4, 11,4,4,4, 1, 0x02, 5, "d[4:0],bz[3],rz[4:0],bz[2],ry[4:0],by[3:0],bz[1],bw[10],bx[3:0],gz[3:0],bz[0],gw[10],gx[3:0],gy[3:0],rw[10],rx[4:0],bw[9:0],gw[9:0],rw[9:0],m[4:0]", 11,4,4,4, 11,5,5,5, 11,4,4,4, 1, 0x06, 5, "d[4:0],bz[3],gy[4],rz[3:0],bz[2],bz[0],ry[3:0],by[3:0],bz[1],bw[10],bx[3:0],gz[3:0],gw[10],gx[4:0],gy[3:0],gz[4],rw[10],rx[3:0],bw[9:0],gw[9:0],rw[9:0],m[4:0]", @@ -106,7 +106,7 @@ static Pattern patterns[NPATTERNS] = // mapping of mode to the corresponding index in pattern // UNUSED ZOH MODES are 0x13, 0x17, 0x1b, 0x1f -- return -2 for these -static int mode_to_pat[MAXMODES] = { +static const int mode_to_pat[MAXMODES] = { 3, // 0x00 8, // 0x01 0, // 0x02 @@ -258,12 +258,13 @@ static void write_header(const ComprEndpts endpts[NREGIONS_TWO], int shapeindex, int rw = endpts[0].A[0], rx = endpts[0].B[0], ry = endpts[1].A[0], rz = endpts[1].B[0]; int gw = endpts[0].A[1], gx = endpts[0].B[1], gy = endpts[1].A[1], gz = endpts[1].B[1]; int bw = endpts[0].A[2], bx = endpts[0].B[2], by = endpts[1].A[2], bz = endpts[1].B[2]; - int ptr = strlen(p.encoding); + int ptr = int(strlen(p.encoding)); while (ptr) { Field field; int endbit, len; + // !!!UNDONE: get rid of string parsing!!! Utils::parse(p.encoding, ptr, field, endbit, len); switch(field) { @@ -313,13 +314,14 @@ static bool read_header(Bits &in, ComprEndpts endpts[NREGIONS_TWO], int &shapein gw = gx = gy = gz = 0; bw = bx = by = bz = 0; - int ptr = strlen(p.encoding); + int ptr = int(strlen(p.encoding)); while (ptr) { Field field; int endbit, len; + // !!!UNDONE: get rid of string parsing!!! Utils::parse(p.encoding, ptr, field, endbit, len); switch(field) @@ -394,21 +396,21 @@ static void generate_palette_quantized(const IntEndpts &endpts, int prec, Vector // interpolate for (int i = 0; i < NINDICES; ++i) - palette[i].x = Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec); + palette[i].x = float(Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec)); a = Utils::unquantize(endpts.A[1], prec); b = Utils::unquantize(endpts.B[1], prec); // interpolate for (int i = 0; i < NINDICES; ++i) - palette[i].y = Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec); + palette[i].y = float(Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec)); a = Utils::unquantize(endpts.A[2], prec); b = Utils::unquantize(endpts.B[2], prec); // interpolate for (int i = 0; i < NINDICES; ++i) - palette[i].z = Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec); + palette[i].z = float(Utils::finish_unquantize(PALETTE_LERP(a, b, i, DENOM), prec)); } static void read_indices(Bits &in, int shapeindex, int indices[Tile::TILE_H][Tile::TILE_W]) @@ -470,17 +472,17 @@ void ZOH::decompresstwo(const char *block, Tile &t) } // given a collection of colors and quantized endpoints, generate a palette, choose best entries, and return a single toterr -static double map_colors(const Vector3 colors[], const float importance[], int np, const IntEndpts &endpts, int prec) +static float map_colors(const Vector3 colors[], const float importance[], int np, const IntEndpts &endpts, int prec) { Vector3 palette[NINDICES]; - double toterr = 0; + float toterr = 0; Vector3 err; generate_palette_quantized(endpts, prec, palette); for (int i = 0; i < np; ++i) { - double err, besterr; + float err, besterr; besterr = Utils::norm(colors[i], palette[0]) * importance[i]; @@ -500,7 +502,7 @@ static double map_colors(const Vector3 colors[], const float importance[], int n // assign indices given a tile, shape, and quantized endpoints, return toterr for each region static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NREGIONS_TWO], int prec, - int indices[Tile::TILE_H][Tile::TILE_W], double toterr[NREGIONS_TWO]) + int indices[Tile::TILE_H][Tile::TILE_W], float toterr[NREGIONS_TWO]) { // build list of possibles Vector3 palette[NREGIONS_TWO][NINDICES]; @@ -517,7 +519,7 @@ static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NR for (int x = 0; x < tile.size_x; x++) { int region = REGION(x,y,shapeindex); - double err, besterr; + float err, besterr; besterr = Utils::norm(tile.data[y][x], palette[region][0]); indices[y][x] = 0; @@ -538,8 +540,8 @@ static void assign_indices(const Tile &tile, int shapeindex, IntEndpts endpts[NR } } -static double perturb_one(const Vector3 colors[], const float importance[], int np, int ch, int prec, const IntEndpts &old_endpts, IntEndpts &new_endpts, - double old_err, int do_b) +static float perturb_one(const Vector3 colors[], const float importance[], int np, int ch, int prec, const IntEndpts &old_endpts, IntEndpts &new_endpts, + float old_err, int do_b) { // we have the old endpoints: old_endpts // we have the perturbed endpoints: new_endpts @@ -592,9 +594,9 @@ static double perturb_one(const Vector3 colors[], const float importance[], int return min_err; } -static void optimize_one(const Vector3 colors[], const float importance[], int np, double orig_err, const IntEndpts &orig_endpts, int prec, IntEndpts &opt_endpts) +static void optimize_one(const Vector3 colors[], const float importance[], int np, float orig_err, const IntEndpts &orig_endpts, int prec, IntEndpts &opt_endpts) { - double opt_err = orig_err; + float opt_err = orig_err; for (int ch = 0; ch < NCHANNELS; ++ch) { opt_endpts.A[ch] = orig_endpts.A[ch]; @@ -664,12 +666,12 @@ static void optimize_one(const Vector3 colors[], const float importance[], int n } } -static void optimize_endpts(const Tile &tile, int shapeindex, const double orig_err[NREGIONS_TWO], +static void optimize_endpts(const Tile &tile, int shapeindex, const float orig_err[NREGIONS_TWO], const IntEndpts orig_endpts[NREGIONS_TWO], int prec, IntEndpts opt_endpts[NREGIONS_TWO]) { Vector3 pixels[Tile::TILE_TOTAL]; float importance[Tile::TILE_TOTAL]; - double err = 0; + float err = 0; for (int region=0; region0.0; ++i) { - double mse = roughtwo(t, i, tempendpts); + float mse = roughtwo(t, i, tempendpts); if (mse < msebest) { msebest = mse; diff --git a/src/nvtt/nvtt.h b/src/nvtt/nvtt.h index c6c6aec..6a03538 100644 --- a/src/nvtt/nvtt.h +++ b/src/nvtt/nvtt.h @@ -101,7 +101,7 @@ namespace nvtt Format_DXT1n, // Not supported on CPU yet. Format_CTX1, // Not supported on CPU yet. - Format_BC6, // Not supported yet. + Format_BC6, Format_BC7, // Not supported yet. Format_DXT1_Luma, @@ -503,7 +503,7 @@ namespace nvtt NVTT_API void fill(float r, float g, float b, float a); NVTT_API void scaleAlphaToCoverage(float coverage, float alphaRef = 0.5f); NVTT_API void toRGBM(float range = 1.0f, float threshold = 0.0f); - NVTT_API void fromRGBM(float range = 1.0f); + NVTT_API void fromRGBM(float range = 1.0f, float threshold = 0.0f); NVTT_API void toLM(float range = 1.0f, float threshold = 0.0f); NVTT_API void toRGBE(int mantissaBits, int exponentBits); NVTT_API void fromRGBE(int mantissaBits, int exponentBits); diff --git a/src/nvtt/tests/testsuite.cpp b/src/nvtt/tests/testsuite.cpp index 184e5cb..5658d46 100644 --- a/src/nvtt/tests/testsuite.cpp +++ b/src/nvtt/tests/testsuite.cpp @@ -187,6 +187,7 @@ enum Mode { Mode_BC5_Normal_Paraboloid, Mode_BC5_Normal_Quartic, //Mode_BC5_Normal_DualParaboloid, + Mode_BC6, Mode_Count }; static const char * s_modeNames[] = { @@ -205,6 +206,7 @@ static const char * s_modeNames[] = { "BC5-Normal-Paraboloid", // Mode_BC5_Normal_Paraboloid, "BC5-Normal-Quartic", // Mode_BC5_Normal_Quartic, //"BC5-Normal-DualParaboloid", // Mode_BC5_Normal_DualParaboloid, + "BC6", // Mode_BC6, }; nvStaticCheck(NV_ARRAY_SIZE(s_modeNames) == Mode_Count); @@ -214,11 +216,14 @@ struct Test { Mode modes[6]; }; static Test s_imageTests[] = { - {"Color", 3, {Mode_BC1, Mode_BC3_YCoCg, Mode_BC3_RGBM, Mode_BC3_LUVW}}, + {"Color", 4, {Mode_BC1, Mode_BC3_YCoCg, Mode_BC3_RGBM, Mode_BC6, /*Mode_BC3_LUVW*/}}, {"Alpha", 3, {Mode_BC1_Alpha, Mode_BC2_Alpha, Mode_BC3_Alpha}}, //{"Normal", 3, {Mode_BC1_Normal, Mode_BC3_Normal, Mode_BC5_Normal}}, {"Normal", 4, {Mode_BC5_Normal, Mode_BC5_Normal_Stereographic, Mode_BC5_Normal_Paraboloid, Mode_BC5_Normal_Quartic}}, {"Lightmap", 4, {Mode_BC1, Mode_BC3_YCoCg, Mode_BC3_RGBM, Mode_BC3_RGBS}}, + {"HDR", 2, {Mode_BC3_RGBM, Mode_BC6}}, + //{"BC6", 1, {Mode_BC6}}, // temporary mode for testing + //{"BC7", 1, {Mode_BC7}}, // temporary mode for testing }; const int s_imageTestCount = ARRAY_SIZE(s_imageTests); @@ -247,8 +252,9 @@ static ImageSet s_imageSets[] = { {"Witness", "witness", s_witnessImageSet, ARRAY_SIZE(s_witnessImageSet), ImageType_RGB}, // 6 {"Lightmap", "lightmap", s_witnessLmapImageSet, ARRAY_SIZE(s_witnessLmapImageSet), ImageType_HDR}, // 7 {"Normal", "id_tnmap", s_normalMapImageSet, ARRAY_SIZE(s_normalMapImageSet), ImageType_Normal}, // 8 + // !!!UNDONE: more HDR image sets }; -const int s_imageSetCount = sizeof(s_imageSets)/sizeof(s_imageSets[0]); +const int s_imageSetCount = ARRAY_SIZE(s_imageSets); struct MyOutputHandler : public nvtt::OutputHandler @@ -396,6 +402,10 @@ int main(int argc, char *argv[]) i++; } } + else + { + printf("Warning: unrecognized option \"%s\"\n", argv[i]); + } } // Validate inputs. @@ -419,7 +429,7 @@ int main(int argc, char *argv[]) for (int i = 0; i < s_imageSetCount; i++) { printf(" %i: \t%s.\n", i, s_imageSets[i].name); } - printf(" -test [0:%d] \tCompression tests to run.", s_imageTestCount); + printf(" -test [0:%d] \tCompression tests to run.\n", s_imageTestCount); for (int i = 0; i < s_imageTestCount; i++) { printf(" %i: \t%s.\n", i, s_imageTests[i].name); } @@ -551,7 +561,7 @@ int main(int argc, char *argv[]) if (t != test.count-1) graphWriter << ","; } - // Leyends. + // Legends. graphWriter << "&chdl="; for (int t = 0; t < test.count; t++) { @@ -584,7 +594,7 @@ int main(int argc, char *argv[]) for (int t = 0; t < test.count; t++) { - float totalTime = 0; + float totalCompressionTime = 0; float totalError = 0; Mode mode = test.modes[t]; @@ -602,6 +612,14 @@ int main(int argc, char *argv[]) else if (mode == Mode_BC5_Normal || mode == Mode_BC5_Normal_Stereographic || mode == Mode_BC5_Normal_Paraboloid || mode == Mode_BC5_Normal_Quartic) { format = nvtt::Format_BC5; } + else if (mode == Mode_BC6) + { + format = nvtt::Format_BC6; + } + else + { + nvDebugCheck(false); + } compressionOptions.setFormat(format); @@ -633,12 +651,12 @@ int main(int argc, char *argv[]) if (img.isNormalMap()) { img.normalizeNormalMap(); } - if (set.type == ImageType_HDR) { + /*if (set.type == ImageType_HDR) { img.scaleBias(0, 1.0f/4.0f, 0.0f); img.clamp(0); img.scaleBias(1, 1.0f/4.0f, 0.0f); img.clamp(1); img.scaleBias(2, 1.0f/4.0f, 0.0f); img.clamp(2); img.toGamma(2); - } + }*/ nvtt::Surface tmp = img; if (mode == Mode_BC1) { @@ -672,7 +690,9 @@ int main(int argc, char *argv[]) else if (mode == Mode_BC3_RGBM) { tmp.setAlphaMode(nvtt::AlphaMode_None); if (set.type == ImageType_HDR) { - tmp.toRGBM(/*4*/); + // Transform to gamma-2.0 space before applying RGBM - helps a lot with banding in the darks. + tmp.toGamma(2.0f); + tmp.toRGBM(3.0f); // range of 3.0 in gamma-2.0 space == range of 9.0 in linear space } else { tmp.toRGBM(); @@ -681,7 +701,7 @@ int main(int argc, char *argv[]) else if (mode == Mode_BC3_LUVW) { tmp.setAlphaMode(nvtt::AlphaMode_None); if (set.type == ImageType_HDR) { - tmp.toLUVW(/*4*/); + tmp.toLUVW(8.0f); } else { tmp.toLUVW(); @@ -725,7 +745,7 @@ int main(int argc, char *argv[]) timer.stop(); printf(" Time: \t%.3f sec\n", timer.elapsed()); - totalTime += timer.elapsed(); + totalCompressionTime += timer.elapsed(); nvtt::Surface img_out = outputHandler.decompress(mode, format, decoder); img_out.setAlphaMode(img.alphaMode()); @@ -757,7 +777,8 @@ int main(int argc, char *argv[]) } else if (mode == Mode_BC3_RGBM) { if (set.type == ImageType_HDR) { - img_out.fromRGBM(/*4*/); + img_out.fromRGBM(3.0f); + img_out.toLinear(2.0f); } else { img_out.fromRGBM(); @@ -765,7 +786,7 @@ int main(int argc, char *argv[]) } else if (mode == Mode_BC3_LUVW) { if (set.type == ImageType_HDR) { - img_out.fromLUVW(/*4*/); + img_out.fromLUVW(8.0f); } else { img_out.fromLUVW(); @@ -837,7 +858,7 @@ int main(int argc, char *argv[]) img_out.addChannel(residual_out, 2, 2, -1.0f); img_out.clamp(2); } - if (set.type == ImageType_HDR) + /*if (set.type == ImageType_HDR) { Path outputFileName; outputFileName.format("%s/%s", outPath, set.fileNames[i]); @@ -848,7 +869,7 @@ int main(int argc, char *argv[]) { printf("Error saving file '%s'.\n", outputFileName.str()); } - } + }*/ // Output compressed image. Path outputFileName; @@ -865,7 +886,6 @@ int main(int argc, char *argv[]) float error; if (errorMode == ErrorMode_RMSE) { error = nvtt::rmsError(img, img_out); - if (set.type == ImageType_HDR) error *= 4; } else if (errorMode == ErrorMode_CieLab) { error = nvtt::cieLabError(img, img_out); @@ -932,7 +952,7 @@ int main(int argc, char *argv[]) totalError /= set.fileCount; printf("Total Results:\n"); - printf(" Total Time: \t%.3f sec\n", totalTime); + printf(" Total Compression Time:\t%.3f sec\n", totalCompressionTime); printf(" Average Error: \t%.4f\n", totalError); if (t != test.count-1) graphWriter << "|"; diff --git a/src/nvtt/tools/assemble.cpp b/src/nvtt/tools/assemble.cpp index f086d64..9e2510e 100644 --- a/src/nvtt/tools/assemble.cpp +++ b/src/nvtt/tools/assemble.cpp @@ -83,6 +83,10 @@ int main(int argc, char *argv[]) { files.append(argv[i]); } + else + { + printf("Warning: unrecognized option \"%s\"\n", argv[i]); + } } if (files.count() == 0) diff --git a/src/nvtt/tools/compress.cpp b/src/nvtt/tools/compress.cpp index 3c1c5b3..ce67700 100644 --- a/src/nvtt/tools/compress.cpp +++ b/src/nvtt/tools/compress.cpp @@ -261,6 +261,15 @@ int main(int argc, char *argv[]) { format = nvtt::Format_BC5; } + else if (strcmp("-bc6", argv[i]) == 0) + { + format = nvtt::Format_BC6; + } + // !!!UNDONE: add BC7 support + /*else if (strcmp("-bc7", argv[i]) == 0) + { + format = nvtt::Format_BC7; + }*/ // Undocumented option. Mainly used for testing. else if (strcmp("-ext", argv[i]) == 0) @@ -302,6 +311,10 @@ int main(int argc, char *argv[]) break; } + else + { + printf("Warning: unrecognized option \"%s\"\n", argv[i]); + } } const uint version = nvtt::version(); @@ -314,7 +327,7 @@ int main(int argc, char *argv[]) if (input.isNull()) { - printf("usage: nvcompress [options] infile [outfile]\n\n"); + printf("usage: nvcompress [options] infile [outfile.dds]\n\n"); printf("Input options:\n"); printf(" -color \tThe input image is a color map (default).\n"); @@ -340,11 +353,13 @@ int main(int argc, char *argv[]) printf(" -bc3 \tBC3 format (DXT5)\n"); printf(" -bc3n \tBC3 normal map format (DXT5nm)\n"); printf(" -bc4 \tBC4 format (ATI1)\n"); - printf(" -bc5 \tBC5 format (3Dc/ATI2)\n\n"); + printf(" -bc5 \tBC5 format (3Dc/ATI2)\n"); + printf(" -bc6 \tBC6 format\n"); + //printf(" -bc7 \tBC7 format\n\n"); printf("Output options:\n"); printf(" -silent \tDo not output progress messages\n"); - printf(" -dds10 \tUse DirectX 10 DDS format\n\n"); + printf(" -dds10 \tUse DirectX 10 DDS format (enabled by default for BC6/7)\n\n"); return EXIT_FAILURE; } @@ -581,6 +596,12 @@ int main(int argc, char *argv[]) outputOptions.setOutputHandler(&outputHandler); outputOptions.setErrorHandler(&errorHandler); + // Automatically use dds10 if compressing to BC6 or BC7 + if (format == nvtt::Format_BC6 || format == nvtt::Format_BC7) + { + dds10 = true; + } + if (dds10) { outputOptions.setContainer(nvtt::Container_DDS10); diff --git a/src/nvtt/tools/decompress.cpp b/src/nvtt/tools/decompress.cpp index 9a7b11a..0163cca 100644 --- a/src/nvtt/tools/decompress.cpp +++ b/src/nvtt/tools/decompress.cpp @@ -66,6 +66,8 @@ int main(int argc, char *argv[]) if (i+1 == argc) break; i++; + // !!!UNDONE: Support at least one HDR output format + #ifdef HAVE_PNG if (strcmp("png", argv[i]) == 0) savePNG = true; else @@ -92,13 +94,17 @@ int main(int argc, char *argv[]) break; } + else + { + printf("Warning: unrecognized option \"%s\"\n", argv[i]); + } } printf("NVIDIA Texture Tools - Copyright NVIDIA Corporation 2007\n\n"); if (input.isNull()) { - printf("usage: nvdecompress [options] infile [outfile]\n\n"); + printf("usage: nvdecompress [options] infile.dds [outfile]\n\n"); printf("Note: the .tga or .png extension is forced on outfile\n\n"); @@ -112,6 +118,8 @@ int main(int argc, char *argv[]) } // Load surface. + // !!! DirectDrawSurface API doesn't support float images, so BC6 will be converted to 8-bit on load. + // Should use nvtt::Surface instead. nv::DirectDrawSurface dds(input.str()); if (!dds.isValid()) { diff --git a/src/nvtt/tools/imgdiff.cpp b/src/nvtt/tools/imgdiff.cpp index 3964fab..4cb0bfc 100644 --- a/src/nvtt/tools/imgdiff.cpp +++ b/src/nvtt/tools/imgdiff.cpp @@ -182,11 +182,10 @@ int main(int argc, char *argv[]) { compareNormal = true; } - if (strcmp("-alpha", argv[i]) == 0) + else if (strcmp("-alpha", argv[i]) == 0) { compareAlpha = true; } - else if (argv[i][0] != '-') { input0 = argv[i]; @@ -197,6 +196,10 @@ int main(int argc, char *argv[]) break; } + else + { + printf("Warning: unrecognized option \"%s\"\n", argv[i]); + } } if (input0.isNull() || input1.isNull()) diff --git a/src/nvtt/tools/resize.cpp b/src/nvtt/tools/resize.cpp index 23390e9..a22aa4b 100644 --- a/src/nvtt/tools/resize.cpp +++ b/src/nvtt/tools/resize.cpp @@ -131,6 +131,10 @@ int main(int argc, char *argv[]) break; } + else + { + printf("Warning: unrecognized option \"%s\"\n", argv[i]); + } } if (input.isNull() || output.isNull())