fix endian conversion for (curently unused) case where in buffer != out buffer