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

Function reverse_bytes_u32

Source/astcenccli_image_load_store.cpp:44–51  ·  view source on GitHub ↗

* @brief Reverse the bytes in a uint32_t value. */

Source from the content-addressed store, hash-verified

42 * @brief Reverse the bytes in a uint32_t value.
43 */
44static uint32_t reverse_bytes_u32(
45 uint32_t val
46) {
47 return ((val >> 24) & 0x000000FF) |
48 ((val >> 8) & 0x0000FF00) |
49 ((val << 8) & 0x00FF0000) |
50 ((val << 24) & 0xFF000000);
51}
52
53/**
54 * @brief Determine the output file name to use for a sliced image write.

Callers 4

Calls

no outgoing calls

Tested by

no test coverage detected