We prove that the planar Dacorogna--Marcellini energy fI^3(A)=∣A∣4−2I^3∣A∣2detA is quasiconvex exactly when it is rank-one convex, i.e. if and only if ∣I^3∣≤32. The proof uses a monotonicity property of the energy functional along the componentwise heat flow. As a corollary of our method, we show that for homogeneous quartic polynomials on 2×2 matrices invariant by left and right rotation, quasiconvexity is equivalent to rank one convexity.