- q[ 0] = (h[ 5] - h[ 7] + h[10] + h[13] + h[14]);
- q[ 1] = (h[ 6] - h[ 8] + h[11] + h[14] - h[15]);
- q[ 2] = (h[ 0] + h[ 7] + h[ 9] - h[12] + h[15]);
- q[ 3] = (h[ 0] - h[ 1] + h[ 8] - h[10] + h[13]);
- q[ 4] = (h[ 1] + h[ 2] + h[ 9] - h[11] - h[14]);
- q[ 5] = (h[ 3] - h[ 2] + h[10] - h[12] + h[15]);
- q[ 6] = (h[ 4] - h[ 0] - h[ 3] - h[11] + h[13]);
- q[ 7] = (h[ 1] - h[ 4] - h[ 5] - h[12] - h[14]);
- q[ 8] = (h[ 2] - h[ 5] - h[ 6] + h[13] - h[15]);
- q[ 9] = (h[ 0] - h[ 3] + h[ 6] - h[ 7] + h[14]);
- q[10] = (h[ 8] - h[ 1] - h[ 4] - h[ 7] + h[15]);
- q[11] = (h[ 8] - h[ 0] - h[ 2] - h[ 5] + h[ 9]);
- q[12] = (h[ 1] + h[ 3] - h[ 6] - h[ 9] + h[10]);
- q[13] = (h[ 2] + h[ 4] + h[ 7] + h[10] + h[11]);
- q[14] = (h[ 3] - h[ 5] + h[ 8] - h[11] - h[12]);
- q[15] = (h[12] - h[ 4] - h[ 6] - h[ 9] + h[13]);
+ /*
+ q[ 0] = (t[ 5] - t[ 7] + t[10] + t[13] + t[14]);
+ q[ 1] = (t[ 6] - t[ 8] + t[11] + t[14] - t[15]);
+ q[ 2] = (t[ 0] + t[ 7] + t[ 9] - t[12] + t[15]);
+ q[ 3] = (t[ 0] - t[ 1] + t[ 8] - t[10] + t[13]);
+ q[ 4] = (t[ 1] + t[ 2] + t[ 9] - t[11] - t[14]);
+ q[ 5] = (t[ 3] - t[ 2] + t[10] - t[12] + t[15]);
+ q[ 6] = (t[ 4] - t[ 0] - t[ 3] - t[11] + t[13]);
+ q[ 7] = (t[ 1] - t[ 4] - t[ 5] - t[12] - t[14]);
+ q[ 8] = (t[ 2] - t[ 5] - t[ 6] + t[13] - t[15]);
+ q[ 9] = (t[ 0] - t[ 3] + t[ 6] - t[ 7] + t[14]);
+ q[10] = (t[ 8] - t[ 1] - t[ 4] - t[ 7] + t[15]);
+ q[11] = (t[ 8] - t[ 0] - t[ 2] - t[ 5] + t[ 9]);
+ q[12] = (t[ 1] + t[ 3] - t[ 6] - t[ 9] + t[10]);
+ q[13] = (t[ 2] + t[ 4] + t[ 7] + t[10] + t[11]);
+ q[14] = (t[ 3] - t[ 5] + t[ 8] - t[11] - t[12]);
+ q[15] = (t[12] - t[ 4] - t[ 6] - t[ 9] + t[13]);
+ */
+ q[ 0] = +t[ 5] +t[10] +t[13] +(tr1=-t[ 7]+t[14]) ;
+ q[ 3] = +t[ 8] +t[13] +t[ 0] +(tr2=-t[ 1]-t[10]) ;
+ q[ 6] = -t[11] +t[13] -t[ 0] -t[ 3] +t[ 4] ;
+ q[ 9] = +t[ 0] +(tr0=-t[ 3]+t[ 6]) +(tr1) ;
+ q[12] = -t[ 9] -(tr0) -(tr2) ;
+ q[15] = -t[ 4] +(tr0=-t[ 9]+t[12]) +(tr1=-t[ 6]+t[13]) ;
+ q[ 2] = +t[ 7] +t[15] +t[ 0] -(tr0) ;
+ q[ 5] = +t[10] +(tr0=-t[ 2]+t[15]) +(tr2=+t[ 3]-t[12]) ;
+ q[ 8] = -t[ 5] -(tr0) +(tr1) ;
+ q[11] = -t[ 0] -t[ 2] +t[ 9] +(tr0=-t[ 5]+t[ 8]) ;
+ q[14] = -t[11] +(tr0) +(tr2) ;
+ q[ 1] = +t[ 6] +(tr0=+t[11]+t[14]) +(tr1=-t[ 8]-t[15]) ;
+ q[ 4] = +t[ 9] +t[ 1] +t[ 2] -(tr0) ;
+ q[ 7] = -t[12] -t[14] +t[ 1] -t[ 4] -t[ 5] ;
+ q[10] = -t[ 1] +(tr0=-t[ 4]-t[ 7]) -(tr1) ;
+ q[13] = +t[ 2] +t[10] +t[11] -(tr0) ;