Re: [PATCH v4] media: v4l2-ctrls: add control for dpcm predictor

From: Laurent Pinchart
Date: Thu Sep 13 2012 - 06:17:14 EST


Hi Sakari,

On Friday 07 September 2012 21:46:44 Sakari Ailus wrote:
>
> Could you replace the above with this text (with appropriate indentation
> etc.) while keeping the reference to Wikipedia?
>
> ------8<------
> 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.
>
> Formats using DPCM compression include <xref
> linkend="pixfmt-srggb10dpcm8" />.
>
> This control is used to select the predictor used to encode the samples.

If I remember correctly this control will be used on the receiver side on
DaVinci, to decode pixels not encode them. How is the predictor used in that
case ? Must it match the predictor used on the encoding side ? If so I expect
documentation to be available somewhere.

The OMAP3 ISP supports both DPCM encoding and decoding, and documents the
predictors as

"- The simple predictor

This predictor uses only the previous same color component value as a
prediction value. Therefore, only two-pixel memory is required.

- The advanced predictor

This predictor uses four previous pixel values, when the prediction value is
evaluated. This means that also the other color component values are used,
when the prediction value has been defined."

It also states the the simple predictor is preferred for 10-8-10 conversion,
and the advanced predictor for 10-7-10 and 10-6-10 conversion.

> 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.
> ------8<------

--
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/