An inspired comedy title, "Stir Crazy" blends several inventive, high-spirited performing talents into a tangy, cheerful entertainment.

The principal crazies at the adroit disposal of director Sidney Poitier are Gene Wilder and Richard Pryor, cast as interracial sidekicks of contradictory temperaments.

Wilder is Skip Donahue, an unproduced playwright, and Pryor is Harry Monroe, an unemployed actor. They abandon professional failure in hostile old Manhattan to seek fresh opportunity in Western climes, only to end up in an Arizona slammer serving 125 years for crimes they didn't commit.

After being outrageously incarcerated, the heroes are given an outrageous pretext for escaping: the annual prison rodeo. Skip reveals phenomenal skill as a bronc rider when forced to ride a mechanical bucking bronc in the warden's office. Avid to defeat a rival institution in the rodeo, the warden is persuaded to grant Skip and his cellmates privileges that facilitate a slick breakout under cover of the competition.

Opening today at area theaters, the film may not do anything earth-shattering, like erase your fondest memories of "Some Like It Hot." But "Stir Crazy," brightened by the first Bruce Jay Friedman script to reach the screen, is certainly the most spontaneous and enjoyable movie farce in recent memory. Think of "Stir Crazy" as "The Longest Yard" transformed into a pure comedy or a burlesque takeoff on "Brubaker."

A slight but far from unpleasant surprise is the relative dominance of Wilder. It's not as if Pryor has been obliged to conceal his genius or recede into the background. A number of scenes are deliberately contrived to display his inimitable stuff: a tirade about the loss of his stash, a jar of "African gungi, straight from the Motherland," which is mistaken for oregano by a careless cook; his panic-stricken efforts to act tough (in argot, "get bad") when he and Wilder first enter the prison cell block, an over-compensating charade that prompts his partner into a spastic honky accompaniment; a totally gratuitous episode in which he lands in the prison infirmary and exits screaming in fear of some unspeakable form of surgery.

The co-stars play against type in a way that favors Wilder, because his character, indomitably naive, is the one who takes the initiative and makes things happen, usually out of sheer angelic ignorance. Fearing no harm, expecting to make friends, he courts disaster. The providential joke of the conception is that his foolish behavior never proves fatal, a protection that only a world of make-believe could afford.

Pryor's Harry is alert to danger and malice. He expects the worst and tries to duck trouble. It's a mystery how these two opposites ever got acquainted, and I have a vague suspicion that the personality contrast would make more sense if Skip were a dizzy girlfriend or wife. Nevertheless, the co-stars are funny enough, alone or together or matched with other members of a sensational suppporting cast, to justify subordinating certain logical objections.

"Stir Crazy" tries to allow the performers room for improvised comic specialties while keeping on a swift narrative track. Poitier seems to take delight in funny behavior for its own sake, but the plot remains in brisk forward motion as the characters are constantly plunged into fresh difficulties.

The most prominent supporting bits are contributed by Georg Stanford Brown as a resourceful transvestite who takes a liking to Pryor (Brown really does recall the spirit of Jack Lemmon and Tony Curtis in "Some Like It Hot"), Jobeth Williams and Joel Brooks as eager-beaver defense attorneys, Barry Corbin as the warden, Craig T. Nelson as the captain of guards, Cedrick Hardman as an imposing inmate, Grand Bush as his talkative buddy, Franklin Ajaye as a fellow inmate in the infirmary sequence, Esther Sutherland as a cook, Estelle Omens as a woozy hostess and Lee Purcell as a shoplifter. However, Poitier's loveliest touch is his handling of the hulking Erland Van Lidth de Jeude, who appeared as the biggest Fordham Baldie in "The Wanders" and plays a fearsome brute miraculously tamed by the heroes.

One of the happier consequences of the film's probable, deserving popularity should be the elevation of Sidney Poitier to a fresh eminence as a top-flight Hollywood director.

He has directed several times before, usually with both gusto and box-office success. "Buck and the Preacher," "Uptown Saturday Night," "Let's Do It Again" and "A Piece of the Action" were not flops, after all. However, "Stir Crazy" is likely to achieve a success at once more substantial and far-reaching. Poitier's breakthrough career as a leading man, one of the more formidable and heroic achievements in the annals of Hollywood stardom, may now be echoed by an exemplary career behind the camera. "Stir Crazy" demonstrates more or less casually that Poitier is a large-souled entertainer who cannot be limited by racial stereotyping.

What acceptable excuse could there be for perceiving Poitier as an exclusively "black" filmmaker after "Stir Crazy" gets around? If he can coax or nurture performances this sharp and amusing out of white actors and black actors, in major roles and minor roles the distinction loses all practical significance. It's more accurate to perceive him as what he obviously appears to be: An actor's director, perculiarly sensitive to and appreciative of the faces, expressions and rhythms of a large, varied cast. a

There are hitches and fleeting expository dead spots in the plot; and certain slapstick duets between Wilder and Pryor work so well -- a complementary freak-out, for instance, or bits exploiting the proximity forced upon them by being cellmates -- that it's a shame they aren't elaborated even further. Nevertheless, "Stir Crazy" is too energetic and amusing to permit sustained quibbling. Poitier & Co. have given Hollywood a pick-me-up at a moment when the business desperately needs one.