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. |
10th September 2017, 14:43 | #162 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
Don't use ConvertToYV12, use ConvertToYUV420. To combine the planes again, use CombinePlanes(Y-clip, U-clip, V-clip, "YUV") (for one example) |
|
10th September 2017, 16:11 | #163 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
This issue has several issues. On 1080p content, it throws a validation error on enh. Then it crashes on gBlur value being out of range. And then, output doesn't have the right dimensions!
I used Spline36Resize(Width/2, Height/2) to test and work around the bug, so I'm testing on 960x540 Performance-wise -- Prefetch(8) v1.3c Code:
FPS (min | max | average): 0.239 | 9584 | 14.75 Memory usage (phys | virt): 582 | 695 MiB Thread count: 36 CPU usage (average): 55% Code:
FPS (min | max | average): 0.915 | 15800 | 13.10 Memory usage (phys | virt): 1031 | 1162 MiB Thread count: 38 CPU usage (average): 61% As for versioning, it's bad practice to use major/minor version numbers for development versions. Agree, Microsoft did it with Windows Millenium and Vista, but it's bad practice. You'd get to v1.35 before having a script ready for production. Generally, most people use version numbers below 1 for alpha/beta/dev versions, and for FrameRateConverter, I just put the date instead of a version number until it was finalized. Semantic Versioning Guidelines Quote:
So far v1.3c is what works best. I can't easily test this version side-by-side because frame dimensions don't match. Btw could you explain this line? Code:
noise = mt_binarize (clense(mt_makediff(mt_binarize(noised), mt_edge(sharpen(clean, 0.82), "prewitt")), grey=true)) motion_mask = mmask(noised, fvec3, kind=1, ml=120).mt_binarize(32, u=1, v=1)
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 10th September 2017 at 16:58. |
|
10th September 2017, 19:17 | #164 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
A big difference between 1.3C and higher is changing from MDegrain2 to MDegrain4, which gives better output. Working in Y plane only should reduce this memory usage, I should also be able to recover some speed etc in places. The motionmask has a mt_binarize to create a hard mask, the soft mask is simply too weak for it. As for the dimensions, it's the padding and cropping afterwards, I guess that's why pointresize and not crop is used at the end in the padding script. Pointresize is used so you can add non-mod based padding, addborders requires mod based depending on the pixel type.
As for the renoise, not sure how to apply mt_lut to it such that it is only applied on non-dark areas. I'll give it another try. Last edited by burfadel; 10th September 2017 at 19:19. |
10th September 2017, 21:22 | #165 | Link |
Almost Silent Member
Join Date: Jun 2002
Location: Purgatory
Posts: 273
|
Cranked up a test run of mClean 1.6 last night, and have been faced with two errors. First error was upon initial loading of the script: Enh reported only accepting ranges of 0-54 when using mClean(), so I defined enh as 15, and was off to the races. Come back this morning to a job that is 5 frames from completion, and an Out of memory (Unable to allocate 2992224 bytes) error from Virtualdub FilterMod. Both are firsts for me, at least as far as mClean is concerned.
__________________
Rethinking the "Why?" chromosome. |
10th September 2017, 22:04 | #166 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
That out of memory issue is weird, a tad shy of 3 MB. Maybe I'm triggering a small memory leak somewhere since once the memory is initially allocated it shouldn't increase with time. I have to admit 1.6 does have bugs, but when it works it's good... makes testing interesting! Later today my time I'll post 1.6b with the necessary fixes. I have two different 'concepts' that may help further with speed without quality loss, unfortunately if they work it will make the code look a bit dodgy with people scratching their heads as to why i did it in such a way. The goal of course is efficacy of the concept, not how it looks in script!
|
11th September 2017, 00:16 | #167 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
Generally, when there are issues only on dark (or bright) scenes, it's an indication that it's an issue with the gamma curve, where if you apply a value linearly, it will have a large impact on dark/bright scenes and low impact on middle values. This might be the case here. Just try applying a 2.2 gamma curve on the noise and see what it does. Syntax is mt_lut("x 2.2 ^") |
|
11th September 2017, 10:39 | #168 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
Updated first post to version 1.7
Changes:
It wasn't a linear light issue. If applied the given linear light formula it basically looks like it boosts gamma by 2.2? Let me know how the new analysis works. Should be faster with same or better perceived quality. Last edited by burfadel; 11th September 2017 at 13:58. |
11th September 2017, 16:32 | #169 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Doing some tests. First thing I'm noticing is that it's applying a strong sharpening to scenes without noise, which is a no-no (unless I really want to run a sharpener which I don't). It uses enh=35 for 1080p. Just lowering it a bit works. 25 is too soft, 30 is too sharp, 28 is good.
Original / mClean v1.3c / mClean(enh=28) / mClean(enh=35) This latest version is causing color shifts (SBS logo) Original / mClean Mostly all it does with the KARA - Dazzling Red clip is over-sharpen and distort colors. Can't really compare because of color shifts. On my 288p VCD upscaled to 768p (full script and replacing the denoiser line). enh=15 is too much but enh=7 works. Interestingly enough, renoise makes very little difference at all ... if anything, it just add a little bit of sharpening? This version is doing a good job here, keeping the right details and discarding the right things. No denoise / mClean v1.3c / mClean(enh=7) / mClean(enh=15) Other types of noise, however, it's not doing anything expect sharpening the noise and distorting colors again No denoise / mClean(enh=7) Here, it's adding several distortions compared to v1.3c, such as loosing the teeth No denoise / mClean v1.3c / mClean(enh=7) In terms of versioning, changing the major number from 1 to 0 would respect the conventions; then each dev build could keep incrementing the way you're doing (0.7, 0.8, etc)
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 11th September 2017 at 18:07. |
11th September 2017, 19:19 | #170 | Link |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
I can change enh setting, just thought of a better - and obvious in many ways, way applying the strength. I didn't think to test with VCD resolution. The colour shift is easily fixed, again it's possibly a function of resolution. I'd have to find some clips where it doesn't work as well as previous versions as it's some simple fine tuning. 1.7 should be faster?
|
12th September 2017, 15:16 | #172 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
@burfadel will you port this script to vapoursynth too? I find it quite effective against heavy noise, with better "color stabilising" than smdegrain. (at least for my anime source)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
13th September 2017, 04:33 | #173 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
In terms of performance (with prefetch 8)
v1.6 - 540p Code:
FPS (min | max | average): 0.915 | 15800 | 13.10 Memory usage (phys | virt): 1031 | 1162 MiB Thread count: 38 CPU usage (average): 61% Code:
FPS (min | max | average): 1.557 | 21067 | 21.87 Memory usage (phys | virt): 859 | 932 MiB Thread count: 35 CPU usage (average): 68% Code:
FPS (min | max | average): 0.768 | 64957 | 5.620 Memory usage (phys | virt): 1702 | 2026 MiB Thread count: 41 CPU usage (average): 69%
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 13th September 2017 at 04:41. |
13th September 2017, 11:57 | #175 | Link | |
Registered User
Join Date: Aug 2006
Posts: 2,229
|
Quote:
Last edited by burfadel; 13th September 2017 at 12:56. |
|
13th September 2017, 14:25 | #176 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Ran a few tests (i5 2500K @ 4GHz / 4 cores, AVS+ 64 bit):
[Script] Code:
#SetMemoryMax(3000) colorbars(width = 1920, height = 1080, pixel_type = "yv12").killaudio().assumefps(25, 1).trim(0, 99) #ConvertTo16Bit() mclean() #Prefetch(4) Code:
FPS (min | max | average): 0.979 | 18.07 | 4.996 Memory usage (phys | virt): 582 | 587 MiB Thread count: 15 CPU usage (average): 27% Code:
FPS (min | max | average): 0.377 | 2.532 | 1.503 Memory usage (phys | virt): 741 | 745 MiB Thread count: 15 CPU usage (average): 26% Code:
FPS (min | max | average): 0.699 | 85227 | 3.964 Memory usage (phys | virt): 1269 | 1471 MiB Thread count: 19 CPU usage (average): 77% Code:
FPS (min | max | average): 0.029 | 325413 | 1.090 Memory usage (phys | virt): 1636 | 1954 MiB Thread count: 35 CPU usage (average): 81% Code:
FPS (min | max | average): 0.508 | 325413 | 5.097 Memory usage (phys | virt): 2194 | 2535 MiB Thread count: 44 CPU usage (average): 99% - Using Prefetch(8) needs SetMemoryMax() to be set to ~3000 or performance drops massively Last edited by Groucho2004; 13th September 2017 at 14:58. |
13th September 2017, 16:47 | #180 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Yes, on 32 bit Windows (there are OS hacks but I wouldn't recommend them)
Quote:
If the application that uses 32 Bit Avisynth is built with the LARGEADDRESSAWARE linker switch it can address up to 4 GB on a 64 Bit OS. Last edited by Groucho2004; 13th September 2017 at 20:56. |
|
Tags |
cleaning, denoise, denoiser, mclean |
|
|