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.

Optimize mcsdk-video PCIE demo (include desktop sdk) on DM8148 board

Hi All,

We made a DM8148 board with a PCIE connector and plug in the 4 chips C6678 PCIE card to the DM8148 board. I have ported desktop SDK and mcsdk-video demos into DM8148 environment. We are using 8148 DVRRDK. I have integrated 8148 video capture function into a DataSrc. This datasrc was modified from FileReader.c. I can capture video from HDMI port then encode it into .265 file. All though I encountered many problems in this process, I tried to solve them with one way or another, it is a smooth so far, basicly. Now, I still have  several issues need to be solve. I'd like to post it here. I hope some experienced developers could share some tips to me.

1. First and most important, I see lower performance than expect. It's ~1fps even after I remove the file read/write operations in FileReader and FileWriter.

2. The HEVC encoder only supports 420p as input image. 8148 can only output 422 YUV interlace or 420SP. I haven't found a better way to do 422YUYV/or 420SP to 420P convertion.

3. When I investigate the performance issue. I found the dsp dma takes long time. about 42ms per transfer. I have a look of dsp dma code in pcidrv. There are many function calls in the dma initiate function and xfer complete function. I guess some time consumed only by software code, the PCIE hardware of 8148 should can transfer data much faster than this. I commented out the pci_dma_check function call, just sleep 8ms then return 0 flag to caller function. I saw a performance improvement. I think we should do some fine tuning of the desktop sdk to improve inter processor communications between A8 and DSPs. Maybe you can give me some advice on this. Maybe we should use PCIE interrupt as a notification tool here.

4. I had a look of the node input/output pool of deviceIO. HEVC uses DSP DDR as input pool and PCI memory as output pool. I'd like to know that can I change the input pool type to PCI memory too? If I can change it to PCI type, and uses 8148 EDMA copy image to it, would it improve the YUV transfer performance?

5. Our 8148 board support dual video capture. How to do dual live video encoding with mcsdk-video? 

Thanks in advance first!

ruisucom