mbox series

[RFC,0/3] Split up v4l2-mem2mem.c into a core and codec part

Message ID 20230823142359.602411-1-hverkuil-cisco@xs4all.nl (mailing list archive)
Headers show
Series Split up v4l2-mem2mem.c into a core and codec part | expand

Message

Hans Verkuil Aug. 23, 2023, 2:23 p.m. UTC
This RFC series splits up v4l2-mem2mem.c into a core and codec part.

This is a first stab at this, I'm not entirely happy with the
fact that v4l2_m2m_qbuf has to call to _v4l2_codec_qbuf helper
for some codec specific handling.

In any case, splitting this up makes it easier to maintain (IMHO)
and probably makes it easier as well to improve the codec part.

Regards,

	Hans

Hans Verkuil (3):
  media: split up v4l2-mem2mem.c into a core and codec part
  media: include v4l2-mem2mem-codec.h in codec drivers
  media: v4l2-mem2mem.h: move codec bits to v4l2-mem2mem-codec.h

 .../media/platform/allegro-dvt/allegro-core.c |   2 +-
 drivers/media/platform/amphion/vdec.c         |   2 +-
 drivers/media/platform/amphion/venc.c         |   2 +-
 .../media/platform/chips-media/coda-common.c  |   2 +-
 .../platform/mediatek/jpeg/mtk_jpeg_core.c    |   2 +-
 .../mediatek/vcodec/decoder/mtk_vcodec_dec.c  |   2 +-
 .../vcodec/decoder/mtk_vcodec_dec_stateless.c |   2 +-
 .../mediatek/vcodec/encoder/mtk_vcodec_enc.c  |   2 +-
 drivers/media/platform/nvidia/tegra-vde/vde.h |   2 +-
 .../media/platform/nxp/imx-jpeg/mxc-jpeg.c    |   2 +-
 .../media/platform/verisilicon/hantro_drv.c   |   2 +-
 .../media/platform/verisilicon/hantro_v4l2.c  |   2 +-
 .../media/test-drivers/vicodec/vicodec-core.c |   2 +-
 drivers/media/test-drivers/visl/visl-dec.c    |   2 +-
 drivers/media/v4l2-core/Makefile              |   2 +
 drivers/media/v4l2-core/v4l2-mem2mem-codec.c  | 359 +++++++++++++++
 .../{v4l2-mem2mem.c => v4l2-mem2mem-core.c}   | 422 +-----------------
 drivers/media/v4l2-core/v4l2-mem2mem-priv.h   | 100 +++++
 drivers/staging/media/meson/vdec/vdec.c       |   2 +-
 drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
 .../staging/media/sunxi/cedrus/cedrus_dec.c   |   2 +-
 .../staging/media/sunxi/cedrus/cedrus_hw.c    |   2 +-
 .../staging/media/sunxi/cedrus/cedrus_video.c |   2 +-
 include/media/v4l2-mem2mem-codec.h            | 187 ++++++++
 include/media/v4l2-mem2mem.h                  | 202 +--------
 25 files changed, 691 insertions(+), 619 deletions(-)
 create mode 100644 drivers/media/v4l2-core/v4l2-mem2mem-codec.c
 rename drivers/media/v4l2-core/{v4l2-mem2mem.c => v4l2-mem2mem-core.c} (72%)
 create mode 100644 drivers/media/v4l2-core/v4l2-mem2mem-priv.h
 create mode 100644 include/media/v4l2-mem2mem-codec.h