* [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
@ 2008-03-23 22:43 ` Frej Drejhammar
2008-03-24 0:12 ` Laurent Pinchart
2008-03-23 22:43 ` [PATCH 2 of 6] cx88: Add user " Frej Drejhammar
` (5 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-23 22:43 UTC (permalink / raw)
To: video4linux-list; +Cc: Trent Piepho
1 file changed, 3 insertions(+), 1 deletion(-)
linux/include/linux/videodev2.h | 4 +++-
# HG changeset patch
# User "Frej Drejhammar <frej.drejhammar@gmail.com>"
# Date 1206311496 -3600
# Node ID d758888cf4a466cd2d44a54a0a9e9467d72267fa
# Parent 9a2af878cbd551d1bfac6b19d085a1a83d675a66
v4l2-api: Define a standard control for chroma AGC
From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Define a pre-defined control ID for chroma automatic gain control.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
diff -r 9a2af878cbd5 -r d758888cf4a4 linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h Sat Mar 22 08:37:19 2008 -0300
+++ b/linux/include/linux/videodev2.h Sun Mar 23 23:31:36 2008 +0100
@@ -879,7 +879,9 @@ enum v4l2_power_line_frequency {
#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
-#define V4L2_CID_LASTP1 (V4L2_CID_BASE+29) /* last CID + 1 */
+#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
+/* last CID + 1 */
+#define V4L2_CID_LASTP1 (V4L2_CID_BASE+30)
/* MPEG-class control IDs defined by V4L2 */
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC
2008-03-23 22:43 ` [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC Frej Drejhammar
@ 2008-03-24 0:12 ` Laurent Pinchart
2008-03-24 11:56 ` Frej Drejhammar
0 siblings, 1 reply; 16+ messages in thread
From: Laurent Pinchart @ 2008-03-24 0:12 UTC (permalink / raw)
To: video4linux-list; +Cc: Frej Drejhammar, Trent Piepho
On Sunday 23 March 2008, Frej Drejhammar wrote:
> 1 file changed, 3 insertions(+), 1 deletion(-)
> linux/include/linux/videodev2.h | 4 +++-
>
>
> # HG changeset patch
> # User "Frej Drejhammar <frej.drejhammar@gmail.com>"
> # Date 1206311496 -3600
> # Node ID d758888cf4a466cd2d44a54a0a9e9467d72267fa
> # Parent 9a2af878cbd551d1bfac6b19d085a1a83d675a66
> v4l2-api: Define a standard control for chroma AGC
Shouldn't a documentation patch be provided with each new control addition ?
> From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
>
> Define a pre-defined control ID for chroma automatic gain control.
>
> Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
>
> diff -r 9a2af878cbd5 -r d758888cf4a4 linux/include/linux/videodev2.h
> --- a/linux/include/linux/videodev2.h Sat Mar 22 08:37:19 2008 -0300
> +++ b/linux/include/linux/videodev2.h Sun Mar 23 23:31:36 2008 +0100
> @@ -879,7 +879,9 @@ enum v4l2_power_line_frequency {
> #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26)
> #define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
> #define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
> -#define V4L2_CID_LASTP1 (V4L2_CID_BASE+29) /* last CID + 1 */
> +#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
> +/* last CID + 1 */
> +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+30)
>
> /* MPEG-class control IDs defined by V4L2 */
> #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
Best regards,
Laurent Pinchart
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC
2008-03-24 0:12 ` Laurent Pinchart
@ 2008-03-24 11:56 ` Frej Drejhammar
2008-03-24 19:27 ` Laurent Pinchart
0 siblings, 1 reply; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-24 11:56 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: video4linux-list
Laurent Pinchart <laurent.pinchart@skynet.be> writes:
>
> Shouldn't a documentation patch be provided with each new control
> addition ?
If you had read the the patch series description ([PATCH 0 of 6] cx88:
Enable additional cx2388x features. Version 3) you would have found
just such a patch to the v4l2-spec docbook (which is not in the
v4l-tree).
--Frej
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC
2008-03-24 11:56 ` Frej Drejhammar
@ 2008-03-24 19:27 ` Laurent Pinchart
0 siblings, 0 replies; 16+ messages in thread
From: Laurent Pinchart @ 2008-03-24 19:27 UTC (permalink / raw)
To: Frej Drejhammar; +Cc: video4linux-list
On Monday 24 March 2008, Frej Drejhammar wrote:
> Laurent Pinchart <laurent.pinchart@skynet.be> writes:
> > Shouldn't a documentation patch be provided with each new control
> > addition ?
>
> If you had read the the patch series description ([PATCH 0 of 6] cx88:
> Enable additional cx2388x features. Version 3) you would have found
> just such a patch to the v4l2-spec docbook (which is not in the
> v4l-tree).
Sorry, my bad. I had skipped 0/6. Thanks for the information.
Best regards,
Laurent Pinchart
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2 of 6] cx88: Add user control for chroma AGC
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
2008-03-23 22:43 ` [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC Frej Drejhammar
@ 2008-03-23 22:43 ` Frej Drejhammar
2008-03-23 22:43 ` [PATCH 3 of 6] cx88: Enable chroma AGC by default for all non-SECAM modes Frej Drejhammar
` (4 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-23 22:43 UTC (permalink / raw)
To: video4linux-list; +Cc: Trent Piepho
4 files changed, 37 insertions(+), 6 deletions(-)
linux/drivers/media/video/cx88/cx88-blackbird.c | 4 +--
linux/drivers/media/video/cx88/cx88-core.c | 6 +++-
linux/drivers/media/video/cx88/cx88-video.c | 30 +++++++++++++++++++++--
linux/drivers/media/video/cx88/cx88.h | 3 +-
# HG changeset patch
# User "Frej Drejhammar <frej.drejhammar@gmail.com>"
# Date 1206311637 -3600
# Node ID 5033bd266fb9e90d4d7568013a373fa83061bce0
# Parent d758888cf4a466cd2d44a54a0a9e9467d72267fa
cx88: Add user control for chroma AGC
From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
The cx2388x family has support for chroma AGC. This patch implements a
the V4L2_CID_CHROMA_AGC control for the cx2388x family. By default
chroma AGC is disabled, as in previous versions of the driver.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88-blackbird.c
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c Sun Mar 23 23:31:36 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c Sun Mar 23 23:33:57 2008 +0100
@@ -711,7 +711,7 @@ static int blackbird_queryctrl(struct cx
return -EINVAL;
/* Standard V4L2 controls */
- if (cx8800_ctrl_query(qctrl) == 0)
+ if (cx8800_ctrl_query(dev->core, qctrl) == 0)
return 0;
/* MPEG V4L2 controls */
@@ -959,7 +959,7 @@ static int vidioc_queryctrl (struct file
qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id);
if (unlikely(qctrl->id == 0))
return -EINVAL;
- return cx8800_ctrl_query(qctrl);
+ return cx8800_ctrl_query(dev->core, qctrl);
}
static int vidioc_enum_input (struct file *file, void *priv,
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88-core.c
--- a/linux/drivers/media/video/cx88/cx88-core.c Sun Mar 23 23:31:36 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-core.c Sun Mar 23 23:33:57 2008 +0100
@@ -958,7 +958,11 @@ int cx88_set_tvnorm(struct cx88_core *co
dprintk(1,"set_tvnorm: MO_INPUT_FORMAT 0x%08x [old=0x%08x]\n",
cxiformat, cx_read(MO_INPUT_FORMAT) & 0x0f);
- cx_andor(MO_INPUT_FORMAT, 0xf, cxiformat);
+ /* Chroma AGC must be disabled if SECAM is used */
+ if (norm & V4L2_STD_SECAM)
+ cx_andor(MO_INPUT_FORMAT, 0x40f, cxiformat);
+ else
+ cx_andor(MO_INPUT_FORMAT, 0xf, cxiformat);
#if 1
// FIXME: as-is from DScaler
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:31:36 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:33:57 2008 +0100
@@ -244,6 +244,18 @@ static struct cx88_ctrl cx8800_ctls[] =
.mask = 0x00ff,
.shift = 0,
},{
+ .v = {
+ .id = V4L2_CID_CHROMA_AGC,
+ .name = "Chroma AGC",
+ .minimum = 0,
+ .maximum = 1,
+ .default_value = 0x0,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ },
+ .reg = MO_INPUT_FORMAT,
+ .mask = 1 << 10,
+ .shift = 10,
+ }, {
/* --- audio --- */
.v = {
.id = V4L2_CID_AUDIO_MUTE,
@@ -298,6 +310,7 @@ const u32 cx88_user_ctrls[] = {
V4L2_CID_AUDIO_VOLUME,
V4L2_CID_AUDIO_BALANCE,
V4L2_CID_AUDIO_MUTE,
+ V4L2_CID_CHROMA_AGC,
0
};
EXPORT_SYMBOL(cx88_user_ctrls);
@@ -307,7 +320,7 @@ static const u32 *ctrl_classes[] = {
NULL
};
-int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl)
+int cx8800_ctrl_query(struct cx88_core *core, struct v4l2_queryctrl *qctrl)
{
int i;
@@ -322,6 +335,11 @@ int cx8800_ctrl_query(struct v4l2_queryc
return 0;
}
*qctrl = cx8800_ctls[i].v;
+ /* Report chroma AGC as inactive when SECAM is selected */
+ if (cx8800_ctls[i].v.id == V4L2_CID_CHROMA_AGC &&
+ core->tvnorm & V4L2_STD_SECAM)
+ qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE;
+
return 0;
}
EXPORT_SYMBOL(cx8800_ctrl_query);
@@ -1225,6 +1243,12 @@ int cx88_set_control(struct cx88_core *c
}
mask=0xffff;
break;
+ case V4L2_CID_CHROMA_AGC:
+ /* Do not allow chroma AGC to be enabled for SECAM */
+ value = ((ctl->value - c->off) << c->shift) & c->mask;
+ if (core->tvnorm & V4L2_STD_SECAM && value)
+ return -EINVAL;
+ break;
default:
value = ((ctl->value - c->off) << c->shift) & c->mask;
break;
@@ -1549,10 +1573,12 @@ static int vidioc_queryctrl (struct file
static int vidioc_queryctrl (struct file *file, void *priv,
struct v4l2_queryctrl *qctrl)
{
+ struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core;
+
qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id);
if (unlikely(qctrl->id == 0))
return -EINVAL;
- return cx8800_ctrl_query(qctrl);
+ return cx8800_ctrl_query(core, qctrl);
}
static int vidioc_g_ctrl (struct file *file, void *priv,
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88.h
--- a/linux/drivers/media/video/cx88/cx88.h Sun Mar 23 23:31:36 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88.h Sun Mar 23 23:33:57 2008 +0100
@@ -681,7 +681,8 @@ void cx8802_cancel_buffers(struct cx8802
/* ----------------------------------------------------------- */
/* cx88-video.c*/
extern const u32 cx88_user_ctrls[];
-extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl);
+extern int cx8800_ctrl_query(struct cx88_core *core,
+ struct v4l2_queryctrl *qctrl);
int cx88_enum_input (struct cx88_core *core,struct v4l2_input *i);
int cx88_set_freq (struct cx88_core *core,struct v4l2_frequency *f);
int cx88_get_control(struct cx88_core *core, struct v4l2_control *ctl);
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH 3 of 6] cx88: Enable chroma AGC by default for all non-SECAM modes
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
2008-03-23 22:43 ` [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC Frej Drejhammar
2008-03-23 22:43 ` [PATCH 2 of 6] cx88: Add user " Frej Drejhammar
@ 2008-03-23 22:43 ` Frej Drejhammar
2008-03-23 22:43 ` [PATCH 4 of 6] v4l2-api: Define a standard control for color killer functionality Frej Drejhammar
` (3 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-23 22:43 UTC (permalink / raw)
To: video4linux-list; +Cc: Trent Piepho
2 files changed, 5 insertions(+), 6 deletions(-)
linux/drivers/media/video/cx88/cx88-core.c | 9 ++++-----
linux/drivers/media/video/cx88/cx88-video.c | 2 +-
# HG changeset patch
# User "Frej Drejhammar <frej.drejhammar@gmail.com>"
# Date 1206311942 -3600
# Node ID f11b3fd53145c7ce1b9dbde7e83cbaf6478576bc
# Parent 5033bd266fb9e90d4d7568013a373fa83061bce0
cx88: Enable chroma AGC by default for all non-SECAM modes
From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
An enabled chroma AGC will not degrade picture quality if enabled on a
color PAL or NTSC signal with nominal signal levels. It will give a
significant color reproduction improvement if the chroma signals
diverge from nominal levels. Therefore enable chroma AGC by default
for PAL and NTSC standards.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
diff -r 5033bd266fb9 -r f11b3fd53145 linux/drivers/media/video/cx88/cx88-core.c
--- a/linux/drivers/media/video/cx88/cx88-core.c Sun Mar 23 23:33:57 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-core.c Sun Mar 23 23:39:02 2008 +0100
@@ -958,11 +958,10 @@ int cx88_set_tvnorm(struct cx88_core *co
dprintk(1,"set_tvnorm: MO_INPUT_FORMAT 0x%08x [old=0x%08x]\n",
cxiformat, cx_read(MO_INPUT_FORMAT) & 0x0f);
- /* Chroma AGC must be disabled if SECAM is used */
- if (norm & V4L2_STD_SECAM)
- cx_andor(MO_INPUT_FORMAT, 0x40f, cxiformat);
- else
- cx_andor(MO_INPUT_FORMAT, 0xf, cxiformat);
+ /* Chroma AGC must be disabled if SECAM is used, we enable it
+ by default on PAL and NTSC */
+ cx_andor(MO_INPUT_FORMAT, 0x40f,
+ norm & V4L2_STD_SECAM ? cxiformat : cxiformat | 0x400);
#if 1
// FIXME: as-is from DScaler
diff -r 5033bd266fb9 -r f11b3fd53145 linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:33:57 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:39:02 2008 +0100
@@ -249,7 +249,7 @@ static struct cx88_ctrl cx8800_ctls[] =
.name = "Chroma AGC",
.minimum = 0,
.maximum = 1,
- .default_value = 0x0,
+ .default_value = 0x1,
.type = V4L2_CTRL_TYPE_BOOLEAN,
},
.reg = MO_INPUT_FORMAT,
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH 4 of 6] v4l2-api: Define a standard control for color killer functionality
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
` (2 preceding siblings ...)
2008-03-23 22:43 ` [PATCH 3 of 6] cx88: Enable chroma AGC by default for all non-SECAM modes Frej Drejhammar
@ 2008-03-23 22:43 ` Frej Drejhammar
2008-04-21 23:30 ` Brandon Philips
2008-03-23 22:43 ` [PATCH 5 of 6] cx88: Add user control for color killer Frej Drejhammar
` (2 subsequent siblings)
6 siblings, 1 reply; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-23 22:43 UTC (permalink / raw)
To: video4linux-list; +Cc: Trent Piepho
1 file changed, 2 insertions(+), 1 deletion(-)
linux/include/linux/videodev2.h | 3 ++-
# HG changeset patch
# User "Frej Drejhammar <frej.drejhammar@gmail.com>"
# Date 1206311969 -3600
# Node ID b3a7ec84ad4959869d50710bfcbfb997fb39850d
# Parent f11b3fd53145c7ce1b9dbde7e83cbaf6478576bc
v4l2-api: Define a standard control for color killer functionality
From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
Define a pre-defined control ID for color killer functionality.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
diff -r f11b3fd53145 -r b3a7ec84ad49 linux/include/linux/videodev2.h
--- a/linux/include/linux/videodev2.h Sun Mar 23 23:39:02 2008 +0100
+++ b/linux/include/linux/videodev2.h Sun Mar 23 23:39:29 2008 +0100
@@ -880,8 +880,9 @@ enum v4l2_power_line_frequency {
#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27)
#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28)
#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29)
+#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30)
/* last CID + 1 */
-#define V4L2_CID_LASTP1 (V4L2_CID_BASE+30)
+#define V4L2_CID_LASTP1 (V4L2_CID_BASE+31)
/* MPEG-class control IDs defined by V4L2 */
#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900)
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH 5 of 6] cx88: Add user control for color killer
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
` (3 preceding siblings ...)
2008-03-23 22:43 ` [PATCH 4 of 6] v4l2-api: Define a standard control for color killer functionality Frej Drejhammar
@ 2008-03-23 22:43 ` Frej Drejhammar
2008-03-23 22:43 ` [PATCH 6 of 6] cx88: Enable color killer by default Frej Drejhammar
2008-04-21 23:34 ` [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Brandon Philips
6 siblings, 0 replies; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-23 22:43 UTC (permalink / raw)
To: video4linux-list; +Cc: Trent Piepho
1 file changed, 13 insertions(+)
linux/drivers/media/video/cx88/cx88-video.c | 13 +++++++++++++
# HG changeset patch
# User "Frej Drejhammar <frej.drejhammar@gmail.com>"
# Date 1206312016 -3600
# Node ID 77bef451d41348f8e5ca6b24fe402199ac243ead
# Parent b3a7ec84ad4959869d50710bfcbfb997fb39850d
cx88: Add user control for color killer
From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
The cx2388x family has a color killer. This patch implements the
V4L2_CID_COLOR_KILLER control for the cx2388x family. By default the
color killer is disabled, as in previous versions of the driver.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
diff -r b3a7ec84ad49 -r 77bef451d413 linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:39:29 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:40:16 2008 +0100
@@ -256,6 +256,18 @@ static struct cx88_ctrl cx8800_ctls[] =
.mask = 1 << 10,
.shift = 10,
}, {
+ .v = {
+ .id = V4L2_CID_COLOR_KILLER,
+ .name = "Color killer",
+ .minimum = 0,
+ .maximum = 1,
+ .default_value = 0x0,
+ .type = V4L2_CTRL_TYPE_BOOLEAN,
+ },
+ .reg = MO_INPUT_FORMAT,
+ .mask = 1 << 9,
+ .shift = 9,
+ }, {
/* --- audio --- */
.v = {
.id = V4L2_CID_AUDIO_MUTE,
@@ -311,6 +323,7 @@ const u32 cx88_user_ctrls[] = {
V4L2_CID_AUDIO_BALANCE,
V4L2_CID_AUDIO_MUTE,
V4L2_CID_CHROMA_AGC,
+ V4L2_CID_COLOR_KILLER,
0
};
EXPORT_SYMBOL(cx88_user_ctrls);
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* [PATCH 6 of 6] cx88: Enable color killer by default
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
` (4 preceding siblings ...)
2008-03-23 22:43 ` [PATCH 5 of 6] cx88: Add user control for color killer Frej Drejhammar
@ 2008-03-23 22:43 ` Frej Drejhammar
2008-03-28 18:43 ` Mauro Carvalho Chehab
2008-04-21 23:34 ` [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Brandon Philips
6 siblings, 1 reply; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-23 22:43 UTC (permalink / raw)
To: video4linux-list; +Cc: Trent Piepho
1 file changed, 1 insertion(+), 1 deletion(-)
linux/drivers/media/video/cx88/cx88-video.c | 2 +-
# HG changeset patch
# User "Frej Drejhammar <frej.drejhammar@gmail.com>"
# Date 1206312051 -3600
# Node ID da854c7e2b4372794c0437ab59776fe5fa5305ee
# Parent 77bef451d41348f8e5ca6b24fe402199ac243ead
cx88: Enable color killer by default
From: "Frej Drejhammar <frej.drejhammar@gmail.com>"
An enabled color killer will not degrade picture quality for color
input signals, only suppress bogus color information on
black-and-white input. Therefore enable it by default.
Signed-off-by: "Frej Drejhammar <frej.drejhammar@gmail.com>"
diff -r 77bef451d413 -r da854c7e2b43 linux/drivers/media/video/cx88/cx88-video.c
--- a/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:40:16 2008 +0100
+++ b/linux/drivers/media/video/cx88/cx88-video.c Sun Mar 23 23:40:51 2008 +0100
@@ -261,7 +261,7 @@ static struct cx88_ctrl cx8800_ctls[] =
.name = "Color killer",
.minimum = 0,
.maximum = 1,
- .default_value = 0x0,
+ .default_value = 0x1,
.type = V4L2_CTRL_TYPE_BOOLEAN,
},
.reg = MO_INPUT_FORMAT,
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 6 of 6] cx88: Enable color killer by default
2008-03-23 22:43 ` [PATCH 6 of 6] cx88: Enable color killer by default Frej Drejhammar
@ 2008-03-28 18:43 ` Mauro Carvalho Chehab
2008-03-29 11:18 ` Frej Drejhammar
0 siblings, 1 reply; 16+ messages in thread
From: Mauro Carvalho Chehab @ 2008-03-28 18:43 UTC (permalink / raw)
To: Frej Drejhammar; +Cc: video4linux-list, Trent Piepho
Patches 1 to 5 applied, thanks.
> An enabled color killer will not degrade picture quality for color
> input signals, only suppress bogus color information on
> black-and-white input. Therefore enable it by default.
I don't think it is a good idea to enable the color killer by default. This may
lead to weird effects, if the stream uses some black and white images, with
just a few colors, to produce some sort of visual effect. Better to have this
disabled. If someone wants to see a black-and-white movie, or is on an area
where the color carrier is bogus, he can manually enable the filter.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 6 of 6] cx88: Enable color killer by default
2008-03-28 18:43 ` Mauro Carvalho Chehab
@ 2008-03-29 11:18 ` Frej Drejhammar
0 siblings, 0 replies; 16+ messages in thread
From: Frej Drejhammar @ 2008-03-29 11:18 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: video4linux-list, Trent Piepho
> Patches 1 to 5 applied, thanks.
Great.
> I don't think it is a good idea to enable the color killer by
> default. This may lead to weird effects, if the stream uses some
> black and white images, with just a few colors, to produce some sort
> of visual effect.
In the scenario you describe the broadcaster will still generate a
color burst (as color information is present) and that is what the
color killer detects. The color killer protects against decoding color
when no color information is present (i.e. no color burst). Most
better quality TV-sets have the functionality and no way to disable
it.
> Better to have this disabled. If someone wants to see a
> black-and-white movie, or is on an area where the color carrier is
> bogus, he can manually enable the filter.
A more probable scenario is that you have a low quality signal source
(a low amplitude color burst) and want to disable the killer to allow
recovery of at least some color. But anyway, the control is there so I
can just enable it in my start-up scripts...
Regards,
--Frej
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3
2008-03-23 22:43 [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Frej Drejhammar
` (5 preceding siblings ...)
2008-03-23 22:43 ` [PATCH 6 of 6] cx88: Enable color killer by default Frej Drejhammar
@ 2008-04-21 23:34 ` Brandon Philips
2008-04-22 16:59 ` Frej Drejhammar
6 siblings, 1 reply; 16+ messages in thread
From: Brandon Philips @ 2008-04-21 23:34 UTC (permalink / raw)
To: Frej Drejhammar; +Cc: video4linux-list, Trent Piepho
On 23:43 Sun 23 Mar 2008, Frej Drejhammar wrote:
> + <row>
> + <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
> + <entry>boolean</entry>
> + <entry>Enables color killer functionality.</entry>
> + </row>
Ok, so I found the doc patch but it isn't very helpful...
Could we please get an explanation of what a color killer is for other
driver writers?
Thanks,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3
2008-04-21 23:34 ` [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3 Brandon Philips
@ 2008-04-22 16:59 ` Frej Drejhammar
2008-04-22 17:33 ` Brandon Philips
0 siblings, 1 reply; 16+ messages in thread
From: Frej Drejhammar @ 2008-04-22 16:59 UTC (permalink / raw)
To: Brandon Philips; +Cc: video4linux-list, Trent Piepho
>> + <row>
>> + <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
>> + <entry>boolean</entry>
>> + <entry>Enables color killer functionality.</entry>
>> + </row>
>
> Could we please get an explanation of what a color killer is for other
> driver writers?
Sorry. From the current documentation I did not understand that
standard functionality (AUTO_WHITE_BALANCE, DO_WHITE_BALANCE, GAIN)
required a detailed description. A concise description of a color
killer is as follows:
The color killer disables color decoding if a color-burst is not
present in the input signal. This avoids interference showing up as
false color in purely black-and-white broadcasts (one where the
broadcaster does not generate a color-burst).
Regards,
--Frej
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0 of 6] cx88: Enable additional cx2388x features. Version 3
2008-04-22 16:59 ` Frej Drejhammar
@ 2008-04-22 17:33 ` Brandon Philips
0 siblings, 0 replies; 16+ messages in thread
From: Brandon Philips @ 2008-04-22 17:33 UTC (permalink / raw)
To: Frej Drejhammar; +Cc: video4linux-list, Trent Piepho
On 18:59 Tue 22 Apr 2008, Frej Drejhammar wrote:
> >> + <row>
> >> + <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
> >> + <entry>boolean</entry>
> >> + <entry>Enables color killer functionality.</entry>
> >> + </row>
> >
> > Could we please get an explanation of what a color killer is for other
> > driver writers?
>
> Sorry. From the current documentation I did not understand that
> standard functionality (AUTO_WHITE_BALANCE, DO_WHITE_BALANCE, GAIN)
> required a detailed description.
Most people understand what WHITE_BALANCE and GAIN are, color killing is
a bit more abstract ;)
> A concise description of a color killer is as follows:
> The color killer disables color decoding if a color-burst is not
> present in the input signal. This avoids interference showing up as
> false color in purely black-and-white broadcasts (one where the
> broadcaster does not generate a color-burst).
Thanks. I will add that to your doc patch and send it to Michael.
Cheers,
Brandon
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 16+ messages in thread