[PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats

Neil Armstrong posted 6 patches 1 month ago
There is a newer version of this series
drivers/media/platform/qcom/iris/iris_buffer.c     | 195 ++++++++++++++++++++-
.../platform/qcom/iris/iris_hfi_gen2_command.c     |  75 +++++++-
.../platform/qcom/iris/iris_hfi_gen2_defines.h     |   1 +
.../platform/qcom/iris/iris_hfi_gen2_response.c    |  37 +++-
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  |   8 +-
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       |  42 ++++-
10 files changed, 364 insertions(+), 15 deletions(-)
[PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Neil Armstrong 1 month ago
This adds the plumbing to support decoding HEVC, VP9 and AV1
streams into 10bit pixel formats, linear and compressed.

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

I was unable to get 10bit decoding working with ffmpeg since P010
support for v4l2 decoding is missing, 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

Fluster HEVC results on SM8650:

./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
The failing test case:
- Pixel Format mismatch
 - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
- Unsupported resolution
 - PICSIZE_A_Bossen_1 - resolution is higher than max supported
 - PICSIZE_B_Bossen_1 - resolution is higher than max supported
 - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
 - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
- CRC mismatch
 - RAP_A_docomo_6
- CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
 - VPSSPSPPS_A_MainConcept_1

v4l2-compliance results on SM8550 & SM8650:

$ v4l2-compliance -d /dev/video1 -s
v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25

Compliance test for iris_driver device /dev/video1:

Driver Info:
	Driver name      : iris_driver
	Card type        : Iris Encoder
	Bus info         : platform:aa00000.video-codec
	Driver version   : 7.0.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
	Detected Stateful Encoder

Required ioctls:
	test VIDIOC_QUERYCAP: OK
	test invalid ioctls: OK

Allow for multiple opens:
	test second /dev/video1 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 43 Private Controls: 0

Format ioctls:
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK
	test Composing: OK (Not Supported)
	test Scaling: OK (Not Supported)

Codec ioctls:
	test VIDIOC_(TRY_)ENCODER_CMD: OK
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test CREATE_BUFS maximum buffers: OK
	test VIDIOC_REMOVE_BUFS: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)
	test blocking wait: OK

Test input 0:

Streaming ioctls:
	test read/write: OK (Not Supported)
	Video Capture Multiplanar: Captured 61 buffers    
	test MMAP (select, REQBUFS): OK
	Video Capture Multiplanar: Captured 61 buffers    
	test MMAP (epoll, REQBUFS): OK
	Video Capture Multiplanar: Captured 61 buffers    
	test MMAP (select, CREATE_BUFS): OK
	Video Capture Multiplanar: Captured 61 buffers    
	test MMAP (epoll, CREATE_BUFS): OK
	test USERPTR (select): OK (Not Supported)
	test DMABUF: Cannot test, specify --expbuf-device

Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0

$ v4l2-compliance -d /dev/video0 -s5 --stream-from=test_video_10s.h264
v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25

Compliance test for iris_driver device /dev/video0:

Driver Info:
	Driver name      : iris_driver
	Card type        : Iris Decoder
	Bus info         : platform:aa00000.video-codec
	Driver version   : 7.0.0
	Capabilities     : 0x84204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04204000
		Video Memory-to-Memory Multiplanar
		Streaming
		Extended Pix Format
	Detected Stateful Decoder

Required ioctls:
	test VIDIOC_QUERYCAP: OK
	test invalid ioctls: OK

Allow for multiple opens:
	test second /dev/video0 open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
	test VIDIOC_QUERYCTRL: OK
	test VIDIOC_G/S_CTRL: OK
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 12 Private Controls: 0

Format ioctls:
	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
	test VIDIOC_G/S_PARM: OK (Not Supported)
	test VIDIOC_G_FBUF: OK (Not Supported)
	test VIDIOC_G_FMT: OK
	test VIDIOC_TRY_FMT: OK
	test VIDIOC_S_FMT: OK
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK
	test Composing: OK
	test Scaling: OK (Not Supported)

Codec ioctls:
	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
	test VIDIOC_(TRY_)DECODER_CMD: OK

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test CREATE_BUFS maximum buffers: OK
	test VIDIOC_REMOVE_BUFS: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)
	test blocking wait: OK

Test input 0:

Streaming ioctls:
	test read/write: OK (Not Supported)
the input file is smaller than 7077888 bytes
	Video Capture Multiplanar: Captured 601 buffers   
	test MMAP (select, REQBUFS): OK
the input file is smaller than 7077888 bytes
	Video Capture Multiplanar: Captured 601 buffers   
	test MMAP (epoll, REQBUFS): OK
the input file is smaller than 7077888 bytes
	Video Capture Multiplanar: Captured 601 buffers   
	test MMAP (select, CREATE_BUFS): OK
the input file is smaller than 7077888 bytes
	Video Capture Multiplanar: Captured 601 buffers   
	test MMAP (epoll, CREATE_BUFS): OK
	test USERPTR (select): OK (Not Supported)
	test DMABUF: Cannot test, specify --expbuf-device

Total for iris_driver device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0

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

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v3:
- Added review tag on patch 1
- Limited stride command to AV1 decoding only
- Link to v2: https://patch.msgid.link/20260417-topic-sm8x50-iris-10bit-decoding-v2-0-c987b65a31d5@linaro.org

Changes in v2:
- Fixed bug breaking 8bit decoding
- Dropped filtering on G_FMT while waiting for soure change
- Dropped format filtering on ENUMFMT
- Switched ALIGN(x, 192) to roundup(x, 192) because ALIGN works only with Power Of Two numbers
- Cleaned and refactors the width/height/stride calculations
- Cleaned and redesigned the buffer calculations functions with proper comments and var names
- Passed fluster and v4l2-compliance to check for non regression
- Tested on SM8550
- Added missing V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 with made gstreamer fail decoding
- Link to v1: https://patch.msgid.link/20260408-topic-sm8x50-iris-10bit-decoding-v1-0-428c1ec2e3f3@linaro.org

---
Neil Armstrong (6):
      media: qcom: iris: add helpers for 8bit and 10bit formats
      media: qcom: iris: add QC10C & P010 buffer size calculations
      media: qcom: iris: gen2: add support for 10bit decoding
      media: qcom: iris: vdec: update size and stride calculations for 10bit formats
      media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
      media: qcom: iris: vdec: allow GEN2 decoding into 10bit format

 drivers/media/platform/qcom/iris/iris_buffer.c     | 195 ++++++++++++++++++++-
 .../platform/qcom/iris/iris_hfi_gen2_command.c     |  75 +++++++-
 .../platform/qcom/iris/iris_hfi_gen2_defines.h     |   1 +
 .../platform/qcom/iris/iris_hfi_gen2_response.c    |  37 +++-
 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  |   8 +-
 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       |  42 ++++-
 10 files changed, 364 insertions(+), 15 deletions(-)
---
base-commit: 76671814f2843482d97feca12e95c06f0b05bc8a
change-id: 20260408-topic-sm8x50-iris-10bit-decoding-074c3ac7975c

Best regards,
--  
Neil Armstrong <neil.armstrong@linaro.org>
Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Bryan O'Donoghue 4 weeks ago
Can you rebase off of:

https://gitlab.freedesktop.org/linux-media/media-committers/-/tree/next

and ideally make sure everything applies against

https://gitlab.freedesktop.org/linux-media/users/bodonoghue/-/tree/next+fixes

bod-media-committers-next-plaform-qcom(next-smoketest*)$ b4 shazam 
20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org
Grabbing thread from 
lore.kernel.org/all/20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Analyzing 25 messages in the thread
Analyzing 12 code-review messages
Checking attestation on all messages, may take a moment...
---
   ✓ [PATCH v3 1/6] media: qcom: iris: add helpers for 8bit and 10bit 
formats
     + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
   ✓ [PATCH v3 2/6] media: qcom: iris: add QC10C & P010 buffer size 
calculations
   ✓ [PATCH v3 3/6] media: qcom: iris: gen2: add support for 10bit decoding
     + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
   ✓ [PATCH v3 4/6] media: qcom: iris: vdec: update size and stride 
calculations for 10bit formats
     + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
   ✓ [PATCH v3 5/6] media: qcom: iris: vdec: update find_format to 
