David O. Russell is one of the best directors in Hollywood insofar as no one makes more out of questionable material — hackneyed stories you can easily imagine an untalented director dumbly steering into cloying nonsense — and no one pulls better performances out of mediocre stars, like, in this case, Bradley Cooper and the aging, hacky Robert De Niro we know from Little Fockers. The Silver Linings Playbook, the second film of O. Russell’s mid-career reinvention as a subtle, stylish genre director, is one of the best movies of its kind this year.

Cooper plays Pat, who, as the film begins, is released from the Baltimore mental institution where he was committed on a plea bargain after he beat his wife’s lover half to death. His long-suffering mother (Jacki Weaver) drives him home from Baltimore to Philadelphia, where the movie takes place and from which it derives much of its character. There he surprises his bookie father, Pat Sr. (Robert De Niro), a man who cares a lot about people without thinking too hard about the best way to do so, and who’s consequently as committed to helping his son put his life back together as he is to helping the Eagles make it to the Superbowl by being their most ardent fan. Pat sets out on the straight and narrow, determined to get back in shape and off meds so he can win back the wife who cuckolded him.

So, a released violent mental patient reconnects with family and his past life, and along the way meets a girl (Jennifer Lawrence, preternaturally talented), a widowed dancer almost as crazy as he is. Nothing about this melodrama’s plot makes you lean forward, asking to hear more. It’s the dialogue that does that: Russell’s writing sets him apart from other Hollywood drama makers. Taking full screenplay credit here, his care is evident not only for sharp, incisive, rolling dialogue, but also for long scenes that encompass the ebbs and flows of socializing, fighting, and reconciling. He cares about the shape and rhythm of his movies, not just simple pathos and punchlines. Like some of the best workmen out of classical Hollywood (Anthony Mann, George Cukor, or Michael Curtiz) he handles the entire structure of his films with deftness, wit, and a sense of the elasticity of a film’s movements. Finally, he adds zippy, stylish flare to his script.

These are his attributes, and they’re pretty major. His demerits all have to do with his choice of material, which is almost definitely limited by his headstrong decision to work in the mainstream when a director of such obvious talent could do much outside of it. He makes saccharine movies, but he infuses them with comedy and with the vibrancy of a filmmaker who is fully in charge of the tools of filmmaking available to him. He’s like a McDonald’s employee who stays late to remix all of his restaurant’s shitty ingredients in just the right way to make a burger that tastes like it was made with actual care, then invites his friends in after hours for a pretty damn good meal.