Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Artificial Intelligence LUT calibration #896

Open
wants to merge 50 commits into
base: master
Choose a base branch
from

Conversation

awawa-dev
Copy link
Owner

@awawa-dev awawa-dev commented Jul 7, 2024

I don't know what the final effect will be, but since AI is currently very popular ;) I willlet's use Deep Learning Function Approximation to calibrate SDR/HDR/whatever video source. We will use Python and its related libraries here but it is an optional functionality and you do not have to use it nor will we install it: it must be present in the system.
But first, let's sort out the calibrator code because it needs cleaning before further work. We will use a nNew library for linear algebra herewill help us.

Video test files:
https://github.com/awawa-dev/awawa-dev.github.io/tree/master/calibration
Use SDR video only if your OS or video player will automatically apply SDR to HDR tone mapping.

Old method using Windows 10 and a web browser is no longer mandatory, you can use the old method using browser or simply play the video test file in your favorite video player.

Captured colors are saved in the HyperHDR directory after calibration as calibration_captured_yuv.txt and can be provided to me for analysis if I have some spare time.

@awawa-dev
Copy link
Owner Author

And with latest BT.2100 OOTF detection is even better:

2024-09-09T02:23:09.923Z [CALIBRATOR] (LutCalibrator.cpp:1054) --------------------------------- Actual PQ primaries for YUV coefs: BT2020 ---------------------------------
2024-09-09T02:23:09.923Z [CALIBRATOR] (LutCalibrator.cpp:1055) r: (0.641, 0.333) vs sRGB(0.640, 0.330) vs bt2020(0.708, 0.292)
2024-09-09T02:23:09.923Z [CALIBRATOR] (LutCalibrator.cpp:1056) g: (0.291, 0.618) vs sRGB(0.300, 0.600) vs bt2020(0.170, 0.797)
2024-09-09T02:23:09.924Z [CALIBRATOR] (LutCalibrator.cpp:1057) b: (0.148, 0.060) vs sRGB(0.150, 0.060) vs bt2020(0.131, 0.046)
2024-09-09T02:23:09.924Z [CALIBRATOR] (LutCalibrator.cpp:1058) w: (0.313, 0.329) vs sRGB(0.313, 0.329) vs bt2020(0.313, 0.329)
2024-09-09T02:23:09.929Z [CALIBRATOR] (LutCalibrator.cpp:856) Score: 458.572000
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:857) Selected coef: BT2020
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:858) selected coef delta: 0.017000 -0.002000
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:859) Selected EOTF: HLG
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:862) Selected HLG gamma: 0.000000
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:864) Selected nits: 73.733520
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:865) selected bt2020 range: 1
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:866) selected alt convert: 0
2024-09-09T02:23:09.930Z [CALIBRATOR] (LutCalibrator.cpp:867) selected aspect: 1.010000 0.985000 0.985000
2024-09-09T02:23:09.963Z [CALIBRATOR] Write captured colors to: C:/Users/:-P/.hyperhdr/calibration_captured_yuv.txt
HDR10:
       White: [255 255 255] => [255 255 255] [corrected]
         Red: [255   0   0] => [241   0   0] [corrected]
       Green: [  0 255   0] => [  0 255   0] [corrected]
        Blue: [  0   0 255] => [  0   2 243] [corrected]
    UpperRed: [192   0   0] => [183   1   0] [corrected]
  UpperGreen: [  0 192   0] => [  0 196   0] [corrected]
   UpperBlue: [  0   0 192] => [  0   0 185] [corrected]
   MiddleRed: [128   0   0] => [128   0   0] [corrected]
 MiddleGreen: [  0 128   0] => [  0 133   0] [corrected]
  MiddleBlue: [  0   0 128] => [  0   0 126] [corrected]
      LowRed: [ 64   0   0] => [ 60   0   0] [corrected]
    LowGreen: [  0  64   0] => [  0  71   0] [corrected]
     LowBlue: [  0   0  64] => [  0   0  65] [corrected]
      Yellow: [255 255   0] => [248 255   0] [corrected]
     Magenta: [255   0 255] => [245   0 247] [corrected]
        Cyan: [  0 255 255] => [  0 255 250] [corrected]

      Orange: [255 128   0] => [247 133   0] [corrected]
    LimeBlue: [  0 255 128] => [  0 255 132] [corrected]
        Pink: [255   0 128] => [241   0 132] [corrected]
     LimeRed: [128 255   0] => [132 255   0] [corrected]
       Azure: [  0 128 255] => [  0 136 248] [corrected]
      Violet: [128   0 255] => [128   0 240] [corrected]
     WHITE_0: [  0   0   0] => [  0   0   0] [corrected]
     WHITE_1: [ 16  16  16] => [ 25  25  25] [corrected]
     WHITE_2: [ 32  32  32] => [ 40  40  40] [corrected]
     WHITE_3: [ 48  48  48] => [ 56  56  56] [corrected]
     WHITE_4: [ 64  64  64] => [ 70  70  70] [corrected]
     WHITE_5: [ 80  80  80] => [ 87  87  87] [corrected]
     WHITE_6: [ 96  96  96] => [102 102 102] [corrected]
     WHITE_7: [112 112 112] => [120 120 120] [corrected]
     WHITE_8: [128 128 128] => [134 134 134] [corrected]
     WHITE_9: [144 144 144] => [150 150 150] [corrected]
    WHITE_10: [160 160 160] => [166 166 166] [corrected]
    WHITE_11: [176 176 176] => [179 179 179] [corrected]
    WHITE_12: [192 192 192] => [194 194 194] [corrected]
    WHITE_13: [208 208 208] => [211 211 211] [corrected]
    WHITE_14: [224 224 224] => [225 225 225] [corrected]
    WHITE_15: [240 240 240] => [241 241 241] [corrected]
    WHITE_16: [255 255 255] => [255 255 255] [corrected]

So webos is using HLG inverse OETF but later it skips OOTF .
We can detect such situation now (Selected HLG gamma: 0.000000 in the result logs)

@awawa-dev awawa-dev marked this pull request as ready for review September 9, 2024 00:57
@satgit62
Copy link

satgit62 commented Sep 9, 2024

And with latest BT.2100 OOTF detection is even better:

So webos is using HLG inverse OETF but later it skips OOTF . We can detect such situation now (Selected HLG gamma: 0.000000 in the result logs)

@awawa-dev Hello,
many thanks for the mega fast implementation. That is good news.
I will incorporate the changes into my fork and build for webOS to test and will share my experience with them.
I don't know if they were aware of the latest changes to hyperion-webos. (After a few years, it was discovered that PicCap provides the wrong algorithm for the color calculation for HyperHDR and therefore the LED colors do not match the TV picture. The data is captured with FMT_ABGR, which is actually ARGB. ABGRToARGB, now the bytes are actually BGR, ARGBToRGB24, which in turn is changed to get RGB again.) They made corrections to the internal grabber. See:webosbrew/hyperion-webos@3b58d8a

@NatyaSadella
Copy link

I have tested this the last couple hours:

  1. Sadly that new calibration method doesn't work with the latest Apple TV 4K. I have tried every possible combination of ATV picture modes and test video files, LG settings, everything imaginable. HyperHDR only returns endless "too low resolution or too much noice" errors. On Windows the new method works.

  2. To the users who already tested this: How do your Maximum Luminance Scenes look after the new calibration method? I got a score of 119 and the picture is super bright now (thats actually good) but Maximum Luminance Areas are super overbrightened. Anyone else or error on my side?

  3. I think the new PicCap Backend-Files are necessary for this to work. I've tried the new method with a vanilla PicCap installation and that gave me the NV12 error.

Thank you all so much for this changes. This new method and the changes to PicCap made Ambilight fun again :)

@s1mptom
Copy link

s1mptom commented Sep 9, 2024

Sadly that new calibration method doesn't work with the latest Apple TV 4K. I have tried every possible combination of ATV picture modes and test video files, LG settings, everything imaginable. HyperHDR only returns endless "too low resolution or too much noice" errors. On Windows the new method works.

with hyperion-webos only 1080p works without errors about noise and resolution

To the users who already tested this: How do your Maximum Luminance Scenes look after the new calibration method? I got a score of 119 and the picture is super bright now (thats actually good) but Maximum Luminance Areas are super overbrightened. Anyone else or error on my side?

I have similar thing, but I'm still in testing) my picture has a bit of a greenish tint to it.... can't get a consistent result (gods know what happens in webos)

I think the new PicCap Backend-Files are necessary for this to work. I've tried the new method with a vanilla PicCap installation and that gave me the NV12 error.

Yes, you need to bypass the conversion from NV12 to RGB in the hyperion-webos backend - you can try that with my modifications (I think it's here https://github.com/s1mptom/hyperion-webos/actions/runs/10435701393)

@NatyaSadella
Copy link

I have similar thing, but I'm still in testing) my picture has a bit of a greenish tint to it.... can't get a consistent result (gods know what happens in webos)

When using the old calibration method, I was able to get around that MaxLuminance thing by just deactivating HDR in windows before calibrating. Picture looked the same but with super accurate Max Luminance

@awawa-dev
Copy link
Owner Author

awawa-dev commented Sep 13, 2024

Hi @NatyaSadella

Sadly that new calibration method doesn't work with the latest Apple TV 4K. I have tried every possible combination of ATV picture modes and test video files, LG settings, everything imaginable. HyperHDR only returns endless "too low resolution or too much noice" errors. On Windows the new method works.

I can confirm there was a problem when the grabber resolution wasnt set to 1080p. It's fixed now

To the users who already tested this: How do your Maximum Luminance Scenes look after the new calibration method? I got a score of 119 and the picture is super bright now (thats actually good) but Maximum Luminance Areas are super overbrightened. Anyone else or error on my side?

Currently our HDR video test files are calibrated for ~200nits but webos (or nvidia with tone mapping) can disrespect this depending on some settings and the brightness must be detected. What is more interesting webos is changing gamma from PQ to HLG even if the source material is using PQ gamma. There is possibility to provide test files for other than 200 nits target brightness using ffmpeg.

I think the new PicCap Backend-Files are necessary for this to work. I've tried the new method with a vanilla PicCap installation and that gave me the NV12 error.

Yes, I completely dropped RGB for calibration due to many unpredictable problems so standard flatbuffers/RGB wont work. You need webos client using flatbuffer/NV12.

Thank you all so much for this changes. This new method and the changes to PicCap made Ambilight fun again :)

We are just starting...BTW by pure accident we calibrated also full Rec.2020 thanks to NVidia Shield tone mapping ;-)
I must also re-test all old grabbers. I focus on the grabbers and I hope Ezcap 320 will finally start to cooperate with HLG. This's still interesting grabber thanks to the capabilities and an undocumented option to disable HDCP ;-)

And can anyone help us with converting our test video files from HDR10 to DV? :-) Probably special software is necessary.

@NatyaSadella
Copy link

I can confirm there was a problem when the grabber resolution wasnt set to 1080p. It's fixed now

That was the weird part, PicCap is always set to 1920x1080-60 when I start calibrating. I have tried setting ATV to 1080p too, no dice. But the new version works perfect, no errors, every board is immediately captured. Processing is noticeably faster too. Thank you for the quick fix!

Currently our HDR video test files are calibrated for ~200nits but webos (or nvidia with tone mapping) can disrespect this depending on some settings and the brightness must be detected. What is more interesting webos is changing gamma from PQ to HLG even if the source material is using PQ gamma. There is possibility to provide test files for other than 200 nits target brightness using ffmpeg.

I always look at the log and the numbers after calibrating and I was never able to see a higher nit score than 90. Is this good or bad? I know SDR brightness is around 100-120 nits so I guess I should be close to SDR norms? Or should I see a score closer to your mentioned 200 nits target?

One observation: When I change the video format in webOS from Auto to Full, the nit score drops from 90 to around 50. The LUT looks much closer to the screen when I select the wrong video format. If I calibrate with Low video format, I get 90 nits and a superbright image. In terms of accuracy, it's way too bright. In my case, this is good because I can use 2.0 LED Gamma for both SDR and HDR. But in terms of pure accuracy it's way off. When I select the wrong video format, it's way more accurate. This was a observation with the old calibration method too, if I set LG to Low HyperHDR says Full detected and vice versa. Is this the desired effect?

@awawa-dev
Copy link
Owner Author

Well this part is unclear to me why webos treats it this way. Since it can transform the image from PQ to HLG anyway it can also ignore the original brightness: why it does this - I don't know. Maybe because this stream also is used for its video recorder and HLG will handle SDR and HDR and it also applies all the possible user settings from the LG menu? In the case of SDR @s1mptom provided me with the logs and here is an additional thing I need to pay attention to:
This is the raw captured data of SDR test file:

     WHITE_0: [  0   0   0] => [ 15  15  15] , YUV: [ 29 128 128]
     WHITE_1: [ 16  16  16] => [ 29  29  29] , YUV: [ 41 128 128]
     WHITE_2: [ 32  32  32] => [ 42  42  42] , YUV: [ 52 128 128]
     WHITE_3: [ 48  48  48] => [ 56  56  56] , YUV: [ 64 128 128]
     WHITE_4: [ 64  64  64] => [ 70  70  70] , YUV: [ 76 128 128]
     WHITE_5: [ 80  80  80] => [ 84  84  84] , YUV: [ 88 128 128]
     WHITE_6: [ 96  96  96] => [ 98  98  98] , YUV: [100 128 128]
     WHITE_7: [112 112 112] => [112 112 112] , YUV: [112 128 128]
     WHITE_8: [128 128 128] => [126 126 126] , YUV: [124 128 128]
     WHITE_9: [144 144 144] => [140 140 140] , YUV: [136 128 128]
    WHITE_10: [160 160 160] => [153 153 153] , YUV: [147 128 128]
    WHITE_11: [176 176 176] => [167 167 167] , YUV: [159 128 128]
    WHITE_12: [192 192 192] => [180 180 180] , YUV: [171 128 128]
    WHITE_13: [208 208 208] => [194 194 194] , YUV: [183 128 128]
    WHITE_14: [224 224 224] => [207 207 207] , YUV: [194 128 128]
    WHITE_15: [240 240 240] => [221 221 221] , YUV: [206 128 128]
    WHITE_16: [255 255 255] => [234 234 234] , YUV: [217 128 128]

Look at WHITE_0. Despite the fact that YUV was detected as limited and that after processing and deleting limit in RGB is still limited in the range of 16-235 (or 29-217 YUV)... but it may not be about YUV anymore but about the TV range of 16-235. If you are able to calibrate on the SDR file, see if the captured brightness behaves the same and provide me calibration_captured_yuv.txt file after the calibration. if that is confirmed I can handle such situation. But 2 of 3 LUT tables will be necessary (HyperHDR can switch them on fly and webos also can detect HDR/SDR type of video input).

@satgit62
Copy link

I can confirm there was a problem when the grabber resolution wasnt set to 1080p. It's fixed now

That was the weird part, PicCap is always set to 1920x1080-60 when I start calibrating. I have tried setting ATV to 1080p too, no dice. But the new version works perfect, no errors, every board is immediately captured. Processing is noticeably faster too. Thank you for the quick fix!

Currently our HDR video test files are calibrated for ~200nits but webos (or nvidia with tone mapping) can disrespect this depending on some settings and the brightness must be detected. What is more interesting webos is changing gamma from PQ to HLG even if the source material is using PQ gamma. There is possibility to provide test files for other than 200 nits target brightness using ffmpeg.

I always look at the log and the numbers after calibrating and I was never able to see a higher nit score than 90. Is this good or bad? I know SDR brightness is around 100-120 nits so I guess I should be close to SDR norms? Or should I see a score closer to your mentioned 200 nits target?

One observation: When I change the video format in webOS from Auto to Full, the nit score drops from 90 to around 50. The LUT looks much closer to the screen when I select the wrong video format. If I calibrate with Low video format, I get 90 nits and a superbright image. In terms of accuracy, it's way too bright. In my case, this is good because I can use 2.0 LED Gamma for both SDR and HDR. But in terms of pure accuracy it's way off. When I select the wrong video format, it's way more accurate. This was a observation with the old calibration method too, if I set LG to Low HyperHDR says Full detected and vice versa. Is this the desired effect?

Hi,
Which PicCap backend and webOS HyperHDR are working perfectly for you now?

@NatyaSadella
Copy link

NatyaSadella commented Sep 13, 2024

Well this part is unclear to me why webos treats it this way. Since it can transform the image from PQ to HLG anyway it can also ignore the original brightness: why it does this - I don't know. Maybe because this stream also is used for its video recorder and HLG will handle SDR and HDR and it also applies all the possible user settings from the LG menu? In the case of SDR @s1mptom provided me with the logs and here is an additional thing I need to pay attention to:

WHITE_0: [ 0 0 0] => [ 15 15 15] , YUV: [ 29 128 128]

Look at WHITE_0. Despite the fact that YUV was detected as limited and that after processing and deleting limit in RGB is still limited in the range of 16-235 (or 29-217 YUV)... but it may not be about YUV anymore but about the TV range of 16-235. If you are able to calibrate on the SDR file, see if the captured brightness behaves the same and provide me calibration_captured_yuv.txt file after the calibration. if that is confirmed I can handle such situation. But 2 of 3 LUT tables will be necessary (HyperHDR can switch them on fly and webos also can detect HDR/SDR type of video input).

I will do a sample SDR calibration later and attach the .txt for analysis. I`ve done some testing with SDR calibrating and I have to say, this is the way to go for my setup. If I calibrate with the SDR test file, I get a much higher score (around 3000) but also a much higher nit score. Depending on how you setup your LG SDR picture mode, I got a range of 450-660 nits reported by HyperHDR. This also eliminates the Maximum Luminance behaviour, as you can see in my attached screens, this is Dolby Vision:

New calibration method with HDR420 test file image

image

New calibration method with SDR420 test file image

image

Photo of TV:

image

The second live preview snapshot is actually much closer to what's on the screen in terms of colors, even if it does look the other way on my photo.

I have also looked at how to convert that hdr file to dolby vision but if I try to extract the HDR metadata from the test file, every tool says: No HDR Metadata available

I have send the MediaInfo for that file to some internet guys and the answer I got was this:

"Yeah this doesn't have the correct HDR10 metadata. Your TV probably is ignoring the missing metadata and assuming HDR because it's PQ Rec. 2020."

I don't know how correct that is but it would match the errors I got when I try to extract the metadata

@awawa-dev
Copy link
Owner Author

awawa-dev commented Sep 13, 2024

@NatyaSadella I'm not an encoder expert, just try to use ffmpeg

for YUV420 there should be HDR metatag (hdr10=1):
ffmpeg -loop 1 -t 90 -framerate 1/3 -i table_%d.png -stream_loop -1 -i audio.ogg -shortest -map 0:v:0 -map 1:a:0 -vf fps=25,zscale=m=2020_ncl:p=2020:t=smpte2084:r=full:min=709:pin=709:tin=iec61966-2-1:rin=full:c=topleft:npl=200,format=yuv420p10le -c:v libx265 -vtag hvc1 -pix_fmt yuv420p10le -profile:v main10 -preset veryslow -x265-params keyint=75:min-keyint=75:bframes=0:scenecut=0:psy-rd=0:psy-rdoq=0:rdoq=0:sao=false:cutree=false:deblock=false:strong-intra-smoothing=0:hdr10=1:lossless=1:colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:range=full -f mp4 test_HDR_yuv420_low_quality.mp4

but I can be wrong and there is still a room for improvement

@NatyaSadella
Copy link

Hi,

Which PicCap backend and webOS HyperHDR are working perfectly for you now?

I`m still using HyperHDR on computer with the new backends for piccap you send to me a couple of weeks ago.

Trying to get the new backends to run with HyperHDR on webOS results in endless "Socket closed" errors. Only with a vanilla installation of PicCap it works again but then I can't use the new calibration method because of NV12 errors. After endless re-installs and reboots I just gave up on it.

@awawa-dev
Copy link
Owner Author

vanilla installation of PicCap

PicCap is not related to NV12 support, you need @s1mptom hyperion-webos backend fork

@NatyaSadella
Copy link

NatyaSadella commented Sep 13, 2024

vanilla installation of PicCap

PicCap is not related to NV12 support, you need @s1mptom hyperion-webos backend fork

I will look into that, I have just replaced the backend files.

I have now come a little further in the calibration and have done some fine-tuning to the webOS settings and getting closer and closer. I don't know if the old "the lower the better" score still counts, but I got a score of 56 instead of 3000 and above for the first time during an SDR calibration. Nit Score says 445 nits and the LUT looks like the best of both worlds. Very good brightness as with the HDR calibration with only a very small bit of maximum luminance errors:

SDR cal new:

image

SDR cal old:

image

HDR cal:

image

@awawa-dev
Copy link
Owner Author

awawa-dev commented Sep 13, 2024

Ok, I've just added support for SDR/SRGB calibration so we have another progress and more surprises:

  • SDR is using simply sRGB gamma, but needs range correction.
  • it is using NOT BT.2020 colors ... just simply RGB colors, no need to change them.

So calibration using old methods were invalid for webos at least for such input data.

To avoid ambiguity, I still base my development on @s1mptom provided results, which in this case he obtained using an SDR test file using his fork which supports calibration via NV12 (results attached).
calibration_captured_yuv_sdr.txt

Regarding these captured colors (#896 (comment)) here is the result

2024-09-14T00:26:27.320Z [CALIBRATOR] (LutCalibrator.cpp:821) Score: 3.306000
2024-09-14T00:26:27.320Z [CALIBRATOR] (LutCalibrator.cpp:822) Time: 1.351000
2024-09-14T00:26:27.321Z [CALIBRATOR] (LutCalibrator.cpp:824) Selected coef: FCC
2024-09-14T00:26:27.322Z [CALIBRATOR] (LutCalibrator.cpp:825) Selected coef delta: -0.004000 0.004000
2024-09-14T00:26:27.322Z [CALIBRATOR] (LutCalibrator.cpp:826) Selected EOTF: sRGB
2024-09-14T00:26:27.323Z [CALIBRATOR] (LutCalibrator.cpp:835) Selected bt2020 range: 0
2024-09-14T00:26:27.323Z [CALIBRATOR] (LutCalibrator.cpp:836) Selected alt convert: 0
2024-09-14T00:26:27.323Z [CALIBRATOR] (LutCalibrator.cpp:837) Selected aspect: 1.000000 1.130000 1.130000
2024-09-14T00:26:27.334Z [CALIBRATOR] Write captured colors to: C:/Users/:-)/.hyperhdr/calibration_captured_yuv.txt

HDR10:
       White: [255 255 255] => [255 255 255] [corrected]
         Red: [255   0   0] => [252   3   0] [corrected]
       Green: [  0 255   0] => [  3 255   2] [corrected]
        Blue: [  0   0 255] => [  1   1 253] [corrected]
    UpperRed: [192   0   0] => [189   2   0] [corrected]
  UpperGreen: [  0 192   0] => [  0 193   0] [corrected]
   UpperBlue: [  0   0 192] => [  0   3 190] [corrected]
   MiddleRed: [128   0   0] => [128   2   1] [corrected]
 MiddleGreen: [  0 128   0] => [  0 129   1] [corrected]
  MiddleBlue: [  0   0 128] => [  2   2 128] [corrected]
      LowRed: [ 64   0   0] => [ 63   1   1] [corrected]
    LowGreen: [  0  64   0] => [  0  65   0] [corrected]
     LowBlue: [  0   0  64] => [  0   1  62] [corrected]
      Yellow: [255 255   0] => [254 255   1] [corrected]
     Magenta: [255   0 255] => [254   3 252] [corrected]
        Cyan: [  0 255 255] => [  8 255 255] [corrected]

      Orange: [255 128   0] => [255 129   2] [corrected]
    LimeBlue: [  0 255 128] => [  4 254 127] [corrected]
        Pink: [255   0 128] => [252   3 125] [corrected]
     LimeRed: [128 255   0] => [127 255   2] [corrected]
       Azure: [  0 128 255] => [  0 128 253] [corrected]
      Violet: [128   0 255] => [128   2 253] [corrected]
     WHITE_0: [  0   0   0] => [  0   0   0] [corrected]
     WHITE_1: [ 16  16  16] => [ 16  16  16] [corrected]
     WHITE_2: [ 32  32  32] => [ 31  31  31] [corrected]
     WHITE_3: [ 48  48  48] => [ 47  47  47] [corrected]
     WHITE_4: [ 64  64  64] => [ 64  64  64] [corrected]
     WHITE_5: [ 80  80  80] => [ 80  80  80] [corrected]
     WHITE_6: [ 96  96  96] => [ 96  96  96] [corrected]
     WHITE_7: [112 112 112] => [113 113 113] [corrected]
     WHITE_8: [128 128 128] => [129 129 129] [corrected]
     WHITE_9: [144 144 144] => [145 145 145] [corrected]
    WHITE_10: [160 160 160] => [160 160 160] [corrected]
    WHITE_11: [176 176 176] => [176 176 176] [corrected]
    WHITE_12: [192 192 192] => [193 193 193] [corrected]
    WHITE_13: [208 208 208] => [209 209 209] [corrected]
    WHITE_14: [224 224 224] => [224 224 224] [corrected]
    WHITE_15: [240 240 240] => [240 240 240] [corrected]
    WHITE_16: [255 255 255] => [255 255 255] [corrected]

@NatyaSadella
Copy link

ohhh boy and I thought I was done with calibrating for tonight 😃

@s1mptom @awawa-dev Absurdly great score, what webOS SDR picture mode did you use and what were the settings you choose for like contrast or color depth to achieve this score? I need to replicate this, the best I saw was a score of 14 now but the LUT was super dark. I've tried to lower the contrast so the LUT gets brighter but on the level I need, sRGB gets lost and it's HLG again.

Was this a tonemapped SDR calibration or a raw sdr calibration? Just to clarify. I do not tonemap in HDR/DV while calibrating with the sdr420 file and want to make sure I'm doing it right.

@satgit62
Copy link

satgit62 commented Sep 14, 2024

Hi,
Firstly, I would like to thank @awawa-dev for his new implementations for LG webOS users. Also, @s1mptom's backend is necessary for successful testing.The videos test files from awawa-dev are required for calibration: https://github.com/awawa-dev/awawa-dev.github.io/tree/master/calibration. For those who want to test all these HyperHDR changes on LG webOS, I have compiled “ai_calibration” branch of @awawa-dev and created a test IPK for webOS.
Link to download:https://github.com/satgit62/hyperhdr-webos-loader/releases/download/latest/org.webosbrew.hyperhdr.loader_0.1.9_all.ipk
I would appreciate your feedback.

Lut Calibration

About HyperHDR

New calibration_captured_yuv.txt format
@awawa-dev
Copy link
Owner Author

awawa-dev commented Sep 18, 2024

LG C9 libdile_vt (GUI capturing disabled),yuv420_hdr test file, windows10 + HDR, 1080p for calibration, excellent score better than most grabbers. HyperHDR (v21 from this PR) runs on the external PC.

2024-09-18T22:52:14.021Z [CALIBRATOR] (LutCalibrator.cpp:1028) --------------------------------- Actual PQ primaries for YUV coefs: BT709 ---------------------------------
2024-09-18T22:52:14.022Z [CALIBRATOR] (LutCalibrator.cpp:1029) r: (0.696, 0.291) vs sRGB(0.640, 0.330) vs bt2020(0.708, 0.292)
2024-09-18T22:52:14.022Z [CALIBRATOR] (LutCalibrator.cpp:1030) g: (0.220, 0.722) vs sRGB(0.300, 0.600) vs bt2020(0.170, 0.797)
2024-09-18T22:52:14.024Z [CALIBRATOR] (LutCalibrator.cpp:1031) b: (0.131, 0.050) vs sRGB(0.150, 0.060) vs bt2020(0.131, 0.046)
2024-09-18T22:52:14.025Z [CALIBRATOR] (LutCalibrator.cpp:1032) w: (0.313, 0.329) vs sRGB(0.313, 0.329) vs bt2020(0.313, 0.329)
2024-09-18T22:52:14.027Z [CALIBRATOR] (LutCalibrator.cpp:823) Score: 281.687000
2024-09-18T22:52:14.028Z [CALIBRATOR] (LutCalibrator.cpp:824) Time: 10.284000
2024-09-18T22:52:14.028Z [CALIBRATOR] (LutCalibrator.cpp:826) Selected coef: BT709
2024-09-18T22:52:14.029Z [CALIBRATOR] (LutCalibrator.cpp:827) Selected coef delta: -0.018000 0.006000
2024-09-18T22:52:14.029Z [CALIBRATOR] (LutCalibrator.cpp:828) Selected EOTF: HLG
2024-09-18T22:52:14.030Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected HLG gamma: 0.000000
2024-09-18T22:52:14.031Z [CALIBRATOR] (LutCalibrator.cpp:835) Selected nits: 150.327709
2024-09-18T22:52:14.032Z [CALIBRATOR] (LutCalibrator.cpp:837) Selected bt2020 range: 1
2024-09-18T22:52:14.032Z [CALIBRATOR] (LutCalibrator.cpp:838) Selected alt convert: 1
2024-09-18T22:52:14.033Z [CALIBRATOR] (LutCalibrator.cpp:839) Selected aspect: 1.000000 1.085000 1.085000
HDR10:
       White: [255 255 255] => [255 255 255] [corrected]
         Red: [255   0   0] => [248   0   0] [corrected]
       Green: [  0 255   0] => [  0 253   0] [corrected]
        Blue: [  0   0 255] => [  0   0 255] [corrected]
    UpperRed: [192   0   0] => [185   0   0] [corrected]
  UpperGreen: [  0 192   0] => [  0 188   0] [corrected]
   UpperBlue: [  0   0 192] => [  0   0 193] [corrected]
   MiddleRed: [128   0   0] => [129   0   0] [corrected]
 MiddleGreen: [  0 128   0] => [  0 129   0] [corrected]
  MiddleBlue: [  0   0 128] => [  0   0 133] [corrected]
      LowRed: [ 64   0   0] => [ 67   0   0] [corrected]
    LowGreen: [  0  64   0] => [  0  70   0] [corrected]
     LowBlue: [  0   0  64] => [  0   0  69] [corrected]
      Yellow: [255 255   0] => [252 255   0] [corrected]
     Magenta: [255   0 255] => [248   7 255] [corrected]
        Cyan: [  0 255 255] => [  0 251 255] [corrected]
      Orange: [255 128   0] => [248 134   0] [corrected]
    LimeBlue: [  0 255 128] => [  0 251 123] [corrected]
        Pink: [255   0 128] => [248   8 126] [corrected]
     LimeRed: [128 255   0] => [127 254   0] [corrected]
       Azure: [  0 128 255] => [ 13 126 255] [corrected]
      Violet: [128   0 255] => [129   0 255] [corrected]
     WHITE_0: [  0   0   0] => [  0   0   0] [corrected]
     WHITE_1: [ 16  16  16] => [ 19  19  19] [corrected]
     WHITE_2: [ 32  32  32] => [ 37  37  37] [corrected]
     WHITE_3: [ 48  48  48] => [ 54  54  54] [corrected]
     WHITE_4: [ 64  64  64] => [ 69  69  69] [corrected]
     WHITE_5: [ 80  80  80] => [ 84  84  84] [corrected]
     WHITE_6: [ 96  96  96] => [ 99  99  99] [corrected]
     WHITE_7: [112 112 112] => [114 114 114] [corrected]
     WHITE_8: [128 128 128] => [128 128 128] [corrected]
     WHITE_9: [144 144 144] => [144 144 144] [corrected]
    WHITE_10: [160 160 160] => [158 158 158] [corrected]
    WHITE_11: [176 176 176] => [172 172 172] [corrected]
    WHITE_12: [192 192 192] => [187 187 187] [corrected]
    WHITE_13: [208 208 208] => [202 202 202] [corrected]
    WHITE_14: [224 224 224] => [217 217 217] [corrected]
    WHITE_15: [240 240 240] => [235 235 235] [corrected]
    WHITE_16: [255 255 255] => [255 255 255] [corrected]
 -------------------------------------------------------------------------------------------------
                                        Detailed results