handle 8bit and 10bit formats
     + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
   ✓ [PATCH v3 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 
10bit format
     + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
   ---
   ✓ Signed: openpgp/neil.armstrong@linaro.org
   ---
   NOTE: install dkimpy for DKIM signature verification
---
Total patches: 6
---
  Base: base-commit 76671814f2843482d97feca12e95c06f0b05bc8a not known, 
ignoring
Applying: media: qcom: iris: add helpers for 8bit and 10bit formats
Applying: media: qcom: iris: add QC10C & P010 buffer size calculations
Applying: media: qcom: iris: gen2: add support for 10bit decoding
Applying: media: qcom: iris: vdec: update size and stride calculations 
for 10bit formats
Applying: media: qcom: iris: vdec: update find_format to handle 8bit and 
10bit formats
Applying: media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
Patch failed at 0006 media: qcom: iris: vdec: allow GEN2 decoding into 
10bit format
error: drivers/media/platform/qcom/iris/iris_platform_gen2.c: does not 
exist in index

that file got zapped in:

commit 53a5e095636acbab817a7fb98a67ce76cac59fdf
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date:   Sun Mar 29 02:33:10 2026 +0200

     media: qcom: iris: split platform data from firmware data

     Finalize the logical separation of the software and hardware interface
     descriptions by moving hardware properties to the files specific to the
     particular VPU version.

     Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
     Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
     Signed-off-by: Bryan O'Donoghue <bod@kernel.org>

diff --git a/drivers/media/platform/qcom/iris/Makefile 
b/drivers/media/platform/qcom/iris/Makefile
index 2fde45f817276..48e415cbc4390 100644
--- a/drivers/media/platform/qcom/iris/Makefile
+++ b/drivers/media/platform/qcom/iris/Makefile
@@ -4,14 +4,16 @@ qcom-iris-objs += iris_buffer.o \
               iris_ctrls.o \
               iris_firmware.o \
               iris_hfi_common.o \
+             iris_hfi_gen1.o \
               iris_hfi_gen1_command.o \
               iris_hfi_gen1_response.o \
+             iris_hfi_gen2.o \
               iris_hfi_gen2_command.o \
               iris_hfi_gen2_packet.o \
               iris_hfi_gen2_response.o \
               iris_hfi_queue.o \
-             iris_platform_gen1.o \
-             iris_platform_gen2.o \
+             iris_platform_vpu2.o \
+             iris_platform_vpu3x.o \
               iris_power.o \
               iris_probe.o \
               iris_resources.o \

---
bod
Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Neil Armstrong 3 weeks, 1 day ago
On 5/15/26 11:35, Bryan O'Donoghue wrote:
> 
> Can you rebase off of:
> 
> https://gitlab.freedesktop.org/linux-media/media-committers/-/tree/next
> 
> and ideally make sure everything applies against
> 
> https://gitlab.freedesktop.org/linux-media/users/bodonoghue/-/tree/next+fixes

Ack, I rebased and it applies cleanly.

Will post v4 after testing with fixes asked by Vikash

Neil

> 
> bod-media-committers-next-plaform-qcom(next-smoketest*)$ b4 shazam 20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org
> Grabbing thread from lore.kernel.org/all/20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org/t.mbox.gz
> Checking for newer revisions
> Grabbing search results from lore.kernel.org
> Analyzing 25 messages in the thread
> Analyzing 12 code-review messages
> Checking attestation on all messages, may take a moment...
> ---
>    ✓ [PATCH v3 1/6] media: qcom: iris: add helpers for 8bit and 10bit formats
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 2/6] media: qcom: iris: add QC10C & P010 buffer size calculations
>    ✓ [PATCH v3 3/6] media: qcom: iris: gen2: add support for 10bit decoding
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 4/6] media: qcom: iris: vdec: update size and stride calculations for 10bit formats
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 5/6] media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ---
>    ✓ Signed: openpgp/neil.armstrong@linaro.org
>    ---
>    NOTE: install dkimpy for DKIM signature verification
> ---
> Total patches: 6
> ---
>   Base: base-commit 76671814f2843482d97feca12e95c06f0b05bc8a not known, ignoring
> Applying: media: qcom: iris: add helpers for 8bit and 10bit formats
> Applying: media: qcom: iris: add QC10C & P010 buffer size calculations
> Applying: media: qcom: iris: gen2: add support for 10bit decoding
> Applying: media: qcom: iris: vdec: update size and stride calculations for 10bit formats
> Applying: media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
> Applying: media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
> Patch failed at 0006 media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
> error: drivers/media/platform/qcom/iris/iris_platform_gen2.c: does not exist in index
> 
> that file got zapped in:
> 
> commit 53a5e095636acbab817a7fb98a67ce76cac59fdf
> Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Date:   Sun Mar 29 02:33:10 2026 +0200
> 
>      media: qcom: iris: split platform data from firmware data
> 
>      Finalize the logical separation of the software and hardware interface
>      descriptions by moving hardware properties to the files specific to the
>      particular VPU version.
> 
>      Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
>      Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>      Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
> 
> diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/platform/qcom/iris/Makefile
> index 2fde45f817276..48e415cbc4390 100644
> --- a/drivers/media/platform/qcom/iris/Makefile
> +++ b/drivers/media/platform/qcom/iris/Makefile
> @@ -4,14 +4,16 @@ qcom-iris-objs += iris_buffer.o \
>                iris_ctrls.o \
>                iris_firmware.o \
>                iris_hfi_common.o \
> +             iris_hfi_gen1.o \
>                iris_hfi_gen1_command.o \
>                iris_hfi_gen1_response.o \
> +             iris_hfi_gen2.o \
>                iris_hfi_gen2_command.o \
>                iris_hfi_gen2_packet.o \
>                iris_hfi_gen2_response.o \
>                iris_hfi_queue.o \
> -             iris_platform_gen1.o \
> -             iris_platform_gen2.o \
> +             iris_platform_vpu2.o \
> +             iris_platform_vpu3x.o \
>                iris_power.o \
>                iris_probe.o \
>                iris_resources.o \
> 
> ---
> bod

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Vikash Garodia 4 weeks ago
On 5/15/2026 3:05 PM, Bryan O'Donoghue wrote:
> 
> Can you rebase off of:
> 
> https://gitlab.freedesktop.org/linux-media/media-committers/-/tree/next
> 
> and ideally make sure everything applies against
> 
> https://gitlab.freedesktop.org/linux-media/users/bodonoghue/-/tree/ 
> next+fixes
> 

there are issues reported and review comments open in this series. You 
need to wait for them to be addressed.

> bod-media-committers-next-plaform-qcom(next-smoketest*)$ b4 shazam 
> 20260511-topic-sm8x50-iris-10bit-decoding-v3-0-7fc049b93042@linaro.org
> Grabbing thread from lore.kernel.org/all/20260511-topic-sm8x50- 
> iris-10bit-decoding-v3-0-7fc049b93042@linaro.org/t.mbox.gz
> Checking for newer revisions
> Grabbing search results from lore.kernel.org
> Analyzing 25 messages in the thread
> Analyzing 12 code-review messages
> Checking attestation on all messages, may take a moment...
> ---
>    ✓ [PATCH v3 1/6] media: qcom: iris: add helpers for 8bit and 10bit 
> formats
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 2/6] media: qcom: iris: add QC10C & P010 buffer size 
> calculations
>    ✓ [PATCH v3 3/6] media: qcom: iris: gen2: add support for 10bit decoding
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 4/6] media: qcom: iris: vdec: update size and stride 
> calculations for 10bit formats
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 5/6] media: qcom: iris: vdec: update find_format to 
> handle 8bit and 10bit formats
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ✓ [PATCH v3 6/6] media: qcom: iris: vdec: allow GEN2 decoding into 
> 10bit format
>      + Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>    ---
>    ✓ Signed: openpgp/neil.armstrong@linaro.org
>    ---
>    NOTE: install dkimpy for DKIM signature verification
> ---
> Total patches: 6
> ---
>   Base: base-commit 76671814f2843482d97feca12e95c06f0b05bc8a not known, 
> ignoring
> Applying: media: qcom: iris: add helpers for 8bit and 10bit formats
> Applying: media: qcom: iris: add QC10C & P010 buffer size calculations
> Applying: media: qcom: iris: gen2: add support for 10bit decoding
> Applying: media: qcom: iris: vdec: update size and stride calculations 
> for 10bit formats
> Applying: media: qcom: iris: vdec: update find_format to handle 8bit and 
> 10bit formats
> Applying: media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
> Patch failed at 0006 media: qcom: iris: vdec: allow GEN2 decoding into 
> 10bit format
> error: drivers/media/platform/qcom/iris/iris_platform_gen2.c: does not 
> exist in index
> 
> that file got zapped in:
> 
> commit 53a5e095636acbab817a7fb98a67ce76cac59fdf
> Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Date:   Sun Mar 29 02:33:10 2026 +0200
> 
>      media: qcom: iris: split platform data from firmware data
> 
>      Finalize the logical separation of the software and hardware interface
>      descriptions by moving hardware properties to the files specific to 
> the
>      particular VPU version.
> 
>      Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
>      Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>      Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
> 
> diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/ 
> platform/qcom/iris/Makefile
> index 2fde45f817276..48e415cbc4390 100644
> --- a/drivers/media/platform/qcom/iris/Makefile
> +++ b/drivers/media/platform/qcom/iris/Makefile
> @@ -4,14 +4,16 @@ qcom-iris-objs += iris_buffer.o \
>                iris_ctrls.o \
>                iris_firmware.o \
>                iris_hfi_common.o \
> +             iris_hfi_gen1.o \
>                iris_hfi_gen1_command.o \
>                iris_hfi_gen1_response.o \
> +             iris_hfi_gen2.o \
>                iris_hfi_gen2_command.o \
>                iris_hfi_gen2_packet.o \
>                iris_hfi_gen2_response.o \
>                iris_hfi_queue.o \
> -             iris_platform_gen1.o \
> -             iris_platform_gen2.o \
> +             iris_platform_vpu2.o \
> +             iris_platform_vpu3x.o \
>                iris_power.o \
>                iris_probe.o \
>                iris_resources.o \
> 
> ---
> bod

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Vikash Garodia 1 month ago
On 5/11/2026 2:50 PM, Neil Armstrong wrote:
> This adds the plumbing to support decoding HEVC, VP9 and AV1
> streams into 10bit pixel formats, linear and compressed.
> 
> This has only been tested on SM8550 & SM8650 with HEVC, and was
> inspired by Venus, DRM MSM and the downstream vidc driver for the
> buffer calculations and HFI messages.
> 
> I was unable to get 10bit decoding working with ffmpeg since P010
> support for v4l2 decoding is missing, 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
> 
> Fluster HEVC results on SM8650:
> 
> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
> The failing test case:
> - Pixel Format mismatch
>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
> - Unsupported resolution
>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
> - CRC mismatch
>   - RAP_A_docomo_6
> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>   - VPSSPSPPS_A_MainConcept_1

 From earlier SOC reports, 10bit tests which were failing were
