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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st January 2022, 15:05   #81  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by joearmstrong View Post
The example from Avisynth wiki seems to be wrong:

Converting to linear produces errors. Maybe a bug? Without linear the reults are fine for me:

z_ConvertFormat(pixel_type="RGBP16", colorspace_op="2020ncl:st2084:2020:l=>rgb:st2084:2020:f", dither_type="none")
Cube("...\test.cube")
z_ConvertFormat(pixel_type="YV12", colorspace_op="rgb:st2084:2020:f=>709:709:709:l", dither_type="ordered")
It depends on what the LUT is doing.
If the LUT is converting to BT709 SDR, then you don't need to put st2084 to 709 in z_ConvertFormat, otherwise you would be converting it twice!

This is what I use at Sky for PQ to HLG:

Code:
#BBC HDR PQ to HDR HLG LUT

#From 4:2:2 16bit planar Narrow Range to RGB Planar 16bit Full Range
z_ConvertFormat(pixel_type="RGBP16", colorspace_op="2020:st2084:2020:limited=>rgb:st2084:2020:full", resample_filter_uv="spline64", dither_type="error_diffusion")

#From PQ to HLG with 16bit precision
Cube("\\mibcisilonsc\avisynth\Server\encoder\encoder\Processors\avs_plugins\LUTs\1a_PQ1000_HLG_mode.cube", fullrange=true)

#From RGB 16bit planar Full Range to YUV422 10bit planar Narrow Range with dithering
z_ConvertFormat(pixel_type="YUV422P10", colorspace_op="rgb:std-b67:2020:full=>2020:std-b67:2020:limited", resample_filter_uv="spline64", dither_type="error_diffusion")
and it's what I believe should be a good example.
FranceBB is offline   Reply With Quote
Old 21st January 2022, 20:37   #82  |  Link
joearmstrong
Registered User
 
joearmstrong's Avatar
 
Join Date: Jul 2013
Posts: 38
You're right, FranceBB.
I think this should be correct:

z_ConvertFormat(pixel_type="RGBP16", colorspace_op="2020ncl:st2084:2020:l=>rgb:st2084:2020:f", dither_type="none")
Cube("C:\Downloads\HDR to SDR\LUT von der rabe\Lut Eigen_HDR to SDR 02.cube", fullrange=true)
z_ConvertFormat(pixel_type="YV12", colorspace_op="rgb:709:709:f=>709:709:709:l", dither_type="ordered")

Last edited by joearmstrong; 24th March 2023 at 15:20.
joearmstrong is offline   Reply With Quote
Old 21st January 2022, 23:38   #83  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
National squirrel appreciation day today :tip: gonca. Cube is the ham and the convert stuff is the bread. The ham tastes great.
videoh is offline   Reply With Quote
Old 22nd January 2022, 10:24   #84  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Yeah the last one you posted is correct.

Quote:
Originally Posted by videoh View Post
National squirrel appreciation day today.
I thought you were just fooling us all, Donald, but I googled it and it's actually really the Squirrel Appreciation Day O_O
FranceBB is offline   Reply With Quote
Old 24th January 2022, 21:28   #85  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
My monitor profile doesn't work anymore in latest version v1.3. Here's a link. It was working at least up to v1.1. Do I need to conform the .cube file to another format?
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 25th January 2022, 12:41   #86  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Doesn't work means what? And post your script.
videoh is offline   Reply With Quote
Old 25th January 2022, 17:59   #87  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Means white output. This is what I have been using the past years:
Code:
	ConvertBits(16)
	ConvertToPlanarRGB()
	Cube("MonitorLUT.cube", 2, true)
	ConvertBits(8,dither=1)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread
Dogway is offline   Reply With Quote
Old 26th January 2022, 01:29   #88  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Thank you. I'll look into it.
videoh is offline   Reply With Quote
Old 26th January 2022, 05:43   #89  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by Dogway View Post
Means white output. This is what I have been using the past years:
Code:
	ConvertBits(16)
	ConvertToPlanarRGB()
	Cube("MonitorLUT.cube", 2, true)
	ConvertBits(8,dither=1)
Vapoursynth vscube_r3 produces "white" output too , unless the input is RGBS . r2a worked ok with RGB48
poisondeathray is offline   Reply With Quote
Old 26th January 2022, 13:10   #90  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
What is RGBS and how would one arrange the input to be RGBS?
videoh is offline   Reply With Quote
Old 26th January 2022, 13:19   #91  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by videoh View Post
What is RGBS and how would one arrange the input to be RGBS?
32-bit float and ConvertBits(32).
Reel.Deel is offline   Reply With Quote
Old 26th January 2022, 13:32   #92  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Thank you. Investigating...
videoh is offline   Reply With Quote
Old 27th January 2022, 01:02   #93  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
I can reproduce the issue with the white output with only Cube("....", 2). cpu 0 and 1 are fine. Using just Cube("....") is fine and it seems AVX2 is used.
StvG is offline   Reply With Quote
Old 27th January 2022, 01:21   #94  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
Quote:
Originally Posted by StvG View Post
I can reproduce the issue with the white output with only Cube("....", 2). cpu 0 and 1 are fine. Using just Cube("....") is fine and it seems AVX2 is used.
for avscube 1.3 and vscube 1.3 , cpu 0 and 1 are ok for me too. But it picks 2 by default for me, and white screen (unless RGBS in put for VPY)
poisondeathray is offline   Reply With Quote
Old 27th January 2022, 18:30   #95  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Looks like a bug in lut_avx2.cpp, as when I replace that with the version from r2a, it works. Intrinsics and assembly are Greek to me, so I posted an issue at sekrit's site:

https://github.com/sekrit-twc/timecube/issues/7

Meanwhile, don't use cpu=2. You can try cpu=3 for AVX512, which seems to work for me.

Last edited by videoh; 27th January 2022 at 18:35.
videoh is offline   Reply With Quote
Old 27th January 2022, 20:36   #96  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Quote:
Originally Posted by videoh View Post
Meanwhile, don't use cpu=2. You can try cpu=3 for AVX512, which seems to work for me.
That's why for me Cube("...") (w/o specifying cpu) is working (AVX512). But cpu=3 isn't mentioned in the readme/avs wiki.
StvG is offline   Reply With Quote
Old 27th January 2022, 23:41   #97  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Yeah, I need to update the help file.
videoh is offline   Reply With Quote
Old 29th January 2022, 00:12   #98  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
sekrit committed a fix for this. I'll update the Avisynth build.
videoh is offline   Reply With Quote
Old 29th January 2022, 03:04   #99  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
I updated the 1.3 release with the fix for cpu=2:

http:\\rationalqm.us\hdr\avscube_1.3.zip
videoh is offline   Reply With Quote
Old 29th January 2022, 06:28   #100  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Thanks.
StvG is offline   Reply With Quote
Reply

Tags
3dl, cube, hdr, lut, sdr

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 19:12.


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