-------------------------------------------------------------------------------------------------
[  0   0   0] => [  0   0   0]
[  0   0  64] => [  0   0  69]
[  0   0 128] => [  0   0 133]
[  0   0 192] => [  0   0 193]
[  0   0 255] => [  0   0 255]
[  0  64   0] => [  0  70   0]
[  0  64  64] => [  0  67  67]
[  0  64 128] => [  0  67 130]
[  0  64 192] => [  0  68 189]
[  0  64 255] => [ 11  65 255]
[  0 128   0] => [  0 129   0]
[  0 128  64] => [  0 129  66]
[  0 128 128] => [  0 128 127]
[  0 128 192] => [ 10 127 186]
[  0 128 255] => [ 13 126 255]
[  0 192   0] => [  0 188   0]
[  0 192  64] => [  0 187  61]
[  0 192 128] => [  0 185 124]
[  0 192 192] => [  0 185 183]
[  0 192 255] => [ 15 185 253]
[  0 255   0] => [  0 253   0]
[  0 255  64] => [  0 251  56]
[  0 255 128] => [  0 251 123]
[  0 255 192] => [  0 253 185]
[  0 255 255] => [  0 251 255]
[ 64   0   0] => [ 67   0   0]
[ 64   0  64] => [ 66   0  69]
[ 64   0 128] => [ 69   0 131]
[ 64   0 192] => [ 69   0 189]
[ 64   0 255] => [ 73   0 255]
[ 64  64   0] => [ 68  70   0]
[ 64  64  64] => [ 69  69  69]
[ 64  64 128] => [ 67  68 127]
[ 64  64 192] => [ 71  67 189]
[ 64  64 255] => [ 73  66 255]
[ 64 128   0] => [ 67 129   0]
[ 64 128  64] => [ 66 129  65]
[ 64 128 128] => [ 65 128 129]
[ 64 128 192] => [ 73 127 185]
[ 64 128 255] => [ 71 127 255]
[ 64 192   0] => [ 66 187   0]
[ 64 192  64] => [ 62 187  61]
[ 64 192 128] => [ 69 186 125]
[ 64 192 192] => [ 74 186 185]
[ 64 192 255] => [ 78 184 253]
[ 64 255   0] => [ 60 253   0]
[ 64 255  64] => [ 55 252  62]
[ 64 255 128] => [ 61 253 124]
[ 64 255 192] => [ 48 252 183]
[ 64 255 255] => [ 59 253 251]
[128   0   0] => [129   0   0]
[128   0  64] => [127   0  66]
[128   0 128] => [128   0 131]
[128   0 192] => [128   0 190]
[128   0 255] => [129   0 255]
[128  64   0] => [126  72   0]
[128  64  64] => [126  72  66]
[128  64 128] => [126  70 128]
[128  64 192] => [128  70 189]
[128  64 255] => [128  70 254]
[128 128   0] => [124 130   0]
[128 128  64] => [127 130  64]
[128 128 128] => [128 128 128]
[128 128 192] => [131 127 187]
[128 128 255] => [130 127 255]
[128 192   0] => [124 188   0]
[128 192  64] => [124 188  64]
[128 192 128] => [126 187 123]
[128 192 192] => [133 185 187]
[128 192 255] => [132 185 255]
[128 255   0] => [127 254   0]
[128 255  64] => [125 254  57]
[128 255 128] => [125 253 123]
[128 255 192] => [128 253 181]
[128 255 255] => [130 252 250]
[192   0   0] => [185   0   0]
[192   0  64] => [189   0  68]
[192   0 128] => [186   0 129]
[192   0 192] => [189   0 190]
[192   0 255] => [187   0 255]
[192  64   0] => [182  74   0]
[192  64  64] => [184  74  65]
[192  64 128] => [185  72 124]
[192  64 192] => [183  74 188]
[192  64 255] => [186  72 255]
[192 128   0] => [184 131   0]
[192 128  64] => [185 130  65]
[192 128 128] => [185 131 124]
[192 128 192] => [187 130 186]
[192 128 255] => [187 129 254]
[192 192   0] => [188 189   0]
[192 192  64] => [187 188  58]
[192 192 128] => [186 189 123]
[192 192 192] => [187 187 187]
[192 192 255] => [189 186 253]
[192 255   0] => [182 255   0]
[192 255  64] => [180 255  55]
[192 255 128] => [183 255 124]
[192 255 192] => [183 254 181]
[192 255 255] => [187 252 254]
[255   0   0] => [248   0   0]
[255   0  64] => [251   0  66]
[255   0 128] => [248   8 126]
[255   0 192] => [248   2 189]
[255   0 255] => [248   7 255]
[255  64   0] => [247  75   0]
[255  64  64] => [248  77  67]
[255  64 128] => [249  75 128]
[255  64 192] => [249  75 188]
[255  64 255] => [249  73 254]
[255 128   0] => [248 134   0]
[255 128  64] => [248 133  62]
[255 128 128] => [248 132 125]
[255 128 192] => [251 131 185]
[255 128 255] => [252 131 255]
[255 192   0] => [249 190   0]
[255 192  64] => [246 190  64]
[255 192 128] => [252 189 126]
[255 192 192] => [247 190 185]
[255 192 255] => [254 188 254]
[255 255   0] => [252 255   0]
[255 255  64] => [248 255  54]
[255 255 128] => [253 255 121]
[255 255 192] => [252 255 183]
[255 255 255] => [255 255 255]

Captured colors: calibration_captured_yuv_c9.txt

New version from @s1mptom with manual:

https://github.com/s1mptom/hyperion-webos/actions/runs/10928329050/artifacts/1949551235

connect to TV with SSH and send pgrep -fl piccap | while read -r pid _; do kill "$pid"; done to kill piccap with hyperion process. 
Then you need to replace all backend files in /media/developer/apps/usr/palm/services/org.webosbrew.piccap.service
after that you need to send luna-send -n 1 -f luna://org.webosbrew.piccap.service/setSettings "{\"use_direct_nv12\": true}"

still in early testing phase so you run it on your own risk, must restart the webos service few times to make it work properly

@NatyaSadella
Copy link

Yep the score can get very very low when you tweak some things. That brings another question to the table:

If those scores are better than what USB grabbers can achieve.. isn't this the perfect time to create a PicCap successor or at least officially support webOS now? A Awawa-made webOS grabber with HyperHDR and HyperSerial in mind would be awesome.

I mean we are still at version 0.4.3 and we need a totally modified version of PicCap now with HyperHDR v21. It doesn't look like PicCap is in development anymore so all changes to HyperHDR from now can not be used by webOS users when v21 launches.

I know your time is limited and you run on limited resources. But to be honest, we need a new webOS grabber, PicCap is a dead end.

Unrelated to the grabber idea: Is AI in use now and fully implemented or is this feature still to come? If it's not implemented yet, what can we expect from this when were hitting scores of 3 right now without it? What could be the real benefit for HyperHDR and how could AI help with the calibration process?

@awawa-dev
Copy link
Owner Author

If those scores are better than what USB grabbers can achieve.. isn't this the perfect time to create a PicCap successor or at least officially support webOS now? A Awawa-made webOS grabber with HyperHDR and HyperSerial in mind would be awesome.

Personally I do not have such plans.

I mean we are still at version 0.4.3 and we need a totally modified version of PicCap now with HyperHDR v21. It doesn't look like PicCap is in development anymore so all changes to HyperHDR from now can not be used by webOS users when v21 launches.

Changes to piccap would be minimal (new option to enable NV12). The key for NV12 support is in the @s1mptom backend. Who knows...Maybe we'll see hyperhdr-webos someday? But not in HyperHDR project. There are still many unknown factors, when we switched to libdile it turned out that SDR behaves differently than in the second system, gamma is shifted differently and the colors are no longer in sRGB. More tests are needed, but at least HDR works perfectly. I still focus more on USB grabbers.

Unrelated to the grabber idea: Is AI in use now and fully implemented or is this feature still to come? If it's not implemented yet, what can we expect from this when were hitting scores of 3 right now without it? What could be the real benefit for HyperHDR and how could AI help with the calibration process?

I treat it as an interesting experiment, I don't know what the result will be, although @s1mptom has already started working on it. I will also investigate other approaches, although I assume that the system based on ITU equations will be more accurate if we decipher all the paths in which the video was processed. If we can't determine this, then AI should step in, although there is always a risk that it will start hallucinating.

@awawa-dev
Copy link
Owner Author

awawa-dev commented Sep 19, 2024

Added SDR support for libdile (and maybe other TV models): turns out it's BT2020 with sRGB gamma. My PC player played a trick on me and I had to reset its settings to default because it was working on HDR settings. Anyway, I have confirmation with the yuv420_SDR file played in Windows (with HDR disabled using madvr) and from the USB drive using the LG player:

madVR/WIndows10/HDR disabled:

