linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nick Dyer <nick.dyer@itdev.co.uk>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Benson Leung <bleung@chromium.org>,
	Alan Bowens <Alan.Bowens@atmel.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Chris Healy <cphealy@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	Andrew Duggan <aduggan@synaptics.com>,
	James Chen <james.chen@emc.com.tw>, Dudley Du <dudl@cypress.com>,
	Andrew de los Reyes <adlr@chromium.org>,
	sheckylin@chromium.org, Peter Hutterer <peter.hutterer@who-t.net>,
	Florian Echtler <floe@butterbrot.org>,
	mchehab@osg.samsung.com
Subject: Re: [PATCH v2 2/8] [media] Add signed 16-bit pixel format
Date: Fri, 27 May 2016 13:52:13 +0100	[thread overview]
Message-ID: <82b68931-0da1-bd26-87c1-1cd9e2296f71@itdev.co.uk> (raw)
In-Reply-To: <57483FD1.9080704@xs4all.nl>

On 27/05/2016 13:38, Hans Verkuil wrote:
> On 05/04/2016 07:07 PM, Nick Dyer wrote:
>> +    <refname><constant>V4L2_PIX_FMT_YS16</constant></refname>
>> +    <refpurpose>Grey-scale image</refpurpose>
>> +  </refnamediv>
>> +  <refsect1>
>> +    <title>Description</title>
>> +
>> +    <para>This is a signed grey-scale image with a depth of 16 bits per
>> +pixel. The most significant byte is stored at higher memory addresses
>> +(little-endian).</para>
> 
> I'm not sure this should be described in terms of grey-scale, since negative
> values make no sense for that. How are these values supposed to be interpreted
> if you want to display them? -32768 == black and 32767 is white?

We have written a utility to display this data and it is able to display
the values mapped to grayscale or color:
https://github.com/ndyer/heatmap/blob/master/src/display.c#L44

An example of the output is here:
https://www.youtube.com/watch?v=Uj4T6fUCySw

The data is intrinsically signed because that's how the low level touch
controller treats it. I'm happy to change it to "Signed image" if you think
that would be better.

  reply	other threads:[~2016-05-27 12:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 17:07 [PATCH v2 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L Nick Dyer
2016-05-04 17:07 ` [PATCH v2 1/8] Input: atmel_mxt_ts - add support for T37 diagnostic data Nick Dyer
2016-05-04 17:07 ` [PATCH v2 2/8] [media] Add signed 16-bit pixel format Nick Dyer
2016-05-27 12:38   ` Hans Verkuil
2016-05-27 12:52     ` Nick Dyer [this message]
2016-05-27 13:18       ` Hans Verkuil
2016-05-27 13:31         ` Nick Dyer
2016-05-04 17:07 ` [PATCH v2 3/8] [media] v4l2-core: Add VFL_TYPE_TOUCH_SENSOR Nick Dyer
2016-05-04 17:07 ` [PATCH v2 4/8] Input: atmel_mxt_ts - output diagnostic debug via v4l2 device Nick Dyer
2016-05-27 12:54   ` Hans Verkuil
2016-06-01 16:22     ` Nick Dyer
2016-05-04 17:07 ` [PATCH v2 5/8] Input: atmel_mxt_ts - read touchscreen size Nick Dyer
2016-05-04 17:07 ` [PATCH v2 6/8] Input: atmel_mxt_ts - handle diagnostic data orientation Nick Dyer
2016-05-04 17:07 ` [PATCH v2 7/8] Input: atmel_mxt_ts - add diagnostic data support for mXT1386 Nick Dyer
2016-05-04 17:07 ` [PATCH v2 8/8] Input: atmel_mxt_ts - add support for reference data Nick Dyer
2016-05-27 12:56   ` Hans Verkuil
2016-05-13 15:17 ` [PATCH v2 0/8] Input: atmel_mxt_ts - output raw touch diagnostic data via V4L Nick Dyer

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=82b68931-0da1-bd26-87c1-1cd9e2296f71@itdev.co.uk \
    --to=nick.dyer@itdev.co.uk \
    --cc=Alan.Bowens@atmel.com \
    --cc=adlr@chromium.org \
    --cc=aduggan@synaptics.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=bleung@chromium.org \
    --cc=cphealy@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dudl@cypress.com \
    --cc=floe@butterbrot.org \
    --cc=hverkuil@xs4all.nl \
    --cc=james.chen@emc.com.tw \
    --cc=javier@osg.samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=peter.hutterer@who-t.net \
    --cc=rydberg@bitmath.org \
    --cc=sheckylin@chromium.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).