Page 5 of 12

Port Cube

Posted: Fri Aug 19, 2022 11:16 am
by Sherman
Guys, did you know you can just open the cube file with a text editor?

If the cube specifies a domain you will see DOMAIN_MAX and DOMAIN_MIN in the header. I've never seen a cube file using them.

TITLE "PQ_to_BT709_slope"
LUT_3D_SIZE 65
# - Created by Francesco Bucciantini
0.000000 0.000000 0.000000
0.025484 0.000000 0.000000
0.045503 0.000000 0.000000
0.065639 0.000000 0.000000
0.086664 0.000000 0.000000
...

Port Cube

Posted: Fri Aug 19, 2022 11:49 am
by Rocky
Cool, thank you Sherm!

Please re-download to get new range option handling. Please read the document for details.

DGSource("THE GREAT WALL.dgi",ct=48,cb=48,cl=0,cr=0,rw=1920,rh=1032)
DGCube("PQ_to_BT709_slope.cube",expand_in=true,compress_out=true,interp="tetrahedral")

Port Cube

Posted: Fri Aug 19, 2022 1:48 pm
by reel.deal
Hi DG,

Thanks for the updates on this filter. Quick question, you mentioned full range is gone but I still see that parameter in the filter signature: c[cube]s[fullrange]b[expand_in]b[compress_out]b[interp]s[device]i

Is it simply ignored?

Port Cube

Posted: Fri Aug 19, 2022 2:07 pm
by Curly
No attention to detail these guys, you're right.

Dude! Welcome to the forum where your reputation will increase by leaps and bounds. Like mine!

:bow: reel.deal

Port Cube

Posted: Fri Aug 19, 2022 4:40 pm
by Guest 2
reel.deal wrote:
Fri Aug 19, 2022 1:48 pm
Hi DG
Welcome ;)

Port Cube

Posted: Fri Aug 19, 2022 5:12 pm
by Rocky
Thank you for the report reel.deal. Yes it's ignored. I'll get rid of it. And welcome!

Port Cube

Posted: Sat Aug 20, 2022 8:16 am
by Rocky
Uploaded version without ignored fullrange parameter. Now we have to get some versioning in place. Can't believe this was already linked at Avisynth wiki. Interest is apparently greater than I anticipated.

Also, the cube loading seems rather slow. I'll try to improve that.

Port Cube

Posted: Sat Aug 20, 2022 8:44 am
by Guest 2
Rocky wrote:
Sat Aug 20, 2022 8:16 am
Interest is apparently greater than I anticipated.
As I told you ;)

You did something eagerly wanted by a lot of people.

When DGCube will be polished and shiny, a proper BM3D is wanted too. ;)

Port Cube

Posted: Sat Aug 20, 2022 1:21 pm
by Rocky
I'll listen when you tell me things, promise.

Re-download to get the faster cube loading. Jeez, templates, vectors, calling functions for every character. Why would anyone do that (five seconds to parse a simple text file)? There's no timecube code left at all. Still, could release source code when stable.

BM3D. Sure, I'm listening.

Can you get that TDS guy straightened out? Or is it terminal?

Port Cube

Posted: Sat Aug 20, 2022 2:39 pm
by reel.deal
I added DGCube to the wiki a few days ago, I thought it was *done*. But yes, there is an interest :).

I have a few questions regarding the examples that are included in the documentation. I have virtually no experience with HDR content but a few things stand out to me.

Apply 3D LUT to HDR10 PQ clip obtained from DGSource() using external conversions to RGBP16:

Code: Select all

DGSource("THE GREAT WALL.dgi")
z_ConvertFormat(pixel_type="RGBP16", colorspace_op="2020:st2084:2020:limited=>rgb:st2084:2020:full")
DGCube("PQ_to_BT709_slope.cube", expand_in=true, compress_out=true, interp="tetrahedral")
z_ConvertFormat(pixel_type="YUV422P10", colorspace_op="rgb:std-b67:2020:full=>2020:std-b67:2020:limited")
Shouldn't that be expand_in=false, compress_out=false since z_ConvertFormat converts to full range RGB and then converts to limited range YUV?

Also, the cube being applied implies that it converts PQ to Rec.709 (hdr to sdr?), so why does z_ConvertFormat then convert to Rec.2020 HLG? Wouldn't it be more appropriate to use colorspace_op="rgb:709:709:full=>709:709:709:limited"? I don't know what difference it make as I do not have an HDR monitor nor any samples to try it on, but I just found that a little confusing. Do you by any chance have a small sample of The Great Wall?

