Hello,
I am developing an application for the C6748. The purpose of the application is to capture a video stream from a sensor, encode it to H.264 and send it to a computer.
Both parts of the application is working "alone". For example, I am able to capture video and send it to a computer. I am also able to load a small video sequence to RAM through JTAG, encode it to H.264 and send it to a computer. However, when the application has both the VPIF driver and the H.264 encoder, my video buffers get corrupted as soon as they are received by my application.
The cause for these data corruptions is most probably related to cache coherence. During the last weeks, I have read a lot of specs, errata's, user's manual, wikis and posts. I have also made lots of tests but the problem is still there. So I need help and advise from you, DSP & CODEC experts!
The application uses the following components:
- Code Composer Studio 5.3
- C6000 code generation tools version 7.4.1
- DSP/BIOS 5.42.00.07
- C6748 BIOSPSP 01.30.01 (VPIF device driver)
- framework_components_2_26_00_01
- dm6446_h264enc_02_02_00_02_production
Here is an overview of what my app looks like:
Enable cache
Create a video capture channel
Allocate memory for capture frame buffers
Queue capture frame buffers in the driver queue
Start the capture channel for streaming
Grab the first capture frame buffer
Create the H264 algorithm instance
Initialise DMAN3 manager
Grant DMA resources
Activate the algorithm
Get algorithm input and output buffers information
DeActivate the algorithm
while (1)
{
Invalidate the buffer before giving to capture driver
Get the recently captured frame buffer (FVID_exchange)
Convert frame buffer from RAW to YCbCr
Flush and invalidate the processed buffers (Y and C)
Copy processed buffers to H264 input buffers
Write back invalidate cache for input buffers
Activate the H.264 algorithm
Apply algorithm run time parameters (XDM_SETPARAMS)
Call the video encoding process
Read algorithm status
DeActivate the algorithm
Write back invalidate cache for output buffers
Send the H.264 encoded frame to the PC
}
Thanks for your help,
Julie