engine/dlib/src/dlib/webp.cpp
// Compose WebP 24-bit color RGB into RGB565 data.
Compose WebP 24-bit color RGB into RGB565 data.
Compose WebP 24 - bit color RGB into RGB565 data .
static inline void ComposeRGB565(uint16_t* dest, uint8_t* src, uint32_t elements)
    {
        for(uint32_t i = 0; i < elements; ++i)
        {
            uint16_t p = (((uint16_t) *(src++)) << 8) & 0xf800;
            p |= (((uint16_t) *(src++)) << 3) & 0x7e0;
            p |= (((uint16_t) *(src++)) >> 3) & 0x1f;
            *(dest++) = p;
        }
    }
static inline void ComposeRGB565 ( uint16_t * dest , uint8_t * src , uint32_t elements ) { for ( uint32_t i = 0 ; i < elements ; ++ i ) { uint16_t p = ( ( ( uint16_t ) * ( src ++ ) ) << 8 ) & 0xf800 ; p |= ( ( ( uint16_t ) * ( src ++ ) ) << 3 ) & 0x7e0 ; p |= ( ( ( uint16_t ) * ( src ++ ) ) >> 3 ) & 0x1f ; * ( dest ++ ) = p ; } }
Compose WebP 24-bit color RGB into RGB565 data.
Compose WebP 24 - bit color RGB into RGB565 data .