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. |
2nd May 2017, 17:13 | #1 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Porting SMDegrain to Native High Bit Depth
With Avisynth+ now supporting native high-bit-depth, and MaskTools2 and MvTools2 also supporting high-bit-depth, is anyone interested in modifying SMDegrain to work with full native high-bit-depth?
In the best world, you could simply call SMDegrain with a 16-bit native clip and it would process it all in HBD. In practice, it returns errors. Some side libraries (that probably have HBD replacements) haven't been ported to HBD yet, and a few minor issues can happen along the way. It shouldn't be very hard but someone's got to do it, sooner or later. I'll create this thread for those who want to chime in, and let's see where it goes from here. |
2nd May 2017, 17:21 | #2 | Link | |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
I think real.finder did that already? https://pastebin.com/Mz5taAgN
Quote:
https://forum.doom9.org/showthread.php?t=174121
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
|
2nd May 2017, 17:38 | #3 | Link |
Registered User
Join Date: Oct 2014
Posts: 268
|
I know vapoursynth is not avisynth but vapoursynth has a ported smdegrain script with high bitdepth in havsfunc. (I don't know if it's a direct port or takes some liberties ).
Could at least be useful to take a peek how it works in vpy . |
2nd May 2017, 18:18 | #5 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
work fine for me, seems you have old mvtools2 and you try use lsb
__________________
See My Avisynth Stuff |
2nd May 2017, 19:06 | #7 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
Code:
convertbits(16) filter1 filter2 filter3 convertbits(8) #without dither, you can set the setting to do dither too
__________________
See My Avisynth Stuff |
|
2nd May 2017, 19:17 | #8 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Duh!
Works now... but performance isn't good at all! 8-bit Code:
FPS (min | max | average): 1.874 | 101671 | 18.11 Memory usage (phys | virt): 757 | 775 MiB Thread count: 34 CPU usage (average): 77% Code:
FPS (min | max | average): 0.288 | 47.37 | 3.171 Memory usage (phys | virt): 1059 | 1095 MiB Thread count: 32 CPU usage (average): 76% |
5th May 2017, 19:29 | #9 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,542
|
Quote:
__________________
@turment on Telegram |
|
5th May 2017, 20:34 | #10 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
use the lines I post last time will do everything in full 16 bit yes with add another parameter to do that but why?! it make no sense, stay with lsb will be better and faster
__________________
See My Avisynth Stuff Last edited by real.finder; 5th May 2017 at 20:37. |
|
5th May 2017, 20:43 | #12 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
mode in SMDegrain? will do nothing without lsb things
convertbits() in avs+ has dither modes, you can set that when you back to 8 bit
__________________
See My Avisynth Stuff |
5th May 2017, 20:48 | #13 | Link | |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,542
|
Quote:
PHP Code:
PHP Code:
__________________
@turment on Telegram |
|
5th May 2017, 20:55 | #14 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
and set dither=0 in convertbits() will give you dither like mode=0
__________________
See My Avisynth Stuff |
|
5th May 2017, 21:17 | #15 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,542
|
Quick test results
PHP Code:
Code:
[2017-05-05][21:58:43] encoded 1680 frames, 12.38 fps, 3004.32 kb/s, duration 0:02:15.65 [2017-05-05][21:58:43] av2y [info]: E:\in\1_55FO~1\founde~1.avs: 1920x800, YV12, 8-bits, progressive, 24 fps, 1680 frames [2017-05-05][21:58:43] Final file size is 25.1 MB bytes. PHP Code:
Code:
[2017-05-05][22:01:59] encoded 1680 frames, 9.76 fps, 3343.63 kb/s, duration 0:02:52.06 [2017-05-05][22:01:59] av2y [info]: E:\in\1_55FO~1\founde~2.avs: 1920x800, YV12, 8-bits, progressive, 24 fps, 1680 frames [2017-05-05][22:01:59] Final file size is 27.9 MB bytes. PHP Code:
Code:
[2017-05-05][22:06:02] encoded 1680 frames, 9.70 fps, 3164.08 kb/s, duration 0:02:53.15 [2017-05-05][22:06:02] av2y [info]: E:\in\1_55FO~1\founde~3.avs: 1920x800, YV12, 8-bits, progressive, 24 fps, 1680 frames [2017-05-05][22:06:02] Final file size is 26.4 MB bytes. PHP Code:
Code:
[2017-05-05][22:09:02] encoded 1680 frames, 9.62 fps, 3132.65 kb/s, duration 0:02:54.63 [2017-05-05][22:09:02] av2y [info]: E:\in\1_55FO~1\founde~4.avs: 1920x800, YV12, 8-bits, progressive, 24 fps, 1680 frames [2017-05-05][22:09:02] Final file size is 26.2 MB bytes. Regarding visual quality, need time to decide
__________________
@turment on Telegram |
5th May 2017, 21:42 | #16 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,542
|
Tests on more grainy source
The Silence of the Lambs BD
PHP Code:
Code:
[2017-05-05][22:23:48] encoded 1708 frames, 9.44 fps, 4109.46 kb/s, duration 0:03:00.98 [2017-05-05][22:23:48] av2y [info]: E:\in\1_58SI~1\silenz~1.avs: 1920x1032, YV12, 8-bits, progressive, 24000/1001 fps, 1708 frames [2017-05-05][22:23:48] Final file size is 34.9 MB bytes. PHP Code:
Code:
[2017-05-05][22:29:18] encoded 1708 frames, 6.30 fps, 6812.83 kb/s, duration 0:04:31.24 [2017-05-05][22:29:18] av2y [info]: E:\in\1_58SI~1\silenz~2.avs: 1920x1032, YV12, 8-bits, progressive, 24000/1001 fps, 1708 frames [2017-05-05][22:29:18] Final file size is 57.9 MB bytes. PHP Code:
Code:
[2017-05-05][22:34:43] encoded 1708 frames, 7.59 fps, 3702.49 kb/s, duration 0:03:44.95 [2017-05-05][22:34:43] av2y [info]: E:\in\1_58SI~1\silenz~3.avs: 1920x1032, YV12, 8-bits, progressive, 24000/1001 fps, 1708 frames [2017-05-05][22:34:43] Final file size is 31.5 MB bytes. PHP Code:
Code:
[2017-05-05][22:40:39] encoded 1708 frames, 4.88 fps, 6839.06 kb/s, duration 0:05:49.72 [2017-05-05][22:40:39] av2y [info]: E:\in\1_58SI~1\silenz~4.avs: 1920x1032, YV12, 8-bits, progressive, 24000/1001 fps, 1708 frames [2017-05-05][22:40:39] Final file size is 58.1 MB bytes.
__________________
@turment on Telegram |
8th May 2017, 17:44 | #19 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
OK I found the performance problem: MinBlur.
Code:
MinBlur(2,3,true) Code:
FPS (min | max | average): 5.066 | 146152 | 59.99 Memory usage (phys | virt): 155 | 153 MiB Thread count: 29 CPU usage (average): 66% Code:
FPS (min | max | average): 0.961 | 66813 | 10.50 Memory usage (phys | virt): 222 | 220 MiB Thread count: 29 CPU usage (average): 77% |
23rd May 2017, 06:37 | #20 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
real.finder, I believe you said MinBlur was only performed on 8-bit-depth?
Code:
input8h = defined(input8h) && isclip(input8h) ? input8h : lsb_in ? inputP. Ditherpost(mode=6, slice=slices) : nop() input8y = defined(input8y) ? input8y : planar ? (lsb_in ? input8h.Dither_YUY2toInterleaved() : inputP) : inputP input8 = defined(input8 ) ? input8 : lsb_in ? (planar ? input8y.Interleaved2planar() : input8h) : input8y |
Thread Tools | Search this Thread |
Display Modes | |
|
|