public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] media: venus: adapt headers only flag for V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE
@ 2023-01-03  7:15 Ming Qian
  2023-01-03  7:15 ` [PATCH 2/3] media: s5p-mfc: " Ming Qian
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ming Qian @ 2023-01-03  7:15 UTC (permalink / raw)
  To: mchehab, hverkuil-cisco
  Cc: shawnguo, robh+dt, s.hauer, kernel, festevam, linux-imx,
	xiahong.bao, eagle.zhou, tao.jiang_2, linux-media, linux-kernel,
	linux-arm-kernel

when V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE is chosen,
the first buffer only contains stream header,
so apply the flag V4L2_BUF_FLAG_HEADERS_ONLY

Signed-off-by: Ming Qian <ming.qian@nxp.com>
---
 drivers/media/platform/qcom/venus/venc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index cdb12546c4fa..33c8e4329f6e 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1260,6 +1260,9 @@ static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type,
 		vb->planes[0].data_offset = data_offset;
 		vb->timestamp = timestamp_us * NSEC_PER_USEC;
 		vbuf->sequence = inst->sequence_cap++;
+		if (inst->controls.enc.header_mode == V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE &&
+		    !vbuf->sequence)
+			vbuf->flags |= V4L2_BUF_FLAG_HEADERS_ONLY;
 	} else {
 		vbuf->sequence = inst->sequence_out++;
 	}
-- 
2.38.1


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

end of thread, other threads:[~2023-01-03 17:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03  7:15 [PATCH 1/3] media: venus: adapt headers only flag for V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE Ming Qian
2023-01-03  7:15 ` [PATCH 2/3] media: s5p-mfc: " Ming Qian
2023-01-03 17:39   ` kernel test robot
2023-01-03  7:15 ` [PATCH 3/3] media: mediatek: vcodec: " Ming Qian
2023-01-03  9:04 ` [PATCH 1/3] media: venus: " kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox