Video Input Memory Allocator

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

Bobby Mah

  • Posts: 7
  • Joined: Mon Apr 11, 2016 5:35 pm

Video Input Memory Allocator

PostThu Apr 21, 2016 6:11 pm

Hello all,

I am considering writing a memory allocator for the video input frames. I plan to implement the IDeckLinkMemoryAllocator methods in my class. I need some details though.
1. If I request a certain video format say bmdFormat8BitYUV, will the video frames I get always be in that format or can the BMD device return RGBA at a later time when someone plugs in another video source?
2. If the BMD device does return exactly what I requested no matter how many sources are plugged in, does the allocator get the data in the format I requested or do I have to allocate extra buffers to handle the raw capture in some form of RGBA and then allocate more to handle the YUV data?


Thanks in advance for your answers
Offline

Derek Simkowiak

  • Posts: 2
  • Joined: Mon Apr 25, 2016 9:12 pm

Re: Video Input Memory Allocator

PostThu Apr 28, 2016 12:42 am

> can the BMD device return RGBA

Our reading of the docs is that the BMD cannot return RGBA. The SDK contains sample code for converting bmdFormat8BitYUV into an OpenGL RGB texture using a GLSL shader.

> do I have to allocate extra buffers to handle the raw capture in some form of RGBA and then allocate more to handle the YUV data?

Yes; you must supply a buffer for YUV every time it asks for one. If you have only one YUV buffer, then you will get in trouble when you are busy processing that single buffer into RGB but the BMD needs another buffer to capture the next frame into it. So you will probably need to have a YUV buffer pool in your allocator, with multiple YUV buffers (and convert them into RGB as each frame is captured).

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 37 guests