MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / load_texel_f16

Function load_texel_f16

Source/astcenc_image.cpp:62–72  ·  view source on GitHub ↗

* @brief Load a 16-bit fp16 texel from a data array. * * @param data The data pointer. * @param base_offset The index offset to the start of the pixel. */

Source from the content-addressed store, hash-verified

60 * @param base_offset The index offset to the start of the pixel.
61 */
62static vfloat4 load_texel_f16(
63 const void* data,
64 size_t base_offset
65) {
66 const uint16_t* data16 = static_cast<const uint16_t*>(data);
67 int r = data16[base_offset ];
68 int g = data16[base_offset + 1];
69 int b = data16[base_offset + 2];
70 int a = data16[base_offset + 3];
71 return float16_to_float(vint4(r, g, b, a));
72}
73
74/**
75 * @brief Load a 32-bit float texel from a data array.

Callers

nothing calls this directly

Calls 2

float16_to_floatFunction · 0.70
vint4Class · 0.70

Tested by

no test coverage detected