- DBLK_A_MAIN10_VIXS_4
- INITQP_B_Main10_Sony_1
- TSUNEQBD_A_MAIN10_Technicolor_2
- WP_A_MAIN10_Toshiba_3
- WP_MAIN10_B_Toshiba_3
- WPP_A_ericsson_MAIN10_2
- WPP_B_ericsson_MAIN10_2
- WPP_C_ericsson_MAIN10_2
- WPP_E_ericsson_MAIN10_2
- WPP_F_ericsson_MAIN10_2

I was in the opinion that once we enable 10bit, these tests would pass. 
Though i do not see these in your failing tests, but the count of 
131/147 have not improved. Could you check if these tests are passing 
and count is better than 131 pass ?

Regards,
Vikash
Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Neil Armstrong 3 weeks, 4 days ago
On 5/13/26 19:33, Vikash Garodia wrote:
> 
> On 5/11/2026 2:50 PM, Neil Armstrong wrote:
>> This adds the plumbing to support decoding HEVC, VP9 and AV1
>> streams into 10bit pixel formats, linear and compressed.
>>
>> This has only been tested on SM8550 & SM8650 with HEVC, and was
>> inspired by Venus, DRM MSM and the downstream vidc driver for the
>> buffer calculations and HFI messages.
>>
>> I was unable to get 10bit decoding working with ffmpeg since P010
>> support for v4l2 decoding is missing, 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
>>
>> Fluster HEVC results on SM8650:
>>
>> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
>> The failing test case:
>> - Pixel Format mismatch
>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
>> - Unsupported resolution
>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>> - CRC mismatch
>>   - RAP_A_docomo_6
>> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>>   - VPSSPSPPS_A_MainConcept_1
> 
>  From earlier SOC reports, 10bit tests which were failing were
> - DBLK_A_MAIN10_VIXS_4
> - INITQP_B_Main10_Sony_1
> - TSUNEQBD_A_MAIN10_Technicolor_2
> - WP_A_MAIN10_Toshiba_3
> - WP_MAIN10_B_Toshiba_3
> - WPP_A_ericsson_MAIN10_2
> - WPP_B_ericsson_MAIN10_2
> - WPP_C_ericsson_MAIN10_2
> - WPP_E_ericsson_MAIN10_2
> - WPP_F_ericsson_MAIN10_2
> 
> I was in the opinion that once we enable 10bit, these tests would pass. Though i do not see these in your failing tests, but the count of 131/147 have not improved. Could you check if these tests are passing and count is better than 131 pass ?

Sorry there's a copy paste error I'll fix on v4, here's the fluster log:


|Test|GStreamer-H.265-V4L2|
|-|-|
|TOTAL|141/147|
|TOTAL TIME|8.600s|
|-|-|
...
|PICSIZE_A_Bossen_1|☠|
|PICSIZE_B_Bossen_1|☠|
...
|RAP_A_docomo_6|❌|
...
|TSUNEQBD_A_MAIN10_Technicolor_2|☠|
...
|WPP_D_ericsson_MAIN10_2|☠|
|WPP_D_ericsson_MAIN_2|☠|
...
|-|-|
|Test|GStreamer-H.265-V4L2|
|TOTAL|140/147|
|TOTAL TIME|8.600s|

|-|-|
|Profile|GStreamer-H.265-V4L2|
|MAIN|131/135|
|MAIN_10|9/11|
|MAIN_STILL_PICTURE|1/1|

So the failing cases:
- Pixel Format mismatch
  - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
- Unsupported resolution
  - PICSIZE_A_Bossen_1 - resolution is higher than max supported
  - PICSIZE_B_Bossen_1 - resolution is higher than max supported
  - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
  - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
- CRC mismatch
  - RAP_A_docomo_6

> 
> Regards,
> Vikash

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Vikash Garodia 3 weeks, 2 days ago
On 5/18/2026 1:12 PM, Neil Armstrong wrote:
> On 5/13/26 19:33, Vikash Garodia wrote:
>>
>> On 5/11/2026 2:50 PM, Neil Armstrong wrote:
>>> This adds the plumbing to support decoding HEVC, VP9 and AV1
>>> streams into 10bit pixel formats, linear and compressed.
>>>
>>> This has only been tested on SM8550 & SM8650 with HEVC, and was
>>> inspired by Venus, DRM MSM and the downstream vidc driver for the
>>> buffer calculations and HFI messages.
>>>
>>> I was unable to get 10bit decoding working with ffmpeg since P010
>>> support for v4l2 decoding is missing, 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
>>>
>>> Fluster HEVC results on SM8650:
>>>
>>> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 
>>> 131/147
>>> The failing test case:
>>> - Pixel Format mismatch
>>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but 
>>> decoder returns P010
>>> - Unsupported resolution
>>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>>> - CRC mismatch
>>>   - RAP_A_docomo_6
>>> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>>>   - VPSSPSPPS_A_MainConcept_1
>>
>>  From earlier SOC reports, 10bit tests which were failing were
>> - DBLK_A_MAIN10_VIXS_4
>> - INITQP_B_Main10_Sony_1
>> - TSUNEQBD_A_MAIN10_Technicolor_2
>> - WP_A_MAIN10_Toshiba_3
>> - WP_MAIN10_B_Toshiba_3
>> - WPP_A_ericsson_MAIN10_2
>> - WPP_B_ericsson_MAIN10_2
>> - WPP_C_ericsson_MAIN10_2
>> - WPP_E_ericsson_MAIN10_2
>> - WPP_F_ericsson_MAIN10_2
>>
>> I was in the opinion that once we enable 10bit, these tests would 
>> pass. Though i do not see these in your failing tests, but the count 
>> of 131/147 have not improved. Could you check if these tests are 
>> passing and count is better than 131 pass ?
> 
> Sorry there's a copy paste error I'll fix on v4, here's the fluster log:
> 
> 
> |Test|GStreamer-H.265-V4L2|
> |-|-|
> |TOTAL|141/147|
> |TOTAL TIME|8.600s|
> |-|-|
> ...
> |PICSIZE_A_Bossen_1|☠|
> |PICSIZE_B_Bossen_1|☠|
> ...
> |RAP_A_docomo_6|❌|
> ...
> |TSUNEQBD_A_MAIN10_Technicolor_2|☠|
> ...
> |WPP_D_ericsson_MAIN10_2|☠|
> |WPP_D_ericsson_MAIN_2|☠|
> ...
> |-|-|
> |Test|GStreamer-H.265-V4L2|
> |TOTAL|140/147|
> |TOTAL TIME|8.600s|
> 
> |-|-|
> |Profile|GStreamer-H.265-V4L2|
> |MAIN|131/135|
> |MAIN_10|9/11|
> |MAIN_STILL_PICTURE|1/1|
> 
> So the failing cases:
> - Pixel Format mismatch
>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder 
> returns P010

Why would gstreamer expect NV12 for MAIN10 usecase ? Is this something 
to do with format negotiation ?

