Page 1 of 1

Resolve not scaling Anamorphic Media correctly

PostPosted: Sat Nov 30, 2024 11:22 pm
by Hjalmar
Hey All,

I Posted earlier in September that I was having issues properly scaling iPhone Anamorphic footage in Resolve. My suspicion was that the BMC App was embedding something that was tripping up Resolve. I was advised to provide a Rack Leader to really drill into the issue. But, I've been on a show since then and for something like a making a rack leader for vacation footage I simply have not found the time.

Original Post: https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=209157

Recently, I am gearing up to Master/Deliver a short film that I shot in April of this year. I have forked my original Final Color project and am now noticing the same scaling issue. When I did the Dailies/Editorial renders for Post, I did not have this issue (in April 2024). Now, Resolve is not handling Anamorphic media correctly. Luckily, as this was a 'real' production, I have the original Rack Leader that demonstrates the same issue. I'll lay out the details as best I can.

First, I will stress that when I work on my own projects, I always work in "Centre crop with no resizing". When I work with Company 3 (formally Deluxe), they prefer that I deliver projects in "Scale full frame with crop". They make Input sizing calculations based off this setting. While I respect this position for a lab that deals with dozens of shows/films at any given time, and countless types of deliverables, I still prefer Centre crop for my own projects. This is because of issues like exactly what I'm about to outline, any automated issues are immediately apparent. Since I will only be rendering 2-3 different deliverables on this project, it is worth the extra effort to manually calculate and scale so I know when things have gone wrong.

Now to the issue...

The acquisition of the project:
ARRI Alexa Mini LF
Panavision T-Series 2.0x Anamorphic Lenses
4.5K 3:2 Open Gate
Sensor Active Image Area: 4448 × 3096 px
Extraction: 3510 × 2942 px (2.39:1 @ 95%)
Delivering: 4096 × 1716 (DCI Scope 2.39)

Using all of these numbers, I had generated a rack leader using ARRI's Frame Line & Lens Illumination Tool. The .PNG image file generated is 8896 × 3096 with a pixel aspect ratio of 1.0. For demonstration purposes, I have created a 2.0 squeezed version of this image file which is 4448 × 3096.

Before importing these files into a Resolve project, here is the scaling math:
3510 × 2.0 = 7020
Therefore, we must scale 7020 × 2942 into 4096 × 1716

4096 / 7020 = 0.583475783475783

Now I create a Resolve Project with the Master Timeline Resolution set to 4096 x 1716 DCI Scope 2.39. I next import the 2 Rackleaders-- The 8896×3096 1.0 Pixel version and the 4448×3096 2.0 Pixel version. I also import a clip from the original source media, also 4448x3096 2.0.

I set image scaling to "Centre crop with no resizing". I create an Input Sizing Preset based on the above math, with the only thing modified is the Zoom factor: 0.583475783475783. Now for the results:

Here are the 3 files with no Input Sizing (as is after import). The 2.0 rackleader and the film frame both have their Pixel Aspect Ratio set to 2.0, and the 1.0 version is set to Square. You can already see how the 2.0 Anamorphic files are scaling already, even though the image scaling in project settings is set to "Centre crop with no resizing. The Square pixel Rack Leader behaves normally:
1.0 Rackleader
1.0 No Input Size_1.1.2.jpg
1.0 No Input Size_1.1.2.jpg (636.92 KiB) Viewed 421 times


2.0 Rackleader
2.0 No Input Size_1.2.2.jpg
2.0 No Input Size_1.2.2.jpg (631.46 KiB) Viewed 421 times


2.0 Frame
2.0 No Input Size_1.3.1.jpeg
2.0 No Input Size_1.3.1.jpeg (994.7 KiB) Viewed 421 times


**Edit: Breaking up the post because there is a 3 image limit per post...

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Sun Dec 01, 2024 7:23 pm
by Hjalmar
Next, Here is the Input Sizing Applied-- Please note that the 1.0 Pixel Rackleader behaves correctly, the 2.0 versions do not. The 2.0 rackleader and the film frame both have their Pixel Aspect Ratio set to 2.0, and the 1.0 version is set to Square.
1.0 Rackleader
1.0 Scaled_1.1.1.jpg
1.0 Scaled_1.1.1.jpg (690.95 KiB) Viewed 421 times


