John, Thank you so much for your quick and detailed response. It is so helpful to me.
Here, I have some more questions.
1. What is the meaning of the funcions “CamIntAsm_acquireTrackingLine" and "CamIntAsm_acquireDumpLine"? What is the value in "currentLineBuffer", "previousLineBuffer“ and "colorMap"? And, what is the runlength in the buffer?
My understanding is: CamIntAsm_acquireDumpLine is used to read the 176 color data into the currentLineBuffer, and put the previous 176 colors into perviousLineBuffer. CamIntAsm_acquireTrackingLine is used to read the 176 color data into currentLineBuffer and update the value in colorMap. Is it right?
2. Will “CamIntAsm_acquireTrackingLine “ publish the event “FEV_ACQUIRE_LINE_COMPLETE†in the end? In your code, I can not find anywhere that explicitly publishs this event, which brings the action of FrameMgr_processLine().
3. Can you explain the the Bayer format that arrange the pixels? Is it like the following?
Line 1: g r g r g r g r …………
Line 2: b g b g b g b …………
…………
Line 144: b g b g b g b …………
Lets use g(mxn) representing the green value of pixel n in line m. Can I say that pixel stacks in the packet is structured as
Packet1: g(1x1), b(2x1), g(2x2), r(1x2), g(1x3), b(2x3)………
Packet2: g(3x1), b(4x1), g(4x2), r(3x2), g(3x3), b(4x3)………
……………..
4. I am confused on the dataToSend in the function FrameMgr_processLine(). Why when i is even, the low 4 bits currentLineBuffer is in the high 4 bits of dataToSend, and when i is odd, it is opposite? A color value can be 0~255, but 4 bits in only 0~15. So, why you just use four bits to represent to green/red/blue value? what is the true RGB value?
I have so many questions. Thank you in advance for your help!