> - Unsupported resolution
>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
> - CRC mismatch
>   - RAP_A_docomo_6
> 
>>
>> Regards,
>> Vikash
> 

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Neil Armstrong 3 weeks, 1 day ago
On 5/20/26 17:44, Vikash Garodia wrote:
> 
> On 5/18/2026 1:12 PM, Neil Armstrong wrote:
>> On 5/13/26 19:33, Vikash Garodia wrote:
>>>
>>> On 5/11/2026 2:50 PM, Neil Armstrong wrote:
>>>> This adds the plumbing to support decoding HEVC, VP9 and AV1
>>>> streams into 10bit pixel formats, linear and compressed.
>>>>
>>>> This has only been tested on SM8550 & SM8650 with HEVC, and was
>>>> inspired by Venus, DRM MSM and the downstream vidc driver for the
>>>> buffer calculations and HFI messages.
>>>>
>>>> I was unable to get 10bit decoding working with ffmpeg since P010
>>>> support for v4l2 decoding is missing, 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
>>>>
>>>> Fluster HEVC results on SM8650:
>>>>
>>>> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
>>>> The failing test case:
>>>> - Pixel Format mismatch
>>>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
>>>> - Unsupported resolution
>>>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>>>> - CRC mismatch
>>>>   - RAP_A_docomo_6
>>>> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>>>>   - VPSSPSPPS_A_MainConcept_1
>>>
>>>  From earlier SOC reports, 10bit tests which were failing were
>>> - DBLK_A_MAIN10_VIXS_4
>>> - INITQP_B_Main10_Sony_1
>>> - TSUNEQBD_A_MAIN10_Technicolor_2
>>> - WP_A_MAIN10_Toshiba_3
>>> - WP_MAIN10_B_Toshiba_3
>>> - WPP_A_ericsson_MAIN10_2
>>> - WPP_B_ericsson_MAIN10_2
>>> - WPP_C_ericsson_MAIN10_2
>>> - WPP_E_ericsson_MAIN10_2
>>> - WPP_F_ericsson_MAIN10_2
>>>
>>> I was in the opinion that once we enable 10bit, these tests would pass. Though i do not see these in your failing tests, but the count of 131/147 have not improved. Could you check if these tests are passing and count is better than 131 pass ?
>>
>> Sorry there's a copy paste error I'll fix on v4, here's the fluster log:
>>
>>
>> |Test|GStreamer-H.265-V4L2|
>> |-|-|
>> |TOTAL|141/147|
>> |TOTAL TIME|8.600s|
>> |-|-|
>> ...
>> |PICSIZE_A_Bossen_1|☠|
>> |PICSIZE_B_Bossen_1|☠|
>> ...
>> |RAP_A_docomo_6|❌|
>> ...
>> |TSUNEQBD_A_MAIN10_Technicolor_2|☠|
>> ...
>> |WPP_D_ericsson_MAIN10_2|☠|
>> |WPP_D_ericsson_MAIN_2|☠|
>> ...
>> |-|-|
>> |Test|GStreamer-H.265-V4L2|
>> |TOTAL|140/147|
>> |TOTAL TIME|8.600s|
>>
>> |-|-|
>> |Profile|GStreamer-H.265-V4L2|
>> |MAIN|131/135|
>> |MAIN_10|9/11|
>> |MAIN_STILL_PICTURE|1/1|
>>
>> So the failing cases:
>> - Pixel Format mismatch
>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
> 
> Why would gstreamer expect NV12 for MAIN10 usecase ? Is this something to do with format negotiation ?

                         # Feature: Test unequal luma and chroma bitdepth
                         # setting. The luma bitdepth is higher than the chroma
                         # bitdepth.
                         # Luma is 10 bit, chroma is 9 bit

This particular test uses different bit depth for luma and chroma, and the fw upscales all to 10bit
while the sw decoder seems to downscale to 8bit. And it seems other HW decoder does the same as iris.

I think the HW decoder is right here, but this use case will probably never occur in real life.

> 
>> - Unsupported resolution
>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>> - CRC mismatch
>>   - RAP_A_docomo_6
>>
>>>
>>> Regards,
>>> Vikash
>>
> 

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Vikash Garodia 3 weeks, 1 day ago
On 5/21/2026 12:54 PM, Neil Armstrong wrote:
> On 5/20/26 17:44, Vikash Garodia wrote:
>>
>> On 5/18/2026 1:12 PM, Neil Armstrong wrote:
>>> On 5/13/26 19:33, Vikash Garodia wrote:
>>>>
>>>> On 5/11/2026 2:50 PM, Neil Armstrong wrote:
>>>>> This adds the plumbing to support decoding HEVC, VP9 and AV1
>>>>> streams into 10bit pixel formats, linear and compressed.
>>>>>
>>>>> This has only been tested on SM8550 & SM8650 with HEVC, and was
>>>>> inspired by Venus, DRM MSM and the downstream vidc driver for the
>>>>> buffer calculations and HFI messages.
>>>>>
>>>>> I was unable to get 10bit decoding working with ffmpeg since P010
>>>>> support for v4l2 decoding is missing, 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
>>>>>
>>>>> Fluster HEVC results on SM8650:
>>>>>
>>>>> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 
>>>>> - 131/147
>>>>> The failing test case:
>>>>> - Pixel Format mismatch
>>>>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but 
>>>>> decoder returns P010
>>>>> - Unsupported resolution
>>>>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>>>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>>>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>>>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>>>>> - CRC mismatch
>>>>>   - RAP_A_docomo_6
>>>>> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as 
>>>>> well
>>>>>   - VPSSPSPPS_A_MainConcept_1
>>>>
>>>>  From earlier SOC reports, 10bit tests which were failing were
>>>> - DBLK_A_MAIN10_VIXS_4
>>>> - INITQP_B_Main10_Sony_1
>>>> - TSUNEQBD_A_MAIN10_Technicolor_2
>>>> - WP_A_MAIN10_Toshiba_3
>>>> - WP_MAIN10_B_Toshiba_3
>>>> - WPP_A_ericsson_MAIN10_2
>>>> - WPP_B_ericsson_MAIN10_2
>>>> - WPP_C_ericsson_MAIN10_2
>>>> - WPP_E_ericsson_MAIN10_2
>>>> - WPP_F_ericsson_MAIN10_2
>>>>
>>>> I was in the opinion that once we enable 10bit, these tests would 
>>>> pass. Though i do not see these in your failing tests, but the count 
>>>> of 131/147 have not improved. Could you check if these tests are 
>>>> passing and count is better than 131 pass ?
>>>
>>> Sorry there's a copy paste error I'll fix on v4, here's the fluster log:
>>>
>>>
>>> |Test|GStreamer-H.265-V4L2|
>>> |-|-|
>>> |TOTAL|141/147|
>>> |TOTAL TIME|8.600s|
>>> |-|-|
>>> ...
>>> |PICSIZE_A_Bossen_1|☠|
>>> |PICSIZE_B_Bossen_1|☠|
>>> ...
>>> |RAP_A_docomo_6|❌|
>>> ...
>>> |TSUNEQBD_A_MAIN10_Technicolor_2|☠|
>>> ...
>>> |WPP_D_ericsson_MAIN10_2|☠|
>>> |WPP_D_ericsson_MAIN_2|☠|
>>> ...
>>> |-|-|
>>> |Test|GStreamer-H.265-V4L2|
>>> |TOTAL|140/147|
>>> |TOTAL TIME|8.600s|
>>>
>>> |-|-|
>>> |Profile|GStreamer-H.265-V4L2|
>>> |MAIN|131/135|
>>> |MAIN_10|9/11|
>>> |MAIN_STILL_PICTURE|1/1|
>>>
>>> So the failing cases:
>>> - Pixel Format mismatch
>>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but 
>>> decoder returns P010
>>
>> Why would gstreamer expect NV12 for MAIN10 usecase ? Is this something 
>> to do with format negotiation ?
> 
>                          # Feature: Test unequal luma and chroma bitdepth
>                          # setting. The luma bitdepth is higher than the 
> chroma
>                          # bitdepth.
>                          # Luma is 10 bit, chroma is 9 bit
> 
> This particular test uses different bit depth for luma and chroma, and 
> the fw upscales all to 10bit
> while the sw decoder seems to downscale to 8bit. And it seems other HW 
> decoder does the same as iris.
> 
> I think the HW decoder is right here, but this use case will probably 
> never occur in real life.

Have not seen such case either, where luma and chrome have different 
bitdepth. We can mark them as not supported by VPU

+ing Nico if he has any comments on this test.

Regards,
Vikash

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Wangao Wang 1 month ago
I did testing on Purwa and found that the decoded raw data only has one 
frame, and there is also an alignment issue. Screenshots are in the 
attachment.
I used the command you provided to generate the HDR H.265 stream, and 
tested with the same v4l2-ctrl command. Is there anything in the testing 
details that I might have missed?

