James McAvoy is going crazy in Sierra/Affinity’s new international trailer for the comic thriller “Filth,” portraying a sex-obsessed drug-addicted police officer in Edinburgh.

“When you enforce the law, it’s easier to break it,” the trailer asserts.

The trailer notes that the project is from the creators of “Trainspotting.” “Filth” is adapted by Jon S. Baird from the novel by Irvine Welsh, whose 1993 novel “Trainspotting” was adapted memorably by Danny Boyle three years later.

Cast includes Jamie Bell, Eddie Marsan, Jim Broadbent, Imogen Poots, Joanne Froggatt, Gary Lewis, Martin Compston, Kate Dickie and Shirley Henderson. The official synopsis: “A bipolar junkie cop manipulates and hallucinates his way through the festive season in a bid to secure promotion and win back his wife and daughter.”