Image caption Benedict Cumberbatch has sparked anger on social media

It's just a small clip in a trailer for a comedy, but Benedict Cumberbatch's cameo as an apparent transgender model, All, in Zoolander 2 has stirred up an angry social media protest for alleged transphobia.

With growing public awareness and news stories about transgender people, an online petition to boycott the film had gathered 10,000 signatures by Tuesday morning, saying the "cartoonish mockery... was the modern equivalent of using blackface" - white people blacking up to mock black people.

So what is the status of blackface in acting, and is such a comparison a fair one?

When the director of a university theatre company in Ohio cast a play about Martin Luther King with a white and a black man alternating the role earlier this autumn, it made headlines on both sides of the Atlantic.

It wasn't "blacking up "in the traditional sense, as no make-up was involved, and the intention certainly wasn't to mock.

The director, Michael Oatmen, who is black, said his casting of The Mountaintop was not intended as a "stunt, but a true exploration of King's wish that we all be judged by the content of our character and not the colour of our skin".

But the play's author, Katori Hall vigorously objected.

She said it wasn't the same as colour-blind casting, where black actors are cast in traditionally white roles because of the huge imbalance in the visibility of black actors in mainstream parts.

"The casting of a white King is committing yet another erasure of the black body," she wrote.

Last year Ridley Scott's Exodus: Gods and Kings came under criticism for a cast dominated by make-up-tanned and black-wigged Egyptians played by non-Middle-Easterners, including Joel Edgerton and Sigourney Weaver.

Image copyright Photos 12 / Alamy Stock Photo Image caption Ridley Scott's film was criticised for failing to use Middle Eastern actors

Scott argued the criticism was misplaced, as a blockbuster film needed big names to get funding.

Film writer and programmer Ashley Clark, author of Facing Blackness: Media and Minstrelsy in Spike Lee's Bamboozled, is unimpressed by the "funding" argument and points out each individual film or TV casting decision is part of a bigger picture in which black actors are often not seen or limited to stereotyped supporting roles.

He accepts that many black and Asian British actors have headed West for better opportunity.

But he adds: "We live in a context where the Hollywood Reporter, doing a big photo spread of leading actors, marginalised women of colour... in a climate where the cultural product is not diverse, things that are on the line and are offensive need to be held accountable whether they like it or not."

American actor Dylan Marron was so disturbed by the invisibility of black actors that he began collating "every single word spoken by a person of colour" in individual Hollywood films and found they usually amounted to a few seconds often as servants or prostitutes.

Long history of criticism

There has been widespread criticism of blacking up for at least 30 years, going back to Alec Guinness and Amy Irving playing painted Indians in A Passage To India and The Far Pavilions (both 1984).

So why is it still happening?

Image copyright Moviestore collection Ltd / Alamy Stock Photo Image caption Alec Guinness was criticised for blacking up

Angelina Jolie in curly wig and tan make-up as the mixed-ethnicity Mariane Pearl in A Mighty Heart (2007) is a recent "borderline" example.

The actors' union, Equity, has called for those who make commissioning decisions to make reflecting the nation's diversity core to casting on stage or on screen.

Together with the Arts Council England it strongly criticised Trevor Nunn's decision earlier this year to cast an all-white version of Shakespeare's Wars of the Roses history plays for supposed "historical authenticity".

Many people have pointed out that women and Jewish people wouldn't have been allowed to perform in Shakespearean times, and many of the characters are French.

Actress Tanya Moodie told The Stage: "And yet someone with black skin comes in, and it's like, 'Let's avoid the black people, because that's not historically accurate… you can cherry-pick.' In any way you put it, it's offensive."

Image caption A gay inter-species couple features in Doctor Who

Leading TV writer Russell T Davies, creator of Cucumber and Queer as Folk, has a commitment to writing diverse parts in all his dramas.

The creation by fellow Doctor Who writer Steven Moffat of the lesbian inter-species detective duo, the Silurian Lady Vastra and Victorian human Jenny Flint, is testament to how charmingly it can be done.

On British TV, blackface casting has endured longer in comedy than in film - take for instance Come Fly With Me, Matt Lucas and David Walliams's ill-received 2010 follow-up to Little Britain.

But TV comedy is also at the cutting edge.

Breakthrough moment

The acclaimed sitcom Boy Meets Girl stars transgender actress Rebecca Root as a trans woman negotiating a new relationship.

And on the big screen, the independent film Tangerine is winning plaudits for its central performances by two trans women - both non-professional actors.

Image copyright Getty Images Image caption Rebecca Root starred in the BBC sitcom Boy Meets Girl

A decade on from Felicity Huffman's Oscar-nominated performance as a trans woman in Transamerica (2005), could this be a breakthrough moment for the representation of trans men and women?

Film critic Juliet Jacques, author of Trans: A Memoir, says: "Higher-budget studios more reliant on 'star' actors are still using people such as Jared Leto or Eddie Redmayne as trans characters, and lots of the discourse around them focuses on how good they look, or the challenges of playing the role - the humanity of trans people gets lost in that, I think.

"That's before you get on to the use of trans bodies or identities in films from Ace Ventura (1994) to The Hangover: Part II (2011), that get laughs out of the idea that trans people are undesirable, and/or that having sex with one is shameful - the jokes about our genitalia in the Zoolander 2 trailer are nothing new."

Image copyright AF archive / Alamy Stock Photo Image caption Felicity Huffman was nominated for an Oscar for her performance as a trans woman in Transamerica

Writers such as Jacques are helping challenge how we present diversity on screen, but she is wary of comparing portrayals of trans people to blacking up.

"I don't like the 'blacking up' analogy - trans people have different issues with 'passing' and 'stealth' in a transphobic society than people of colour in a racist one," she says.

"But many of the contemporary portrayals of trans people by cis[gender] actors look dated now - I think they're only going to look worse in a decade's time."

Cis gender is a term to describe someone whose self-identify corresponds to their biological birth gender.

Samira Ahmed presents Front Row on BBC Radio 4.