Skip to contentSkip to conversation

cx88: Enable additional cx2388x features. Version 3

PATCH In review Frej Drejhammar 4 participants 16 messages Mar 23, 2008 – Apr 22, 2008 Media (V4L/DVB)

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 v4l2-api: Define a standard control for chroma AGC

In reply to Frej Drejhammar
1 file changed, 3 insertions(+), 1 deletion(-)

linux/include/linux/videodev2.h | 4 +++-

# HG changeset patch
# User "Frej Drejhammar <[email protected]>" # Date 1206311496 -3600
# Node ID d758888cf4a466cd2d44a54a0a9e9467d72267fa # Parent 9a2af878cbd551d1bfac6b19d085a1a83d675a66
v4l2-api: Define a standard control for chroma AGC

From: "Frej Drejhammar <[email protected]>"

Define a pre-defined control ID for chroma automatic gain control.

linux/include/linux/videodev2.h +3 -1
diff -r 9a2af878cbd5 -r d758888cf4a4 linux/include/linux/videodev2.h
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#5 lore raw

PATCH 1/1 cx88: Add user control for chroma AGC

In reply to Frej Drejhammar
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 <[email protected]>" # Date 1206311637 -3600
# Node ID 5033bd266fb9e90d4d7568013a373fa83061bce0 # Parent d758888cf4a466cd2d44a54a0a9e9467d72267fa
cx88: Add user control for chroma AGC

From: "Frej Drejhammar <[email protected]>"

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.

linux/drivers/media/video/cx88/cx88-blackbird.c +2 -2
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -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,
linux/drivers/media/video/cx88/cx88-core.c +5 -1
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88-core.c
@@ -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
linux/drivers/media/video/cx88/cx88-video.c +28 -2
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88-video.c
@@ -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,
linux/drivers/media/video/cx88/cx88.h +2 -1
diff -r d758888cf4a4 -r 5033bd266fb9 linux/drivers/media/video/cx88/cx88.h
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#6 lore raw

PATCH 1/1 cx88: Enable chroma AGC by default for all non-SECAM modes

In reply to Frej Drejhammar
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 <[email protected]>" # Date 1206311942 -3600
# Node ID f11b3fd53145c7ce1b9dbde7e83cbaf6478576bc # Parent 5033bd266fb9e90d4d7568013a373fa83061bce0
cx88: Enable chroma AGC by default for all non-SECAM modes

From: "Frej Drejhammar <[email protected]>"

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.

linux/drivers/media/video/cx88/cx88-core.c +4 -5
diff -r 5033bd266fb9 -r f11b3fd53145 linux/drivers/media/video/cx88/cx88-core.c
@@ -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
linux/drivers/media/video/cx88/cx88-video.c +1 -1
diff -r 5033bd266fb9 -r f11b3fd53145 linux/drivers/media/video/cx88/cx88-video.c
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#0 lore raw

PATCH 1/1 cx88: Enable additional cx2388x features. Version 3

The cx2388x family of broadcast decoders all have features not enabled by the standard cx88 driver. This revised patch series adds two new pre-defined control IDs: V4L2_CID_CHROMA_AGC and V4L2_CID_COLOR_KILLER (patch 1+4).

Patches 2 and 5 respectively implement these controls for cx88.

Patches 3 and 6 enable these controls by default as the enabled features will not degrade picture quality when used with high quality input and will improve quality with marginal input.

The patches applies cleanly to 7400:9a2af878cbd5 of
http://linuxtv.org/hg/v4l-dvb/ and have been tested an a HVR-1300. The patches should be applied in order, but patches 3 and 6 can be omitted.

Below is a patch to version 0.24 of the v4l2-spec docbook source documenting V4L2_CID_CHROMA_AGC and V4L2_CID_COLOR_KILLER. This patch is untested as building the unmodified spec fails on my system and build requirements are undocumented.

compat.sgml +11 -0
diff -ur v4l2spec-0.24-original/compat.sgml v4l2spec-0.24/compat.sgml
@@ -2202,6 +2202,17 @@
 	 </listitem>
        </orderedlist>
      </section>
+
+    <section>
+      <title>V4L2 in Linux 2.6.2x</title>
+      <orderedlist>
+        <listitem>
+          <para>New <link linkend="control">controls</link>
+<constant>V4L2_CID_CHROMA_AGC</constant>,
+<constant>V4L2_CID_COLOR_KILLER</constant>were added.
+        </listitem>
+       </orderedlist>
+     </section>
    </section>
 
    <section id="other">
controls.sgml +11 -1
diff -ur v4l2spec-0.24-original/controls.sgml v4l2spec-0.24/controls.sgml
@@ -261,11 +261,21 @@
             <entry>Adjusts the backlight compensation in a camera. The
 minimum value disables backlight compensation.</entry>
           </row>
+	  <row>
+            <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry>
+            <entry>boolean</entry>
+            <entry>Enables automatic gain control for the chroma channel.</entry>
+          </row>
+	  <row>
+            <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
+            <entry>boolean</entry>
+            <entry>Enables color killer functionality.</entry>
+          </row>
           <row>
             <entry><constant>V4L2_CID_LASTP1</constant></entry>
             <entry></entry>
             <entry>End of the predefined control IDs (currently
-<constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant> + 1).</entry>
+<constant>V4L2_CID_COLOR_KILLER</constant> + 1).</entry>
           </row>
           <row>
             <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>

--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#7 lore raw

PATCH 1/1 v4l2-api: Define a standard control for color killer functionality

1 file changed, 2 insertions(+), 1 deletion(-)

linux/include/linux/videodev2.h | 3 ++-

# HG changeset patch
# User "Frej Drejhammar <[email protected]>"
# Date 1206311969 -3600
# Node ID b3a7ec84ad4959869d50710bfcbfb997fb39850d
# Parent f11b3fd53145c7ce1b9dbde7e83cbaf6478576bc
v4l2-api: Define a standard control for color killer functionality

From: "Frej Drejhammar <[email protected]>"

Define a pre-defined control ID for color killer functionality.

linux/include/linux/videodev2.h +2 -1
diff -r f11b3fd53145 -r b3a7ec84ad49 linux/include/linux/videodev2.h
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#9 lore raw

PATCH 1/1 cx88: Enable color killer by default

In reply to Frej Drejhammar
1 file changed, 1 insertion(+), 1 deletion(-)

linux/drivers/media/video/cx88/cx88-video.c | 2 +-

# HG changeset patch
# User "Frej Drejhammar <[email protected]>" # Date 1206312051 -3600
# Node ID da854c7e2b4372794c0437ab59776fe5fa5305ee # Parent 77bef451d41348f8e5ca6b24fe402199ac243ead
cx88: Enable color killer by default

From: "Frej Drejhammar <[email protected]>"

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.

linux/drivers/media/video/cx88/cx88-video.c +1 -1
diff -r 77bef451d413 -r da854c7e2b43 linux/drivers/media/video/cx88/cx88-video.c
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#12 lore raw

PATCH 1/1 cx88: Add user control for color killer

In reply to Frej Drejhammar
1 file changed, 13 insertions(+)

linux/drivers/media/video/cx88/cx88-video.c | 13 +++++++++++++

# HG changeset patch
# User "Frej Drejhammar <[email protected]>" # Date 1206312016 -3600
# Node ID 77bef451d41348f8e5ca6b24fe402199ac243ead # Parent b3a7ec84ad4959869d50710bfcbfb997fb39850d
cx88: Add user control for color killer

From: "Frej Drejhammar <[email protected]>"

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.

linux/drivers/media/video/cx88/cx88-video.c +13 -0
diff -r b3a7ec84ad49 -r 77bef451d413 linux/drivers/media/video/cx88/cx88-video.c
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#2 lore raw

Re: [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC

In reply to Frej Drejhammar
Quoted 10 lines · Frej Drejhammar
1 file changed, 3 insertions(+), 1 deletion(-)

linux/include/linux/videodev2.h | 4 +++-

# HG changeset patch
# User "Frej Drejhammar <[email protected]>" # 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 ?

Quoted 10 lines

From: "Frej Drejhammar <[email protected]>"

Define a pre-defined control ID for chroma automatic gain control.

diff -r 9a2af878cbd5 -r d758888cf4a4 linux/include/linux/videodev2.h

linux/include/linux/videodev2.h enum v4l2_power_line_frequency { · line 887

Quoted 10 lines
linux/include/linux/videodev2.h +3 -1
@@ -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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#3 lore raw

Re: [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC

Quoted 3 lines · Laurent Pinchart

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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#4 lore raw

Re: [PATCH 1 of 6] v4l2-api: Define a standard control for chroma AGC

Quoted 8 lines · Frej Drejhammar
Quoted 2 lines · Laurent Pinchart

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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#10 lore raw

Re: [PATCH 6 of 6] cx88: Enable color killer by default

In reply to Frej Drejhammar

Patches 1 to 5 applied, thanks.

Quoted 3 lines

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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#11 lore raw

Re: [PATCH 6 of 6] cx88: Enable color killer by default

Quoted 1 line

Patches 1 to 5 applied, thanks.

Great.

Quoted 4 lines

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.

Quoted 3 lines

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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#13 lore raw
In reply to Frej Drejhammar

controls.sgml line 273

Quoted 5 lines · Frej Drejhammar
controls.sgml +5 -0
+	  <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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#14 lore raw
Quoted 8 lines

controls.sgml line 273

Quoted 5 lines
controls.sgml +5 -0
+	  <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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

#15 lore raw
Quoted 9 lines · Frej Drejhammar
Quoted 8 lines

controls.sgml line 273

Quoted 5 lines
controls.sgml +5 -0
+	  <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?

Quoted 3 lines

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 ;)

Quoted 6 lines

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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list