From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com,
laurent.pinchart@ideasonboard.com, m.szyprowski@samsung.com,
jonghun.han@samsung.com, riverful.kim@samsung.com,
sw0312.kim@samsung.com, Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH v2 1/2] v4l: Add new alpha component control
Date: Mon, 28 Nov 2011 13:13:32 +0100 [thread overview]
Message-ID: <4ED37AEC.80105@samsung.com> (raw)
In-Reply-To: <201111281238.42045.hverkuil@xs4all.nl>
On 11/28/2011 12:38 PM, Hans Verkuil wrote:
> On Friday 25 November 2011 16:39:31 Sylwester Nawrocki wrote:
>> This control is intended for the video capture or memory-to-memory devices
>> that are capable of setting up a per-pixel alpha component to some
>> arbitrary value. The V4L2_CID_ALPHA_COMPONENT control allows to set the
>> alpha component for all pixels to a value in range from 0 to 255.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> ---
>> Documentation/DocBook/media/v4l/compat.xml | 11 ++++++++
>> Documentation/DocBook/media/v4l/controls.xml | 25
>> +++++++++++++++---- .../DocBook/media/v4l/pixfmt-packed-rgb.xml |
>> 7 ++++-
>> drivers/media/video/v4l2-ctrls.c | 7 +++++
>> include/linux/videodev2.h | 6 ++--
>> 5 files changed, 45 insertions(+), 11 deletions(-)
>>
...
>> /* MPEG controls */
>> /* Keep the order of the 'case's the same as in videodev2.h! */
>> @@ -714,6 +715,12 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum
>> v4l2_ctrl_type *type, /* Max is calculated as RGB888 that is 2^24 */
>> *max = 0xFFFFFF;
>> break;
>> + case V4L2_CID_ALPHA_COMPONENT:
>> + *type = V4L2_CTRL_TYPE_INTEGER;
>> + *step = 1;
>> + *min = 0;
>> + *max = 0xff;
>> + break;
>
> Hmm. Do we really want to fix the max value to 0xff? The bits assigned to the
> alpha component will vary between 1 (V4L2_PIX_FMT_RGB555X), 4
> (V4L2_PIX_FMT_RGB444) or 8 (V4L2_PIX_FMT_RGB32). It wouldn't surprise me to
> see larger sizes as well in the future (e.g. 16 bits).
>
> I think the max value should be the largest alpha value the hardware can
> support. The application has to set it to the right value that corresponds
> to the currently chosen pixel format. The driver just copies the first N bits
> into the alpha value where N depends on the pixel format.
>
> what do you think?
Yes, ideally the maximum value of the alpha control should be changing depending
on the set colour format.
Currently the maximum value of the control equals maximum alpha value for the fourcc
of maximum colour depth (V4L2_PIX_FMT_RGB32).
What I found missing was a method for changing the control range dynamically, without
deleting and re-initializing the control handler.
If we reinitalize whole control handler the previously set control values are lost.
And, AFAIU, single control cannot be currently removed and re-added to the control
handler.
--
Regards,
Sylwester
next prev parent reply other threads:[~2011-11-28 12:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 15:39 [PATCH/RFC v2] Add new V4L2_CID_ALPHA_COMPONENT control Sylwester Nawrocki
2011-11-25 15:39 ` [PATCH v2 1/2] v4l: Add new alpha component control Sylwester Nawrocki
2011-11-28 11:09 ` Laurent Pinchart
2011-11-28 11:38 ` Hans Verkuil
2011-11-28 12:13 ` Sylwester Nawrocki [this message]
2011-11-28 12:39 ` Hans Verkuil
2011-11-28 13:02 ` Sylwester Nawrocki
2011-11-29 11:08 ` Hans Verkuil
2011-11-29 16:40 ` Sylwester Nawrocki
2011-11-29 18:10 ` Laurent Pinchart
2011-11-29 18:30 ` Hans Verkuil
2011-11-29 18:58 ` Laurent Pinchart
2011-12-08 9:30 ` Sylwester Nawrocki
2011-12-08 10:30 ` Laurent Pinchart
2011-12-08 12:30 ` Sylwester Nawrocki
2011-12-13 12:18 ` Hans Verkuil
2011-12-14 13:34 ` Sylwester Nawrocki
2011-12-14 14:42 ` [PATCH/RFC v4 0/2] Add new V4L2_CID_ALPHA_COMPONENT control Sylwester Nawrocki
2011-12-14 14:42 ` [PATCH v4 1/2] v4l: Add new alpha component control Sylwester Nawrocki
2011-12-14 14:42 ` [PATCH v4 2/2] s5p-fimc: Add support for alpha component configuration Sylwester Nawrocki
2011-12-14 14:53 ` [PATCH v2 1/2] v4l: Add new alpha component control Hans Verkuil
2011-11-29 19:39 ` Sylwester Nawrocki
2011-11-30 1:40 ` Laurent Pinchart
2011-11-25 15:39 ` [PATCH v2 2/2] s5p-fimc: Add support for alpha component configuration Sylwester Nawrocki
2011-11-28 11:42 ` Hans Verkuil
2011-11-28 12:17 ` Sylwester Nawrocki
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=4ED37AEC.80105@samsung.com \
--to=s.nawrocki@samsung.com \
--cc=hverkuil@xs4all.nl \
--cc=jonghun.han@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@redhat.com \
--cc=riverful.kim@samsung.com \
--cc=sw0312.kim@samsung.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.