On 2026/5/11 17:20, Neil Armstrong wrote:
> This adds the plumbing to support decoding HEVC, VP9 and AV1
> streams into 10bit pixel formats, linear and compressed.
> 
> This has only been tested on SM8550 & SM8650 with HEVC, and was
> inspired by Venus, DRM MSM and the downstream vidc driver for the
> buffer calculations and HFI messages.
> 
> I was unable to get 10bit decoding working with ffmpeg since P010
> support for v4l2 decoding is missing, 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
> 
> Fluster HEVC results on SM8650:
> 
> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
> The failing test case:
> - Pixel Format mismatch
>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
> - Unsupported resolution
>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
> - CRC mismatch
>   - RAP_A_docomo_6
> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>   - VPSSPSPPS_A_MainConcept_1
> 
> v4l2-compliance results on SM8550 & SM8650:
> 
> $ v4l2-compliance -d /dev/video1 -s
> v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
> v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25
> 
> Compliance test for iris_driver device /dev/video1:
> 
> Driver Info:
> 	Driver name      : iris_driver
> 	Card type        : Iris Encoder
> 	Bus info         : platform:aa00000.video-codec
> 	Driver version   : 7.0.0
> 	Capabilities     : 0x84204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 		Device Capabilities
> 	Device Caps      : 0x04204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 	Detected Stateful Encoder
> 
> Required ioctls:
> 	test VIDIOC_QUERYCAP: OK
> 	test invalid ioctls: OK
> 
> Allow for multiple opens:
> 	test second /dev/video1 open: OK
> 	test VIDIOC_QUERYCAP: OK
> 	test VIDIOC_G/S_PRIORITY: OK
> 	test for unlimited opens: OK
> 
> Debug ioctls:
> 	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
> 	test VIDIOC_LOG_STATUS: OK (Not Supported)
> 
> Input ioctls:
> 	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
> 	test VIDIOC_ENUMAUDIO: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDIO: OK (Not Supported)
> 	Inputs: 0 Audio Inputs: 0 Tuners: 0
> 
> Output ioctls:
> 	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
> 	Outputs: 0 Audio Outputs: 0 Modulators: 0
> 
> Input/Output configuration ioctls:
> 	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
> 	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
> 	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
> 	test VIDIOC_G/S_EDID: OK (Not Supported)
> 
> Control ioctls:
> 	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
> 	test VIDIOC_QUERYCTRL: OK
> 	test VIDIOC_G/S_CTRL: OK
> 	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
> 	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
> 	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
> 	Standard Controls: 43 Private Controls: 0
> 
> Format ioctls:
> 	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
> 	test VIDIOC_G/S_PARM: OK
> 	test VIDIOC_G_FBUF: OK (Not Supported)
> 	test VIDIOC_G_FMT: OK
> 	test VIDIOC_TRY_FMT: OK
> 	test VIDIOC_S_FMT: OK
> 	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
> 	test Cropping: OK
> 	test Composing: OK (Not Supported)
> 	test Scaling: OK (Not Supported)
> 
> Codec ioctls:
> 	test VIDIOC_(TRY_)ENCODER_CMD: OK
> 	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
> 	test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
> 
> Buffer ioctls:
> 	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
> 	test CREATE_BUFS maximum buffers: OK
> 	test VIDIOC_REMOVE_BUFS: OK
> 	test VIDIOC_EXPBUF: OK
> 	test Requests: OK (Not Supported)
> 	test blocking wait: OK
> 
> Test input 0:
> 
> Streaming ioctls:
> 	test read/write: OK (Not Supported)
> 	Video Capture Multiplanar: Captured 61 buffers
> 	test MMAP (select, REQBUFS): OK
> 	Video Capture Multiplanar: Captured 61 buffers
> 	test MMAP (epoll, REQBUFS): OK
> 	Video Capture Multiplanar: Captured 61 buffers
> 	test MMAP (select, CREATE_BUFS): OK
> 	Video Capture Multiplanar: Captured 61 buffers
> 	test MMAP (epoll, CREATE_BUFS): OK
> 	test USERPTR (select): OK (Not Supported)
> 	test DMABUF: Cannot test, specify --expbuf-device
> 
> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0
> 
> $ v4l2-compliance -d /dev/video0 -s5 --stream-from=test_video_10s.h264
> v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
> v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25
> 
> Compliance test for iris_driver device /dev/video0:
> 
> Driver Info:
> 	Driver name      : iris_driver
> 	Card type        : Iris Decoder
> 	Bus info         : platform:aa00000.video-codec
> 	Driver version   : 7.0.0
> 	Capabilities     : 0x84204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 		Device Capabilities
> 	Device Caps      : 0x04204000
> 		Video Memory-to-Memory Multiplanar
> 		Streaming
> 		Extended Pix Format
> 	Detected Stateful Decoder
> 
> Required ioctls:
> 	test VIDIOC_QUERYCAP: OK
> 	test invalid ioctls: OK
> 
> Allow for multiple opens:
> 	test second /dev/video0 open: OK
> 	test VIDIOC_QUERYCAP: OK
> 	test VIDIOC_G/S_PRIORITY: OK
> 	test for unlimited opens: OK
> 
> Debug ioctls:
> 	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
> 	test VIDIOC_LOG_STATUS: OK (Not Supported)
> 
> Input ioctls:
> 	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
> 	test VIDIOC_ENUMAUDIO: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDIO: OK (Not Supported)
> 	Inputs: 0 Audio Inputs: 0 Tuners: 0
> 
> Output ioctls:
> 	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
> 	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> 	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
> 	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
> 	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
> 	Outputs: 0 Audio Outputs: 0 Modulators: 0
> 
> Input/Output configuration ioctls:
> 	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
> 	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
> 	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
> 	test VIDIOC_G/S_EDID: OK (Not Supported)
> 
> Control ioctls:
> 	test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
> 	test VIDIOC_QUERYCTRL: OK
> 	test VIDIOC_G/S_CTRL: OK
> 	test VIDIOC_G/S/TRY_EXT_CTRLS: OK
> 	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
> 	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
> 	Standard Controls: 12 Private Controls: 0
> 
> Format ioctls:
> 	test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
> 	test VIDIOC_G/S_PARM: OK (Not Supported)
> 	test VIDIOC_G_FBUF: OK (Not Supported)
> 	test VIDIOC_G_FMT: OK
> 	test VIDIOC_TRY_FMT: OK
> 	test VIDIOC_S_FMT: OK
> 	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
> 	test Cropping: OK
> 	test Composing: OK
> 	test Scaling: OK (Not Supported)
> 
> Codec ioctls:
> 	test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
> 	test VIDIOC_G_ENC_INDEX: OK (Not Supported)
> 	test VIDIOC_(TRY_)DECODER_CMD: OK
> 
> Buffer ioctls:
> 	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
> 	test CREATE_BUFS maximum buffers: OK
> 	test VIDIOC_REMOVE_BUFS: OK
> 	test VIDIOC_EXPBUF: OK
> 	test Requests: OK (Not Supported)
> 	test blocking wait: OK
> 
> Test input 0:
> 
> Streaming ioctls:
> 	test read/write: OK (Not Supported)
> the input file is smaller than 7077888 bytes
> 	Video Capture Multiplanar: Captured 601 buffers
> 	test MMAP (select, REQBUFS): OK
> the input file is smaller than 7077888 bytes
> 	Video Capture Multiplanar: Captured 601 buffers
> 	test MMAP (epoll, REQBUFS): OK
> the input file is smaller than 7077888 bytes
> 	Video Capture Multiplanar: Captured 601 buffers
> 	test MMAP (select, CREATE_BUFS): OK
> the input file is smaller than 7077888 bytes
> 	Video Capture Multiplanar: Captured 601 buffers
> 	test MMAP (epoll, CREATE_BUFS): OK
> 	test USERPTR (select): OK (Not Supported)
> 	test DMABUF: Cannot test, specify --expbuf-device
> 
> Total for iris_driver device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0
> 
> [1] https://github.com/superna9999/pyv4l2compliance
> 
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> Changes in v3:
> - Added review tag on patch 1
> - Limited stride command to AV1 decoding only
> - Link to v2: https://patch.msgid.link/20260417-topic-sm8x50-iris-10bit-decoding-v2-0-c987b65a31d5@linaro.org
> 
> Changes in v2:
> - Fixed bug breaking 8bit decoding
> - Dropped filtering on G_FMT while waiting for soure change
> - Dropped format filtering on ENUMFMT
> - Switched ALIGN(x, 192) to roundup(x, 192) because ALIGN works only with Power Of Two numbers
> - Cleaned and refactors the width/height/stride calculations
> - Cleaned and redesigned the buffer calculations functions with proper comments and var names
> - Passed fluster and v4l2-compliance to check for non regression
> - Tested on SM8550
> - Added missing V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 with made gstreamer fail decoding
> - Link to v1: https://patch.msgid.link/20260408-topic-sm8x50-iris-10bit-decoding-v1-0-428c1ec2e3f3@linaro.org
> 
> ---
> Neil Armstrong (6):
>        media: qcom: iris: add helpers for 8bit and 10bit formats
>        media: qcom: iris: add QC10C & P010 buffer size calculations
>        media: qcom: iris: gen2: add support for 10bit decoding
>        media: qcom: iris: vdec: update size and stride calculations for 10bit formats
>        media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
>        media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
> 
>   drivers/media/platform/qcom/iris/iris_buffer.c     | 195 ++++++++++++++++++++-
>   .../platform/qcom/iris/iris_hfi_gen2_command.c     |  75 +++++++-
>   .../platform/qcom/iris/iris_hfi_gen2_defines.h     |   1 +
>   .../platform/qcom/iris/iris_hfi_gen2_response.c    |  37 +++-
>   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  |   8 +-
>   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       |  42 ++++-
>   10 files changed, 364 insertions(+), 15 deletions(-)
> ---
> base-commit: 76671814f2843482d97feca12e95c06f0b05bc8a
> change-id: 20260408-topic-sm8x50-iris-10bit-decoding-074c3ac7975c
> 
> Best regards,
> --
> Neil Armstrong <neil.armstrong@linaro.org>
> 
> 

-- 
Best Regards,
Wangao
Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Neil Armstrong 1 month ago
Hi,

On 5/13/26 10:50, Wangao Wang wrote:
> I did testing on Purwa and found that the decoded raw data only has one frame, and there is also an alignment issue. Screenshots are in the attachment.
> I used the command you provided to generate the HDR H.265 stream, and tested with the same v4l2-ctrl command. Is there anything in the testing details that I might have missed?

Thanks for testing.

The screenshot you sent would imply the UV plane offset has an aligment
and is not directly after the Y plane as expected.

Let me check on my side, because I was able to successfully import
and display via GL, Vulkan and DRM on SM8550 and SM8650.

Neil

