[PATCH RFC 3/6] drm: Plane YCbCr to RGB conversion related properties
Ville Syrjälä
ville.syrjala at linux.intel.com
Wed Apr 26 17:22:33 UTC 2017
On Wed, Apr 26, 2017 at 03:56:54PM +0300, Jyri Sarha wrote:
> On 04/24/17 19:55, Ville Syrjälä wrote:
> >> In fact we have plane specific YCbCr to RGB CSC (only preoffset
> >> possible), then (per crtc) gamma table, and finally a (per crtc) RGB to
> >> YCbCr CSC with optional post offset (so it can be used either as CSC or
> >> CTM).
> > So with that plane hw you could perhaps do:
> > - YCbCr->RGB if you input is not linear, but then you must
> > blend using non-linear data
> > - colorspace conversion if your input is alredy linear
> >
> > And with your crtc hw you could do:
> > - degamma + CTM
> > - gamma + RGB->YCbCr
>
>
> Just a generic question. Shouldn't - in an ideal HW - the degamma phase
> and the CTM be a plane specific property?
>
> I mean, isn't the purpose of normalizing the non linear RGB to linear
> (and possibly converting the color space) to have same format for all
> plane data before blending and composing them together?
>
> Of course it does not matter if all the planes use the same color space,
> which then should be converted to something else for the output.
>
> ... or have I misunderstood something?
I think the pipeline we want to expose is
planes: crtc:
YCbCr->RGB -> degamma -> CTM -> (gamma) \
YCbCr->RGB -> degamma -> CTM -> (gamma) -> (degamma) -> CTM -> gamma -> RGB->YCbCr
... /
I put the plane gamma and crtc degamma in parentheses because ideally
you perhaps wouldn't need them (since you want to blend with linear
data). But we have hardware which has them, and might be lacking some
of the other stages so they can actually be useful. Eg. if you don't
have plane gamma/degamma and you want to use the crtc CTM to change
the colorspace you would also use the crtc degamma.
--
Ville Syrjälä
Intel OTC
More information about the dri-devel
mailing list