- Posts: 3
- Joined: Wed Feb 01, 2023 8:58 pm
- Real Name: Benjamin Kirk Brightwell
Hiya
I'm having some trouble with tearing on my decklink 8k pro.
It will be a case of it showing a bit of frame A and frame B but on top of each other - almost like an interpolation of the two. Interestingly its sometimes as if it will show frame A for say 20 lines, B for 20 lines then back to A for the rest of the frame.
I am using scheduleVideoFrame after realising that displayVideoFrameSync was not performant enough in terms of it was taking >20ms to display a frame and I need the whole business of frame creation to frame display to take less than this time.
Now that I'm using scheduleVideoFrame, according to my debug tools, it's taking sub 1.2ms to populate a frame with the new frame data and to then schedule it. This seems totally acceptable but then why is tearing occurring?
For more info about my project, it consists of a D3D program that runs on its own thread. It then adds its frame data to a thread safe queue every 50ms. The ScheduledFrameCompleted callback then looks to see if there is anything in the queue and if so, populates the completedFrame from the callback with the D3D frame data. It then schedules the frame.
I can make this problem worse (and I mean much worse) by pausing execution of my D3D program and resuming it again. At which point there is a crazy amount of tearing.
I've looked to the examples but feel like I can't gain much more information about how I would render in what is effectively one program and schedule frames from the Black Magic thread.
I really appreciate any advice that can be given.
Extra information, current target format is bmdModeHD1080p50 with bmdFormat8BitBGRA. The problem occurs at 720p50 also. I preroll 3 frames.
I'm having some trouble with tearing on my decklink 8k pro.
It will be a case of it showing a bit of frame A and frame B but on top of each other - almost like an interpolation of the two. Interestingly its sometimes as if it will show frame A for say 20 lines, B for 20 lines then back to A for the rest of the frame.
I am using scheduleVideoFrame after realising that displayVideoFrameSync was not performant enough in terms of it was taking >20ms to display a frame and I need the whole business of frame creation to frame display to take less than this time.
Now that I'm using scheduleVideoFrame, according to my debug tools, it's taking sub 1.2ms to populate a frame with the new frame data and to then schedule it. This seems totally acceptable but then why is tearing occurring?
For more info about my project, it consists of a D3D program that runs on its own thread. It then adds its frame data to a thread safe queue every 50ms. The ScheduledFrameCompleted callback then looks to see if there is anything in the queue and if so, populates the completedFrame from the callback with the D3D frame data. It then schedules the frame.
I can make this problem worse (and I mean much worse) by pausing execution of my D3D program and resuming it again. At which point there is a crazy amount of tearing.
I've looked to the examples but feel like I can't gain much more information about how I would render in what is effectively one program and schedule frames from the Black Magic thread.
I really appreciate any advice that can be given.
Extra information, current target format is bmdModeHD1080p50 with bmdFormat8BitBGRA. The problem occurs at 720p50 also. I preroll 3 frames.