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 > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th August 2018, 20:50   #21  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Quote:
Originally Posted by videoh View Post
3D LUTs are used for all kinds of transforms, e.g., full HDR to SDR, which is the context of this thread. If you think the following process is not intensive, then I'll leave you to your own world:

Convert YCbCr to normalized float RGB.
Convert to linear float RGB (undo 2084).
Convert to a perceptually uniform color space.
Tonemap.
Perform gamut mapping using one of many different designs.
Convert back to linear float RGB.
Apply SDR gamma curve.
Convert back to YCbCr for output.

The point of a LUT is that you can perform this process for each color value and store the results for lookup.
I do those things in Resolve all the time and they hardly toll the GPU.

Not sure what you mean by convert to "perceptually uniform color space", converting to XYZ as an intermediate and back together with gamut mapping out of gamut values should do the job just fine.
Cary Knoop is offline   Reply With Quote
Old 10th August 2018, 20:58   #22  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
Quote:
Originally Posted by videoh View Post
As I said, I'll leave you to your own little world. 3D LUTs exist for a reason. It's not just that no-one is as clever as you.
That little world includes all professional color management tools which use mathematical transforms for gamma and gamut transforms not LUTs.
Cary Knoop is offline   Reply With Quote
Old 10th August 2018, 21:00   #23  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Enjoy your world.

jpsdr's stuff is not GPU based so will you still advise him that LUTs are useless?

Last edited by videoh; 10th August 2018 at 21:12.
videoh is offline   Reply With Quote
Old 10th August 2018, 21:28   #24  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
What is the achieved frame rate for 3840x2160?

Last edited by videoh; 10th August 2018 at 22:13.
videoh is offline   Reply With Quote
Old 10th August 2018, 23:29   #25  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by videoh View Post
What is the achieved frame rate for 3840x2160?
Code:
import vapoursynth as vs
core = vs.get_core()

# tested vs.RGBS, vs.RGBH, vs.RGB24 and vs.RGB48
clip = core.std.BlankClip(width=3840,height=2160,format=vs.RGBS, length=1000)
clip = core.timecube.Cube(clip, cube=r"D:\Encode\vscube\test.cube")

clip.set_output()
RGB24 (8-bit int): 211.35 fps
RGB48 (16-bit int): 127.69 fps
RGBH (16-bit/half precision float): 129.5 fps
RGBS (32-bit/single precision float): 56.65 fps

Intel i7-8700K @ 4.9 GHz, 16GB DDR4-3200. Using 12 threads (or, more precisely, 12 simultaneous requests in vspipe). That many threads is definitely suboptimal for RGBS though; I tried it with 2 threads and it went up to 65-ish FPS. Judging by a quick and dirty test, for RGBH it doesn't scale beyond 6 threads, while RGB24 can benefit from 8-10 threads but not from all 12. It's most likely memory/cache bound.

Last edited by TheFluff; 11th August 2018 at 00:29.
TheFluff is offline   Reply With Quote
Old 10th August 2018, 23:42   #26  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Thank you, TheFluff.

I will get the 3D LUT filter and run some experiments.

BTW, my DGHDRtoSDR() with DGSource() delivering YUV420P16 coincidentally also runs at 56 fps under Vapoursynth (i7 7700K + 1080 Ti).

Last edited by videoh; 10th August 2018 at 23:49.
videoh is offline   Reply With Quote
Old 11th August 2018, 00:18   #27  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Any idea why the vpy script would fail with:

vapoursynth.Error: LoadLibraryEx failed with code 87: update windows and try again

when loading vscube.dll?

I did retarget the Windows SDK to the one I had on my machine (10.0.16299.0) but it built OK. Would that cause it?

Last edited by videoh; 11th August 2018 at 00:21.
videoh is offline   Reply With Quote
Old 11th August 2018, 00:28   #28  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Maybe? This is Win7, no? I think the usual way of fixing that particular LoadLibraryEx misbehavior is installing either KB2533623 or IE11 or both, I dunno.
TheFluff is offline   Reply With Quote
Old 11th August 2018, 00:45   #29  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
OK, thanks, changed to full path for vscube.dll and it went away. I'm on latest Win10. Weird.
videoh is offline   Reply With Quote
Old 11th August 2018, 22:28   #30  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
It was pointed out to me that I forgot to pass "keep=True" to blankclip. Since the script is memory bound, passing that parameter pretty much just doubles the performance, so the fps numbers quoted above are about half of what the filter itself is actually capable of.
TheFluff is offline   Reply With Quote
Old 11th August 2018, 22:37   #31  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
Great to know, thanks for the update!
videoh is offline   Reply With Quote
Old 17th May 2019, 10:49   #32  |  Link
age
Registered User
 
Join Date: Oct 2015
Posts: 54
hi! Is it possible to add the bt.2390 tone mapping curves? it would be great
age is offline   Reply With Quote
Reply

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


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