Here's one way to do matrix transpose in SSE:

http://randombit.net/bitbashing/2009/10/08/integer_matrix_transpose_in_sse2.html