2024-09-19T23:57:07.891Z [CALIBRATOR] (LutCalibrator.cpp:827) Score: 375.060000
2024-09-19T23:57:07.891Z [CALIBRATOR] (LutCalibrator.cpp:828) Time: 26.969000
2024-09-19T23:57:07.892Z [CALIBRATOR] (LutCalibrator.cpp:830) Selected coef: FCC
2024-09-19T23:57:07.892Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected coef delta: -0.006000 -0.006000
2024-09-19T23:57:07.893Z [CALIBRATOR] (LutCalibrator.cpp:832) Selected EOTF: BT2020 with sRGB TRC
more....
Captured colors:
       White: [255 255 255] => [236 236 236] , YUV: [219 128 128]
         Red: [255   0   0] => [229  55  38] , YUV: [ 94 103 205]
       Green: [  0 255   0] => [ 89 198  54] , YUV: [157  76  86]
        Blue: [  0   0 255] => [ 41  34 239] , YUV: [ 59 217 123]
    UpperRed: [192   0   0] => [176  41  29] , YUV: [ 75 109 188]
  UpperGreen: [  0 192   0] => [ 66 149  41] , YUV: [122  89  96]
   UpperBlue: [  0   0 192] => [ 32  25 179] , YUV: [ 48 195 125]
   MiddleRed: [128   0   0] => [118  25  19] , YUV: [ 54 116 169]
 MiddleGreen: [  0 128   0] => [ 43 100  28] , YUV: [ 87 102 106]
  MiddleBlue: [  0   0 128] => [ 20  15 120] , YUV: [ 36 174 126]
      LowRed: [ 64   0   0] => [ 58  13   7] , YUV: [ 35 121 148]
    LowGreen: [  0  64   0] => [ 21  49  13] , YUV: [ 51 115 117]
     LowBlue: [  0   0  64] => [  8   8  58] , YUV: [ 26 150 126]
      Yellow: [255 255   0] => [234 223  68] , YUV: [200  59 139]

     Magenta: [255   0 255] => [232  67 235] , YUV: [114 185 194]
        Cyan: [  0 255 255] => [101 213 237] , YUV: [180 150  78]
      Orange: [255 128   0] => [230 128  49] , YUV: [140  83 176]
    LimeBlue: [  0 255 128] => [ 93 206 123] , YUV: [167 103  82]
        Pink: [255   0 128] => [230  58 118] , YUV: [101 137 201]
     LimeRed: [128 255   0] => [132 209  57] , YUV: [172  69 100]
       Azure: [  0 128 255] => [ 62 114 234] , YUV: [112 186 100]
      Violet: [128   0 255] => [121  44 237] , YUV: [ 80 205 154]
     WHITE_0: [  0   0   0] => [  0   0   0] , YUV: [ 16 128 128]
     WHITE_1: [ 16  16  16] => [ 15  15  15] , YUV: [ 29 128 128]
     WHITE_2: [ 32  32  32] => [ 29  29  29] , YUV: [ 41 128 128]
     WHITE_3: [ 48  48  48] => [ 44  44  44] , YUV: [ 54 128 128]
     WHITE_4: [ 64  64  64] => [ 59  59  59] , YUV: [ 67 128 128]
     WHITE_5: [ 80  80  80] => [ 74  74  74] , YUV: [ 80 128 128]
     WHITE_6: [ 96  96  96] => [ 88  88  88] , YUV: [ 92 128 128]
     WHITE_7: [112 112 112] => [104 104 104] , YUV: [105 128 128]
     WHITE_8: [128 128 128] => [119 119 119] , YUV: [118 128 128]
     WHITE_9: [144 144 144] => [134 134 134] , YUV: [131 128 128]
    WHITE_10: [160 160 160] => [148 148 148] , YUV: [143 128 128]
    WHITE_11: [176 176 176] => [163 163 163] , YUV: [156 128 128]
    WHITE_12: [192 192 192] => [178 178 178] , YUV: [169 128 128]
    WHITE_13: [208 208 208] => [193 193 193] , YUV: [182 128 128]
    WHITE_14: [224 224 224] => [207 207 207] , YUV: [194 128 128]
    WHITE_15: [240 240 240] => [222 222 222] , YUV: [207 128 128]
    WHITE_16: [255 255 255] => [236 236 236] , YUV: [219 128 128]

2024-09-19T23:57:07.885Z [CALIBRATOR] (LutCalibrator.cpp:1037) --------------------------------- Actual PQ primaries for YUV coefs: FCC ---------------------------------
2024-09-19T23:57:07.886Z [CALIBRATOR] (LutCalibrator.cpp:1038) r: (0.670, 0.294) vs sRGB(0.640, 0.330) vs bt2020(0.708, 0.292)
2024-09-19T23:57:07.887Z [CALIBRATOR] (LutCalibrator.cpp:1039) g: (0.244, 0.670) vs sRGB(0.300, 0.600) vs bt2020(0.170, 0.797)
2024-09-19T23:57:07.888Z [CALIBRATOR] (LutCalibrator.cpp:1040) b: (0.143, 0.055) vs sRGB(0.150, 0.060) vs bt2020(0.131, 0.046)
2024-09-19T23:57:07.889Z [CALIBRATOR] (LutCalibrator.cpp:1041) w: (0.313, 0.329) vs sRGB(0.313, 0.329) vs bt2020(0.313, 0.329)
2024-09-19T23:57:07.891Z [CALIBRATOR] (LutCalibrator.cpp:827) Score: 375.060000
2024-09-19T23:57:07.891Z [CALIBRATOR] (LutCalibrator.cpp:828) Time: 26.969000
2024-09-19T23:57:07.892Z [CALIBRATOR] (LutCalibrator.cpp:830) Selected coef: FCC
2024-09-19T23:57:07.892Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected coef delta: -0.006000 -0.006000
2024-09-19T23:57:07.893Z [CALIBRATOR] (LutCalibrator.cpp:832) Selected EOTF: BT2020 with sRGB TRC
2024-09-19T23:57:07.894Z [CALIBRATOR] (LutCalibrator.cpp:839) Selected nits: 0.000000
2024-09-19T23:57:07.894Z [CALIBRATOR] (LutCalibrator.cpp:841) Selected bt2020 range: 0
2024-09-19T23:57:07.894Z [CALIBRATOR] (LutCalibrator.cpp:842) Selected alt convert: 1
2024-09-19T23:57:07.895Z [CALIBRATOR] (LutCalibrator.cpp:843) Selected aspect: 1.000000 1.080000 1.080000

HDR10:
       White: [255 255 255] => [255 255 255] [corrected]
         Red: [255   0   0] => [255   1   0] [corrected]
       Green: [  0 255   0] => [  0 236   0] [corrected]
        Blue: [  0   0 255] => [  0   2 255] [corrected]
    UpperRed: [192   0   0] => [196   1   1] [corrected]
  UpperGreen: [  0 192   0] => [  7 178   7] [corrected]
   UpperBlue: [  0   0 192] => [  8   3 196] [corrected]
   MiddleRed: [128   0   0] => [132   2   7] [corrected]
 MiddleGreen: [  0 128   0] => [  9 119  11] [corrected]
  MiddleBlue: [  0   0 128] => [  6   3 132] [corrected]
      LowRed: [ 64   0   0] => [ 65   6   4] [corrected]
    LowGreen: [  0  64   0] => [  9  59   8] [corrected]
     LowBlue: [  0   0  64] => [  5   4  64] [corrected]
      Yellow: [255 255   0] => [254 249   0] [corrected]
     Magenta: [255   0 255] => [255   0 255] [corrected]
        Cyan: [  0 255 255] => [ 28 242 255] [corrected]
      Orange: [255 128   0] => [255 128   4] [corrected]
    LimeBlue: [  0 255 128] => [ 13 241 125] [corrected]
        Pink: [255   0 128] => [255   0 124] [corrected]
     LimeRed: [128 255   0] => [117 245   0] [corrected]
       Azure: [  0 128 255] => [ 19 121 255] [corrected]
      Violet: [128   0 255] => [129   0 255] [corrected]
     WHITE_0: [  0   0   0] => [  0   0   0] [corrected]
     WHITE_1: [ 16  16  16] => [ 16  16  16] [corrected]
     WHITE_2: [ 32  32  32] => [ 31  31  31] [corrected]
     WHITE_3: [ 48  48  48] => [ 48  48  48] [corrected]
     WHITE_4: [ 64  64  64] => [ 64  64  64] [corrected]
     WHITE_5: [ 80  80  80] => [ 80  80  80] [corrected]
     WHITE_6: [ 96  96  96] => [ 95  95  95] [corrected]
     WHITE_7: [112 112 112] => [112 112 112] [corrected]
     WHITE_8: [128 128 128] => [128 128 128] [corrected]
     WHITE_9: [144 144 144] => [144 144 144] [corrected]
    WHITE_10: [160 160 160] => [160 160 160] [corrected]
    WHITE_11: [176 176 176] => [176 176 176] [corrected]
    WHITE_12: [192 192 192] => [192 192 192] [corrected]
    WHITE_13: [208 208 208] => [209 209 209] [corrected]
    WHITE_14: [224 224 224] => [224 224 224] [corrected]
    WHITE_15: [240 240 240] => [240 240 240] [corrected]
    WHITE_16: [255 255 255] => [255 255 255] [corrected]


-------------------------------------------------------------------------------------------------
                                        Detailed results
-------------------------------------------------------------------------------------------------
[  0   0   0] => [  0   0   0]
[  0   0  64] => [  5   4  64]
[  0   0 128] => [  6   3 132]
[  0   0 192] => [  8   3 196]
[  0   0 255] => [  0   2 255]
[  0  64   0] => [  9  59   8]
[  0  64  64] => [ 13  61  64]
[  0  64 128] => [ 16  61 129]
[  0  64 192] => [ 13  61 194]
[  0  64 255] => [ 10  64 255]
[  0 128   0] => [  9 119  11]
[  0 128  64] => [ 18 120  63]
[  0 128 128] => [ 23 121 129]
[  0 128 192] => [ 21 122 195]
[  0 128 255] => [ 19 121 255]
[  0 192   0] => [  7 178   7]
[  0 192  64] => [  3 181  57]
[  0 192 128] => [ 16 182 125]
[  0 192 192] => [ 22 182 195]
[  0 192 255] => [ 30 182 255]
[  0 255   0] => [  0 236   0]
[  0 255  64] => [ 15 239  51]
[  0 255 128] => [ 13 241 125]
[  0 255 192] => [ 24 241 192]
[  0 255 255] => [ 28 242 255]
[ 64   0   0] => [ 65   6   4]
[ 64   0  64] => [ 65   5  65]
[ 64   0 128] => [ 63   2 129]
[ 64   0 192] => [ 61   0 195]
[ 64   0 255] => [ 59   1 255]
[ 64  64   0] => [ 64  62  11]
[ 64  64  64] => [ 64  64  64]
[ 64  64 128] => [ 61  65 128]
[ 64  64 192] => [ 63  66 194]
[ 64  64 255] => [ 59  67 255]
[ 64 128   0] => [ 60 123  12]
[ 64 128  64] => [ 56 125  59]
[ 64 128 128] => [ 61 126 129]
[ 64 128 192] => [ 59 128 194]
[ 64 128 255] => [ 57 128 255]
[ 64 192   0] => [ 51 183   2]
[ 64 192  64] => [ 53 186  59]
[ 64 192 128] => [ 53 188 125]
[ 64 192 192] => [ 55 187 192]
[ 64 192 255] => [ 56 188 255]
[ 64 255   0] => [ 45 242   0]
[ 64 255  64] => [ 46 245  49]
[ 64 255 128] => [ 51 247 124]
[ 64 255 192] => [ 56 247 191]
[ 64 255 255] => [ 53 249 255]
[128   0   0] => [132   2   7]
[128   0  64] => [132   1  61]
[128   0 128] => [131   0 127]
[128   0 192] => [131   0 195]
[128   0 255] => [129   0 255]
[128  64   0] => [130  62   6]
[128  64  64] => [129  64  61]
[128  64 128] => [130  66 128]
[128  64 192] => [127  66 195]
[128  64 255] => [128  67 255]
[128 128   0] => [125 124  13]
[128 128  64] => [127 127  61]
[128 128 128] => [128 128 128]
[128 128 192] => [126 129 193]
[128 128 255] => [124 129 255]
[128 192   0] => [123 186   1]
[128 192  64] => [123 188  53]
[128 192 128] => [121 190 125]
[128 192 192] => [124 190 192]
[128 192 255] => [124 192 255]
[128 255   0] => [117 245   0]
[128 255  64] => [120 249  49]
[128 255 128] => [119 250 122]
[128 255 192] => [119 251 190]
[128 255 255] => [122 250 255]
[192   0   0] => [196   1   1]
[192   0  64] => [196   0  60]
[192   0 128] => [197   0 127]
[192   0 192] => [196   0 194]
[192   0 255] => [193   0 255]
[192  64   0] => [197  66   9]
[192  64  64] => [195  68  59]
[192  64 128] => [195  67 125]
[192  64 192] => [194  67 191]
[192  64 255] => [195  70 255]
[192 128   0] => [194 126   9]
[192 128  64] => [194 128  56]
[192 128 128] => [192 129 126]
[192 128 192] => [195 130 193]
[192 128 255] => [190 133 255]
[192 192   0] => [192 186   1]
[192 192  64] => [190 190  53]
[192 192 128] => [191 192 124]
[192 192 192] => [192 192 192]
[192 192 255] => [192 192 255]
[192 255   0] => [189 248   0]
[192 255  64] => [187 251  45]
[192 255 128] => [187 251 119]
[192 255 192] => [189 253 192]
[192 255 255] => [189 255 253]
[255   0   0] => [255   1   0]
[255   0  64] => [255   0  57]
[255   0 128] => [255   0 124]
[255   0 192] => [255   0 190]
[255   0 255] => [255   0 255]
[255  64   0] => [255  68   0]
[255  64  64] => [255  69  57]
[255  64 128] => [255  69 124]
[255  64 192] => [255  70 192]
[255  64 255] => [255  71 255]
[255 128   0] => [255 128   4]
[255 128  64] => [255 130  52]
[255 128 128] => [255 131 123]
[255 128 192] => [255 132 189]
[255 128 255] => [255 132 254]
[255 192   0] => [255 188   0]
[255 192  64] => [255 192  49]
[255 192 128] => [255 192 123]
[255 192 192] => [255 193 190]
[255 192 255] => [255 195 253]
[255 255   0] => [254 249   0]
[255 255  64] => [254 251  41]
[255 255 128] => [254 255 119]
[255 255 192] => [254 254 188]
[255 255 255] => [255 255 255]
-------------------------------------------------------------------------------------------------

