12. If $16^{\sin ^{2} x}+16^{\cos ^{2} x}=10$, then $\cos 4 x=$
$\qquad$ .
12. $-\frac{1}{2}$.

Let $t=16^{\sin ^{2} x}(1 \leqslant t \leqslant 16)$. Then $16^{\cos ^{2} x}=16^{1-\sin ^{2} x}=\frac{16}{t}$.
Substituting into the original equation gives $t+\frac{16}{t}=10 \Rightarrow t=2$ or 8.

Solving yields $\sin ^{2} x=\frac{1}{4}$ or $\frac{3}{4}$.
Thus, $\cos 4 x=-\frac{1}{2}$.