Geoffrey Rush gives a brilliant performance as the Marquis de Sade, the famed pornographer for whom the term “sadism” was coined, in Philip Kaufman’s “Quills.” He’s portrayed as a tortured (literally) genius whose drive to keep writing is almost as strong as his sex drive, and Rush plays up the deviltry and undignified desperation with inspired madness.

Good acting is probably the best thing to glean from “Quills,” written by Doug Wright and based on his play. Aside from the performances, it’s a depraved, lurid flick about a depraved, lurid man and all the depraved, lurid things his stories inspire others to do. It’s the rare instance in movie reviewing when we have to go beyond asking, “Did the film accomplish what it set out to do?” and also ask, “Was it even worth doing?” Personally, I can see no good coming of this film.

It’s set in the Charenton Asylum in early 19th-century France. The most famous inmate is the Marquis, imprisoned after committing some rather nasty and violent crimes; it was only due to the influence of his wife that he was committed rather than imprisoned (a crazy husband is less damaging, socially, than a convict husband).

The Marquis is granted a lot of lenience by Coulmier (Joaquin Phoenix), the flawed priest in charge of the place. Seen as much less a threat to the general public than the pyromaniacs or cretins who also inhabit Charenton, the Marquis is given a regular bed instead of a straw mat, and is allowed to continue writing. Coulmier sees writing as therapeutic — so long, of course, as none of the smut he writes is actually published.

Score one for the Marquis, though: Thanks to the help of Madeleine (Kate Winslet), a laundress who is a fan of his work, the Marquis’s latest book “Justine” is published anonymously. The lack of a byline doesn’t do much good, though; everyone knows by the style who the author is, and Napoleon promptly has the book banned and sends noted psychologist Dr. Royer-Collard (Michael Caine) out to Charenton to fix the Marquis once and for all.

Royer-Collard has some rather unusual methods, including dunking a man’s head under water for several seconds on regular intervals for a period of weeks. Of course, some would see this is nothing but sadism — but ah ha! You’ve caught on.

Coulmier convinces Royer-Collard to let him keep the Marquis from writing without resorting to drastic measures. He takes away everything that could possibly be used as a quill — and then the Marquis uses broken glass from his mirror to cut himself, then writes on his clothes with his own blood.

Meanwhile, Royer-Collard has a scandal brewing in his own life when he marries an extremely young orphan named Simone (Amelia Warner) who has grown up in a convent and who doesn’t love the good doctor for even a moment. His treatment of her, particularly in the department of her “wifely duties,” might be described as … I don’t know, SADISTIC?!?!?

One major obstacle the film never overcomes is the fact that the Marquis is writing pornography. Replace that with actual literature or art, and we’d be on his side all the way. But we tend to be somewhat reluctant to go to the wall for a pornographer, and it doesn’t help that the film never tries to convince us that the Marquis’s work is anything else. No defense is made of the stuff’s artistic merit, much less of one’s inalienable right to free speech (this is France in the early 1800s). It’s just a guy with an unstoppable impulse to write dirty books.

In fact, the best they can come up with for the reason Madeleine risks her life to help publish the Marquis’s tawdry little tales is that, at the end of a hard day of washing crazy people’s sheets, she likes to unwind with some porn. Hardly an inspiring example of fighting for the right to express oneself.

A much more dangerous aspect of the film is the cavalier attitude with which it dismisses the notion that the Marquis’s writing is responsible for the several dozen things the movie clearly shows him to be responsible for. People — and not just the weak-minded inmates — do things inspired by the stories they’ve read, leading up to an insane nightmare of debauchery when fire and all hell break loose at the asylum. When Coulmier accuses the Marquis of being responsible for this, he retorts by saying that if one of the loons had drowned while trying to walk across water, Coulmier wouldn’t blame the Bible for it, would he?

That’s it? That’s the only response to this very serious accusation? Rather glib, considering there’s a list about a mile long of things people do in the movie as a direct result of reading the Marquis’s work.

So the Marquis is wrong, right? His words really do have an effect on people, don’t they? But if that’s the case — which it clearly is — then what’s to be said for a movie that revels in showing us the Marquis’s handiwork as much as he reveled in creating it? If books can influence people’s behavior, for better or worse, then can’t movies about those books do the same thing, provided they show enough of the details?

A movie about the life of the Marquis de Sade could probably tell the story without delving too much into the specifics of what he penned. But this isn’t a biography: It’s a bibliography. Passages from the Marquis’s books are read aloud frequently, and Kaufman doesn’t shy away from the sexual and sadistic actions of people who are motivated by them.

Perhaps the film is right in its implication that we all have a bit of the Marquis de Sade in us. I sat through the whole thing, didn’t I?

D+ (; R, abundant harsh profanity and vulgarity, abundant nudity and sexuality, some strong violence.)