Internal LG C9 video player yuv420_sdr file:

2024-09-20T00:17:23.624Z [CALIBRATOR] (LutCalibrator.cpp:827) Score: 273.508000
2024-09-20T00:17:23.624Z [CALIBRATOR] (LutCalibrator.cpp:828) Time: 10.588000
2024-09-20T00:17:23.625Z [CALIBRATOR] (LutCalibrator.cpp:830) Selected coef: BT601
2024-09-20T00:17:23.625Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected coef delta: 0.018000 0.000000
2024-09-20T00:17:23.626Z [CALIBRATOR] (LutCalibrator.cpp:832) Selected EOTF: BT2020 with sRGB TRC
more....
Captured colors:
       White: [255 255 255] => [255 255 255] , YUV: [235 128 128]
         Red: [255   0   0] => [255  41  20] , YUV: [ 89  97 223]
       Green: [  0 255   0] => [ 10 220  19] , YUV: [154  61  44]
        Blue: [  0   0 255] => [ 20  32 255] , YUV: [ 55 227 114]
    UpperRed: [192   0   0] => [216  39  25] , YUV: [ 81 104 206]
  UpperGreen: [  0 192   0] => [  6 166  13] , YUV: [120  77  64]
   UpperBlue: [  0   0 192] => [ 18  26 208] , YUV: [ 48 209 117]
   MiddleRed: [128   0   0] => [144  29  19] , YUV: [ 61 112 179]
 MiddleGreen: [  0 128   0] => [  4 112  10] , YUV: [ 86  94  85]
  MiddleBlue: [  0   0 128] => [ 11  20 141] , YUV: [ 39 182 119]
      LowRed: [ 64   0   0] => [ 72  13   9] , YUV: [ 38 120 154]
    LowGreen: [  0  64   0] => [  4  54   4] , YUV: [ 50 111 108]
     LowBlue: [  0   0  64] => [  6   9  68] , YUV: [ 27 154 124]
      Yellow: [255 255   0] => [255 239  15] , YUV: [210  28 144]

     Magenta: [255   0 255] => [255  52 253] , YUV: [110 196 209]
        Cyan: [  0 255 255] => [ 22 232 254] , YUV: [178 159  35]
      Orange: [255 128   0] => [253 139  20] , YUV: [149  64 183]
    LimeBlue: [  0 255 128] => [ 18 224 129] , YUV: [165 107  41]
        Pink: [255   0 128] => [255  53 143] , YUV: [104 147 213]
     LimeRed: [128 255   0] => [114 228  15] , YUV: [178  46  86]
       Azure: [  0 128 255] => [ 21 131 255] , YUV: [116 194  75]
      Violet: [128   0 255] => [148  44 255] , YUV: [ 86 210 165]
     WHITE_0: [  0   0   0] => [  0   0   0] , YUV: [ 16 128 128]
     WHITE_1: [ 16  16  16] => [ 17  17  17] , YUV: [ 31 128 128]
     WHITE_2: [ 32  32  32] => [ 31  31  31] , YUV: [ 43 128 128]
     WHITE_3: [ 48  48  48] => [ 47  47  47] , YUV: [ 56 128 128]
     WHITE_4: [ 64  64  64] => [ 63  63  63] , YUV: [ 70 128 128]
     WHITE_5: [ 80  80  80] => [ 79  79  79] , YUV: [ 84 128 128]
     WHITE_6: [ 96  96  96] => [ 94  94  94] , YUV: [ 97 128 128]
     WHITE_7: [112 112 112] => [109 109 109] , YUV: [110 128 128]
     WHITE_8: [128 128 128] => [126 126 126] , YUV: [124 128 128]
     WHITE_9: [144 144 144] => [141 141 141] , YUV: [137 128 128]
    WHITE_10: [160 160 160] => [156 156 156] , YUV: [150 128 128]
    WHITE_11: [176 176 176] => [172 172 172] , YUV: [164 128 128]
    WHITE_12: [192 192 192] => [189 189 189] , YUV: [178 128 128]
    WHITE_13: [208 208 208] => [204 204 204] , YUV: [191 128 128]
    WHITE_14: [224 224 224] => [219 219 219] , YUV: [204 128 128]
    WHITE_15: [240 240 240] => [236 236 236] , YUV: [219 128 128]
    WHITE_16: [255 255 255] => [255 255 255] , YUV: [235 128 128]

2024-09-20T00:17:23.619Z [CALIBRATOR] (LutCalibrator.cpp:1038) --------------------------------- Actual PQ primaries for YUV coefs: BT601 ---------------------------------
2024-09-20T00:17:23.620Z [CALIBRATOR] (LutCalibrator.cpp:1039) r: (0.696, 0.292) vs sRGB(0.640, 0.330) vs bt2020(0.708, 0.292)
2024-09-20T00:17:23.621Z [CALIBRATOR] (LutCalibrator.cpp:1040) g: (0.175, 0.780) vs sRGB(0.300, 0.600) vs bt2020(0.170, 0.797)
2024-09-20T00:17:23.622Z [CALIBRATOR] (LutCalibrator.cpp:1041) b: (0.135, 0.051) vs sRGB(0.150, 0.060) vs bt2020(0.131, 0.046)
2024-09-20T00:17:23.622Z [CALIBRATOR] (LutCalibrator.cpp:1042) w: (0.313, 0.329) vs sRGB(0.313, 0.329) vs bt2020(0.313, 0.329)
2024-09-20T00:17:23.624Z [CALIBRATOR] (LutCalibrator.cpp:827) Score: 273.508000
2024-09-20T00:17:23.624Z [CALIBRATOR] (LutCalibrator.cpp:828) Time: 10.588000
2024-09-20T00:17:23.625Z [CALIBRATOR] (LutCalibrator.cpp:830) Selected coef: BT601
2024-09-20T00:17:23.625Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected coef delta: 0.018000 0.000000
2024-09-20T00:17:23.626Z [CALIBRATOR] (LutCalibrator.cpp:832) Selected EOTF: BT2020 with sRGB TRC
2024-09-20T00:17:23.627Z [CALIBRATOR] (LutCalibrator.cpp:839) Selected nits: 0.000000
2024-09-20T00:17:23.627Z [CALIBRATOR] (LutCalibrator.cpp:841) Selected bt2020 range: 0
2024-09-20T00:17:23.629Z [CALIBRATOR] (LutCalibrator.cpp:842) Selected alt convert: 1
2024-09-20T00:17:23.630Z [CALIBRATOR] (LutCalibrator.cpp:843) Selected aspect: 1.000000 1.005000 1.005000

HDR10:
       White: [255 255 255] => [255 255 255] [corrected]
         Red: [255   0   0] => [236   0   0] [corrected]
       Green: [  0 255   0] => [  4 255   0] [corrected]
        Blue: [  0   0 255] => [  1   0 248] [corrected]
    UpperRed: [192   0   0] => [199   4  17] [corrected]
  UpperGreen: [  0 192   0] => [  5 199   1] [corrected]
   UpperBlue: [  0   0 192] => [  5   2 203] [corrected]
   MiddleRed: [128   0   0] => [133   9  15] [corrected]
 MiddleGreen: [  0 128   0] => [  7 134   5] [corrected]
  MiddleBlue: [  0   0 128] => [  5   8 137] [corrected]
      LowRed: [ 64   0   0] => [ 67   5   8] [corrected]
    LowGreen: [  0  64   0] => [  7  64   3] [corrected]
     LowBlue: [  0   0  64] => [  5   5  66] [corrected]
      Yellow: [255 255   0] => [252 253   0] [corrected]
     Magenta: [255   0 255] => [237   0 249] [corrected]
        Cyan: [  0 255 255] => [ 15 255 252] [corrected]

      Orange: [255 128   0] => [243 132   0] [corrected]
    LimeBlue: [  0 255 128] => [ 18 255 129] [corrected]
        Pink: [255   0 128] => [237   0 140] [corrected]
     LimeRed: [128 255   0] => [121 255   0] [corrected]
       Azure: [  0 128 255] => [ 14 135 252] [corrected]
      Violet: [128   0 255] => [138   0 250] [corrected]
     WHITE_0: [  0   0   0] => [  0   0   0] [corrected]
     WHITE_1: [ 16  16  16] => [ 17  17  17] [corrected]
     WHITE_2: [ 32  32  32] => [ 31  31  31] [corrected]
     WHITE_3: [ 48  48  48] => [ 47  47  47] [corrected]
     WHITE_4: [ 64  64  64] => [ 63  63  63] [corrected]
     WHITE_5: [ 80  80  80] => [ 79  79  79] [corrected]
     WHITE_6: [ 96  96  96] => [ 94  94  94] [corrected]
     WHITE_7: [112 112 112] => [109 109 109] [corrected]
     WHITE_8: [128 128 128] => [126 126 126] [corrected]
     WHITE_9: [144 144 144] => [141 141 141] [corrected]
    WHITE_10: [160 160 160] => [156 156 156] [corrected]
    WHITE_11: [176 176 176] => [172 172 172] [corrected]
    WHITE_12: [192 192 192] => [189 189 189] [corrected]
    WHITE_13: [208 208 208] => [204 204 204] [corrected]
    WHITE_14: [224 224 224] => [219 219 219] [corrected]
    WHITE_15: [240 240 240] => [236 236 236] [corrected]
    WHITE_16: [255 255 255] => [255 255 255] [corrected]


