Skip to content

media: amphion: copy timestamp from output to

Ming Qian linux-arm-kernel linux-media lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 0 repliesSuperseded
  3. v12 patches 0 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: amphion: decoder copy timestamp from output to capturedrivers/media/platform/amphion/vdec.c drivers/media/platform/amphion/vpu_malone.c drivers/media/platform/amphion/vpu_v4l2.c +1 more+87 -500 replies
2/2media: amphion: encoder copy timestamp from output to capturedrivers/media/platform/amphion/venc.c+16 -310 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] media: amphion: copy timestamp from output to

v3
- add helper function vpu_skip_frame() and vpu_next_src_buf()

v2
- reduce the min buffers count

There is a timestamp manager in firmware,
so in previous, driver will pass the timestamp to firmware, and when a frame is decoded or encoded,
firmware will pass the timestamp to driver,
then driver set the timestamp to the capture vb2_buffer.

But there is problem that the timestamp manager will ensure that the timestamps are monotonically increasing.
So if there are reorder frames, the capture buffer's timestamp is inconsistent with the timestamp of the corresponding output buffer.

It goes against the description of V4L2_BUF_FLAG_TIMESTAMP_COPY in the specification

In order to comply with the specification, driver should copy timestamp from output buffer to capture buffer, and there is an helper function v4l2_m2m_buf_copy_metadata to handle it.

Ming Qian (2):
media: amphion: decoder copy timestamp from output to capture
media: amphion: encoder copy timestamp from output to capture

 drivers/media/platform/amphion/vdec.c       | 76 ++++++++-------------
 drivers/media/platform/amphion/venc.c       | 47 +++++--------
 drivers/media/platform/amphion/vpu_malone.c |  2 +-
 drivers/media/platform/amphion/vpu_v4l2.c   | 56 +++++++++++++++
 drivers/media/platform/amphion/vpu_v4l2.h   |  3 +
 5 files changed, 103 insertions(+), 81 deletions(-)
Signature · 1 line
2.35.1