> 
> On 2026/5/11 17:20, Neil Armstrong wrote:
>> This adds the plumbing to support decoding HEVC, VP9 and AV1
>> streams into 10bit pixel formats, linear and compressed.
>>
>> This has only been tested on SM8550 & SM8650 with HEVC, and was
>> inspired by Venus, DRM MSM and the downstream vidc driver for the
>> buffer calculations and HFI messages.
>>
>> I was unable to get 10bit decoding working with ffmpeg since P010
>> support for v4l2 decoding is missing, 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
>>
>> Fluster HEVC results on SM8650:
>>
>> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
>> The failing test case:
>> - Pixel Format mismatch
>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
>> - Unsupported resolution
>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>> - CRC mismatch
>>   - RAP_A_docomo_6
>> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>>   - VPSSPSPPS_A_MainConcept_1
>>
>> v4l2-compliance results on SM8550 & SM8650:
>>
>> $ v4l2-compliance -d /dev/video1 -s
>> v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
>> v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25
>>
>> Compliance test for iris_driver device /dev/video1:
>>
>> Driver Info:
>>     Driver name      : iris_driver
>>     Card type        : Iris Encoder
>>     Bus info         : platform:aa00000.video-codec
>>     Driver version   : 7.0.0
>>     Capabilities     : 0x84204000
>>         Video Memory-to-Memory Multiplanar
>>         Streaming
>>         Extended Pix Format
>>         Device Capabilities
>>     Device Caps      : 0x04204000
>>         Video Memory-to-Memory Multiplanar
>>         Streaming
>>         Extended Pix Format
>>     Detected Stateful Encoder
>>
>> Required ioctls:
>>     test VIDIOC_QUERYCAP: OK
>>     test invalid ioctls: OK
>>
>> Allow for multiple opens:
>>     test second /dev/video1 open: OK
>>     test VIDIOC_QUERYCAP: OK
>>     test VIDIOC_G/S_PRIORITY: OK
>>     test for unlimited opens: OK
>>
>> Debug ioctls:
>>     test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
>>     test VIDIOC_LOG_STATUS: OK (Not Supported)
>>
>> Input ioctls:
>>     test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>     test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>>     test VIDIOC_ENUMAUDIO: OK (Not Supported)
>>     test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
>>     test VIDIOC_G/S_AUDIO: OK (Not Supported)
>>     Inputs: 0 Audio Inputs: 0 Tuners: 0
>>
>> Output ioctls:
>>     test VIDIOC_G/S_MODULATOR: OK (Not Supported)
>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>     test VIDIOC_ENUMAUDOUT: OK (Not Supported)
>>     test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
>>     test VIDIOC_G/S_AUDOUT: OK (Not Supported)
>>     Outputs: 0 Audio Outputs: 0 Modulators: 0
>>
>> Input/Output configuration ioctls:
>>     test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
>>     test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
>>     test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
>>     test VIDIOC_G/S_EDID: OK (Not Supported)
>>
>> Control ioctls:
>>     test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
>>     test VIDIOC_QUERYCTRL: OK
>>     test VIDIOC_G/S_CTRL: OK
>>     test VIDIOC_G/S/TRY_EXT_CTRLS: OK
>>     test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
>>     test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>>     Standard Controls: 43 Private Controls: 0
>>
>> Format ioctls:
>>     test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
>>     test VIDIOC_G/S_PARM: OK
>>     test VIDIOC_G_FBUF: OK (Not Supported)
>>     test VIDIOC_G_FMT: OK
>>     test VIDIOC_TRY_FMT: OK
>>     test VIDIOC_S_FMT: OK
>>     test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
>>     test Cropping: OK
>>     test Composing: OK (Not Supported)
>>     test Scaling: OK (Not Supported)
>>
>> Codec ioctls:
>>     test VIDIOC_(TRY_)ENCODER_CMD: OK
>>     test VIDIOC_G_ENC_INDEX: OK (Not Supported)
>>     test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
>>
>> Buffer ioctls:
>>     test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
>>     test CREATE_BUFS maximum buffers: OK
>>     test VIDIOC_REMOVE_BUFS: OK
>>     test VIDIOC_EXPBUF: OK
>>     test Requests: OK (Not Supported)
>>     test blocking wait: OK
>>
>> Test input 0:
>>
>> Streaming ioctls:
>>     test read/write: OK (Not Supported)
>>     Video Capture Multiplanar: Captured 61 buffers
>>     test MMAP (select, REQBUFS): OK
>>     Video Capture Multiplanar: Captured 61 buffers
>>     test MMAP (epoll, REQBUFS): OK
>>     Video Capture Multiplanar: Captured 61 buffers
>>     test MMAP (select, CREATE_BUFS): OK
>>     Video Capture Multiplanar: Captured 61 buffers
>>     test MMAP (epoll, CREATE_BUFS): OK
>>     test USERPTR (select): OK (Not Supported)
>>     test DMABUF: Cannot test, specify --expbuf-device
>>
>> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0
>>
>> $ v4l2-compliance -d /dev/video0 -s5 --stream-from=test_video_10s.h264
>> v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
>> v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25
>>
>> Compliance test for iris_driver device /dev/video0:
>>
>> Driver Info:
>>     Driver name      : iris_driver
>>     Card type        : Iris Decoder
>>     Bus info         : platform:aa00000.video-codec
>>     Driver version   : 7.0.0
>>     Capabilities     : 0x84204000
>>         Video Memory-to-Memory Multiplanar
>>         Streaming
>>         Extended Pix Format
>>         Device Capabilities
>>     Device Caps      : 0x04204000
>>         Video Memory-to-Memory Multiplanar
>>         Streaming
>>         Extended Pix Format
>>     Detected Stateful Decoder
>>
>> Required ioctls:
>>     test VIDIOC_QUERYCAP: OK
>>     test invalid ioctls: OK
>>
>> Allow for multiple opens:
>>     test second /dev/video0 open: OK
>>     test VIDIOC_QUERYCAP: OK
>>     test VIDIOC_G/S_PRIORITY: OK
>>     test for unlimited opens: OK
>>
>> Debug ioctls:
>>     test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
>>     test VIDIOC_LOG_STATUS: OK (Not Supported)
>>
>> Input ioctls:
>>     test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>     test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>>     test VIDIOC_ENUMAUDIO: OK (Not Supported)
>>     test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
>>     test VIDIOC_G/S_AUDIO: OK (Not Supported)
>>     Inputs: 0 Audio Inputs: 0 Tuners: 0
>>
>> Output ioctls:
>>     test VIDIOC_G/S_MODULATOR: OK (Not Supported)
>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>     test VIDIOC_ENUMAUDOUT: OK (Not Supported)
>>     test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
>>     test VIDIOC_G/S_AUDOUT: OK (Not Supported)
>>     Outputs: 0 Audio Outputs: 0 Modulators: 0
>>
>> Input/Output configuration ioctls:
>>     test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
>>     test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
>>     test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
>>     test VIDIOC_G/S_EDID: OK (Not Supported)
>>
>> Control ioctls:
>>     test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
>>     test VIDIOC_QUERYCTRL: OK
>>     test VIDIOC_G/S_CTRL: OK
>>     test VIDIOC_G/S/TRY_EXT_CTRLS: OK
>>     test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
>>     test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>>     Standard Controls: 12 Private Controls: 0
>>
>> Format ioctls:
>>     test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
>>     test VIDIOC_G/S_PARM: OK (Not Supported)
>>     test VIDIOC_G_FBUF: OK (Not Supported)
>>     test VIDIOC_G_FMT: OK
>>     test VIDIOC_TRY_FMT: OK
>>     test VIDIOC_S_FMT: OK
>>     test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
>>     test Cropping: OK
>>     test Composing: OK
>>     test Scaling: OK (Not Supported)
>>
>> Codec ioctls:
>>     test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
>>     test VIDIOC_G_ENC_INDEX: OK (Not Supported)
>>     test VIDIOC_(TRY_)DECODER_CMD: OK
>>
>> Buffer ioctls:
>>     test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
>>     test CREATE_BUFS maximum buffers: OK
>>     test VIDIOC_REMOVE_BUFS: OK
>>     test VIDIOC_EXPBUF: OK
>>     test Requests: OK (Not Supported)
>>     test blocking wait: OK
>>
>> Test input 0:
>>
>> Streaming ioctls:
>>     test read/write: OK (Not Supported)
>> the input file is smaller than 7077888 bytes
>>     Video Capture Multiplanar: Captured 601 buffers
>>     test MMAP (select, REQBUFS): OK
>> the input file is smaller than 7077888 bytes
>>     Video Capture Multiplanar: Captured 601 buffers
>>     test MMAP (epoll, REQBUFS): OK
>> the input file is smaller than 7077888 bytes
>>     Video Capture Multiplanar: Captured 601 buffers
>>     test MMAP (select, CREATE_BUFS): OK
>> the input file is smaller than 7077888 bytes
>>     Video Capture Multiplanar: Captured 601 buffers
>>     test MMAP (epoll, CREATE_BUFS): OK
>>     test USERPTR (select): OK (Not Supported)
>>     test DMABUF: Cannot test, specify --expbuf-device
>>
>> Total for iris_driver device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0
>>
>> [1] https://github.com/superna9999/pyv4l2compliance
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> Changes in v3:
>> - Added review tag on patch 1
>> - Limited stride command to AV1 decoding only
>> - Link to v2: https://patch.msgid.link/20260417-topic-sm8x50-iris-10bit-decoding-v2-0-c987b65a31d5@linaro.org
>>
>> Changes in v2:
>> - Fixed bug breaking 8bit decoding
>> - Dropped filtering on G_FMT while waiting for soure change
>> - Dropped format filtering on ENUMFMT
>> - Switched ALIGN(x, 192) to roundup(x, 192) because ALIGN works only with Power Of Two numbers
>> - Cleaned and refactors the width/height/stride calculations
>> - Cleaned and redesigned the buffer calculations functions with proper comments and var names
>> - Passed fluster and v4l2-compliance to check for non regression
>> - Tested on SM8550
>> - Added missing V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 with made gstreamer fail decoding
>> - Link to v1: https://patch.msgid.link/20260408-topic-sm8x50-iris-10bit-decoding-v1-0-428c1ec2e3f3@linaro.org
>>
>> ---
>> Neil Armstrong (6):
>>        media: qcom: iris: add helpers for 8bit and 10bit formats
>>        media: qcom: iris: add QC10C & P010 buffer size calculations
>>        media: qcom: iris: gen2: add support for 10bit decoding
>>        media: qcom: iris: vdec: update size and stride calculations for 10bit formats
>>        media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
>>        media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
>>
>>   drivers/media/platform/qcom/iris/iris_buffer.c     | 195 ++++++++++++++++++++-
>>   .../platform/qcom/iris/iris_hfi_gen2_command.c     |  75 +++++++-
>>   .../platform/qcom/iris/iris_hfi_gen2_defines.h     |   1 +
>>   .../platform/qcom/iris/iris_hfi_gen2_response.c    |  37 +++-
>>   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  |   8 +-
>>   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       |  42 ++++-
>>   10 files changed, 364 insertions(+), 15 deletions(-)
>> ---
>> base-commit: 76671814f2843482d97feca12e95c06f0b05bc8a
>> change-id: 20260408-topic-sm8x50-iris-10bit-decoding-074c3ac7975c
>>
>> Best regards,
>> -- 
>> Neil Armstrong <neil.armstrong@linaro.org>
>>
>>
> 

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Neil Armstrong 1 month ago
On 5/13/26 14:11, Neil Armstrong wrote:
> Hi,
> 
> On 5/13/26 10:50, Wangao Wang wrote:
>> I did testing on Purwa and found that the decoded raw data only has one frame, and there is also an alignment issue. Screenshots are in the attachment.
>> I used the command you provided to generate the HDR H.265 stream, and tested with the same v4l2-ctrl command. Is there anything in the testing details that I might have missed?
> 
> Thanks for testing.
> 
> The screenshot you sent would imply the UV plane offset has an aligment
> and is not directly after the Y plane as expected.
> 
> Let me check on my side, because I was able to successfully import
> and display via GL, Vulkan and DRM on SM8550 and SM8650.