-------------------------------------------------------------------------------------------------
                                        Detailed results
-------------------------------------------------------------------------------------------------
[  0   0   0] => [  0   0   0]
[  0   0  64] => [  5   5  66]
[  0   0 128] => [  5   8 137]
[  0   0 192] => [  5   2 203]
[  0   0 255] => [  1   0 248]
[  0  64   0] => [  7  64   3]
[  0  64  64] => [  7  66  64]
[  0  64 128] => [  9  70 135]
[  0  64 192] => [  7  70 202]
[  0  64 255] => [  6  74 249]
[  0 128   0] => [  7 134   5]
[  0 128  64] => [ 11 133  68]
[  0 128 128] => [  9 131 128]
[  0 128 192] => [ 10 132 197]
[  0 128 255] => [ 14 135 252]
[  0 192   0] => [  5 199   1]
[  0 192  64] => [ 15 196  65]
[  0 192 128] => [ 12 195 127]
[  0 192 192] => [ 12 195 197]
[  0 192 255] => [ 12 198 251]
[  0 255   0] => [  4 255   0]
[  0 255  64] => [  7 255  64]
[  0 255 128] => [ 18 255 129]
[  0 255 192] => [ 17 255 193]
[  0 255 255] => [ 15 255 252]
[ 64   0   0] => [ 67   5   8]
[ 64   0  64] => [ 66   2  68]
[ 64   0 128] => [ 71   2 135]
[ 64   0 192] => [ 73   0 203]
[ 64   0 255] => [ 77   0 248]
[ 64  64   0] => [ 64  64   3]
[ 64  64  64] => [ 63  63  63]
[ 64  64 128] => [ 69  68 131]
[ 64  64 192] => [ 73  56 202]
[ 64  64 255] => [ 74  63 249]
[ 64 128   0] => [ 61 133   5]
[ 64 128  64] => [ 63 130  64]
[ 64 128 128] => [ 65 130 128]
[ 64 128 192] => [ 68 121 199]
[ 64 128 255] => [ 71 126 250]
[ 64 192   0] => [ 59 198   1]
[ 64 192  64] => [ 59 198  66]
[ 64 192 128] => [ 64 197 129]
[ 64 192 192] => [ 64 189 192]
[ 64 192 255] => [ 66 189 252]
[ 64 255   0] => [ 56 255   0]
[ 64 255  64] => [ 59 255  61]
[ 64 255 128] => [ 64 255 131]
[ 64 255 192] => [ 65 255 194]
[ 64 255 255] => [ 62 255 255]
[128   0   0] => [133   9  15]

[128   0  64] => [134   2  72]
[128   0 128] => [130   0 131]
[128   0 192] => [136   0 199]
[128   0 255] => [138   0 250]
[128  64   0] => [132  70  15]
[128  64  64] => [130  73  77]
[128  64 128] => [131  65 131]
[128  64 192] => [134  69 198]
[128  64 255] => [136  70 250]
[128 128   0] => [127 127   0]
[128 128  64] => [128 127  61]
[128 128 128] => [126 126 126]
[128 128 192] => [130 125 195]
[128 128 255] => [133 119 251]
[128 192   0] => [126 195   0]
[128 192  64] => [122 196  60]
[128 192 128] => [126 194 125]
[128 192 192] => [127 187 192]
[128 192 255] => [131 181 252]
[128 255   0] => [121 255   0]
[128 255  64] => [123 255  60]
[128 255 128] => [127 255 127]
[128 255 192] => [128 255 191]
[128 255 255] => [127 247 254]
[192   0   0] => [199   4  17]
[192   0  64] => [200   0  80]
[192   0 128] => [198   0 138]
[192   0 192] => [197   0 198]
[192   0 255] => [199   0 250]

[192  64   0] => [197  74  16]
[192  64  64] => [196  76  79]
[192  64 128] => [197  73 137]
[192  64 192] => [193  65 194]
[192  64 255] => [199  67 252]
[192 128   0] => [193 133  14]
[192 128  64] => [195 134  74]
[192 128 128] => [192 135 137]
[192 128 192] => [193 127 193]
[192 128 255] => [195 133 251]
[192 192   0] => [192 191   0]
[192 192  64] => [189 192  56]
[192 192 128] => [190 191 124]
[192 192 192] => [189 189 189]
[192 192 255] => [195 191 254]
[192 255   0] => [187 255   0]
[192 255  64] => [186 255  55]
[192 255 128] => [190 255 126]
[192 255 192] => [191 255 192]
[192 255 255] => [190 254 253]
[255   0   0] => [236   0   0]
[255   0  64] => [236   0  79]
[255   0 128] => [237   0 140]
[255   0 192] => [238   0 199]
[255   0 255] => [237   0 249]
[255  64   0] => [239  71   0]
[255  64  64] => [240  71  72]
[255  64 128] => [240  78 142]
[255  64 192] => [241  67 197]
[255  64 255] => [242  64 250]
[255 128   0] => [243 132   0]
[255 128  64] => [244 132  66]
[255 128 128] => [244 131 132]
[255 128 192] => [246 137 198]
[255 128 255] => [247 129 254]
[255 192   0] => [249 193   0]
[255 192  64] => [248 195  61]
[255 192 128] => [249 193 130]
[255 192 192] => [250 190 193]
[255 192 255] => [251 191 253]
[255 255   0] => [252 253   0]
[255 255  64] => [252 254  46]
[255 255 128] => [253 255 120]
[255 255 192] => [253 255 190]
[255 255 255] => [255 255 255]
-------------------------------------------------------------------------------------------------

on the other hand using LG player to calibrate HDR file is not a good idea: the LG player tone mapping is very aggressive although the colors are still acceptable despite high error:

2024-09-20T00:28:50.696Z [CALIBRATOR] (LutCalibrator.cpp:827) Score: 2152.756000
2024-09-20T00:28:50.697Z [CALIBRATOR] (LutCalibrator.cpp:828) Time: 36.292000
2024-09-20T00:28:50.697Z [CALIBRATOR] (LutCalibrator.cpp:830) Selected coef: BT709
2024-09-20T00:28:50.697Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected coef delta: -0.018000 0.014000
2024-09-20T00:28:50.698Z [CALIBRATOR] (LutCalibrator.cpp:832) Selected EOTF: BT2020 with sRGB TRC
more....
Captured colors:
       White: [255 255 255] => [228 228 228] , YUV: [212 128 128]
         Red: [255   0   0] => [239   0  19] , YUV: [ 61 112 232]
       Green: [  0 255   0] => [ 34 243   0] , YUV: [171  42  46]
        Blue: [  0   0 255] => [  0  19 253] , YUV: [ 43 233 110]
    UpperRed: [192   0   0] => [172   0  12] , YUV: [ 48 116 203]
  UpperGreen: [  0 192   0] => [  6 192   0] , YUV: [135  62  54]
   UpperBlue: [  0   0 192] => [  0  12 191] , YUV: [ 35 208 115]
   MiddleRed: [128   0   0] => [108   0   6] , YUV: [ 36 120 175]
 MiddleGreen: [  0 128   0] => [  0 121   0] , YUV: [ 90  87  79]
  MiddleBlue: [  0   0 128] => [  0   9 123] , YUV: [ 29 179 119]
      LowRed: [ 64   0   0] => [ 45   0   0] , YUV: [ 24 123 148]
    LowGreen: [  0  64   0] => [  0  51   0] , YUV: [ 47 110 107]
     LowBlue: [  0   0  64] => [  0   1  53] , YUV: [ 20 151 125]
      Yellow: [255 255   0] => [229 232   0] , YUV: [200  26 136]
     Magenta: [255   0 255] => [231   0 253] , YUV: [ 74 216 219]
        Cyan: [  0 255 255] => [ 52 234 238] , YUV: [184 148  48]
      Orange: [255 128   0] => [243 115  21] , YUV: [132  74 188]
    LimeBlue: [  0 255 128] => [ 44 241  98] , YUV: [178  85  47]
        Pink: [255   0 128] => [239   0 109] , YUV: [ 66 152 229]
     LimeRed: [128 255   0] => [112 239   0] , YUV: [183  35  82]
       Azure: [  0 128 255] => [  0 105 254] , YUV: [ 96 204  75]
      Violet: [128   0 255] => [ 98   0 250] , YUV: [ 49 228 161]
     WHITE_0: [  0   0   0] => [  0   0   0] , YUV: [ 16 128 128]
     WHITE_1: [ 16  16  16] => [ 11  11  11] , YUV: [ 26 128 128]
     WHITE_2: [ 32  32  32] => [ 23  23  23] , YUV: [ 36 128 128]
     WHITE_3: [ 48  48  48] => [ 36  36  36] , YUV: [ 47 128 128]
     WHITE_4: [ 64  64  64] => [ 51  51  51] , YUV: [ 60 128 128]
     WHITE_5: [ 80  80  80] => [ 68  68  68] , YUV: [ 74 128 128]
     WHITE_6: [ 96  96  96] => [ 85  85  85] , YUV: [ 89 128 128]
     WHITE_7: [112 112 112] => [102 102 102] , YUV: [103 128 128]
     WHITE_8: [128 128 128] => [119 119 119] , YUV: [118 128 128]
     WHITE_9: [144 144 144] => [135 135 135] , YUV: [132 128 128]
    WHITE_10: [160 160 160] => [152 152 152] , YUV: [147 128 128]
    WHITE_11: [176 176 176] => [165 165 165] , YUV: [158 128 128]
    WHITE_12: [192 192 192] => [178 178 178] , YUV: [169 128 128]
    WHITE_13: [208 208 208] => [191 191 191] , YUV: [180 128 128]
    WHITE_14: [224 224 224] => [201 201 201] , YUV: [189 128 128]
    WHITE_15: [240 240 240] => [212 212 212] , YUV: [198 128 128]
    WHITE_16: [255 255 255] => [228 228 228] , YUV: [212 128 128]

