This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
hi all
I am a beginner
I use the Encode Demo for the DaVinci (http://www.ti.com/litv/pdf/spraa96a) to do my application
And I read the Accessing pixels in a frame on DM643x (http://wiki.davincidsp.com/index.php?title=Accessing_pixels_in_a_frame_on_DM643x), want to access pixels in a frame on DM6446
But I don't know how to make the first step
Any idea?
Thanks!
The process of getting the pointer to the video frame is a bit different from DM643X since DM6446 uses Linux-based ARM software drivers as opposed DSP-side drivers. Once you get the pointer to the buffer, the pixel format in the buffer is likely the same as what is described in the wiki above; I say likely because most of the video processing sub-system (VPSS) works on YCbCr 4:2:2 data; however, there is flexibility within the VPSS to swap order of pixels or even support other pixel formats such as RAW-Bayer pattern and RGB565 (for OSD window) at certain stages of the VPSS. However, if you are using encodedecode demo and are interested in a video frame, then you are working with YCbCr 4:2:2.
That said, the encodedecode captures a video frame thru V4L2 driver (look for VIDIOC_DQBUF request within the source code for your pointer to captured video buffer) and displays video frame thru Frame buffer driver (look for FBIOPAN_DISPLAY request for your display buffer pointer). As you can guess, how you get your buffer pointer will depend on where along the VPSS pipeline you are interested in looking at; for encodedecode demo, the options are the capture buffer, or the display buffer and the request you should search for in the source code are VIDIOC_DQBUF and FBIOPAN_DISPLAY correspondingly.
Thanks for your help
But I don't understand at all, sorry
I use the GDB to remote debug (http://wiki.davincidsp.com/index.php?title=Debugging_remotely_on_DaVinci_using_gdb)
And I guess the struct CaptureBuffer in Capture.c file is the video frame memory address
Look like this:
(gdb) p capBufs[0]
$1 = {start = 0x449c2000, offset = 2267021312, length = 884736}
But when I type the "x 0x449c2000", I will get the message "Cannot access memory at address 0x449c2000"
Let it be easy, how could I save the frame data to a array? could you give me some tips?
Many thanks!
I suggest you to read Running Demo via ddd on the DVEVM when you debug your program on ARM side. Here is another way to debug codecs using CCS. Both of the ways are easy for you to debug program runing on either ARM side or DSP side. I believe when you debug into "process" function of encodedecode, you will know how to access pixels. As Juan said, the pixel in encodedecode demo is YUV422, so every pixel is 16bit, the order is like " U Y V Y U Y V Y.....". I hope this will be helpful.