Incorrect timestamp handling in QuadMax vpu_malone driver

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Incorrect timestamp handling in QuadMax vpu_malone driver

772件の閲覧回数
crg7475
Contributor III

The vpu_malone V4L2 mem2mem driver sets the `V4L2_BUF_FLAG_TIMESTAMP_COPY` flag in the buffers that come out of the capture stream. That is OK.

However, that driver has some sort of "timestamp manager" that modifies these timestamps. This significantly violates the V4L2 spec, which explicitly states:

The CAPTURE buffer timestamp has been taken from the corresponding OUTPUT buffer. This flag applies only to mem2mem devices.

This means that either, the timestamp manager must be removed and replaced by code that does what the spec states (copy the timestamp from the output to the corresponding capture buffer), or some form of ioctl to conditionally enable/disable it must be added. If the timestamp manager is enabled, this flag must not be set. I strongly recommend to not just remove that flag, since the timestamp copy behavior is absolutely essential in projects like FFmpeg, which use some form of ID to associate encoded and decoded frames. (Using the timestamp field for an arbitrary ID _is_ valid.)

Or is true timestamp copy already available? I saw that changes were made to the driver in kernel releases newer than the one used in Yocto Dunfell.

タグ(3)
0 件の賞賛
2 返答(返信)

687件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

what bsp version do you use? old bsp 4.14) has timestamp issue as I known, try to use the latest bsp which should be fixed this

 

0 件の賞賛

639件の閲覧回数
crg7475
Contributor III

Sorry for the late reply. Not sure - I am using a Toradex board here, and my BSP is Yocto Dunfell. In the linux-imx logs I see this commit: "MLK-24960: [8QM_MEK/8QXP_MEK]mxc:vpu_malone: move timestamp manager to firmware" - is this what you mean? If so, this is already included. I need a way to turn the timestamp manager off and instruct the driver to pass along the timestamps that I specified from the encoded to the corresponding decoded frames.

0 件の賞賛