[PATCH 3/4] drm: Add drm_format_{horz, vert}_chroma_subsampling() utility functions

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Apr 12 05:23:09 PDT 2012

On Wed, Apr 11, 2012 at 08:53:08PM +0200, Roland Scheidegger wrote:
> Am 05.04.2012 20:35, schrieb ville.syrjala at linux.intel.com:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > 
> > These functions return the chroma subsampling factors for the specified
> > pixel format.
> Hmm not really related but looking at it this reminds me these formats
> always look a bit underspecified wrt chroma subsample positions. Are
> these fixed, undefined, or what (even mpeg1 and mpeg2 differ there, and
> let's not even talk about the big mess that interlaced mpeg2 is)?

My thinking is that the sample positions can be configured through
some other means. It doesn't affect the in memory layout at all so
tying it to the format isn't necessary.

This also depends on the hardware. On some hardware you can configure
it quite freely, but on some you may be left with just the one option,
which is often not even documented.

I sent another patch [1] some time ago which provides a helper function
for drivers dealing with good hardware.

[1] http://lists.freedesktop.org/archives/dri-devel/2011-December/017585.html

Ville Syrjälä
Intel OTC

More information about the dri-devel mailing list