@@ -4267,7 +4267,44 @@ interface and may change in the future.</para>
pixels / second.
</entry>
</row>
- <row><entry></entry></row>
+ <row>
+ <entry spanname="id"><constant>V4L2_CID_DPCM_PREDICTOR</constant></entry>
+ <entry>menu</entry>
+ </row>
+ <row id="v4l2-dpcm-predictor">
+ <entry spanname="descr"> Differential pulse-code modulation (DPCM) compression can
+ be used to compress the samples into fewer bits than they would otherwise require.
+ This is done by calculating the difference between consecutive samples and outputting
+ the difference which in average is much smaller than the values of the samples
+ themselves since there is generally lots of correlation between adjacent pixels. In
+ decompression the original samples are reconstructed. The process isn't lossless as
+ the encoded sample size in bits is less than the original.
+
+ <para>Formats using DPCM compression include <xref linkend="pixfmt-srggb10dpcm8" />.</para>
+
+ <para>This control is used to select the predictor used to encode the samples.</para>
+
+ <para>The main difference between the simple and the advanced predictors is image quality,
+ with advanced predictor supposed to produce better quality images as a result. Simple
+ predictor can be used e.g. for testing purposes. For more information about DPCM see <ulink
+ url="http://en.wikipedia.org/wiki/Differential_pulse-code_modulation">Wikipedia</ulink>.</para>
+ </entry>
+ </row>
+ <row>
+ <entrytbl spanname="descr" cols="2">
+ <tbody valign="top">
+ <row>
+ <entry><constant>V4L2_DPCM_PREDICTOR_SIMPLE</constant></entry>
+ <entry>Predictor type is simple</entry>
+ </row>
+ <row>
+ <entry><constant>V4L2_DPCM_PREDICTOR_ADVANCED</constant></entry>
+ <entry>Predictor type is advanced</entry>
+ </row>
+ </tbody>
+ </entrytbl>
+ </row>
+ <row><entry></entry></row>
</tbody>
</tgroup>
</table>
@@ -425,6 +425,11 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
"Gray",
NULL,
};
+ static const char * const dpcm_predictor[] = {
+ "Simple",
+ "Advanced",
+ NULL,
+ };
switch (id) {
case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
@@ -502,6 +507,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id)
return mpeg4_profile;
case V4L2_CID_JPEG_CHROMA_SUBSAMPLING:
return jpeg_chroma_subsampling;
+ case V4L2_CID_DPCM_PREDICTOR:
+ return dpcm_predictor;
default:
return NULL;
@@ -732,6 +739,7 @@ const char *v4l2_ctrl_get_name(u32 id)
case V4L2_CID_IMAGE_PROC_CLASS: return "Image Processing Controls";
case V4L2_CID_LINK_FREQ: return "Link Frequency";
case V4L2_CID_PIXEL_RATE: return "Pixel Rate";
+ case V4L2_CID_DPCM_PREDICTOR: return "DPCM Predictor";
default:
return NULL;
@@ -832,6 +840,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
case V4L2_CID_ISO_SENSITIVITY_AUTO:
case V4L2_CID_EXPOSURE_METERING:
case V4L2_CID_SCENE_MODE:
+ case V4L2_CID_DPCM_PREDICTOR:
*type = V4L2_CTRL_TYPE_MENU;
break;
case V4L2_CID_LINK_FREQ:
@@ -2000,6 +2000,11 @@ enum v4l2_jpeg_chroma_subsampling {
#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1)
#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2)
+#define V4L2_CID_DPCM_PREDICTOR (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3)
+enum v4l2_dpcm_predictor {
+ V4L2_DPCM_PREDICTOR_SIMPLE = 0,
+ V4L2_DPCM_PREDICTOR_ADVANCED = 1,
+};
/*
* T U N I N G