How to set correct settings (Prevent driver override)

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

Ingmar Rieger

  • Posts: 60
  • Joined: Sun Nov 25, 2012 2:24 am

How to set correct settings (Prevent driver override)

PostTue Nov 06, 2018 6:52 pm

Hello,

I'm working on video output from DeckLink cards and now had the chance to try the code on different DeckLink cards with different monitors as I before used my home setup with the small DeckLink 4K Mini Monitor only. While trying the tool, it showed that my implementation of different formats like 10 Bit RGB and 12 Bit RGB works well and the monitor receives the correct code values if setup of the card is set correctly but there is the problem:
The driver seems to overwrite the output settings and I always need to change the settings in the Blackmagic Desktop Video Setup application after I enable video output. After I initialize the device it switches to "Video is converted to Y, Cb, Cr", PsF instead of p and Dual Link when I specifically selected Single Link(or Quad Link for 4K RGB).

Basically I use this code (with some error handling I removed to simplify here):
Code: Select all
IDeckLinkConfiguration* decklink_config;
BOOL outflag  = true;

this->my_IDeckLink->QueryInterface(IID_IDeckLinkConfiguration, reinterpret_cast<void**>(&decklink_config));

if (4K mode on DeckLink 8K pro)
    decklink_config->SetInt(bmdDeckLinkConfigDuplexMode, bmdDuplexModeFull);

decklink_config->SetInt(bmdDeckLinkConfigSDIOutputLinkConfiguration, bmdLinkConfigurationQuadLink);  // or single link depending on use case
decklink_config->SetFlag(bmdDeckLinkConfigQuadLinkSDIVideoOutputSquareDivisionSplit, outflag);     // when using QuadLink 4K

decklink_config->SetInt(bmdDeckLinkConfigVideoOutputIdleOperation,  bmdIdleVideoOutputLastFrame);
decklink_config->SetInt(bmdDeckLinkConfigVideoOutputConversionMode, bmdNoVideoOutputConversion);
decklink_config->SetFlag(bmdDeckLinkConfig444SDIVideoOutput, outflag);


I haven't had the chance to fully test quad link, but on the UltraStudio 4K I have direct access to 444 is always switched to 4:2:2 conversion and Link mode is on dual link when I open the Desktop Video Setup app after starting our tool and sending the setup parameters.

My parameters are 1080p24, SingleLink and especially bmdDeckLinkConfig444SDIVideoOutput set to true. So I at least would expect 4:4:4 but even when I changed it, next time I release the card and reinitialize it is reset again. So what would be the right way to set those setup parameters (and which parameter switches from PsF to p mode)?
Sadly there is no example for this kind of output setup and I tried to find the way with the help of the SDK documentation and the headers but I'm stuck there now.

Another question I have: What exactly does the color space parameter do? Is this intended as the selection for the 4:4:4 <-> 4:2:2 matrix selection or is there more behind this parameter?
Greetings
Ingmar Rieger
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 129
  • Joined: Mon Sep 04, 2017 4:05 am

Re: How to set correct settings (Prevent driver override)

PostWed Nov 07, 2018 3:01 am

Hi Ingmar,

You need to call IDeckLinkConfiguration::WriteConfigurationToPreferences() method to store the active configuration to system preferences. Otherwise the configuration changes will be reverted once IDeckLInkConfiguration interface is released.

You need to ensure that your application is run with administrator/sudoer privileges to successfully call IDeckLinkConfiguration::WriteConfigurationToPreferences().

Regards
Cameron

Ref:
DeckLink SDK Manual - 2.5.15.9 IDeckLinkConfiguration:: WriteConfigurationToPreferences method
Offline

Ingmar Rieger

  • Posts: 60
  • Joined: Sun Nov 25, 2012 2:24 am

Re: How to set correct settings (Prevent driver override)

PostWed Nov 07, 2018 6:24 am

Hey Cameron,

thank you very much. Missed the part of the SDK documentation that is way too clear: "Changes will persist until the IDeckLinkConfiguration object is released, unless WriteConfigurationToPreferences is called." (on page 84 [SDK v10.11.4]) would have helped...

To prevent the need for the admin access I now just keep the IDeckLinkConfiguration instance until just before I release the interface when finished and it works fine.
Greetings
Ingmar Rieger
Offline

Ingmar Rieger

  • Posts: 60
  • Joined: Sun Nov 25, 2012 2:24 am

Re: How to set correct settings (Prevent driver override)

PostWed Nov 07, 2018 8:07 am

Hey,

I just tested the code with different cards and video modes and on the 8K Pro the line
Code: Select all
decklink_config->SetInt(bmdDeckLinkConfigDuplexMode, bmdDuplexModeFull);
seem to not work as I hoped. Haven't found it in the documentation for the 8K specifically so hoped/assumed the duplex mode kind of works like for the Quad/Duo cards. Can you give me some help how to correctly set the 8K Pro to Quad link out?
Greetings
Ingmar Rieger
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 129
  • Joined: Mon Sep 04, 2017 4:05 am

Re: How to set correct settings (Prevent driver override)

PostThu Nov 08, 2018 4:27 am

Hi Ingmar,

For Quad-link output on the DeckLink 8K Pro, you need to set duplex mode to bmdDuplexModeHalf, as all connectors need to be configured as outputs.

Regards
Cameron
Offline

Ingmar Rieger

  • Posts: 60
  • Joined: Sun Nov 25, 2012 2:24 am

Re: How to set correct settings (Prevent driver override)

PostThu Nov 08, 2018 8:04 am

Ah, thank you. What was I thinking. This is obvious and I seem to need more sleep ;-)

Thanks for helping, although I can't try currently I assume it works and try as soon as I have access to the 8K Pro again in the next weeks.
Greetings
Ingmar Rieger

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 1 guest