2.0 Rackleader
2.0 Scaled_1.2.1.jpg
2.0 Scaled_1.2.1.jpg (373.82 KiB) Viewed 421 times


2.0 Frame
2.0 Scaled_1.3.2.jpeg
2.0 Scaled_1.3.2.jpeg (392.04 KiB) Viewed 421 times


Breaking up the post again due to image attachment limit...

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Sun Dec 01, 2024 7:26 pm
by Hjalmar
Finally, for comparison, here are the 2.0 frames with Zoom adjusted manually (no input sizing). This is a crude number by eye but demonstrates how far off the images are. The rough upscale Zoom number is 1.170:
2.0 Rackleader
2.0 Manual Scaling 1.170_1.2.5.jpg
2.0 Manual Scaling 1.170_1.2.5.jpg (686.88 KiB) Viewed 420 times


2.0 Frame
2.0 Manual Scaling 1.170_1.3.5.jpeg
2.0 Manual Scaling 1.170_1.3.5.jpeg (892.54 KiB) Viewed 420 times


In my mind, the way I've always done this has resulted in pin precise scaling. As of the last ~3 months, I'm now noticing that Resolve is making me upscale Anamorphic footage by roughly 17% when according to my math it should be downscaling by about 40%. What has changed in Resolve's handling of Anamorphic footage in the last 6ish months, or perhaps 12 months?

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Sun Dec 01, 2024 8:06 pm
by Hjalmar
As a followup, I've noticed something that may be a clue towards what Resolve is doing. First I set my image scaling settings to 'centre crop with no resizing'. Embedded metadata detects the Pixel Aspect ratio to 2.0. I set the Input Sizing in the media pool to the above mentioned Zoom factor calculation (0.583475783475783). This results in the super scaled images as shown above. Now, if I goto the Color Tab and further adjust the Sizing > Input Sizing > Zoom to a value of 2.000, the image lines up perfectly:

2.0 Rackleader
2.0 Scaled + 2.0 Zoom_1.2.6.jpg
2.0 Scaled + 2.0 Zoom_1.2.6.jpg (691.37 KiB) Viewed 397 times


2.0 Frame
2.0 Scaled + 2.0 Zoom_1.3.6.jpeg
2.0 Scaled + 2.0 Zoom_1.3.6.jpeg (891.47 KiB) Viewed 397 times


I speculate there is a correlation between the 2.0 desqueeze value of the Anamorphic lenses (2.0 Pixel aspect ratio in Resolve) and the 2.000 additional Zoom value needed on the clip level. This makes me think that instead of taking an image of 4448×3096 2.0 Anamorphic and desqueezing it to an 8896×3096 Flat image, Resolve is instead seeing the 2.0 Pixel aspect ratio and displaying it 4448×1548. This downres's the image by half, forcing me to upres downstream by 2x. Why, I wonder, is Resolve handling Anamorphic footage this way? It never used to be this way, and indeed any other software I import the same footage to displays it correctly (flattens to 8896×3096 and then I downres to 4K DCI Scope).

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Sun Dec 01, 2024 8:37 pm
by Hjalmar
Based on my last post, I took my presumption that Resolve is halving the height instead of doubling the width during its Pixel Aspect Ratio calculation, and re-did the Zoom calculation math.

So again, if the extraction in this example is 3510 × 2942 before desqueeze and I am delvering 4096 × 1716, I did the calculation based off the squeezed value, not the desqueezed value as shown above:

4096 / 3510 = 1.166951566951567

This Zoom value correlates with my manual adjustment by eye of 1.170. The images do indeed line up with this calculation (1.166951566951567):

2.0 Rackleader
2.0 Scaled 1.167_1.2.7.jpg
2.0 Scaled 1.167_1.2.7.jpg (691.58 KiB) Viewed 386 times


2.0 Frame
2.0 Scaled 1.167_1.3.7.jpeg
2.0 Scaled 1.167_1.3.7.jpeg (891.58 KiB) Viewed 386 times


