AnsweredAssumed Answered

Getting data into BF707 via EPPI

Question asked by rgd@dvt on Sep 1, 2017
Latest reply on Sep 18, 2017 by rgd@dvt

I want to read 4 video frames (1344 x 760 pixels 8bit) and 19264 bytes into the blackfin. I use an FPGA to format the stream, this means I first send the 19264 bytes (FV and LV are both high at that moment), this followed by the 4 (grey) frames. Here the FV and LV are high during active video.

Since I had some issues getting the data in I skipped the part with the 19264 bytes, and first focused on the 4 frames.

When I worked with real video I first thought is was all fine, Till I placed a stopwatch in front of the camera and there I saw that the Images in the buffers did not come from the same Original image.

To simplyfy thing a bit I replaced the video with a "almost" fixed value, meaning a replaced the least 4 bits by a frame conunter and the highest 4 bits by a fixed value: 1st frame 0x2x, 2nd 0x4x, third 0x8x and the last one with 0xCx. Further I let the system only runs once.

The system waits on an trigger telling the frames are comming in the next 5 mS.

I declared 5 buffers, but for this first test I intendend not to use the first one:

* Video frames */
#pragma align(32)
section ("sdram_bank0")static uint8_t VideoBuf0[VIDEO_BUF_SIZE];  //OV4682_VIDEO_BUF --> Geo-data + 160x120 bytes thumbnail
#pragma align(32)
section ("sdram_bank1")static uint8_t VideoBuf1[VIDEO_BUF_SIZE];  //OV4682_VIDEO_BUF --> Red data
#pragma align(32)
section ("sdram_bank2")static uint8_t VideoBuf2[VIDEO_BUF_SIZE];  //OV4682_VIDEO_BUF --> Green Data
#pragma align(32)
section ("sdram_bank3")static uint8_t VideoBuf3[VIDEO_BUF_SIZE];  //OV4682_VIDEO_BUF --> Blue data
#pragma align(32)
section ("sdram_bank4")static uint8_t VideoBuf4[VIDEO_BUF_SIZE];  //OV4682_VIDEO_BUF --> NIR data

 I used the example from : Camera_EI3_Extender_Board-Rel1.1.0 for the BF707 as guide. With calls to adi_eppi_Enable(pDevInfo->hPPIDevice, true) != ADI_EPPI_SUCCESS, adi_eppi_GetBuffer(pDevice->pDevInfo->hPPIDevice, (void **)ppVideoFrame) != ADI_EPPI_SUCCESS and adi_eppi_SubmitFrame(pDevice->pDevInfo->hPPIDevice, pFrame, nmbbytesperline, nmblinesperframe, pDevInfo->nXStride, pDevInfo->nYStride );

When I see the result in the image Viewer: In buffer0 I see the data 0x82, in buffer1 again 0x82, in buffer2 the data is 0xC3 and in buffer3 is also 0xC3. In other words from the 4 frames I grab on 2 sequantial frames, but I see the the frames end in two buffers. I thought that maybe the time between the frames was to short, so I increased it to 10 lines (approx 1mS).

Any idea what could case this effect, what is the thinking error I make. Is there a document to an explanation what the functions adi_eppi_SubmitFrame, adi_eppi_GetBuffer exactly do. I am afraid that I do not fully understand the exact function and that is the reason why it does not function well.

I added a part of the code to grab the 4 frames.