From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Scheidegger Subject: Re: [PATCH 3/4] drm: Add drm_format_{horz, vert}_chroma_subsampling() utility functions Date: Fri, 13 Apr 2012 04:42:04 +0200 Message-ID: <4F87927C.1090905@hispeed.ch> References: <1333650918-16919-1-git-send-email-ville.syrjala@linux.intel.com> <1333650918-16919-3-git-send-email-ville.syrjala@linux.intel.com> <4F85D314.1010205@hispeed.ch> <20120412122309.GM4917@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from fep17.mx.upcmail.net (fep17.mx.upcmail.net [62.179.121.37]) by gabe.freedesktop.org (Postfix) with ESMTP id C3E4A9ED8B for ; Thu, 12 Apr 2012 19:38:26 -0700 (PDT) In-Reply-To: <20120412122309.GM4917@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: =?ISO-8859-1?Q?Ville_Syrj=E4l=E4?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Am 12.04.2012 14:23, schrieb Ville Syrj=E4l=E4: > On Wed, Apr 11, 2012 at 08:53:08PM +0200, Roland Scheidegger wrote: >> Am 05.04.2012 20:35, schrieb ville.syrjala@linux.intel.com: >>> From: Ville Syrj=E4l=E4 >>> >>> 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 > = I guess that makes sense. As long as those "other means" are available. Not like with xv where I think drivers just default to what is probably the most likely subsample positions, so assuming mpeg2/4 progressive or something (which gets mpeg1 slightly wrong), if they even bother to care about such subtleties :-). Roland