Extract a block, but blank out blue, and swap red and alpha, on the fly.
| 215 | |
| 216 | // Extract a block, but blank out blue, and swap red and alpha, on the fly. |
| 217 | void ExtractBlockDXT5N( const uint8_t* inPtr, const int width, uint8_t* colorBlock ) |
| 218 | { |
| 219 | for( int j = 0; j != 4; ++j ) |
| 220 | { |
| 221 | const uint8_t* src = inPtr; |
| 222 | for( int i = 0; i != 4; ++i, src += 4 ) |
| 223 | { |
| 224 | *colorBlock++ = 0; |
| 225 | *colorBlock++ = src[1]; |
| 226 | *colorBlock++ = src[3]; |
| 227 | *colorBlock++ = src[2]; |
| 228 | } |
| 229 | |
| 230 | inPtr += width * 4; |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | void GetMinMaxYCoCg( uint8_t* colorBlock, uint8_t* minColor, uint8_t* maxColor ) |
| 235 | { |
no outgoing calls
no test coverage detected