CX3 - Utilizing the UVC PTS (Presentation Time Stamp) field

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiBe_3829331
Level 1
Level 1

Dear all,

For a new project in the company i work for, I would like to check out the option to use Cypress CX3 SoC.

One of the requirements of the project is to stream a video from the CX3 via USB UVC class to a host PC @ 30fps.

In addition, there is a need to add a timestamp for each video frame by utilizing the PTS field (Presentation Time Stamp) of the UVC payload header.

Is there a way to support this requirement without compromising system performance (i.e. stream video frame @ 30fps)

Please advise,

Nissim.

0 Likes
1 Solution
9 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Nissim,

You can use CyU3PGetTime() API to fill the time stamp field. But there are few limitations as discussed in the below thread:

CX3 timestamp

Please go through this thread and let me know if this suits your application.

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

Thanks for you quick replay.

After reading the CX3 timestamp thread, additional question is required:

Is there a possibility to update the 'Presentation time stamp' field in the UVC payload header during the streaming operation without compromising system performance (i.e. stream video frame @ 30fps)?

If so how this could be achieved?

Please advise,

Nissim

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Nissim,

System performance will be affected since CPU needs to do this additional task but it may not hurt your streaming @30fps. You can test it out by modifying CyFxUVCAddHeader() function to change the PTS field of glUVCHeader. It also depends on the resolution you are streaming.

Regards,

Hemanth

Hemanth
0 Likes

Hi Hemanth,

Can you please be more clear regrading your sentence 'System performance will be affected since CPU needs to do this additional task but it may not hurt your streaming @30fps.'?

The resolution should be one of the following:

a. 1280x800

b. 1600x1300

Do you mean that CPU will interfere the autonomous MIPI-USB chain by updating the UVC header for every captured frame?

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Nissim,

Cypress default UVC firmware adds UVC header to every payload (every DMA buffer produced from GPIF). CPU does this header addition. In your case, you also perform CyU3PGetTime() and then copy the value to the header. So, doing this will consume some CPU time. This is what I meant by 'performance being affected'.

Regards,

Hemanth

Hemanth
0 Likes

Thanks.

0 Likes

Hi Hemanth,

If i understand you correctly it a matter of latency (should be tested of course).

Is there a possibility to change the resolution of the tick timer to feet my 30fps requirements?

Thanks,

Nissim.

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Please refer to https://www.cypress.com/comment/286026

Regards,

Hemanth

Hemanth
NiBe_3829331
Level 1
Level 1

10x

0 Likes