I think this proof really supports my theory that the Pixel Aspect Ratio adjustment in Resolve may be the culprit. The question then remains; when did Resolve start halving height instead of doubling width during it's Pixel Aspect Ratio calculations (2.0 in this example, would be different for 1.33, etc). Why am I upresing an image on input by ~17% instead of downresing by ~42% when delivering a 4K DCI Scope project shot on 2.0 Anamorphic Lenses?

Cheers,
Spencer

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Mon Dec 02, 2024 2:49 am
by Marc Wielage
The whole chapter in the Resolve manual on "Input Sizing and Resolution Independence," scaling, and the various settings is a mission critical section you need to read TWICE to understand. It's particularly important when you're dealing with an unusual aspect ratio. Lots of very important information there.

You have to understand exactly what's going on in in the Image Scaling settings to diagnose problems like this and figure out how to eliminate all unnecessary blanking and borders from the image. This is one of those things that's very easy to screw up in the initial project setup and in the final delivery.

I traditionally will do a 1-minute test render and then check the render in the OS to make sure the sizing is exactly what I need it to be. And I create sizing charts prior to start of picture so I can verify, "yes, nothing is being cut off and everything is fine."

It's good that you have a chart, but it helps to actually shoot it with the camera involved so that you can absolutely guarantee that what you saw on set will absolutely be reproduced in post. Without that, it's just a guess. If it were me... I would not try to shoot anamorphic on an iPhone, but that's me.

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Mon Dec 02, 2024 1:32 pm
by Hjalmar
The iPhone is really just playing around with toys, but it does reproduce the same issue, hence my suspicion that it has something to do with how Resolve is handling pixel aspect ratio. I’ve read the manual and this has been my workflow for years while working with Anamorphic media. We too always shoot a rackleader optically, however, this example was on a micro budget passion project with no prep time. The example above was shot on Alexa Mini LF with Panavision T-Series lenses. And again, I’m flagging that something has changed since April 2024. With this project, we shot early April and I immediately made dailies proxies for editorial with dailies color. Using this scaling method (which I have used for years) the media behaved as I’ve always expected. Now that same media is not scaling the same using the same math as previous. I only mentioned the iPhone footage because it’s the same problem. Regardless of not having an optically shot rack leader, you can visually see it’s way off. I generated the digital rack leader myself and was the DoP on the short, I’ve worked with LF camera systems and Panavision anamorphics as a DIT for years; I’m very familiar with the workflow. Please double full check my math but I really don’t think it’s user error— something appears to be different with how Resolve is calculating Pixel Aspect Ratio and I don’t see that reflected in the User Manual.

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Mon Dec 02, 2024 2:49 pm
by Hjalmar
My solution for now is to use the squeezed horizontal pixel value which results in a 1.166951566951567 Zoom Factor. This number is different from other NLE's and previous versions of Resolve but at least it is displaying correctly.

Re: Resolve not scaling Anamorphic Media correctly

PostPosted: Mon Dec 02, 2024 2:51 pm
by Sven H
Hjalmar wrote:I speculate there is a correlation between the 2.0 desqueeze value of the Anamorphic lenses (2.0 Pixel aspect ratio in Resolve) and the 2.000 additional Zoom value needed on the clip level. This makes me think that instead of taking an image of 4448×3096 2.0 Anamorphic and desqueezing it to an 8896×3096 Flat image, Resolve is instead seeing the 2.0 Pixel aspect ratio and displaying it 4448×1548. This downres's the image by half, forcing me to upres downstream by 2x. Why, I wonder, is Resolve handling Anamorphic footage this way? It never used to be this way, and indeed any other software I import the same footage to displays it correctly (flattens to 8896×3096 and then I downres to 4K DCI Scope).
[...]
when did Resolve start halving height instead of doubling width during it's Pixel Aspect Ratio calculations (2.0 in this example, would be different for 1.33, etc).

Yes, Resolve desqueezes 2.0 by cutting the vertical resolution in half. I remember seeing this behavior back in Resolve 16. So it's nothing new on that end. Probably has been like that forever.

I want to throw in one more thing (honestly just flew over your post, because it's a lot and as you said yourself, a bit complicated to follow along). Doesn't the Mini LF also add some pillarboxes with anamorphic footage? I remember having to upscale any anamorphic footage by ~8% anyway (we built Input Sizing Presets for that reason)