v4l2-ctl doesn't properly handle the events, could you try dumping with gstreamer instead ?

gst-launch-1.0 -v -m filesrc location=Big_Buck_Bunny_1080_10s_30MB_main10.h265 ! h265parse !  v4l2h265dec ! filesink location=out.yuv

The dump I have is good, the UV plane is right after the Y plane.

and also try to pass fluster:
fluster download -c h.265
fluster run -d GStreamer-H.265-V4L2 -ts JCT-VC-HEVC_V1 -q -s -j1

You should have 9/11 main10 streams passing.

Neil

> 
> Neil
> 
>>
>> On 2026/5/11 17:20, Neil Armstrong wrote:
>>> This adds the plumbing to support decoding HEVC, VP9 and AV1
>>> streams into 10bit pixel formats, linear and compressed.
>>>
>>> This has only been tested on SM8550 & SM8650 with HEVC, and was
>>> inspired by Venus, DRM MSM and the downstream vidc driver for the
>>> buffer calculations and HFI messages.
>>>
>>> I was unable to get 10bit decoding working with ffmpeg since P010
>>> support for v4l2 decoding is missing, 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
>>>
>>> Fluster HEVC results on SM8650:
>>>
>>> ./fluster.py run -ts JCT-VC-HEVC_V1 -d GStreamer-H.265-V4L2-Gst1.0 - 131/147
>>> The failing test case:
>>> - Pixel Format mismatch
>>>   - TSUNEQBD_A_MAIN10_Technicolor_2 - Gstreamer waits NV12 but decoder returns P010
>>> - Unsupported resolution
>>>   - PICSIZE_A_Bossen_1 - resolution is higher than max supported
>>>   - PICSIZE_B_Bossen_1 - resolution is higher than max supported
>>>   - WPP_D_ericsson_MAIN_2 - resolution is lower than min supported
>>>   - WPP_D_ericsson_MAIN10_2 - resolution is lower than min supported
>>> - CRC mismatch
>>>   - RAP_A_docomo_6
>>> - CRC mismatch - bitstream issue - fails with ffmpeg sw decoder as well
>>>   - VPSSPSPPS_A_MainConcept_1
>>>
>>> v4l2-compliance results on SM8550 & SM8650:
>>>
>>> $ v4l2-compliance -d /dev/video1 -s
>>> v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
>>> v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25
>>>
>>> Compliance test for iris_driver device /dev/video1:
>>>
>>> Driver Info:
>>>     Driver name      : iris_driver
>>>     Card type        : Iris Encoder
>>>     Bus info         : platform:aa00000.video-codec
>>>     Driver version   : 7.0.0
>>>     Capabilities     : 0x84204000
>>>         Video Memory-to-Memory Multiplanar
>>>         Streaming
>>>         Extended Pix Format
>>>         Device Capabilities
>>>     Device Caps      : 0x04204000
>>>         Video Memory-to-Memory Multiplanar
>>>         Streaming
>>>         Extended Pix Format
>>>     Detected Stateful Encoder
>>>
>>> Required ioctls:
>>>     test VIDIOC_QUERYCAP: OK
>>>     test invalid ioctls: OK
>>>
>>> Allow for multiple opens:
>>>     test second /dev/video1 open: OK
>>>     test VIDIOC_QUERYCAP: OK
>>>     test VIDIOC_G/S_PRIORITY: OK
>>>     test for unlimited opens: OK
>>>
>>> Debug ioctls:
>>>     test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
>>>     test VIDIOC_LOG_STATUS: OK (Not Supported)
>>>
>>> Input ioctls:
>>>     test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>>     test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>>>     test VIDIOC_ENUMAUDIO: OK (Not Supported)
>>>     test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
>>>     test VIDIOC_G/S_AUDIO: OK (Not Supported)
>>>     Inputs: 0 Audio Inputs: 0 Tuners: 0
>>>
>>> Output ioctls:
>>>     test VIDIOC_G/S_MODULATOR: OK (Not Supported)
>>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>>     test VIDIOC_ENUMAUDOUT: OK (Not Supported)
>>>     test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
>>>     test VIDIOC_G/S_AUDOUT: OK (Not Supported)
>>>     Outputs: 0 Audio Outputs: 0 Modulators: 0
>>>
>>> Input/Output configuration ioctls:
>>>     test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
>>>     test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
>>>     test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
>>>     test VIDIOC_G/S_EDID: OK (Not Supported)
>>>
>>> Control ioctls:
>>>     test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
>>>     test VIDIOC_QUERYCTRL: OK
>>>     test VIDIOC_G/S_CTRL: OK
>>>     test VIDIOC_G/S/TRY_EXT_CTRLS: OK
>>>     test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
>>>     test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>>>     Standard Controls: 43 Private Controls: 0
>>>
>>> Format ioctls:
>>>     test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
>>>     test VIDIOC_G/S_PARM: OK
>>>     test VIDIOC_G_FBUF: OK (Not Supported)
>>>     test VIDIOC_G_FMT: OK
>>>     test VIDIOC_TRY_FMT: OK
>>>     test VIDIOC_S_FMT: OK
>>>     test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
>>>     test Cropping: OK
>>>     test Composing: OK (Not Supported)
>>>     test Scaling: OK (Not Supported)
>>>
>>> Codec ioctls:
>>>     test VIDIOC_(TRY_)ENCODER_CMD: OK
>>>     test VIDIOC_G_ENC_INDEX: OK (Not Supported)
>>>     test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
>>>
>>> Buffer ioctls:
>>>     test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
>>>     test CREATE_BUFS maximum buffers: OK
>>>     test VIDIOC_REMOVE_BUFS: OK
>>>     test VIDIOC_EXPBUF: OK
>>>     test Requests: OK (Not Supported)
>>>     test blocking wait: OK
>>>
>>> Test input 0:
>>>
>>> Streaming ioctls:
>>>     test read/write: OK (Not Supported)
>>>     Video Capture Multiplanar: Captured 61 buffers
>>>     test MMAP (select, REQBUFS): OK
>>>     Video Capture Multiplanar: Captured 61 buffers
>>>     test MMAP (epoll, REQBUFS): OK
>>>     Video Capture Multiplanar: Captured 61 buffers
>>>     test MMAP (select, CREATE_BUFS): OK
>>>     Video Capture Multiplanar: Captured 61 buffers
>>>     test MMAP (epoll, CREATE_BUFS): OK
>>>     test USERPTR (select): OK (Not Supported)
>>>     test DMABUF: Cannot test, specify --expbuf-device
>>>
>>> Total for iris_driver device /dev/video1: 54, Succeeded: 54, Failed: 0, Warnings: 0
>>>
>>> $ v4l2-compliance -d /dev/video0 -s5 --stream-from=test_video_10s.h264
>>> v4l2-compliance 1.33.0-5456, 64 bits, 64-bit time_t
>>> v4l2-compliance SHA: 8aa593bda182 2026-04-11 10:54:25
>>>
>>> Compliance test for iris_driver device /dev/video0:
>>>
>>> Driver Info:
>>>     Driver name      : iris_driver
>>>     Card type        : Iris Decoder
>>>     Bus info         : platform:aa00000.video-codec
>>>     Driver version   : 7.0.0
>>>     Capabilities     : 0x84204000
>>>         Video Memory-to-Memory Multiplanar
>>>         Streaming
>>>         Extended Pix Format
>>>         Device Capabilities
>>>     Device Caps      : 0x04204000
>>>         Video Memory-to-Memory Multiplanar
>>>         Streaming
>>>         Extended Pix Format
>>>     Detected Stateful Decoder
>>>
>>> Required ioctls:
>>>     test VIDIOC_QUERYCAP: OK
>>>     test invalid ioctls: OK
>>>
>>> Allow for multiple opens:
>>>     test second /dev/video0 open: OK
>>>     test VIDIOC_QUERYCAP: OK
>>>     test VIDIOC_G/S_PRIORITY: OK
>>>     test for unlimited opens: OK
>>>
>>> Debug ioctls:
>>>     test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
>>>     test VIDIOC_LOG_STATUS: OK (Not Supported)
>>>
>>> Input ioctls:
>>>     test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
>>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>>     test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
>>>     test VIDIOC_ENUMAUDIO: OK (Not Supported)
>>>     test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
>>>     test VIDIOC_G/S_AUDIO: OK (Not Supported)
>>>     Inputs: 0 Audio Inputs: 0 Tuners: 0
>>>
>>> Output ioctls:
>>>     test VIDIOC_G/S_MODULATOR: OK (Not Supported)
>>>     test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
>>>     test VIDIOC_ENUMAUDOUT: OK (Not Supported)
>>>     test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
>>>     test VIDIOC_G/S_AUDOUT: OK (Not Supported)
>>>     Outputs: 0 Audio Outputs: 0 Modulators: 0
>>>
>>> Input/Output configuration ioctls:
>>>     test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
>>>     test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
>>>     test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
>>>     test VIDIOC_G/S_EDID: OK (Not Supported)
>>>
>>> Control ioctls:
>>>     test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
>>>     test VIDIOC_QUERYCTRL: OK
>>>     test VIDIOC_G/S_CTRL: OK
>>>     test VIDIOC_G/S/TRY_EXT_CTRLS: OK
>>>     test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
>>>     test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
>>>     Standard Controls: 12 Private Controls: 0
>>>
>>> Format ioctls:
>>>     test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
>>>     test VIDIOC_G/S_PARM: OK (Not Supported)
>>>     test VIDIOC_G_FBUF: OK (Not Supported)
>>>     test VIDIOC_G_FMT: OK
>>>     test VIDIOC_TRY_FMT: OK
>>>     test VIDIOC_S_FMT: OK
>>>     test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
>>>     test Cropping: OK
>>>     test Composing: OK
>>>     test Scaling: OK (Not Supported)
>>>
>>> Codec ioctls:
>>>     test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
>>>     test VIDIOC_G_ENC_INDEX: OK (Not Supported)
>>>     test VIDIOC_(TRY_)DECODER_CMD: OK
>>>
>>> Buffer ioctls:
>>>     test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
>>>     test CREATE_BUFS maximum buffers: OK
>>>     test VIDIOC_REMOVE_BUFS: OK
>>>     test VIDIOC_EXPBUF: OK
>>>     test Requests: OK (Not Supported)
>>>     test blocking wait: OK
>>>
>>> Test input 0:
>>>
>>> Streaming ioctls:
>>>     test read/write: OK (Not Supported)
>>> the input file is smaller than 7077888 bytes
>>>     Video Capture Multiplanar: Captured 601 buffers
>>>     test MMAP (select, REQBUFS): OK
>>> the input file is smaller than 7077888 bytes
>>>     Video Capture Multiplanar: Captured 601 buffers
>>>     test MMAP (epoll, REQBUFS): OK
>>> the input file is smaller than 7077888 bytes
>>>     Video Capture Multiplanar: Captured 601 buffers
>>>     test MMAP (select, CREATE_BUFS): OK
>>> the input file is smaller than 7077888 bytes
>>>     Video Capture Multiplanar: Captured 601 buffers
>>>     test MMAP (epoll, CREATE_BUFS): OK
>>>     test USERPTR (select): OK (Not Supported)
>>>     test DMABUF: Cannot test, specify --expbuf-device
>>>
>>> Total for iris_driver device /dev/video0: 54, Succeeded: 54, Failed: 0, Warnings: 0
>>>
>>> [1] https://github.com/superna9999/pyv4l2compliance
>>>
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>> Changes in v3:
>>> - Added review tag on patch 1
>>> - Limited stride command to AV1 decoding only
>>> - Link to v2: https://patch.msgid.link/20260417-topic-sm8x50-iris-10bit-decoding-v2-0-c987b65a31d5@linaro.org
>>>
>>> Changes in v2:
>>> - Fixed bug breaking 8bit decoding
>>> - Dropped filtering on G_FMT while waiting for soure change
>>> - Dropped format filtering on ENUMFMT
>>> - Switched ALIGN(x, 192) to roundup(x, 192) because ALIGN works only with Power Of Two numbers
>>> - Cleaned and refactors the width/height/stride calculations
>>> - Cleaned and redesigned the buffer calculations functions with proper comments and var names
>>> - Passed fluster and v4l2-compliance to check for non regression
>>> - Tested on SM8550
>>> - Added missing V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 with made gstreamer fail decoding
>>> - Link to v1: https://patch.msgid.link/20260408-topic-sm8x50-iris-10bit-decoding-v1-0-428c1ec2e3f3@linaro.org
>>>
>>> ---
>>> Neil Armstrong (6):
>>>        media: qcom: iris: add helpers for 8bit and 10bit formats
>>>        media: qcom: iris: add QC10C & P010 buffer size calculations
>>>        media: qcom: iris: gen2: add support for 10bit decoding
>>>        media: qcom: iris: vdec: update size and stride calculations for 10bit formats
>>>        media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
>>>        media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
>>>
>>>   drivers/media/platform/qcom/iris/iris_buffer.c     | 195 ++++++++++++++++++++-
>>>   .../platform/qcom/iris/iris_hfi_gen2_command.c     |  75 +++++++-
>>>   .../platform/qcom/iris/iris_hfi_gen2_defines.h     |   1 +
>>>   .../platform/qcom/iris/iris_hfi_gen2_response.c    |  37 +++-
>>>   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  |   8 +-
>>>   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       |  42 ++++-
>>>   10 files changed, 364 insertions(+), 15 deletions(-)
>>> ---
>>> base-commit: 76671814f2843482d97feca12e95c06f0b05bc8a
>>> change-id: 20260408-topic-sm8x50-iris-10bit-decoding-074c3ac7975c
>>>
>>> Best regards,
>>> -- 
>>> Neil Armstrong <neil.armstrong@linaro.org>
>>>
>>>
>>
> 

