DeckLink SDK + 4K = video aliasing

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

tautin

  • Posts: 19
  • Joined: Thu Oct 18, 2018 3:11 pm
  • Real Name: Tim Autin

DeckLink SDK + 4K = video aliasing

PostThu Jun 06, 2019 3:33 pm

Hello,

I'm using the DeckLink SDK to display 4K videos on a 4K screen with a DeckLink 8K Pro. In all the samples (and thus in my code) I get a very strong aliasing (see the attached screenshot).

It looks like the OpenGL scene is created at non HiDPI resolution and then upscaled. I added
Code: Select all
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
at the begining of the program. It work for the UI (widgets etc) but does nothing to the video.

How can I fix that? The problem is also visible in MediaExpress, both on Ubuntu and Windows...

Thanks

EDIT 1: recordings are clean, so the problem does not come from the camera
EDIT 2: 1080p is displayed nicely
EDIT 3: problem also happens on a Full HD screen on another computer. Seems unbelievable that this has not been tested before / no one else on the forum seems to complain :? . It's super easy to reproduce: just plug a 4K camera to a Decklink card and open MediaExpress...
EDIT 4: GStreamer works fine, so there is a way...
Attachments
decklink.png
decklink.png (995.9 KiB) Viewed 938 times
Offline

Cameron Nichols

Blackmagic Design

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

Re: DeckLink SDK + 4K = video aliasing

PostFri Jun 14, 2019 5:22 am

Hi Tim,

I assume the attached image is your rendered frame (with size 1291x726)?

Please be aware that the screen preview helpers (such as IDeckLinkGLScreenPreviewHelper, and IDeckLinkDX9ScreenPreviewHelper) are by design for small window rendering, the frame is decimated by 1/2 for HD, 1/4 for 4K and 1/8 for 8K by skipping lines, so you may see aliasing if your render window is larger.

For high-fidelity screen previews, please refer to the implementation notes using IDeckLinkScreenPreviewCallback interface in our developer FAQ at https://www.blackmagicdesign.com/support/faq/59024, under heading Full screen preview with DeckLink screen preview helpers.

Regards
Cameron
Offline

tautin

  • Posts: 19
  • Joined: Thu Oct 18, 2018 3:11 pm
  • Real Name: Tim Autin

Re: DeckLink SDK + 4K = video aliasing

PostFri Jun 14, 2019 8:29 am

Hi Cameron,

Thanks for your answer. The attached image is a crop of a screenshot of a fullscreen preview.

Honestly, having to understand the ~2000 lines of code (including a non trivial OpenGL shader) of the LoopThroughWithOpenGLCompositing sample just to display a full resolution video is like :shock: :shock: :shock: . IMHO that's exactly the kind of things the SDK should take care of, and such a basic task should be done in a couple of hours.

Moreover (after I have understood that it must be run as root), the LoopThroughWithOpenGLCompositing doesn't show a video, just an OpenGL scene rotating on a black background.

I better understand now why Media Express does not have a fullscreen preview option :roll: ... Even BlackMagic's devs do not want to go that way :?

Luckily I have found that recent versions of GStreamer have a qmlglsink element, allowing to perfectly display a video (including from a DeckLink card) in a QML app. This takes ~ 150 lines of easily understandable code (sample available here: https://cgit.freedesktop.org/gstreamer/ ... k?h=master). I'd have prefer to avoid the GStreamer dependency but I have to move on.

I'm extremely disappointed by the SDK.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 4 guests