Hi Cameron,
I change the things that you mentioned in the DeckLinkInputDevice.cs, but I have the same problem, the byte array in 10 and 8 bit YUV are the same (also in the size of the array they are ths same)!
I'm trying to figure out why this is happenin, so I change this code:
- Code: Select all
//The GetBytes method allows direct access to the data buffer of a video IDeckLinkVideoFrame bgra32Frame = m_frameConverter.ConvertFrame(e.videoFrame);
bgra32Frame.GetBytes(out IntPtr bgra32FrameBytes);
int frameSize = bgra32Frame.GetRowBytes() * bgra32Frame.GetHeight();
byte[] frameBytes = new byte[frameSize];
Marshal.Copy(bgra32FrameBytes, frameBytes, 0, frameSize);
to this one:
- Code: Select all
//The GetBytes method allows direct access to the data buffer of a video IDeckLinkVideoFrame
e.videoFrame.GetBytes(out IntPtr bgra32FrameBytes);
int frameSize = e.videoFrame.GetRowBytes() * e.videoFrame.GetHeight();
byte[] frameBytes = new byte[frameSize];
Marshal.Copy(bgra32FrameBytes, frameBytes, 0, frameSize);
(I'm not using this line: bgra32Frame = m_frameConverter.ConvertFrame(e.videoFrame)).
and now I get that in the 8 bit YUV the size of the byte array is 720*576*2 (this is good because I am working with PAL 625i50) but in 10 bit YUV the size is 1105920.
Maybe I am doing something wrong or the new code is the solution?
Thank you,
Tom.