Commit 0fc87864 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: Add test pattern colour component controls



In many cases the test pattern has selectable values for each colour
component. Implement controls for raw bayer components. Additional controls
should be defined for colour components that are not covered by these
controls.

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 5275a3b6
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -4790,6 +4790,40 @@ interface and may change in the future.</para>
	    conversion.
	    </entry>
	  </row>
	  <row>
	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_RED</constant></entry>
	    <entry>integer</entry>
	  </row>
	  <row>
	    <entry spanname="descr">Test pattern red colour component.
	    </entry>
	  </row>
	  <row>
	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_GREENR</constant></entry>
	    <entry>integer</entry>
	  </row>
	  <row>
	    <entry spanname="descr">Test pattern green (next to red)
	    colour component.
	    </entry>
	  </row>
	  <row>
	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_BLUE</constant></entry>
	    <entry>integer</entry>
	  </row>
	  <row>
	    <entry spanname="descr">Test pattern blue colour component.
	    </entry>
	  </row>
	  <row>
	    <entry spanname="id"><constant>V4L2_CID_TEST_PATTERN_GREENB</constant></entry>
	    <entry>integer</entry>
	  </row>
	  <row>
	    <entry spanname="descr">Test pattern green (next to blue)
	    colour component.
	    </entry>
	  </row>
	  <row><entry></entry></row>
	</tbody>
      </tgroup>
+4 −0
Original line number Diff line number Diff line
@@ -859,6 +859,10 @@ const char *v4l2_ctrl_get_name(u32 id)
	case V4L2_CID_VBLANK:			return "Vertical Blanking";
	case V4L2_CID_HBLANK:			return "Horizontal Blanking";
	case V4L2_CID_ANALOGUE_GAIN:		return "Analogue Gain";
	case V4L2_CID_TEST_PATTERN_RED:		return "Red Pixel Value";
	case V4L2_CID_TEST_PATTERN_GREENR:	return "Green (Red) Pixel Value";
	case V4L2_CID_TEST_PATTERN_BLUE:	return "Blue Pixel Value";
	case V4L2_CID_TEST_PATTERN_GREENB:	return "Green (Blue) Pixel Value";

	/* Image processing controls */
	/* Keep the order of the 'case's the same as in v4l2-controls.h! */
+4 −0
Original line number Diff line number Diff line
@@ -865,6 +865,10 @@ enum v4l2_jpeg_chroma_subsampling {
#define V4L2_CID_VBLANK				(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1)
#define V4L2_CID_HBLANK				(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2)
#define V4L2_CID_ANALOGUE_GAIN			(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3)
#define V4L2_CID_TEST_PATTERN_RED		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4)
#define V4L2_CID_TEST_PATTERN_GREENR		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5)
#define V4L2_CID_TEST_PATTERN_BLUE		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)
#define V4L2_CID_TEST_PATTERN_GREENB		(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)


/* Image processing controls */