How to ensure the consistency and accuracy of PTS during the process of sending video data between SOC and MCU

When sending data between SOC (System on Chip) and MCU (Microcontroller Unit), to ensure the consistency and accuracy of PTS (Presentation Time Stamp), the following conditions generally need to be met:

  1. Use an accurate time source: You need to have an accurate hardware clock and/or time source as a reference. This time source should be accessible between the SOC and the MCU, or both should have the same reference time source.

  2. Synchronization mechanism: You need a way to synchronize or align the time of the SOC and MCU, which can be achieved through hardware or software. For example, you can use Network Time Protocol (NTP) or Precision Time Protocol (PTP) to synchronize the system time between the two.

  3. Consistent processing and transmission delays: During the process of processing and transmitting data, you need to consider delays in processing data and data transmission, which will also affect the accuracy of PTS.

  4. Consistency of clock frequency: If the PTS is based on the hardware clock, then you need to ensure that the clock frequency of the SOC and MCU is consistent, otherwise the calculated PTS may be biased.

  5. Timestamp marking of data packets: When sending data from the SOC to the MCU, you can add a timestamp to the data packet, so that when the MCU receives the data, the PTS can be adjusted based on this timestamp.

The above are just some basic suggestions. The specific implementation may need to be designed according to the needs of your system and application.

Guess you like

Origin blog.csdn.net/qq_41483419/article/details/132898218