The stream of BE shorts is a stream of **unaligned** BE shorts so needs to be treated as raw bytes not shorts. casting from `char *` to `short *` can cause the compiler to generate loads with potentially invalid alignment causing crashes.