Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th September 2011, 21:34   #201  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,197
at which position to add this line?

I keep getting error: parsing failure: unexpected '!'; expected end of input (position XX) messages when trying to use the command line

edit: now haali does start up properly with every (valid) 3dlut file I feed to it. I uninstalled LAVsplitter this time, before that I might just have reinstalled haali after having installed LAV instead of proper uninstallaling LAV first. maybe that caused some problems.
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack)

Last edited by Thunderbolt8; 27th September 2011 at 21:43.
Thunderbolt8 is offline   Reply With Quote
Old 27th September 2011, 21:56   #202  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Oh, totally my bad - I forgot that you have to set the bit depth for each input channel, so it's !Input_Depth(7, 7, 7)

And good to hear about the Haali thing.
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 29th September 2011, 21:17   #203  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
In case anybody's interested, I'm working on a system to perceptually expand the gamut of a source file to the maximum representable gamut in your monitor space that won't clip any levels (or clip some of the blue, how far you expand it depends on your preferences).

In other words, you will be able to take a dull and gray source image and expand the gamut to something bright and exciting, depending on how much your monitor can represent.

This is basically like using an uncalibrated wide gamut monitor, but with one very important difference: the hue will stay the same, just the chromaticity increases or decreases. So basically, the red will be the same shade of red - just more vivid.

This solves the “plastic greens” problem of wide gamut monitors while giving you some of their benefits.

The main drawback? On the average wide gamut monitor, you can't get a significant increase since the blue primaries are often very close to the originals. For example on my U2410, I can increase the chromaticity by around 1.5% before I start clipping the blue channel. This is a barely detectable increase, only very slight at best. But if you have something like a projector with a much wider blue primary, you can benefit more from the increase.

Alternatively, you can choose to clip the blue channel slightly, which will begin shifting the hue of colors with a lot of blue saturation.
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 29th September 2011, 23:14   #204  |  Link
fairchild
Registered User
 
Join Date: Sep 2010
Posts: 321
Hey nand, I have a question regarding these tools which you are providing. Normally what I had been using was use the following coordinates which had been generated by my calibration software + meter (I used colorHCFR + i1DisplayLT) and entered these values into the MadVR yCMS configuration tab:

