Post Reply

mdnie LUT format with shared CYMK+W primaries?

OP PelPix

10th May 2014, 07:49 PM   |  #1  
OP Member
Thanks Meter: 0
 
31 posts
Join Date:Joined: Mar 2011
I need someone who can help me better understand how this LUT works. I'm trying to create an app that loads ICC profiles on the Galaxy S4 using mdnie, but the definitions are all concorded and weird and I can't figure out how to pull them out.

mdnie loads color correction in LUTs that look like this:

Code:
static char MOVIE_UI_2[] = {
0xEC,
0x00, //roi ctrl
0x00, //roi0 x start
0x00,
0x00, //roi0 x end
0x00,
0x00, //roi0 y start
0x00,
0x00, //roi0 y end
0x00,
0x00, //roi1 x strat
0x00,
0x00, //roi1 x end
0x00,
0x00, //roi1 y start
0x00,
0x00, //roi1 y end
0x00,
0x81, //scr Cr Yb
0xd9, //scr Rr Bb
0xf6, //scr Cg Yg
0x1c, //scr Rg Bg
0xec, //scr Cb Yr
0x13, //scr Rb Br
0xe0, //scr Mr Mb
0x52, //scr Gr Gb
0x34, //scr Mg Mg
0xee, //scr Gg Gg
0xf5, //scr Mb Mr
0x1f, //scr Gb Gr
0xe9, //scr Yr Cb
0x1c, //scr Br Rb
0xf3, //scr Yg Cg
0x1f, //scr Bg Rg
0x40, //scr Yb Cr
0xeb, //scr Bb Rr
0xff, //scr Wr Wb
0x00, //scr Kr Kb
0xfa, //scr Wg Wg
0x00, //scr Kg Kg
0xf3, //scr Wb Wr
0x00, //scr Kb Kr
0x00, //curve 1 b
0x20, //curve 1 a
0x00, //curve 2 b
0x20, //curve 2 a
0x00, //curve 3 b
0x20, //curve 3 a
0x00, //curve 4 b
0x20, //curve 4 a
0x02, //curve 5 b
0x1b, //curve 5 a
0x02, //curve 6 b
0x1b, //curve 6 a
0x02, //curve 7 b
0x1b, //curve 7 a
0x01, //curve 8 b
0x1b, //curve 8 a
0x09, //curve 9 b
0xa6, //curve 9 a
0x09, //curve10 b
0xa6, //curve10 a
0x09, //curve11 b
0xa6, //curve11 a
0x09, //curve12 b
0xa6, //curve12 a
0x00, //curve13 b
0x20, //curve13 a
0x00, //curve14 b
0x20, //curve14 a
0x00, //curve15 b
0x20, //curve15 a
0x00, //curve16 b
0x20, //curve16 a
0x00, //curve17 b
0x20, //curve17 a
0x00, //curve18 b
0x20, //curve18 a
0x00, //curve19 b
0x20, //curve19 a
0x00, //curve20 b
0x20, //curve20 a
0x00, //curve21 b
0x20, //curve21 a
0x00, //curve22 b
0x20, //curve22 a
0x00, //curve23 b
0x20, //curve23 a
0x00, //curve24 b
0xFF, //curve24 a
0x04, //cc r1 0.2
0x90,
0x1f, //cc r2
0x88,
0x1f, //cc r3
0xe8,
0x1f, //cc g1
0xc3,
0x04, //cc g2
0x55,
0x1f, //cc g3
0xe8,
0x1f, //cc b1
0xc3,
0x1f, //cc b2
0x88,
0x04, //cc b3
0xb5,
};
(Yes, the hardware converts the RGB input to CYMK+W to do color correction and then back to RGB again to output to screen. What the ****, Samsung?)

Pretty sure the beginning bits are bounds, the //scr section is the color LUT, and everything after is the gamma LUT.

The problem I'm having is that all these values seem to be double-defined in a way I can't decode.

Code:
0xeb, //scr Bb Rr
Vs

Code:
0xd9, //scr Rr Bb
Suggestions? Is one + and one - in colorspace?
Last edited by PelPix; 10th May 2014 at 07:53 PM.
13th May 2014, 04:24 PM   |  #2  
Senior Member
Flag 台灣
Thanks Meter: 664
 
750 posts
Join Date:Joined: Sep 2006
More
Quote:
Originally Posted by PelPix

I need someone who can help me better understand how this LUT works. I'm trying to create an app that loads ICC profiles on the Galaxy S4 using mdnie, but the definitions are all concorded and weird and I can't figure out how to pull them out.

Pretty sure the beginning bits are bounds, the //scr section is the color LUT, and everything after is the gamma LUT.

The problem I'm having is that all these values seem to be double-defined in a way I can't decode.

Code:
0xeb, //scr Bb Rr
Vs

Code:
0xd9, //scr Rr Bb
Suggestions? Is one + and one - in colorspace?

Just disregard the second column in color name. So, use "scr Bb Rr" just as "scr Bb". The second color name is just inverted color space (for unknown reason).
Bb means amount of blue in Blue color, and so on.
Curves - are gamma curves. CC is another color control.
Most challenging is curves of gamma. They are very depend on each other like harmonics.
Every curve has 2 bytes:
a - 0..127 (X amount), mask 0x80 is sign for (b)
b - 0..255 (Y amount)

curve24 has special meaning - total amplification.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes