Hi there,
I use BF609 with camera (PAL) and external video decoder (TW2964).
My configuration looks like:
section("sdram_bank1") t_frame image_UYVY_A[FRAME_BUF_LEN]; section("sdram_bank2") t_frame image_UYVY_B[FRAME_BUF_LEN]; volatile unsigned int imageAB = 0; volatile unsigned int framerate_ppi_A = 0; volatile unsigned int framerate_ppi_B = 0; void init() { adi_eppi_Open(0, ADI_EPPI_DIRECTION_RX, driverMemoryEPPI, (uint32_t)ADI_EPPI_MEMORY_SIZE, &hDeviceEPPI); adi_eppi_SetDataLength(hDeviceEPPI, ADI_EPPI_8BIT); adi_eppi_SetITUMode(hDeviceEPPI, ADI_EPPI_ACTIVE); adi_eppi_SetInternalClk(hDeviceEPPI, false); adi_eppi_SetSamplesPerLine(hDeviceEPPI, FRAME_X_UYVY + FRAME_BLANKING_X); adi_eppi_SetHorizontalCount(hDeviceEPPI, FRAME_X_UYVY); adi_eppi_SetHorizontalDelay(hDeviceEPPI, 0); adi_eppi_SetLinesPerFrame(hDeviceEPPI, FRAME_Y_UYVY + FRAME_BLANKING_Y); adi_eppi_SetVerticalCount(hDeviceEPPI, FRAME_Y_UYVY); adi_eppi_SetVerticalDelay(hDeviceEPPI, 0); adi_eppi_SetDmaTransferSize(hDeviceEPPI, ADI_EPPI_DMA_TRANSFER_8BIT); adi_eppi_SetDMAConfig(hDeviceEPPI, true); adi_eppi_RepetiveBufferEnable(hDeviceEPPI, true); adi_eppi_StreamingEnable(hDeviceEPPI, true); adi_eppi_RegisterCallback(hDeviceEPPI, EPPI_Callback, NULL); adi_eppi_SubmitBuffer(hDeviceEPPI, image_UYVY_A, FRAME_X_UYVY * FRAME_Y_UYVY * FRAME_BUF_LEN); adi_eppi_SubmitBuffer(hDeviceEPPI, image_UYVY_B, FRAME_X_UYVY * FRAME_Y_UYVY * FRAME_BUF_LEN); adi_eppi_Enable(hDeviceEPPI, true); } void EPPI_Callback(void* pHandle, uint32_t u32Arg, void* pArg) { if(imageAB==0) // A -> B { imageAB = 1; framerate_ppi_A++; adi_eppi_SubmitFrameUpdate(hDeviceEPPI, image_UYVY_A); } else // B -> A { imageAB = 0; framerate_ppi_B++; adi_eppi_SubmitFrameUpdate(hDeviceEPPI, image_UYVY_B); } }
I think, it works fine. I have correct picture in both frame buffers.
But when I want to use h264 coder and I run pEncHndl->pProcess, I get glitches, invalid frame, shifted bytes in frame (sometimes different colors, green glitches, beginning in another place).
Even there is a problem, when in pProcess I use different buffer than EPPI used.
BR
Jakub