2024-09-20T00:28:50.690Z [CALIBRATOR] (LutCalibrator.cpp:1038) --------------------------------- Actual PQ primaries for YUV coefs: BT709 ---------------------------------
2024-09-20T00:28:50.691Z [CALIBRATOR] (LutCalibrator.cpp:1039) r: (0.702, 0.290) vs sRGB(0.640, 0.330) vs bt2020(0.708, 0.292)
2024-09-20T00:28:50.692Z [CALIBRATOR] (LutCalibrator.cpp:1040) g: (0.180, 0.788) vs sRGB(0.300, 0.600) vs bt2020(0.170, 0.797)
2024-09-20T00:28:50.693Z [CALIBRATOR] (LutCalibrator.cpp:1041) b: (0.131, 0.049) vs sRGB(0.150, 0.060) vs bt2020(0.131, 0.046)
2024-09-20T00:28:50.694Z [CALIBRATOR] (LutCalibrator.cpp:1042) w: (0.313, 0.329) vs sRGB(0.313, 0.329) vs bt2020(0.313, 0.329)
2024-09-20T00:28:50.696Z [CALIBRATOR] (LutCalibrator.cpp:827) Score: 2152.756000
2024-09-20T00:28:50.697Z [CALIBRATOR] (LutCalibrator.cpp:828) Time: 36.292000
2024-09-20T00:28:50.697Z [CALIBRATOR] (LutCalibrator.cpp:830) Selected coef: BT709
2024-09-20T00:28:50.697Z [CALIBRATOR] (LutCalibrator.cpp:831) Selected coef delta: -0.018000 0.014000
2024-09-20T00:28:50.698Z [CALIBRATOR] (LutCalibrator.cpp:832) Selected EOTF: BT2020 with sRGB TRC
2024-09-20T00:28:50.699Z [CALIBRATOR] (LutCalibrator.cpp:839) Selected nits: 0.000000
2024-09-20T00:28:50.699Z [CALIBRATOR] (LutCalibrator.cpp:841) Selected bt2020 range: 0
2024-09-20T00:28:50.699Z [CALIBRATOR] (LutCalibrator.cpp:842) Selected alt convert: 1
2024-09-20T00:28:50.700Z [CALIBRATOR] (LutCalibrator.cpp:843) Selected aspect: 0.980000 1.020000 1.020000

HDR10:
       White: [255 255 255] => [252 252 252] [corrected]
         Red: [255   0   0] => [255  11  10] [corrected]
       Green: [  0 255   0] => [ 26 255  18] [corrected]
        Blue: [  0   0 255] => [  4   0 255] [corrected]
    UpperRed: [192   0   0] => [185   8   9] [corrected]
  UpperGreen: [  0 192   0] => [  0 210  15] [corrected]
   UpperBlue: [  0   0 192] => [  3   2 197] [corrected]
   MiddleRed: [128   0   0] => [117   6   7] [corrected]
 MiddleGreen: [  0 128   0] => [  0 133  10] [corrected]
  MiddleBlue: [  0   0 128] => [  2   6 128] [corrected]
      LowRed: [ 64   0   0] => [ 51   4   1] [corrected]
    LowGreen: [  0  64   0] => [  0  58   4] [corrected]
     LowBlue: [  0   0  64] => [  2   3  57] [corrected]
      Yellow: [255 255   0] => [253 255   2] [corrected]
     Magenta: [255   0 255] => [249   0 255] [corrected]
        Cyan: [  0 255 255] => [ 57 253 255] [corrected]
      Orange: [255 128   0] => [255 135  26] [corrected]
    LimeBlue: [  0 255 128] => [ 43 255 119] [corrected]
        Pink: [255   0 128] => [255   5 116] [corrected]
     LimeRed: [128 255   0] => [126 255  15] [corrected]
       Azure: [  0 128 255] => [  0 110 255] [corrected]
      Violet: [128   0 255] => [108   0 255] [corrected]
     WHITE_0: [  0   0   0] => [  3   3   3] [corrected]
     WHITE_1: [ 16  16  16] => [ 15  15  15] [corrected]
     WHITE_2: [ 32  32  32] => [ 28  28  28] [corrected]
     WHITE_3: [ 48  48  48] => [ 42  42  42] [corrected]
     WHITE_4: [ 64  64  64] => [ 59  59  59] [corrected]
     WHITE_5: [ 80  80  80] => [ 77  77  77] [corrected]
     WHITE_6: [ 96  96  96] => [ 96  96  96] [corrected]
     WHITE_7: [112 112 112] => [114 114 114] [corrected]
     WHITE_8: [128 128 128] => [133 133 133] [corrected]
     WHITE_9: [144 144 144] => [151 151 151] [corrected]
    WHITE_10: [160 160 160] => [169 169 169] [corrected]
    WHITE_11: [176 176 176] => [184 184 184] [corrected]
    WHITE_12: [192 192 192] => [198 198 198] [corrected]
    WHITE_13: [208 208 208] => [212 212 212] [corrected]
    WHITE_14: [224 224 224] => [224 224 224] [corrected]
    WHITE_15: [240 240 240] => [235 235 235] [corrected]
    WHITE_16: [255 255 255] => [252 252 252] [corrected]


-------------------------------------------------------------------------------------------------
                                        Detailed results
-------------------------------------------------------------------------------------------------
[  0   0   0] => [  3   3   3]
[  0   0  64] => [  2   3  57]
[  0   0 128] => [  2   6 128]
[  0   0 192] => [  3   2 197]
[  0   0 255] => [  4   0 255]
[  0  64   0] => [  0  58   4]
[  0  64  64] => [  1  56  57]
[  0  64 128] => [  2  50 132]
[  0  64 192] => [  3  31 212]
[  0  64 255] => [  2  42 255]
[  0 128   0] => [  0 133  10]
[  0 128  64] => [  0 133  55]
[  0 128 128] => [  2 126 131]
[  0 128 192] => [  0 108 213]
[  0 128 255] => [  0 110 255]
[  0 192   0] => [  0 210  15]
[  0 192  64] => [  0 210  51]
[  0 192 128] => [  0 205 124]
[  0 192 192] => [ 26 198 204]
[  0 192 255] => [ 40 185 255]
[  0 255   0] => [ 26 255  18]
[  0 255  64] => [ 32 255  51]
[  0 255 128] => [ 43 255 119]
[  0 255 192] => [ 61 255 191]
[  0 255 255] => [ 57 253 255]
[ 64   0   0] => [ 51   4   1]
[ 64   0  64] => [ 52   3  56]
[ 64   0 128] => [ 52   0 125]
[ 64   0 192] => [ 45   0 196]
[ 64   0 255] => [ 44   0 255]
[ 64  64   0] => [ 56  59   4]
[ 64  64  64] => [ 59  59  59]
[ 64  64 128] => [ 53  53 131]
[ 64  64 192] => [ 21  32 208]
[ 64  64 255] => [ 38  41 255]
[ 64 128   0] => [ 62 136  10]
[ 64 128  64] => [ 58 137  56]
[ 64 128 128] => [ 69 130 131]
[ 64 128 192] => [ 45 112 211]
[ 64 128 255] => [ 57 112 255]
[ 64 192   0] => [ 64 211  15]
[ 64 192  64] => [ 59 211  50]
[ 64 192 128] => [ 58 206 123]
[ 64 192 192] => [ 72 198 203]
[ 64 192 255] => [ 74 184 255]
[ 64 255   0] => [ 69 255  18]
[ 64 255  64] => [ 60 255  40]
[ 64 255 128] => [ 70 255 113]
[ 64 255 192] => [ 77 255 185]
[ 64 255 255] => [ 79 251 255]
[128   0   0] => [117   6   7]
[128   0  64] => [117   6  55]
[128   0 128] => [117   1 124]
[128   0 192] => [111   0 194]
[128   0 255] => [108   0 255]
[128  64   0] => [120  63   3]
[128  64  64] => [120  62  58]
[128  64 128] => [122  60 127]
[128  64 192] => [112  49 198]
[128  64 255] => [107  46 255]
[128 128   0] => [128 135   5]
[128 128  64] => [130 135  66]
[128 128 128] => [133 133 133]
[128 128 192] => [126 124 202]
[128 128 255] => [120 116 255]
[128 192   0] => [129 210  12]
[128 192  64] => [127 212  51]
[128 192 128] => [128 207 122]
[128 192 192] => [133 199 200]
[128 192 255] => [129 186 255]
[128 255   0] => [126 255  15]
[128 255  64] => [122 255  28]
[128 255 128] => [125 255 114]
[128 255 192] => [133 255 186]
[128 255 255] => [133 253 254]
[192   0   0] => [185   8   9]
[192   0  64] => [187   8  53]
[192   0 128] => [192   3 120]
[192   0 192] => [186   0 196]
[192   0 255] => [176   0 255]
[192  64   0] => [189  63  10]
[192  64  64] => [192  61  56]
[192  64 128] => [196  54 124]
[192  64 192] => [188  56 200]
[192  64 255] => [180  50 255]
[192 128   0] => [197 132   0]
[192 128  64] => [197 132  61]
[192 128 128] => [197 131 128]
[192 128 192] => [196 128 204]
[192 128 255] => [186 122 255]
[192 192   0] => [198 205   5]
[192 192  64] => [198 203  57]
[192 192 128] => [198 202 125]
[192 192 192] => [198 198 198]
[192 192 255] => [190 187 255]
[192 255   0] => [183 255  10]
[192 255  64] => [180 255  13]
[192 255 128] => [181 255 106]
[192 255 192] => [186 252 177]
[192 255 255] => [188 248 247]
[255   0   0] => [255  11  10]
[255   0  64] => [255  10  51]
[255   0 128] => [255   5 116]
[255   0 192] => [255   0 192]
[255   0 255] => [249   0 255]
[255  64   0] => [255  61  13]
[255  64  64] => [255  57  55]
[255  64 128] => [255  55 120]
[255  64 192] => [255  51 196]
[255  64 255] => [254  59 255]
[255 128   0] => [255 135  26]
[255 128  64] => [255 133  63]
[255 128 128] => [255 134 127]
[255 128 192] => [255 129 198]
[255 128 255] => [255 129 255]
[255 192   0] => [255 202   9]
[255 192  64] => [255 200  65]
[255 192 128] => [255 198 126]
[255 192 192] => [255 201 196]
[255 192 255] => [255 193 255]
[255 255   0] => [253 255   2]
[255 255  64] => [253 255  48]
[255 255 128] => [253 255 115]
[255 255 192] => [250 255 186]
[255 255 255] => [252 252 252]
-------------------------------------------------------------------------------------------------

At the moment it seems to me that all webos paths are supported. Tests show that using test video files makes calibration much easier, but on the other hand there is a factor that was not there before: various player enhancers or other settings that the user has enabled, so you have to be very vigilant and control everything. The rest is now in the hands of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants