diff options
Diffstat (limited to 'source/blender/imbuf/intern/dds/BlockDXT.h')
-rw-r--r-- | source/blender/imbuf/intern/dds/BlockDXT.h | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/source/blender/imbuf/intern/dds/BlockDXT.h b/source/blender/imbuf/intern/dds/BlockDXT.h index 70ec8808c61..1fefa7c739d 100644 --- a/source/blender/imbuf/intern/dds/BlockDXT.h +++ b/source/blender/imbuf/intern/dds/BlockDXT.h @@ -25,28 +25,28 @@ * Original license from NVIDIA follows. */ -// Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com> -// -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -// OTHER DEALINGS IN THE SOFTWARE. +/* Copyright NVIDIA Corporation 2007 -- Ignacio Castano <icastano@nvidia.com> + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. */ #pragma once @@ -55,7 +55,7 @@ #include <Common.h> #include <Stream.h> -/// DXT1 block. +/** DXT1 block. */ struct BlockDXT1 { Color16 col0; Color16 col1; @@ -81,13 +81,13 @@ struct BlockDXT1 { void flip2(); }; -/// Return true if the block uses four color mode, false otherwise. +/** Return true if the block uses four color mode, false otherwise. */ inline bool BlockDXT1::isFourColorMode() const { return col0.u > col1.u; } -/// DXT3 alpha block with explicit alpha. +/** DXT3 alpha block with explicit alpha. */ struct AlphaBlockDXT3 { union { struct { @@ -117,7 +117,7 @@ struct AlphaBlockDXT3 { void flip2(); }; -/// DXT3 block. +/** DXT3 block. */ struct BlockDXT3 { AlphaBlockDXT3 alpha; BlockDXT1 color; @@ -129,30 +129,30 @@ struct BlockDXT3 { void flip2(); }; -/// DXT5 alpha block. +/** DXT5 alpha block. */ struct AlphaBlockDXT5 { - // uint64 unions do not compile on all platforms + /* uint64 unions do not compile on all platforms */ #if 0 union { struct { - uint64 alpha0 : 8; // 8 - uint64 alpha1 : 8; // 16 - uint64 bits0 : 3; // 3 - 19 - uint64 bits1 : 3; // 6 - 22 - uint64 bits2 : 3; // 9 - 25 - uint64 bits3 : 3; // 12 - 28 - uint64 bits4 : 3; // 15 - 31 - uint64 bits5 : 3; // 18 - 34 - uint64 bits6 : 3; // 21 - 37 - uint64 bits7 : 3; // 24 - 40 - uint64 bits8 : 3; // 27 - 43 - uint64 bits9 : 3; // 30 - 46 - uint64 bitsA : 3; // 33 - 49 - uint64 bitsB : 3; // 36 - 52 - uint64 bitsC : 3; // 39 - 55 - uint64 bitsD : 3; // 42 - 58 - uint64 bitsE : 3; // 45 - 61 - uint64 bitsF : 3; // 48 - 64 + uint64 alpha0 : 8; /* 8 */ + uint64 alpha1 : 8; /* 16 */ + uint64 bits0 : 3; /* 3 - 19 */ + uint64 bits1 : 3; /* 6 - 22 */ + uint64 bits2 : 3; /* 9 - 25 */ + uint64 bits3 : 3; /* 12 - 28 */ + uint64 bits4 : 3; /* 15 - 31 */ + uint64 bits5 : 3; /* 18 - 34 */ + uint64 bits6 : 3; /* 21 - 37 */ + uint64 bits7 : 3; /* 24 - 40 */ + uint64 bits8 : 3; /* 27 - 43 */ + uint64 bits9 : 3; /* 30 - 46 */ + uint64 bitsA : 3; /* 33 - 49 */ + uint64 bitsB : 3; /* 36 - 52 */ + uint64 bitsC : 3; /* 39 - 55 */ + uint64 bitsD : 3; /* 42 - 58 */ + uint64 bitsE : 3; /* 45 - 61 */ + uint64 bitsF : 3; /* 48 - 64 */ }; uint64 u; }; @@ -245,7 +245,7 @@ struct AlphaBlockDXT5 { void flip2(); }; -/// DXT5 block. +/** DXT5 block. */ struct BlockDXT5 { AlphaBlockDXT5 alpha; BlockDXT1 color; @@ -257,7 +257,7 @@ struct BlockDXT5 { void flip2(); }; -/// ATI1 block. +/** ATI1 block. */ struct BlockATI1 { AlphaBlockDXT5 alpha; @@ -267,7 +267,7 @@ struct BlockATI1 { void flip2(); }; -/// ATI2 block. +/** ATI2 block. */ struct BlockATI2 { AlphaBlockDXT5 x; AlphaBlockDXT5 y; @@ -278,7 +278,7 @@ struct BlockATI2 { void flip2(); }; -/// CTX1 block. +/** CTX1 block. */ struct BlockCTX1 { uint8 col0[2]; uint8 col1[2]; |