Quote:
Gamut_Measurements 1
8.522508 0.659738 0.332989
27.843536 0.297610 0.595287
3.192925 0.149621 0.066393
46.652584 0.311805 0.327390
Quote:
Grayscale_Measurements
20 1 3.572751 0.309652 0.327431
30 1 7.791107 0.312203 0.327093
40 1 13.703165 0.312105 0.327861
50 1 21.226063 0.312431 0.329232
60 1 31.068672 0.310517 0.327090
70 1 42.082134 0.312013 0.327941
80 1 53.747086 0.312122 0.327018
90 1 68.256332 0.311853 0.328607
100 1 81.266403 0.312070 0.327252
Is there an easy/quick way to just enter the above values into Agryll/your software and have it+your software generate a 3dlut to be used by MadVR or is there something else that needs to be done? (I'd rather not re-calibrate using Agryll since I like the way my set is already configured for both my HTPC usage + Blu-ray player + Cable TV.

If that's out of the scope of your tools, then that's understandable. I'd like to try an alternative to MadVR + yCMS.

Thanks!
__________________
MPC-HC/MPC-BE, Lav Filters, MadVR
CPU: AMD Ryzen 5 1600, Video: AMD Radeon RX Vega 56 -> TCL S405 55", Audio: Audio-Technica M50S

Last edited by fairchild; 29th September 2011 at 23:39.
fairchild is offline   Reply With Quote
Old 30th September 2011, 12:43   #205  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Quote:
Originally Posted by fairchild View Post
If that's out of the scope of your tools, then that's understandable. I'd like to try an alternative to MadVR + yCMS.

Thanks!
My tools use yCMS as a back-end for those kind of measurements. The only gamut mapping I've implemented myself is currently just a linear transition, it isn't capable of calibrating the gamma curve like that or anything.
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 30th September 2011, 16:15   #206  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Previews of the technology I mentioned earlier:

80% source gamut
90% source gamut
100% source gamut (original image)
110% source gamut
120% source gamut
130% source gamut
140% source gamut
150% source gamut

Do note that these images are for the standard mode of my U2410, calibrated to D65 and colors will appear inaccurate on your monitor. It is just to demonstrate how the technology works. At 100%, the colors (as shown on my monitors) are exactly BT.709.

It is important to note, that (on my monitor):
  • Above 1.5% the blue channel starts clipping
  • Above 15.2% the red channel starts clipping
  • Above 41.8% the green channel starts clipping
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 1st October 2011, 13:39   #207  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Version 0.14 release

Download link: http://www.mediafire.com/?m7nr5qgkdso6bdh

This build mainly highlights some significant back-end changes in terms of color space support. If I keep going at the current rate, I'll be able to replace yCMS and LittleCMS soon. The library is currently already capable of gamma encoding/decoding, color space conversion, chromatic adaption, chromatic desaturation etc.

In addition, I'm working on the proper GUI front-end which will replace the command line utilities / lutscript. (Apart from that, I need to re-work the way color spaces work in LutScript significantly. I may just scrap LutScript completely and switch to an existing scripting language like ruby or haskell and provide bindings instead)

Change log:
Code:
Version 0.14:
* LinkICCGUI now automatically updates yCMS on first run as well
* imagecal.exe clamps the levels to 0-255 properly now, before it would overflow
* Another attempt at fixing the locale bug, this time by forcing en-US explicitly instead of the invariant culture
* Gamma encoding for values under 0 clamps the values now (instead of resulting in NaN or Infinity)
* Fixed a very slight error in the predefined BT709 primaries
+ LutScript scripts can now be directly dragged onto lutscript.exe instead of having to run it from the console
  You can also assign the program as default program for the .3ls file extension, so you just need to double click it
+ Added new gamuts (usable in LutScript):
  BT709 (aliases: HDTV, sRGB, scRGB)
  ROMM (aliases: ProPhotoRGB)
  AdobeRGB (aliases: AdobeRGB98)
  AppleRGB
  NTSC (aliases: NTSC53, FCC1953, BT470M)
  NTSC87 (aliases: SMPTEC, SMPTE_C, SMPTE_RP_145, SMPTE_170M)
  SECAM (aliases: PAL, EBU_Tech_3213, BT470_B)
  AdobeWide
  CIE1931
  ACES
+ Chromaticity expanding in the L*Ch(ab) color space is now supported
+ Chromatic adaptation between two different white points is now supported
+ Separated the white point component from the color space, added more default white points:
  A, B, C, D50, D55, D65, D75, E, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12
+ Added a function to calculate the white point from a color temperature
? Note: The above four features are not yet available in LutScript or any program
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 2nd October 2011, 02:00   #208  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Going for a double release since I finished this version up much, much faster than anticipated:

Version 0.15 release

Download link: http://www.mediafire.com/?rowlp5bf44y2205

This build mainly implements the features added in 0.14 into LutScript, doing so by completely rewriting the LutScript engine. Basically, LutScript is now a derivative of C# (some things are modified, for example ! in function names gets changed to _, and a few global constants have been added eg. 3DLUT for !Filetype). What this means is that you can basically extend its capabilities with standard C#. The plaintext of a LutScript file (.3ls2) is stuck inside a code provider's constructor and executed directly, so any sort of variables or other processing logic you declare in it get executed as well. The main syntactic change is that top-level functions (starting with a !) need a semicolon (;) after them, eg. !Filetype(3DLUT); and !Pixel()'s functions need to be separated by a regular comma, eg. !Pixel( GammaDec(2.4), GammaEnc(2.2) );

To complement this, a new filter has been added named Code(Func<ColorTriple, ColorTriple>) which basically provides you with the possibility of writing your own transformation logic in C# source. The !Pixel function has been rewritten and is now !Pixel(params ITransformationProvider<ColorTriple>[] filters), which is a fancy way of saying you can give it a bunch of filters as arguments.

Other than that, the main new filters this release highlights are ChromaticAdapt(ColorTriple source, ColorTriple dest, [ScalingMode mode]) and ChromaticScale(double factor, ColorTriple illuminant).

Using these filters, it's possible to, for example, desaturate or oversaturate colors, which is useful when moving into a large color space (where saturation wouldn't cause clipping).

Here's a new example of what a LutScript file looks like:

Code:
!Filetype(3DLUT);

!Pixel(
    GammaDec(2.2),
    ColorDec(ColorSpace.BT709),
    ChromaticScale(1.3),
    IccSingle("monitor.icm")
);
This creates a madVR-compatible .3dlut that decodes from BT.709, oversaturates by 130% (increases the chromaticity) and decodes back into the color space defined by my monitor's ICC profile.

