linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mirela Rabulea <mirela.rabulea@nxp.com>
To: "mchehab@kernel.org" <mchehab@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"Mirela Rabulea (OSS)" <mirela.rabulea@oss.nxp.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"hverkuil-cisco@xs4all.nl" <hverkuil-cisco@xs4all.nl>
Cc: dl-linux-imx <linux-imx@nxp.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"laurent.pinchart+renesas@ideasonboard.com" 
	<laurent.pinchart+renesas@ideasonboard.com>,
	Aisheng Dong <aisheng.dong@nxp.com>,
	Laurentiu Palcu <laurentiu.palcu@nxp.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Robert Chiras <robert.chiras@nxp.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"paul.kocialkowski@bootlin.com" <paul.kocialkowski@bootlin.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"niklas.soderlund+renesas@ragnatech.se" 
	<niklas.soderlund+renesas@ragnatech.se>,
	Daniel Baluta <daniel.baluta@nxp.com>,
	"dafna.hirschfeld@collabora.com" <dafna.hirschfeld@collabora.com>,
	"ezequiel@collabora.com" <ezequiel@collabora.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
Subject: Re: [EXT] Re: [PATCH v4 00/11] Add V4L2 driver for i.MX8 JPEG Encoder/Decoder
Date: Wed, 4 Nov 2020 13:27:54 +0000	[thread overview]
Message-ID: <982d940c4809b843fdc177daf4db349a0e667924.camel@nxp.com> (raw)
In-Reply-To: <ca7a395a-68ea-33a3-1216-0adf225fce7b@xs4all.nl>

Hi Hans,

On Wed, 2020-11-04 at 12:55 +0100, Hans Verkuil wrote:
> 
> So please recompile v4l2-compliance from the git repo and retest. If
> you find new failures, then you probably need to post a v5, otherwise
> it is enough to reply to this with the output of the updated v4l2-
> compliance.
> 
> 

I was unsure if the latest of v4l2-compliance is stable.
This commit (which is not part of stable 1.20), got me a little
confused:

commit e50041186be9f69dd94b64fb924115201726e72a
Author: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Date:   Thu Jul 16 13:41:37 2020 +0200

    v4l2-compliance: fix colorspace checks for JPEG codecs
    
    The colorspace handling for JPEG encoders/decoders is quite
    different from other m2m devices since the colorspace of a
    compressed JPEG file is effectively fixed to sRGB. So the
    typical passthrough of colorspace information from output
    to capture is not valid, instead the colorspace information is
    (mostly) fixed.

And it somehow contradicts(?) with Philipp's latest commits on coda
jpeg driver:

commit 1e3e2a9ac40ad4d11699a49a1bbbf40cd8d4c8bd
Author: Philipp Zabel <p.zabel@pengutronix.de>
Date:   Fri Jun 29 08:46:46 2018 -0400

    media: coda: jpeg: allow non-JPEG colorspace
    
    The hardware codec is not colorspace aware. We should trust
userspace to
    set the correct colorimetry information on the OUTPUT queue and
mirror
    the exact same setting on the CAPTURE queue.
    
    There is no reason to restrict colorspace to JPEG for JPEG images,
if
    userspace injects the correct colorspace information into the JPEG
    headers after encoding.
    
    Fixes: b14ac545688d ("[media] coda: improve colorimetry handling")

I agree on the statement "The hardware codec is not colorspace aware",
by that I mean this colorspace will not translate into any setting sent
to the hardware. The question is, how the driver is expected to bahave?
Once I clarify on this, I'll include a fix in v5.

I'll post below, for reference, the full log on latest from master.

Thanks,
Mirela

root@imx8qxpmek:/unit_tests/JPEG# ./v4l2-compliance-master -d
/dev/video0 -s
v4l2-compliance 1.21.0-4675, 64 bits, 64-bit time_t
v4l2-compliance SHA: b84569db756a 2020-10-23 12:30:38

Compliance test for mxc-jpeg decode device /dev/video0:

Driver Info:
	Driver name      : mxc-jpeg decode
	Card type        : mxc-jpeg decoder
	Bus info         : platform:58400000.jpegdec
	Driver version   : 5.10.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 JPEG Decoder

Required ioctls:
	test VIDIOC_QUERYCAP: 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

	test invalid ioctls: 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 (Not Supported)
	test VIDIOC_QUERYCTRL: OK (Not Supported)
	test VIDIOC_G/S_CTRL: OK (Not Supported)
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 0 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
		fail: v4l2-test-formats.cpp(810):
fmt_raw.g_colorspace() != V4L2_COLORSPACE_SRGB
	test VIDIOC_S_FMT: FAIL
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	test Composing: OK (Not Supported)
	test Scaling: OK

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

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)

Test input 0:

