EEVblog Electronics Community Forum
Products => Computers => Programming => Topic started by: DiTBho on May 25, 2022, 02:17:24 pm
-
yes, no doubt about it: it is to be avoided, unless you are really motivated!
You have an extremely hacked application driver in pre-alpha state for an abandoned video grabber that has never seen a half source released by the company that marketed it, nothing has been documented and the only thing available comes from the reverse engineered binary-only driver (for Windows) , which helped create a couple of experimental source files written in GoLang, a language for which you don't have a compiler for your hardware because PA-RISC is not yet supported by llvm, so there is no GoLang compiler.
This is the scenario. What is this? ... love? for information technology? or just bloody masochism?
I don't know, but I'd really like to support this (crazy) idea, so ...
... any advice on how to convert GoLang to C?
Because, to make matters worse, I don't know GoLang at all.
---> yup, going to reverse engineer a reverse engineered hack in alpha-state for an abandoned hardware, supporting an experimental abandoned architecture
I can not do it, or can I? :-// :-// :-//
-
Specifically, the experimental GoLang application-driver:
- handles a couple of USB2-bulk endpoints
- needs to configure an FPGA through bulk endpoints
- needs to handles new USB2-bulk endpoints
- needs to move up to 30Mbyte through bulk
- needs to perform color-correction, I see the Go’s built YCbCrToRGB() function
-
So, the video grabber shots YCbCR images and you need to convert them into RGB, that's why there is the built-in Go function YCbCrToRGB(), but behind it, there is a lot of confusion
are { YUV, YCbCr, YPbPr } synonyms? :o :o :o
As far as I understand
- YUV is for {PAL, S-Video, ... } analog sources
- YPbPr is for also analog sources but produces better color results as YUV-Component-Video
- YCbCr is for { DVB, HDMI, ... } digital sources <------ the Go-source uses this one
The Wiki has an article (https://en.wikipedia.org/wiki/YUV) talking about many things :scared:
-
So, the video grabber shots YCbCR images and you need to convert them into RGB, that's why there is the built-in Go function YCbCrToRGB(), but behind it, there is a lot of confusion
are { YUV, YCbCr, YPbPr } synonyms? :o :o :o
As far as I understand
- YUV is for {PAL, S-Video, ... } analog sources
- YPbPr is for also analog sources but produces better color results as YUV-Component-Video
- YCbCr is for { DVB, HDMI, ... } digital sources <------ the Go-source uses this one
The Wiki has an article (https://en.wikipedia.org/wiki/YUV) talking about many things :scared:
https://stackoverflow.com/questions/4041840/function-to-convert-ycbcr-to-rgb ?
-
this (https://www.youtube.com/watch?v=3dET-EoIMM8)
This video on Youtube explains a bit of things about color-spaces :o :o :o
-
Ok, the color conversion is done, now I have to think about the USB2-bulk stuff.
I see GoLang has a lot of built-in functions to handle usb-bulk ... umm, what about C on Linux?
I have never developed anything with usb. Time to learn!