Wrong Scaling with BlackmagicRawResolutionScale

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

orademaker

  • Posts: 2
  • Joined: Thu Jan 19, 2023 8:22 am
  • Real Name: Oliver Rademaker

Wrong Scaling with BlackmagicRawResolutionScale

PostThu Jan 19, 2023 8:44 am

Hi Guys,

I use the BlackmagicRawResolutionScale Type to put it into SetResolutionScale of IBlackmagicRawFrame which is coming out of the Read Callback. Unfortunatlly all values except of blackmagicRawResolutionScaleFull give me wrong image dimesions at the output.
F.e.: An Sample file with clip resolution of 12288x6480 scaled with blackmagicRawResolutionScaleHalf give me 8192x4320 instead of expected 6144x3240 or with blackmagicRawResolutionScaleQuarter give me 4096x2160 instead of expected 3072x1620.
Anyone else noticed that? Known Bug?

BR, Oliver
Offline

CaptainHook

Blackmagic Design

  • Posts: 2057
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Wrong Scaling with BlackmagicRawResolutionScale

PostThu Jan 19, 2023 8:37 pm

Hi, this is expected behaviour.

Our 12K camera with the way it works means its “lower” resolution decode options are not actually “half”, “quarter” etc. It actually was designed to be 12K/8K/4K/2K. You will see similar resolutions are available in Resolve from the RAW panel.

The 12K camera introduced a new image format to Blackmagic RAW that has been engineered with performance and scalability in mind (only used by the 12K camera for now). The new format was specifically designed to accelerate down-scaled decodes and support a wider range of cameras. With this new format comes some unique requirements that means a down-scaled decode won't necessarily result in an expected reduction in dimensions, which led to the addition of the IBlackmagicRawClipResolutions interface (check the changelog for 2.0 beta 1 and is also documented in the manual).

The IBlackmagicRawClipResolutions interface (queryable from a clip) is designed to aid in determining the exact processed image sizes based on desired scale values. The reverse is also true and you're now able to query what scale would be best used to get a processed image resulting in a resolution as close to that specified. In addition, this interface also provides methods to query all the available resolutions at which an image may be decoded which is useful for lists in GUIs etc.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

orademaker

  • Posts: 2
  • Joined: Thu Jan 19, 2023 8:22 am
  • Real Name: Oliver Rademaker

Re: Wrong Scaling with BlackmagicRawResolutionScale

PostFri Jan 20, 2023 8:57 am

Thanks for detailed answer.

Thanks to the forum I found the new IBlackmagicRawClipResolutions and brought me the solution I needed. Just query for scale value by target resolution and then query for destination resolution by previous got scale. That brings me the exact values I need.

Good to know that the behaviour was no bug.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 21 guests