Robert De Niro had to get a leg up -- or a shoe up, more like -- standing next to Al Pacino in the new Martin Scorsese movie ... thank God for close-ups.

Bob and Al star in Scorsese's new mobster flick, "The Irishman," in which they filmed a scene this week where they were strolling side by side in the Bronx.

As you can see, De Niro really got into character by wearing high platform shoes -- the guy he's playing stands at 6'4" ... and in real life, the actor's only 5'10".

Hollywood and their tall tales ... gotta love it.