Display issue with bmdModeHD1080i50

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

ShilpiR_beesys

  • Posts: 17
  • Joined: Mon Apr 22, 2019 7:15 am
  • Real Name: Shilpi Rustagi

Display issue with bmdModeHD1080i50

PostMon Apr 22, 2019 9:10 am

Hi...

I am trying to run OpenGLOutput application with the Display mode as 1920x1080x25i i.e. bmdModeHD1080i50 , I am getting horizontal lines on the output plus the output is getting squeezed vertically.. Do I need to make some other settings too..
Offline

Cameron Nichols

Blackmagic Design

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

Re: Display issue with bmdModeHD1080i50

PostMon Apr 29, 2019 3:43 am

Hi Shilpi,

In function BMDOpenGLOutput::Start(), I made the following change (requires Desktop Video 11.0 or later)
Code: Select all
#if 0
   if (pDLOutput->GetDisplayModeIterator(&pDLDisplayModeIterator) == S_OK)
   {
      if (pDLDisplayModeIterator->Next(&pDLDisplayMode) != S_OK)
      {
         MessageBox(NULL, _T("Cannot find video mode."), _T("DeckLink error."), MB_OK);
         goto bail;
      }
   }
#else
   if (pDLOutput->GetDisplayMode(bmdModeHD1080i50, &pDLDisplayMode) != S_OK)
   {
      MessageBox(NULL, _T("Cannot find video mode."), _T("DeckLink error."), MB_OK);
      goto bail;
   }
#endif

But I don't see the horizontal lines you mention. Also, the unmodified sample outputs in NTSC (4:3), whereas you are choosing 16:9, so this if potentially why you are seeing squeezing?

Which Desktop Video version, DeckLink card, OS are you running?

Regards
Cameron
Offline

ShilpiR_beesys

  • Posts: 17
  • Joined: Mon Apr 22, 2019 7:15 am
  • Real Name: Shilpi Rustagi

Re: Display issue with bmdModeHD1080i50

PostTue Apr 30, 2019 5:34 am

Hi Cameron,

I made the following code changes in function BMDOpenGLOutput::Start()
Code: Select all
if (pDLOutput->GetDisplayModeIterator(&pDLDisplayModeIterator) == S_OK)
   {
      while (true)
      {
         if (pDLDisplayMode)
            pDLDisplayMode->Release();
         pDLDisplayMode = NULL;

         pDLDisplayModeIterator->Next(&pDLDisplayMode);
         if (pDLDisplayMode)
         {
            if (pDLDisplayMode->GetDisplayMode() == bmdModeHD1080i50)
            {
               break;
            }
         }
      }
   }


and I am getting the output as the image attached...

While the output comes perfectly OK for 1080p50
Attachments
Untitled.png
1080i50
Untitled.png (218.31 KiB) Viewed 2558 times
Offline

Cameron Nichols

Blackmagic Design

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

Re: Display issue with bmdModeHD1080i50

PostWed May 01, 2019 3:06 am

Hi Shilpi,

Can you please detail your setup, specifically:
  • OS and version
  • Desktop Video version
  • Desktop Video product
  • Output connection - SDI/HDMI
Thanks
Cameron
Offline

ShilpiR_beesys

  • Posts: 17
  • Joined: Mon Apr 22, 2019 7:15 am
  • Real Name: Shilpi Rustagi

Re: Display issue with bmdModeHD1080i50

PostWed May 01, 2019 12:33 pm

The details of my setups are as follows

OS and version : Windows 10 Enterprise 64 Bit
Desktop Video version : 11.1
Desktop Video product : Decklink
Output connection - SDI/HDMI : HDMI
Offline

ShilpiR_beesys

  • Posts: 17
  • Joined: Mon Apr 22, 2019 7:15 am
  • Real Name: Shilpi Rustagi

Re: Display issue with bmdModeHD1080i50

PostFri May 10, 2019 12:21 pm

Hi,

I am not able Sync audio and video.. Since the video callback comes per frame and the audio call back is per field but they are not in Sync ..

I wrote the following code in Init
Code: Select all
   
     _audioSamplesPerFrame = (unsigned long)((bmdAudioSampleRate48kHz * _frameDuration) / _frameTimescale);
      hr = _deckLinkOutput->BeginAudioPreroll();
      hr = (_deckLinkOutput->ScheduleAudioSamples((LPVOID)_audioBuff[0], audioSamplesPerFrame/2, _totalAudioSecondsScheduled, bmdAudioSampleRate48kHz, &framesWritten));
      if(hr != S_OK)
    goto bail;
      _totalAudioSecondsScheduled++;


where _frameDuration and _frameTimeScale is obtained from DisplayMode's GetFrameRate()

and the following code in the Audio Callback Function
Code: Select all
   
uint32_t framesWritten = 0;
int audioSamplesPerframe = (bmdAudioSampleType16bitInteger * 2 * bmdAudioSampleRate48kHz * _frameDuration) / _frameTimescale;

BMDTimeValue hardwareTime, timeInFrame, ticksPerFrame;
_deckLinkOutput->GetHardwareReferenceClock(_frameTimescale, &hardwareTime, &timeInFrame, &ticksPerFrame);
uint32_t bufferedSampleFrameCount = 0;
_deckLinkOutput->GetBufferedAudioSampleFrameCount(&bufferedSampleFrameCount);
//if (bufferedSampleFrameCount > 0)
{
   if (_totalAudioSecondsScheduled % 2 == 0)
   {
               // FIELD 0
      _deckLinkOutput->ScheduleAudioSamples((LPVOID)_audioBuff[1], _audioSamplesPerFrame / 2, _totalAudioSecondsScheduled, bmdAudioSampleRate48kHz, &framesWritten);
   }
   else
   {
               // FIELD 1
      _deckLinkOutput->ScheduleAudioSamples((LPVOID)_audioBuff[0], _audioSamplesPerFrame / 2, _totalAudioSecondsScheduled, bmdAudioSampleRate48kHz, &framesWritten);
   }

   _totalAudioSecondsScheduled++;
}

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 29 guests