Optimized some format conversions

Thanks to kristofjé


Former-commit-id: f7c0e5da41b7b7b4c967d7ae812b6da517761823
This commit is contained in:
Lynix 2013-03-23 22:50:13 +01:00
parent 7ddff94a30
commit 5464b3e184
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ namespace
inline nzUInt8 c4to8(nzUInt8 c)
{
return c * (255/15);
return c >> 4;
}
inline nzUInt8 c5to4(nzUInt8 c)
@ -31,7 +31,7 @@ namespace
inline nzUInt8 c8to4(nzUInt8 c)
{
return c * (15.f/255.f);
return c << 4;
}
inline nzUInt8 c8to5(nzUInt8 c)