Paramount is about to finalize what will likely be the biggest deal of this year’s Toronto Film Festival: a whopping $12.5 million for the Chris Rock comedy “Top Five.” The studio, which is acquiring worldwide rights to the movie, has also agreed to spend $20 million on marketing.

The Scott Rudin-produced film, which Rock stars in and directs about a day in the life of a comedian movie star, premiered in Toronto on Saturday night and sparked a fierce bidding war among several studios.

The film’s budget was north of $10 million. Buyers interested in the film included CBS Films, Sony, Open Road and Relativity.

Part of the concern for potential buyers is that with a substantial promotional commitment and Rock’s limited international following, the film would be almost wholly dependent on its domestic box office in order to make a profit. However, the film was enthusiastically received by audiences at Toronto and knowledgeable insiders say it has real commercial potential.

Paramount makes sense because the studio’s chief, Brad Grey, has a longstanding relationship with Rock.