public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/7] media: qcom: iris: add support for decoding 10bit formats
@ 2026-04-08 16:43 Neil Armstrong
  2026-04-08 16:43 ` [PATCH RFC 1/7] media: qcom: iris: add QC10C & P010 buffer size calculations Neil Armstrong
                   ` (7 more replies)
  0 siblings, 8 replies; 34+ messages in thread
From: Neil Armstrong @ 2026-04-08 16:43 UTC (permalink / raw)
  To: Vikash Garodia, Dikshita Agarwal, Abhinav Kumar,
	Bryan O'Donoghue, Mauro Carvalho Chehab
  Cc: linux-media, linux-arm-msm, linux-kernel, Neil Armstrong

This adds the plumbing to support decoding HEVC and AV1
streams into 10bit pixel formats, linear and compressed.

This has only been tested on SM8650 with HEVC, and was inspired by
Venus and the downstream vidc driver for the buffer
calculations and HFI messages.

I was unable to get 10bit decoding working with Gstreamer
and ffmpeg, but v4l2-ctl works with:
v4l2-ctl --verbose --set-fmt-video-out=pixelformat=HEVC --set-fmt-video=pixelformat=P010 --stream-mmap --stream-out-mmap --stream-from-hdr Big_Buck_Bunny_1080_10s_30MB_main10.h265.hdr --stream-to out.P010
v4l2-ctl --verbose --set-fmt-video-out=pixelformat=HEVC --set-fmt-video=pixelformat=Q10C --stream-mmap --stream-out-mmap --stream-from-hdr Big_Buck_Bunny_1080_10s_30MB_main10.h265.hdr --stream-to out.QC10

The non-10bit decoding still works as before.

With Big_Buck_Bunny_1080_10s_30MB reencoded in 10-bit profile
and tranformed in v4l2 header format with [1]:
ffmpeg -i Big_Buck_Bunny_1080_10s_30MB.h264 -pix_fmt yuv420p10le -c:v libx265 -crf 28 -x265-params profile=main10 Big_Buck_Bunny_1080_10s_30MB_main10.h265
/path/to/mkhdr.sh Big_Buck_Bunny_1080_10s_30MB_main10.h265 raw Big_Buck_Bunny_1080_10s_30MB_main10.h265.hdr

The frames correctness has been verified buy displaying them
via Vulkan DMA_BUF import, including QC10C and QC08C.

The support is probably incomplete for other platforms and
I'm unsure what's required to conform to the V4L2 M2M stateless
spec, especially since AFAIK the decoder doesn't support
decoding 10bit streams in 8bit pixel format, thus the RFC state.
Review is welcome !

[1] https://github.com/superna9999/pyv4l2compliance

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Neil Armstrong (7):
      media: qcom: iris: add QC10C & P010 buffer size calculations
      media: qcom: iris: gen2: add support for 10bit decoding
      media: qcom: iris: add helpers for 8bit and 10bit formats
      media: qcom: iris: vdec: update size and stride calculations for 10bit formats
      media: qcom: iris: vdec: forbid g_fmt while waiting for first source change
      media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
      media: qcom: iris: vdec: allow decoding into 10bit format

 drivers/media/platform/qcom/iris/iris_buffer.c     | 81 +++++++++++++++++++++-
 .../platform/qcom/iris/iris_hfi_gen2_command.c     | 71 ++++++++++++++++++-
 .../platform/qcom/iris/iris_hfi_gen2_defines.h     |  1 +
 .../platform/qcom/iris/iris_hfi_gen2_response.c    | 35 ++++++++--
 drivers/media/platform/qcom/iris/iris_instance.h   |  2 +
 .../platform/qcom/iris/iris_platform_common.h      |  1 +
 .../media/platform/qcom/iris/iris_platform_gen2.c  |  3 +-
 drivers/media/platform/qcom/iris/iris_state.c      |  6 ++
 drivers/media/platform/qcom/iris/iris_state.h      |  1 +
 drivers/media/platform/qcom/iris/iris_utils.c      | 16 ++++-
 drivers/media/platform/qcom/iris/iris_utils.h      |  2 +
 drivers/media/platform/qcom/iris/iris_vdec.c       | 70 +++++++++++++++++--
 drivers/media/platform/qcom/iris/iris_vidc.c       | 14 +++-
 13 files changed, 285 insertions(+), 18 deletions(-)
---
base-commit: f3e6330d7fe42b204af05a2dbc68b379e0ad179e
change-id: 20260408-topic-sm8x50-iris-10bit-decoding-074c3ac7975c

Best regards,
--  
Neil Armstrong <neil.armstrong@linaro.org>


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

end of thread, other threads:[~2026-04-17  8:03 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 16:43 [PATCH RFC 0/7] media: qcom: iris: add support for decoding 10bit formats Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 1/7] media: qcom: iris: add QC10C & P010 buffer size calculations Neil Armstrong
2026-04-08 23:59   ` Dmitry Baryshkov
2026-04-09  7:25     ` Neil Armstrong
2026-04-11 16:13       ` Dmitry Baryshkov
2026-04-17  6:47   ` Dikshita Agarwal
2026-04-17  8:03     ` Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 2/7] media: qcom: iris: gen2: add support for 10bit decoding Neil Armstrong
2026-04-17  7:22   ` Dikshita Agarwal
2026-04-17  8:03     ` Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 3/7] media: qcom: iris: add helpers for 8bit and 10bit formats Neil Armstrong
2026-04-17  7:23   ` Dikshita Agarwal
2026-04-17  8:03     ` Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 4/7] media: qcom: iris: vdec: update size and stride calculations for " Neil Armstrong
2026-04-10 10:10   ` Vishnu Reddy
2026-04-10 11:59     ` Neil Armstrong
2026-04-10 12:57       ` Vishnu Reddy
2026-04-10 13:47         ` Neil Armstrong
2026-04-14 23:39       ` Nicolas Dufresne
2026-04-08 16:43 ` [PATCH RFC 5/7] media: qcom: iris: vdec: forbid g_fmt while waiting for first source change Neil Armstrong
2026-04-08 16:43 ` [PATCH RFC 6/7] media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats Neil Armstrong
2026-04-15  6:39   ` Vishnu Reddy
2026-04-15  7:35     ` Neil Armstrong
2026-04-08 16:44 ` [PATCH RFC 7/7] media: qcom: iris: vdec: allow decoding into 10bit format Neil Armstrong
2026-04-09  0:02 ` [PATCH RFC 0/7] media: qcom: iris: add support for decoding 10bit formats Dmitry Baryshkov
2026-04-09  1:04   ` Nicolas Dufresne
2026-04-09  1:40     ` Dmitry Baryshkov
2026-04-09  7:43       ` Neil Armstrong
2026-04-09  7:36     ` Neil Armstrong
2026-04-09 13:19       ` Nicolas Dufresne
2026-04-10 12:00         ` Neil Armstrong
2026-04-10 16:25           ` Neil Armstrong
2026-04-11 17:10             ` Dmitry Baryshkov
2026-04-14 15:35             ` Neil Armstrong

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