The new movie “Green Book” sets up, with a pristine precision, a scenario that was already ridiculous when it was presented in “Guess Who’s Coming to Dinner,” more than half a century ago: the acceptance by white people of a black protagonist whose talents and achievements are exceptional, whose manners are elegant, whose record is spotless, and whose résumé and connections are stamped “high-class.” “Green Book,” a blatantly Oscar-baiting flip on “Driving Miss Daisy,” is set in 1962 and is based on the true story of the business and personal relationship between the black musician Donald Shirley (played by Mahershala Ali) and the white night-club bouncer Tony Vallelonga, a.k.a. Tony Lip (Viggo Mortensen), so nicknamed because of his inclination to run his mouth. (He boasts of being “the best bullshit artist in the Bronx.”) Don hires Tony to drive him on a concert tour, mainly through the South. Tony, a crude man with street smarts, hard fists, and courage, is bewildered and awed by Don, who, for his part, both disdains Tony’s raw character and depends on him for protection in a part of the country where he won’t be able to defend himself.

The movie, directed by Peter Farrelly, with a script that he co-wrote with Nick Vallelonga (Tony’s son) and Brian Hayes Currie, stays close to Tony throughout, and only occasionally and briefly leaves him for a glimpse of Don’s experience—and then does so mainly to set up trouble from which Tony has to rescue him. In effect, “Green Book” is the story of Tony’s awakening, or, rather, his awokening: his appalled reaction to the firsthand observation of the racist laws and practices to which Don is subjected, of the violence that Don constantly fears. Don quickly wins Tony’s respect and admiration; Tony, both shocked by the racism of Jim Crow and by the humiliations and indignities inflicted upon Don, overcomes his own hitherto unquestioned prejudices and embraces Don as a friend. (The title refers to an actual publication, a guide book listing hotels, restaurants, and other public accommodations throughout the country that were safe for black travellers; Don’s manager provides Tony with a copy at the start of the journey.)

In his life before Don, depicted in the movie’s long prelude, Tony is revealed to be a casual racist in the casually racist milieu of his working-class, Italian-American Bronx neighborhood: when two plumbers, black men, are working in the kitchen of his apartment while Tony (who gets home from work around dawn) is asleep, his wife’s Italian kinfolk come over to keep watch. After his wife, Dolores (Linda Cardellini), gives the workmen a glass of water, Tony, awakened by the crowd (the men are watching the World Series on TV), surreptitiously takes their used glasses from the sink and deposits them in the garbage can. (Dolores eventually notices and puts the glasses back into the sink.)

When Don hires Tony, the movie teasingly plays with a reversal of socioeconomic stereotypes—a black person’s upper-class refinement, a white person’s underclass struggle. Don, though he’s widely admired and successful—he has even had the honor of performing in the White House—is a frustrated classical musician, trained as a concert pianist but barred from that career because of his race. Instead, he has become a musician whom Tony describes as “Like Liberace, but better,” blending classical stylings and improvisations on popular tunes. In the car, while Tony has the radio tuned to a Top Forty station, Don displays his ignorance of black popular music. He has, he says, never heard Chubby Checker; he doesn’t recognize the music of Little Richard. Aretha Franklin? Sam Cooke? “These are your people!” Tony exclaims in an the oblivious riff, ultimately adding, “I’m blacker than you are!” (Tony says more or less everything with an exclamation mark.) The earnest, repellent notion is raised again by Tony when he gets Don to try, for the first time, fried chicken. (Don is loath to eat with his fingers, saying, “It seems so unsanitary.”)

Meanwhile, throughout their journey, Don tries to teach Tony manners. After the chicken feast, Don orders Tony to stop the car and to pick up the soda cup that he (Tony) threw out the window. The musician urges Tony not to use “profanity,” corrects his diction, and, when Tony writes letters home to Dolores, plays Cyrano and feeds him poetic phrases with which to pay her homage. The movie borrows its tropes, and its comedy, from “The Odd Couple,” but its mismatch sometimes turns earnest, as when Don reproaches Tony for staying outside a mansion and playing craps with other—black—drivers. (“They didn’t have a choice whether to be inside or out; you did.”)

Don fits another stereotype, as well, one that works all too conveniently within the movie’s narrow contours: he’s gay. This fact renders him essentially neutered in the presence of Tony and his family and friends, as if removing from the story any racist questions of menacing black male sexuality of the sort that are planted early in the tale and then never explored or challenged. In the course of the journey, he narrowly avoids criminal charges for sexual relations with another man. This is a subject on which Tony, a self-described night-life sophisticate, has no prejudices; here, too, he’s merely trying to protect Don. “If this got out, it would kill your career,” Tony reminds him.

In one scene, Tony himself is the victim of an ethnic insult, and he starts a fight, at great risk to both of them. “I’m the one who pays the price,” Don says, advocating “not violence” but “dignity—dignity always prevails.” Never mind that Don’s life, throughout the film, is repeatedly saved by Tony’s aptitude for violence. (I won’t spoil the ugly implications of the one moment when Tony actually fires a gun.)

Don’s story is that of a lonely outsider who laments about being considered “not black enough, not white enough, not man enough,” and adds, with bewildered anguish, “What am I?” That horrific “what”—instead of “who”—is, in effect, the crux of the film. Though Don’s lament pushes back against prejudices regarding cultural identity, the movie also suggests that the answer to his rhetorical question is “a person,” a trait-free person, and that this is quite enough. The essential subject of “Green Book” isn’t the honoring of cultures, identities, and differences but their effacement in the interest of an ostensibly color-blind neutrality, a bland common ground of an accepted mainstream (in pop and high culture alike) of cuisine, entertainment, friends, family, and personal gratification. (The only instance of civil-rights politics in the film, for instance, is Don’s reference to John and Robert Kennedy, who are “trying to change this country.”)

This grotesquely ahistorical and impersonal view honors a mode of racial enlightenment—a “both sides” enlightenment—that’s as regressive as it is universally salable. It hedges its view of race with as many caveats as a movie producer’s contract. As directed by Peter Farrelly (one of the two Farrelly brothers, known for their comedic films), “Green Book” remains buoyant throughout, with appealingly whimsical humor—with Tony’s bluff ribaldry and Don’s dry wit. It’s that very humor that keeps the movie floating, weightlessly, above the appalling bedrock of its ponderous assumptions.

“Green Book” offers a vision of racists changing their views, but in a way that doesn’t in any way threaten racist prejudices. It’s a calculatedly heartwarming and good-humored look at atrocious actions, ideas, and attitudes with a pallid glow of halcyon optimism, a view of a change of heart that’s achieved through colossal exertions and confrontations with danger. The film’s built-in air of hopefulness, of laws changed and practices overcome, invites a response that blows down this cinematic house of cards: bullshit.