Re: [RFC v2 2/2] backlight: pwm_bl: compute brightness of LED linearly to human eye.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi!

> Yes, I think that how you describe luminance and lightness is right,
> and sounds good improve the doc.
> 
> To be clear the correction table for PWM values can be calculated with
> this code.
> 
> OUTPUT_SIZE = 65535      # Output integer size
> INPUT_SIZE = 2047
> 
> def cie1931(L):
>     L = L*100.0
>     if L <= 8:
>         return (L/902.3)
>     else:
>         return ((L+16.0)/116.0)**3
> 
> x = range(0,int(INPUT_SIZE+1))
> y = [int(round(cie1931(float(L)/INPUT_SIZE)*(OUTPUT_SIZE))) for L in x]

Can we just generate the table on the fly? Should not be hard to do in
fixed point, right?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux