04-05-2023 09:56 AM
I appriciate your patience altenbach.
your solution works perfekt, thank you for the help
04-05-2023 10:23 AM - edited 04-05-2023 10:26 AM
@PalanivelThiruvenkadam wrote:
How to handle if there is a byte order change involved?
Flatter/unflatten has a byte order input. You can also swap bytes or swap words, depending on what yo want.
In your case, you are reversing the two elements of the U16 array, possibly meaning that the two bytes of each U16 are actually in big endian but in the wrong array order. We need to know more details before we can give advice. Are you absolutely sure your explicit code gives the correct result?
If reversing each two-elements U16 array gives the correct answer, this would be equivalent. No loop needed.
You are changing the word order, NOT the byte order!
Same result: