linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] media: amphion: copy timestamp from output to capture
@ 2022-03-11  7:06 Ming Qian
  2022-03-11  7:06 ` [PATCH 1/2] media: amphion: decoder " Ming Qian
  2022-03-11  7:06 ` [PATCH 2/2] media: amphion: encoder " Ming Qian
  0 siblings, 2 replies; 3+ messages in thread
From: Ming Qian @ 2022-03-11  7:06 UTC (permalink / raw)
  To: mchehab, shawnguo
  Cc: hverkuil-cisco, robh+dt, s.hauer, kernel, festevam, linux-imx,
	aisheng.dong, linux-media, linux-kernel, linux-arm-kernel

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     | 89 ++++++++++-------------
 drivers/media/platform/amphion/venc.c     | 47 ++++--------
 drivers/media/platform/amphion/vpu_v4l2.c | 13 ++++
 drivers/media/platform/amphion/vpu_v4l2.h |  1 +
 4 files changed, 70 insertions(+), 80 deletions(-)

-- 
2.33.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-11  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11  7:06 [PATCH 0/2] media: amphion: copy timestamp from output to capture Ming Qian
2022-03-11  7:06 ` [PATCH 1/2] media: amphion: decoder " Ming Qian
2022-03-11  7:06 ` [PATCH 2/2] media: amphion: encoder " Ming Qian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).