Fix fromPlanaerSSE
This commit is contained in:
+3
-3
@@ -84,15 +84,15 @@ void fromPlanarSSE(const void *in, void *out, size_t count)
|
|||||||
switch(sizeof(T))
|
switch(sizeof(T))
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
for(uint32_t o=0; o<ch; o++)static_cast<uint8_t*>(out)[i + o] = static_cast<const uint8_t*>(in)[i + o + s2];
|
for(uint32_t o=0; o<ch; o++)static_cast<uint8_t*>(out)[i*4 + o] = static_cast<const uint8_t*>(in)[i + o*s2];
|
||||||
if(ch==3)static_cast<uint8_t*>(out)[i*4 + 3] = 0xff;
|
if(ch==3)static_cast<uint8_t*>(out)[i*4 + 3] = 0xff;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
for(uint32_t o=0; o<ch; o++)static_cast<uint16_t*>(out)[i + o] = static_cast<const uint16_t*>(in)[i + o + s2];
|
for(uint32_t o=0; o<ch; o++)static_cast<uint16_t*>(out)[i*4 + o] = static_cast<const uint16_t*>(in)[i + o*s2];
|
||||||
if(ch==3)static_cast<uint16_t*>(out)[i*4 + 3] = 0xffff;
|
if(ch==3)static_cast<uint16_t*>(out)[i*4 + 3] = 0xffff;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
for(uint32_t o=0; o<ch; o++)static_cast<uint32_t*>(out)[i + o] = static_cast<const uint32_t*>(in)[i + o + s2];
|
for(uint32_t o=0; o<ch; o++)static_cast<uint32_t*>(out)[i*4 + o] = static_cast<const uint32_t*>(in)[i + o*s2];
|
||||||
if(ch==3)
|
if(ch==3)
|
||||||
{
|
{
|
||||||
if(!std::numeric_limits<T>::is_integer)static_cast<float*>(out)[i*4 + 3] = 1.0;
|
if(!std::numeric_limits<T>::is_integer)static_cast<float*>(out)[i*4 + 3] = 1.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user