I saw in the freeframe implementation that there is some support for 16bit video input. But also feel that this is not implemented in DSFreeFrameWrapper.
Is that the case? And if: how difficult would it be to implement 16bit video input in the DSFreeFrameWrapper?
Just so you know: I would like to have a webcam directly connect to DSFreeFrameWrapper without automatically putting a “AVI decompressor” in between to covert to 24bit rgb. I would like to get the “raw” 16bit yuv2 data to take only the first byte which has already the luminance information.
Im not only asking because of performance reasons, but also because there are some cameras (Oculus DK2 Tracking Camera and Eyetribe) which output a 10bit grayscale image packed in a 16bit yuv2 sample. With the “AVI decompressor” in between, the image gets converted from supposedly yuv2 to rgb and the resulting rgb information is not only barely usable but also misses a lot of information. (bytes get clipped on the way)
I finally did manage to compile it with RAD Studio 10.1 using these directshow baseclasses:
but I still have to test the actual yuy2 conversion.
I have a bit the feeling that it might be a long route. Especially to not break anything else. I guess the filter has to connect to anything (MEDIASUBTYPE_NULL) first and then provide that information to the freeframe plugin. And the freeframe has to tell if it likes eg. 16bit. And then if it doesn’t, the filter graph has to find a new connection and ask the freeframe again. From comments in your code it also seemed that it likes to crash on certain mediasubtypes. And then in the ARTK+ freeframe one has to use a different byte conversion… Let’s see, I’ll keep you updated.
Hey Joreg, it did compile without errors but in vvvv it actually didn’t work. It just didn’t load. (It gave an error, so it tried to load) Maybe too different versions of the DSPack or the Delphi compiler.
But I found a directshow transform filter which does basically the bit conversion and outputs RGB24. Which is actually more flexible if using different freeframe plugins. Now I already tried changing the Merit Value so for any connection between a YUY2 output and a RGB24 input the filter will be used automatically. That works!
But of course the whole system is now screwed if you have a normal webcam that outputs YUY2.
Now I wonder if it is possible to have that directshow transform filter show up in VVVV like the crop filter (CropFilter.ax) so one can simply put it in the graph and use it if needed?
What’s the special sauce?
ai, for that sauce we need to add something in the delphi-code. but it should work and not be too hard. so if you can share a link to that filter i can give it a go…