Re: [PATCH v3 0/6] media: qcom: iris: add support for decoding 10bit formats
Posted by Dmitry Baryshkov 1 month ago
On Wed, May 13, 2026 at 06:02:19PM +0200, Neil Armstrong wrote:
> On 5/13/26 14:11, Neil Armstrong wrote:
> > Hi,
> > 
> > On 5/13/26 10:50, Wangao Wang wrote:
> > > I did testing on Purwa and found that the decoded raw data only has one frame, and there is also an alignment issue. Screenshots are in the attachment.
> > > I used the command you provided to generate the HDR H.265 stream, and tested with the same v4l2-ctrl command. Is there anything in the testing details that I might have missed?
> > 
> > Thanks for testing.
> > 
> > The screenshot you sent would imply the UV plane offset has an aligment
> > and is not directly after the Y plane as expected.
> > 
> > Let me check on my side, because I was able to successfully import
> > and display via GL, Vulkan and DRM on SM8550 and SM8650.
> 
> v4l2-ctl doesn't properly handle the events, could you try dumping with gstreamer instead ?
> 
> gst-launch-1.0 -v -m filesrc location=Big_Buck_Bunny_1080_10s_30MB_main10.h265 ! h265parse !  v4l2h265dec ! filesink location=out.yuv
> 
> The dump I have is good, the UV plane is right after the Y plane.
> 
> and also try to pass fluster:
> fluster download -c h.265
> fluster run -d GStreamer-H.265-V4L2 -ts JCT-VC-HEVC_V1 -q -s -j1
> 
> You should have 9/11 main10 streams passing.

Or it might be an error (or miscommunication) specific to Purwa.


-- 
With best wishes
Dmitry