From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "istvan_v@mailbox.hu" <istvan_v@mailbox.hu>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] cx88: implement sharpness control
Date: Fri, 09 Apr 2010 01:33:12 -0300 [thread overview]
Message-ID: <4BBEAE08.5010908@redhat.com> (raw)
In-Reply-To: <4BADFC12.4030707@mailbox.hu>
istvan_v@mailbox.hu wrote:
> This patch adds support for V4L2_CID_SHARPNESS by changing the luma peak
> filter and notch filter. It can be set in the range 0 to 9, with 0 being
> the original and default mode.
> One minor problem is that other code that sets the registers being used
> (for example when switching TV channels) could reset the control to the
> default. This could be avoided by making changes so that the bits used
> to implement this control are not overwritten.
>
> Signed-off-by: Istvan Varga <istvanv@users.sourceforge.net>
>
> + case V4L2_CID_SHARPNESS:
> + /* use 4xFsc or square pixel notch filter */
> + cx_andor(MO_HTOTAL, 0x1800, (ctl->value & 1) << 11);
> + /* 0b000, 0b100, 0b101, 0b110, or 0b111 */
> + value = (ctl->value < 2 ? 0 : (((ctl->value + 6) & 0x0E) << 6));
> + /* needs to be set for both fields */
> + cx_andor(MO_FILTER_EVEN, mask, value);
> + break;
You're not adjusting the sharpness. Instead, you're changing the vertical tap filter,
and just for the even frames, plus the notch filter.
Tricky, and you're probably affecting the sharpness, but on an indirect and non-linear
way, as you're adjusting different measures.
This doesn't seem right, at least on my eyes. If this is really needed, it would
be better to break it into two controls (one for the notch filter and another for the
vertical tap filter).
Also, the "side effect" is not good: if you're using those bits, your code should assure
that no other part of the driver will touch on the used bits, and that the device will
be initialized with the default standard.
--
Cheers,
Mauro
next prev parent reply other threads:[~2010-04-09 4:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-27 12:37 [PATCH] cx88: implement sharpness control istvan_v
2010-04-09 4:33 ` Mauro Carvalho Chehab [this message]
2010-04-09 18:53 ` istvan_v
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=4BBEAE08.5010908@redhat.com \
--to=mchehab@redhat.com \
--cc=istvan_v@mailbox.hu \
--cc=linux-media@vger.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