OSDN Git Service
(root)
/
android-x86
/
external-s2tc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f309590
)
also handle 8 alphabits specially
author
Rudolf Polzer
<divverent@xonotic.org>
Fri, 15 Jul 2011 07:30:50 +0000
(09:30 +0200)
committer
Rudolf Polzer
<divverent@xonotic.org>
Fri, 15 Jul 2011 07:30:50 +0000
(09:30 +0200)
s2tc_compressor.cpp
patch
|
blob
|
history
diff --git
a/s2tc_compressor.cpp
b/s2tc_compressor.cpp
index
ba05290
..
17065a8
100644
(file)
--- a/
s2tc_compressor.cpp
+++ b/
s2tc_compressor.cpp
@@
-892,11
+892,16
@@
void rgb565_image(unsigned char *out, const unsigned char *rgba, int w, int h, i
{
if(alphabits == 1)
{
- int alphadiffuse = 8 - alphabits;
for(y = 0; y < h; ++y)
for(x = 0; x < w; ++x)
out[(x + y * w) * 4 + 3] = diffuse1(&diffuse_a, rgba[(x + y * w) * srccomps + 3]);
}
+ else if(alphabits == 8)
+ {
+ for(y = 0; y < h; ++y)
+ for(x = 0; x < w; ++x)
+ out[(x + y * w) * 4 + 3] = rgba[(x + y * w) * srccomps + 3]; // no conversion
+ }
else
{
int alphadiffuse = 8 - alphabits;