I was looking for the cube in that example, turns out the actual name is "PQ_to_BT709_v1.cube".

Lastly, how does the internal YUV<->RGB conversion handle chroma placement? Is it hard coded to just one option?

Sorry for the wall of questions and thanks for the warm welcome.

Port Cube

Posted: Sun Aug 21, 2022 5:54 am
by Rocky
reel.deal wrote:
Sat Aug 20, 2022 2:39 pm
Shouldn't that be expand_in=false, compress_out=false since z_ConvertFormat converts to full range RGB and then converts to limited range YUV?
Yes, I have updated the text document and uploaded it. Thank you for pointing it out.
Also, the cube being applied implies that it converts PQ to Rec.709 (hdr to sdr?), so why does z_ConvertFormat then convert to Rec.2020 HLG? Wouldn't it be more appropriate to use colorspace_op="rgb:709:709:full=>709:709:709:limited"?
Yes, also fixed in the document.
Do you by any chance have a small sample of The Great Wall?
https://rationalqm.us/misc/THE_GREAT_WALL.mkv
Lastly, how does the internal YUV<->RGB conversion handle chroma placement? Is it hard coded to just one option?
Whatever it started as it ends as. I don't look at or modify it.

Port Cube

Posted: Sun Aug 21, 2022 6:30 am
by Guest 2
Rocky wrote:
Sat Aug 20, 2022 1:21 pm
BM3D. Sure, I'm listening.
Go for it. ;)
Rocky wrote:
Sat Aug 20, 2022 1:21 pm
Can you get that TDS guy straightened out? Or is it terminal?
He did even created a new user some months ago because people were fond of him.

We are now talking to the second reincarnation.

Port Cube

Posted: Sun Aug 21, 2022 7:04 am
by Rocky
What's his other handle?

Port Cube

Posted: Sun Aug 21, 2022 9:23 am
by Guest 2
Rocky wrote:
Sun Aug 21, 2022 7:04 am
What is his other handle?
Grumpy something, can't remember.

Port Cube

Posted: Sun Aug 21, 2022 10:51 am
by Rocky
Oh, that guy. :roll:

Port Cube

Posted: Sun Aug 21, 2022 11:43 am
by reel.deal
Thanks for the sample. I also updated the wiki to match the corrections above.

Port Cube

Posted: Sun Aug 21, 2022 12:08 pm
by Rocky
That's great, thank you reel.deal. I see you got Moose Approved. Winkie is on the reticent side, so must've noticed something positive about you. big t thinks highly. Pretty soon Moose Lodge dinners. Expect to hear from Britney. Watch out for Natasha, though, she'll bleed you dry. Wonder Woman, any interest? I heard she's on the rebound ;).

Port Cube

Posted: Sun Aug 21, 2022 12:59 pm
by Sherman
Guys, I'm thinking rd as shortform vernacular. Unanimous consent?

Port Cube

Posted: Sun Aug 21, 2022 1:54 pm
by Guest 2
Sherman wrote:
Sun Aug 21, 2022 12:59 pm
Guys, I'm thinking rd as shortform vernacular. Unanimous consent?
Ok. But you should ask HIM :mrgreen:

Port Cube

Posted: Sun Aug 21, 2022 1:58 pm
by Guest 2
Perhaps it's time to have some quality and consistency tests with other plugins and programs to see if everything is ok.

Who here is using some professional software, LUTs, etc?

I am having some luminosity differences between BBC full range LUT and Warner limited range LUTs outputs. With a lot of probability it's because of LUTs but who knows. :D

Port Cube

Posted: Sun Aug 21, 2022 2:48 pm
by Curly
Figured it out. The LUTs are different. Sheila'll believe ya! Never doubt.

Port Cube

Posted: Sun Aug 21, 2022 2:50 pm
by Wonder Woman
:bow: Curly

Port Cube

Posted: Sun Aug 21, 2022 2:54 pm
by Boris
There's nobody here.

Port Cube

Posted: Mon Aug 22, 2022 4:12 am
by Rocky
I uploaded a new version that fixes compatibility with non-AVS+, e.g., AVS 2.6.

Port Cube

Posted: Mon Aug 22, 2022 6:13 am
by Guest 2
Guys, is there a way to find if a 3D lut is to be applied to limited range or full range?

Some tests? Property of the matrix?