MCPcopy Create free account
hub / github.com/crownengine/crown / imageRgba32fToLinear

Function imageRgba32fToLinear

3rdparty/bimg/src/image.cpp:574–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572 }
573
574 void imageRgba32fToLinear(void* _dst, uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _srcPitch, const void* _src)
575 {
576 uint8_t* dst = ( uint8_t*)_dst;
577 const uint8_t* src = (const uint8_t*)_src;
578
579 for (uint32_t zz = 0; zz < _depth; ++zz)
580 {
581 for (uint32_t yy = 0; yy < _height; ++yy, src += _srcPitch, dst += _width*16)
582 {
583 for (uint32_t xx = 0; xx < _width; ++xx)
584 {
585 const uint32_t offset = xx * 16;
586 float* fd = ( float*)(dst + offset);
587 const float* fs = (const float*)(src + offset);
588
589 fd[0] = bx::toLinear(fs[0]);
590 fd[1] = bx::toLinear(fs[1]);
591 fd[2] = bx::toLinear(fs[2]);
592 fd[3] = fs[3];
593 }
594 }
595 }
596 }
597
598 void imageRgba32fToLinear(ImageContainer* _imageContainer)
599 {

Callers 1

convertFunction · 0.85

Calls 2

imageGetRawDataFunction · 0.85
floorFunction · 0.85

Tested by

no test coverage detected