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

Function encode_texel_lns

Source/astcenc_image.cpp:150–159  ·  view source on GitHub ↗

* @brief Encode a texel that includes at least some HDR LNS texels. * * Out-of-range inputs will be clamped to the valid LNS or UNORM range, * depending on @c lns_mask. * * @param data The RGBA data to encode. * @param lns_mask The mask for the HDR channels that need LNS encoding. */

Source from the content-addressed store, hash-verified

148 * @param lns_mask The mask for the HDR channels that need LNS encoding.
149 */
150static vfloat4 encode_texel_lns(
151 vfloat4 data,
152 vmask4 lns_mask
153) {
154 vfloat4 datav_unorm = encode_texel_unorm(data, lns_mask);
155
156 // Out-of-range inputs are clamped inside float_to_lns
157 vfloat4 datav_lns = float_to_lns(data);
158 return select(datav_unorm, datav_lns, lns_mask);
159}
160
161/* See header for documentation. */
162void load_image_block(

Callers

nothing calls this directly

Calls 3

encode_texel_unormFunction · 0.85
float_to_lnsFunction · 0.85
selectFunction · 0.70

Tested by

no test coverage detected