per-plane LUTs and CSCs?

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 10 10:28:03 UTC 2020


On Thu, 10 Sep 2020 12:30:09 +0300
Laurentiu Palcu <laurentiu.palcu at oss.nxp.com> wrote:

> Hi Pekka,
> 
> On Thu, Sep 10, 2020 at 11:50:26AM +0300, Pekka Paalanen wrote:
> > On Thu, 10 Sep 2020 09:52:26 +0200
> > Daniel Vetter <daniel at ffwll.ch> wrote:
> >   
> > > On Thu, Sep 10, 2020 at 10:25:43AM +0300, Pekka Paalanen wrote:  
> > > > On Wed, 9 Sep 2020 13:57:28 +0300
> > > > Laurentiu Palcu <laurentiu.palcu at oss.nxp.com> wrote:
> > > >     
> > > > > Hi all,
> > > > > 
> > > > > I was wondering whether you could give me an advise on how to proceed further
> > > > > with the following issue as I'm preparing to upstream the next set of patches
> > > > > for the iMX8MQ display controller(DCSS). The display controller has 3 planes,
> > > > > each with 2 CSCs and one degamma LUT. The CSCs are in front and after the LUT
> > > > > respectively. Then the output from those 3 pipes is blended together and then
> > > > > gamma correction is applied using a linear-to-nonlinear LUT and another CSC, if
> > > > > needed.  
> > 
> > Hi,
> > 
> > hmm, so FB -> CSC -> LUT -> CSC -> blending?
> > 
> > Is it then
> > 	blending -> LUT -> CSC -> encoder
> > or
> > 	blending -> CSC -> LUT -> encoder?  
> 
> The DCSS pipeline topology is this:
> 
> FB1->CSC_A->LUT->CSC_B-\
> FB2->CSC_A->LUT->CSC_B-|-blender->LUT->CSC_O->encoder
> FB3->CSC_A->LUT->CSC_B-/
> 
> Basically, CSC_A is used to convert to a common colorspace if needed
> (YUV->RGB) as well as to perform pixel range conversions: limited->full.
> CSC_B is for gamut conversions(like 709->2020). The CSC_O is used to
> convert to the colorspace used by the output (like RGB->YUV).

I didn't realize that it would be correct to do RGB-YUV conversion in
non-linear space, but yeah, that's what most software do too I guess.

> > 
> > Are all these LUTs per-channel 1D LUTs or something else?  
> 
> LUTs are 3D, per pixel component.

Sorry, which one?

An example of a 3D LUT is 32x32x32 entries with each entry being a
triplet, while a 1D LUT could be 1024 entries with each entry being a
scalar. 1D LUTs are used per-channel so you need three of them, 3D LUTs
you need just one for the color value triplet mapping.

A 3D LUT can express much more than a 4x4 CTM. A 1D LUT cannot do the
channel mixing that a CTM can.

So if you truly have 3D LUTs everywhere, I wonder why the CSC matrix
blocks exist...


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200910/8e63df83/attachment.sig>


More information about the dri-devel mailing list