Streaming ioctls:
	test read/write: OK (Not Supported)
	test blocking wait: OK
	Video Capture Multiplanar: Captured 58 buffers    
	test MMAP (no poll): OK
	Video Capture Multiplanar: Captured 58 buffers    
	test MMAP (select): OK
	Video Capture Multiplanar: Captured 58 buffers    
	test MMAP (epoll): OK
	test USERPTR (no poll): OK (Not Supported)
	test USERPTR (select): OK (Not Supported)
	test DMABUF: Cannot test, specify --expbuf-device

Total for mxc-jpeg decode device /dev/video0: 52, Succeeded: 51,
Failed: 1, Warnings: 0


root@imx8qxpmek:/unit_tests/JPEG# ./v4l2-compliance-master -d
/dev/video1 -s
v4l2-compliance 1.21.0-4675, 64 bits, 64-bit time_t
v4l2-compliance SHA: b84569db756a 2020-10-23 12:30:38

Compliance test for mxc-jpeg decode device /dev/video1:

Driver Info:
	Driver name      : mxc-jpeg decode
	Card type        : mxc-jpeg decoder
	Bus info         : platform:58450000.jpegenc
	Driver version   : 5.10.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 JPEG Encoder

Required ioctls:
	test VIDIOC_QUERYCAP: 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

	test invalid ioctls: 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 (Not Supported)
	test VIDIOC_QUERYCTRL: OK (Not Supported)
	test VIDIOC_G/S_CTRL: OK (Not Supported)
	test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
	test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
	test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
	Standard Controls: 0 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
		fail: v4l2-test-formats.cpp(810):
fmt_raw.g_colorspace() != V4L2_COLORSPACE_SRGB
	test VIDIOC_S_FMT: FAIL
	test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
	test Cropping: OK (Not Supported)
	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

Buffer ioctls:
	test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
	test VIDIOC_EXPBUF: OK
	test Requests: OK (Not Supported)

Test input 0:

Streaming ioctls:
	test read/write: OK (Not Supported)
	test blocking wait: OK
	Video Capture Multiplanar: Captured 58 buffers    
	test MMAP (no poll): OK
	Video Capture Multiplanar: Captured 58 buffers    
	test MMAP (select): OK
	Video Capture Multiplanar: Captured 58 buffers    
	test MMAP (epoll): OK
	test USERPTR (no poll): OK (Not Supported)
	test USERPTR (select): OK (Not Supported)
	test DMABUF: Cannot test, specify --expbuf-device

Total for mxc-jpeg decode device /dev/video1: 52, Succeeded: 51,
Failed: 1, Warnings: 0


  reply	other threads:[~2020-11-04 13:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02  3:08 [PATCH v4 00/11] Add V4L2 driver for i.MX8 JPEG Encoder/Decoder Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 01/11] media: v4l: Add packed YUV444 24bpp pixel format Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 02/11] firmware: imx: scu-pd: Add power domains for imx-jpeg Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 03/11] media: dt-bindings: Add bindings for i.MX8QXP/QM JPEG driver Mirela Rabulea (OSS)
2020-11-04 22:38   ` Rob Herring
2020-11-09 21:59     ` [EXT] " Mirela Rabulea
2020-11-02  3:08 ` [PATCH v4 04/11] media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder Mirela Rabulea (OSS)
2020-11-02 16:20   ` Laurentiu Palcu
2020-11-06  1:05     ` Mirela Rabulea
2020-11-04 16:03   ` kernel test robot
2020-11-02  3:08 ` [PATCH v4 05/11] arm64: dts: imx8qxp: Add jpeg encoder/decoder nodes Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 06/11] Add maintainer for IMX jpeg v4l2 driver Mirela Rabulea (OSS)
2020-11-02 16:25   ` Laurentiu Palcu
2020-11-02  3:08 ` [PATCH v4 07/11] media: imx-jpeg: Fix v4l2-compliance streaming tests on decoder Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 08/11] media: Add parsing for APP14 data segment in jpeg helpers Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 09/11] media: Quit parsing stream if doesn't start with SOI Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 10/11] media: Avoid parsing quantization and huffman tables Mirela Rabulea (OSS)
2020-11-02  3:08 ` [PATCH v4 11/11] media: imx-jpeg: Use v4l2 jpeg helpers in mxc-jpeg Mirela Rabulea (OSS)
2020-11-04 11:52 ` [PATCH v4 00/11] Add V4L2 driver for i.MX8 JPEG Encoder/Decoder Hans Verkuil
2020-11-04 11:55   ` Hans Verkuil
2020-11-04 13:27     ` Mirela Rabulea [this message]
2020-11-04 14:08       ` [EXT] " Hans Verkuil
2020-11-06  1:04         ` Mirela Rabulea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=982d940c4809b843fdc177daf4db349a0e667924.camel@nxp.com \
    --to=mirela.rabulea@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel@collabora.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=laurentiu.palcu@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=mirela.rabulea@oss.nxp.com \
    --cc=niklas.soderlund+renesas@ragnatech.se \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=robert.chiras@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).