Full changelog:

Code:
Version 0.15:
! LutScript completely re-worked, instead of creating a DSL from scratch it is now (nearly) syntax-conform C#.NET
  This, in practice, doesn't really change much (as far as the scripting goes), but there are a few syntax differences
  Most notably, semicolons are required after every command, the { } blocks have been removed from !Pixel, and
  individual filters are separated by commas instead, eg. !Pixel( Grayscale(), Inverse(), Scale(0.1, 0.9) );
  The new preferred extension is .3ls2
+ The “old” LutScript behavior can still be obtained by appending the --legacy flag to lutscript.exe. If you open
  a file ending with .3ls instead of .3ls2, this flag is appended automatically.
+ New LutScript function: ChromaticAdapt(ColorTriple source, ColorTriple dest, [ScalingMode mode])
  mode can either be ScalingMode.Bradford, ScalingMode.VonKries or ScalingMode.XYZ - Bradford is the best/default
+ New LutScript function: ChromaticScale(double factor, ColorTriple illuminant)
  This will scale the chromaticity in L*Ch(ab) space by a constant factor
+ New LutScript functions: sRGBGammaEncode() and sRGBGammaDecode()
+ New LutScript function: Code(Func<ColorTriple, ColorTriple>), can be used to code your own transform filters, eg:
  Code((input) => input * 0.7)
~ The LutScript functions dealing with primaries have changed their signature to (ColorSpace c) instead of a bunch of
  double values. If you want to create a color space from the x/y chromaticity values, you can do so using the class's
  default constructors, for example: new ColorSpace(0.64, 0.33, 0.30, 0.60, 0.15, 0.06, Illuminant.D65)
+ Added “smart” versions of ChromaticX / ColorX which attempt to guess the required color space based on the output
  of the previous filter, the primaries of the 3dlut, or failing that, BT.709
  For example, !Input_Primaries(ColorSpace.BT709); !Pixel( GammaDec(2.2), ColorDec(), ColorEnc(), GammaEnc(2.2) );
+ All standard colorspaces and illuminants are now readily accessible from within LutScript, as ColorSpace.<name> or
  Illuminant.<name>, eg. ColorSpace.sRGB or Illuminant.D50
+ A white point can be calculated from the temperature using Illuminant.FromTemperature(double temp)
* Exceptions are a bit more descriptive
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 3rd October 2011, 11:28   #209  |  Link
Thunderbolt8
Registered User
 
Join Date: Sep 2006
Posts: 2,197
is the input line you gave me for colour correction

Code:
# Set the properties properly
!Input_Range(Limited)
!Output_Range(Limited)
!Filetype(3DLUT)
!Input_Primaries(BT709)

!Pixel( {
  
  Scale(-0.07305936073059360730593607305936, 1.0913242009132420091324200913242)
  Clamp(0, 1)
  
} )
still valid with the new version or has anything changed?
__________________
Laptop Lenovo Legion 5 17IMH05: i5-10300H, 16 GB Ram, NVIDIA GTX 1650 Ti (+ Intel UHD 630), Windows 10 x64, madVR (x64), MPC-HC (x64), LAV Filter (x64), XySubfilter (x64) (K-lite codec pack)
Thunderbolt8 is offline   Reply With Quote
Old 3rd October 2011, 13:40   #210  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Quote:
Originally Posted by Thunderbolt8 View Post
is the input line you gave me for colour correction

<snip>

still valid with the new version or has anything changed?
If you keep the extension as .3ls, it's still valid. However, to take advantage of the new features (eg. chromatic expansion), you can change the extension to .3ls2 and modify the script slightly:

Code:
!Filetype(3DLUT);
!Input_Primaries(ColorSpace.BT709);

!Pixel(
  
  Scale(-16.0 / 219.0, 239.0 / 219.0),
  Clamp(0, 1)
  
);
Firstly, instead of just “BT709” it's changed to “ColorSpace.BT709”.

Take note of the semicolons (;) and commas (,) added. I'm trying to figure out how I can add these automatically so the user doesn't have to, but for now, that's the only significant change.

