CapturePreviewCSharp: Image quality is blocky

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

rx78_shinji

CapturePreviewCSharp: Image quality is blocky

PostTue Nov 27, 2018 6:29 am

Hi all,

I am using Decklink Mini Recorder on Windows 10.

I used the sample program CapturePreviewCSharp.
Input from HDMI AppleTV (1280 x 720).
I changed the size of the previewWindow in the CapturePreview form to 1280x720.

but, it is displayed with rough image quality.
Bitmap acquired and saved by GetBytes() from theFrame was not a problem.

Can I use IDeckLinkDX9ScreenPreviewHelper to display on the form with the correct image quality?
Is the sample program working properly in your environment?
Attachments
ok.jpeg
GetBytes() -> BMP
ok.jpeg (79.75 KiB) Viewed 1720 times
ng.jpeg
Capture from form with m_previewHelper.Render(rect);
ng.jpeg (88.01 KiB) Viewed 1720 times
Offline

Cameron Nichols

Blackmagic Design

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

Re: CapturePreviewCSharp: Image quality is blocky

PostWed Nov 28, 2018 3:13 am

Hi Shinji,

There are two reasons why you are observing this:
Firstly, the screen preview helpers (eg IDeckLinkDX9ScreenPreviewHelper) are by design for small screen rendering by dropping every second line. We have a FAQ posted on the developer site for developers who want to generate their own full-screen preview helpers.

https://www.blackmagicdesign.com/support/faq/59024 - Full screen preview with DeckLink screen preview helpers

Secondly, you may want to try resizing your preview window to 1 pixel less than the captured frame size (ie 1279 x 719). Because the Direct3D top-left vertices is from (-0.5,-0.5), it will try to render from a frame of size 1281 x 721, then you will see some aliasing due to non-integral upscaling.

There is a good reference on Windows Dev Center on Direct3D rasterization rules:
https://docs.microsoft.com/en-us/window ... tion-rules

Regards
Cameron
Offline

timyeung

  • Posts: 2
  • Joined: Sat Dec 22, 2018 6:24 pm
  • Real Name: Tim Yeung

Re: CapturePreviewCSharp: Image quality is blocky

PostSun Dec 23, 2018 1:17 am

Should this dropping lines action be documented in the SDK Manual?

As a SDK, should this line dropping feature be configured to be disabled?

Can BM provide a source of the IDeckLinkDX9ScreenPreviewHelper?
Offline

Cameron Nichols

Blackmagic Design

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

Re: CapturePreviewCSharp: Image quality is blocky

PostFri Jan 11, 2019 2:25 am

Hi Tim,

The preview helpers in the DeckLink SDK are intended for small screen rendering. They have been designed with minimal performance impact, including dropping lines to perform deinterlacing. Please refer to our FAQ entitled "Full screen preview with DeckLink screen preview helpers" for a description on how to generate a full screen preview.

https://www.blackmagicdesign.com/support/faq/59024

Regards
Cameron

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 22 guests