linux/drivers/staging
Laurent Pinchart 1fdb55ed40 media: v4l2-mem2mem: Don't copy frame flags in v4l2_m2m_buf_copy_metadata()
The v4l2_m2m_buf_copy_metadata() function takes a boolean
copy_frame_flags argument. When true, it causes the function to copy the
V4L2_BUF_FLAG_KEYFRAME, V4L2_BUF_FLAG_BFRAME and V4L2_BUF_FLAG_PFRAME
flags from the output buffer to the capture buffer.

There is no use cases in any upstream driver for copying the flags.
KEY/P/B frames are properties of the bitstream buffer in some formats.
Once decoded, this is no longer a property of the video frame and should
be discarded.

It was considered useful to know if an uncompressed frame was decoded
from a KEY/P/B compressed frame, and to preserve that information if
that same uncompressed frame was passed through another M2M device (e.g.
a scaler). However, the V4L2 documentation makes it clear that the flags
are meant for compressed frames only.

Drop the copy_frame_flags argument from v4l2_m2m_buf_copy_metadata().
The change to drivers was performed with the following Coccinelle
semantic patch:

@@
expression src;
expression dst;
expression flag;
@@
-       v4l2_m2m_buf_copy_metadata(src, dst, flag);
+       v4l2_m2m_buf_copy_metadata(src, dst);

include/media/v4l2-mem2mem.h and drivers/media/v4l2-core/v4l2-mem2mem.c
have been updated manually.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
History 2025-10-17 11:31:16 +02:00
..
axis-fifo Staging driver fixes for 6.18-rc1 2025-10-07 11:41:06 -07:00
fbtft staging: fbtft: cleanup error handling in fbtft_framebuffer_alloc() 2025-07-09 13:11:07 +02:00
gpib staging: gpib: use int type to store negative error codes 2025-09-06 15:55:35 +02:00
greybus treewide: rename GPIO set callbacks back to their original names 2025-08-07 10:07:06 +02:00
iio staging: iio: adc: ad7816: Drop unnecessary dev_set_drvdata() call 2025-08-25 09:24:19 +01:00
media media: v4l2-mem2mem: Don't copy frame flags in v4l2_m2m_buf_copy_metadata() 2025-10-17 11:31:16 +02:00
most media: Reset file->private_data to NULL in v4l2_fh_del() 2025-08-13 08:33:44 +02:00
nvec staging: nvec: Fix incorrect null termination of battery manufacturer 2025-07-24 11:29:57 +02:00
octeon Staging driver changes for 6.18-rc1 2025-10-04 16:17:14 -07:00
rtl8723bs Staging driver changes for 6.18-rc1 2025-10-04 16:17:14 -07:00
sm750fb staging: sm750fb: rename camel case variable 2025-09-14 17:08:39 +02:00
vc04_services staging: vc04_services/vchiq-mmal: fix typos in comments 2025-08-13 16:25:15 +02:00
vme_user staging: vme_user: fix spelling errors 2025-07-24 11:28:26 +02:00
Kconfig staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00
Makefile staging: fieldbus: Delete unused driver 2024-11-04 00:53:07 +01:00