I've also removed the !Input_Range and !Output_Range tags because those are limited range by default either way. And since this version supports mathematical operators, I've replaced the lengthy constants by their mathematical representations instead. (The .0 is important though, otherwise it won't be done with floating point precision math but instead with integer precision)

Once I'm happy with LutScript I'll write up a real documentation / user guide so all of these questions will be unnecessary, but for now I'm keeping it open so I can still make changes before it's too late.

Once I bump the version to 1.0 I'm not going to make any more drastic changes like that.
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management

Last edited by nand chan; 3rd October 2011 at 13:43.
nand chan is offline   Reply With Quote
Old 3rd October 2011, 19:51   #211  |  Link
alph@
Replicant
 
alph@'s Avatar
 
Join Date: Jan 2007
Location: strasbourg
Posts: 49
Quote:
Originally Posted by nand chan View Post

Once I'm happy with LutScript I'll write up a real documentation / user guide so all of these questions will be unnecessary.
I wait patiently on documentation for benefit from the library of software that you share with us
alph@ is offline   Reply With Quote
Old 1st November 2011, 15:08   #212  |  Link
vega22
Registered User
 
Join Date: Dec 2005
Location: Spain
Posts: 17
First of all, thank warmly Nand all these tools and all their efforts.
Now, a whimsical (and silly) question: I would like to manually alter some calibration data (namely the primary coordinates) before creating the .3dlut files through your tools. What is the best way to do it? Manipulate data in the .cal and/o ti3 files seems complicated. Maybe I should create a .3dlut for only gamut mapping using yCMS and my custon script, then merge this .3dlut with one creating from LinkICCGUI with only grayscale and gamma corrections? It´s possible? How?
The issue is to get a .3dlut to correct grayscale and gamma, but only correct the gamut interpolating one or two primaries, leaving the other untouched.
vega22 is offline   Reply With Quote
Old 3rd November 2011, 10:52   #213  |  Link
Wile-E-Coyote
Registered User
 
Join Date: Jun 2011
Posts: 61
Thank you for keeping your tools updated nand. Any chance you could also update your guides on haruhichan.com ? You said yourself there they were outdated and it's getting hard to sort the right settings in the comments.
Wile-E-Coyote is offline   Reply With Quote
Old 5th November 2011, 04:21   #214  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Quote:
Originally Posted by vega22 View Post
First of all, thank warmly Nand all these tools and all their efforts.
Now, a whimsical (and silly) question: I would like to manually alter some calibration data (namely the primary coordinates) before creating the .3dlut files through your tools. What is the best way to do it? Manipulate data in the .cal and/o ti3 files seems complicated. Maybe I should create a .3dlut for only gamut mapping using yCMS and my custon script, then merge this .3dlut with one creating from LinkICCGUI with only grayscale and gamma corrections? It´s possible? How?
The issue is to get a .3dlut to correct grayscale and gamma, but only correct the gamut interpolating one or two primaries, leaving the other untouched.
I don't quite understand why you want to alter the primaries of your calibration data. If you have an exact measurement available, use those, if you don't, just use a regular transform (without calibration).

If you just want the gamma curves, you could calculate those independently and export them to a 3x1DLUT file like a .cal file or #GammaCurve text file. Then you can do the primary mapping using standard color space logic, and perform the .cal correction on top of that (using LutScript).

Quote:
Originally Posted by Wile-E-Coyote View Post
Thank you for keeping your tools updated nand. Any chance you could also update your guides on haruhichan.com ? You said yourself there they were outdated and it's getting hard to sort the right settings in the comments.
Sooner or later, maybe
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 5th November 2011, 10:11   #215  |  Link
vega22
Registered User
 
Join Date: Dec 2005
Location: Spain
Posts: 17
Quote:
Originally Posted by nand chan View Post
I don't quite understand why you want to alter the primaries of your calibration data
First, my LCD with only hardware calibrations (i use a little boost in "color" setting looking the best ratio for the Y between all colors):
http://img521.imageshack.us/img521/4...ecalibrado.jpg
http://img716.imageshack.us/img716/8...calibrado2.jpg
The gamut is unacceptable, highly saturated. Now, automatically corrected by yCMS:
http://img23.imageshack.us/img23/6008/calibradoycms.jpg
http://img846.imageshack.us/img846/7...bradoycms2.jpg
The gamut is unacceptable, highly unsaturated. And now, the yCMS gamut corrected manually:
http://img198.imageshack.us/img198/5...cmsymanual.jpg
http://img210.imageshack.us/img210/6...msymanual2.jpg
Although still far from optimal, this gamut is the only decent for watching movies.
The process of finding the right spots manually is slow and cumbersome. It seems that the algorithm implemented in the "Upsilon mixer" tries to find the sweet spots interacting with the probe. This seems a good direction. However, i think it's even better to implement a GUI with "XY" sliders or something, for manually locate the points in the most comfortable way.
vega22 is offline   Reply With Quote
Old 8th November 2011, 20:33   #216  |  Link
6233638
Registered User
 
Join Date: Apr 2009
Posts: 1,019
So I finally had a chance to try this out. I followed your guide, let dispcalGUI create an "XYZ LUT + matrix" profile using the "Large testchart for LUT profiles" (396 patches) and left it alone for a couple of hours.

When trying to use LinkICCGUI I get this error:



Any ideas?
6233638 is offline   Reply With Quote
Old 8th November 2011, 21:12   #217  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Quote:
Originally Posted by 6233638 View Post
So I finally had a chance to try this out. I followed your guide, let dispcalGUI create an "XYZ LUT + matrix" profile using the "Large testchart for LUT profiles" (396 patches) and left it alone for a couple of hours.

When trying to use LinkICCGUI I get this error:

Any ideas?
Post the .ti3 file in question. Judging by the error message, it seems to be in an incorrect format (eg. not an XYZ->RGB LUT).
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 8th November 2011, 21:30   #218  |  Link
6233638
Registered User
 
Join Date: Apr 2009
Posts: 1,019
Quote:
Originally Posted by nand chan View Post
Post the .ti3 file in question. Judging by the error message, it seems to be in an incorrect format (eg. not an XYZ->RGB LUT).
http://www.mediafire.com/?glwa374o1czy7z7
6233638 is offline   Reply With Quote
Old 10th November 2011, 15:47   #219  |  Link
nand chan
( ≖‿≖)
 
Join Date: Jul 2011
Location: BW, Germany
Posts: 380
Quote:
Originally Posted by 6233638 View Post
Ah, I see what the issue is. Since you are using a spectrophotometer and not a colorimeter, it doesn't store the individual XYZ entries but the actual values at every wavelength. Understandably, yCMS can't work with these values at all.

What you can do is skip LinkICCGUI (which uses yCMS as well as LittleCMS) and use a LutScript:

Code:
!Filetype(3DLUT);

!Pixel(
    ColorDec(ColorSpace.madVR),
    IccSingle("your_monitor_profile.icm")
);
save as output.3ls2 and drag that onto lutscript.exe, the resulting test.3dlut can be used with madVR.
__________________
Forget about my old .3dlut stuff, just use mpv if you want accurate color management
nand chan is offline   Reply With Quote
Old 10th November 2011, 16:34   #220  |  Link
6233638
Registered User
 
Join Date: Apr 2009
Posts: 1,019
Thanks. I'm now getting:
Code:
Error: System.Exception: [3] 'TI3ParserLib.ColorSpace' does not contain a definition for 'madVR'

   at TI3ParserLib.LutScript.MakeLutFromString(String s)

   at TI3ParserLib.LutScript.MakeLutFromStream(Stream s)

   at TI3ParserLib.LutScript.MakeLutFromFile(String file)

   at lutscript.lutscript.Main(String[] args)
I guess I'm probably supposed to be defining something for "ColorSpace.madVR" but I'm not sure what?

http://www.mediafire.com/?yj5gblrd677j3w1

Here's the ICC profile as well, if that helps. Once I get this working, I'll have to see what the results are like, and then possibly do a longer profile, and make one at 2.40 gamma for film.

Using the ICC profile it generated, I'm getting banding and some discolouration in the greyscale, but I'm hoping that's a result of using the (presumably 8-bit) video card LUT, and that madVR with yCMS will be better.

Another issue I've run into is that when using the ICC profile, it's raising the black level of my display, as if it expected to read something from it. I have an LED backlit LCD that turns the backlight off for black, so that's obviously less than optimal.

I have to change brightness from 50 to 48 to get black to appear black again, and that's obviously going to affect the whole range from black to white. Don't know if the same will also apply when using a 3DLUT file in madVR, but I assume so.

Black point correction was set to 0% in dispcalGUI, which I assumed would take care of this. I guess I need to have a look over the dispcalGUI documentation to see what all the black level options do. (I just followed your guide more-or-less to the letter)
6233638 is offline   Reply With Quote
Reply

Tags
3dlut, argyllcms, color management, icc, madvr, ti3, ycms

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:19.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.