The data in memory is in big endian format and needs to be converted
into CPU byte order. So the patch actually reversed what needs to be done.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
} else if (bytes_left >= 4) {
/* enough bytes in buffer, read in a whole dword */
- uint64_t value = util_cpu_to_le32(*(const uint32_t*)vlc->data);
+ uint64_t value = *(const uint32_t*)vlc->data;
+
+#ifndef PIPE_ARCH_BIG_ENDIAN
+ value = util_bswap32(value);
+#endif
vlc->buffer |= value << vlc->invalid_bits;
vlc->data += 4;