View Full Version : Dogway's Filters Packs
kedautinh12
23rd June 2022, 00:28
I've not actually tried it myself, but I think the BM3DCUDA release version at https://github.com/WolframRhodium/VapourSynth-BM3DCUDA: is for VapourSynth, not Avisynth. On that repository you need to go to Issues, "AVS+ Support" and download the "test8" version, which is the latest experimental port for Avisynth+ --- https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/files/8068864/BM3DCUDA_AVS-test8.zip
My link share him had your link but he is blind to see that
https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues/7#issuecomment-886173346
https://i.imgur.com/YPK5ulj.jpg
kedautinh12
23rd June 2022, 00:33
### Dependencies:
### MVTools2
### ExTools
### LSFplus/SharpenersPack (for Contrasharp or LFR)
### ResizersPack (for Contrasharp
### or Str=0.1 to 1.0 ~ex_retinex()~ or show)
### GradePack (for Str=0.1 to 1.0 ~ex_retinex()~ or show)
### ScenesPack (for Str=0.1 to 1.0 ~ex_retinex()~ if '_SceneRange' frameprops exist)
### MasksPack (for show)
### RgTools (for Contrasharp
### or prefilter=0~3)
### DFTTest (for prefilter=4)
### KNLMeansCL (for prefilter=5)
### BM3D (for prefilter=6) # Buggy when used along ffvideosource() or cropping within DGSource()
### DGDecNV (for prefilter=7)
### TransformsPack (for prefilter=6 or prefilter=7)
### neo_tmedian (for mode="medianT")
### nnedi3 (for subpixel=4)
### SysInfo (for subpixel=4)
### Average (for mfilter + (Contrasharp or mode!=MDegrain) )
Check Dependencies above with this link to findout what external plugins need to be add
http://avisynth.nl/index.php/External_filters
guest
23rd June 2022, 01:57
@kedautinh12
thank you for your links but i have already checked them and all pointing me out to the same source: https://github.com/WolframRhodium/VapourSynth-BM3DCUDA:
Script Error
'C:/VapourSynth-BM3DCUDA_RTC-R2.8/bm3dcuda_rtc.dll' cannot be used as a plugin for AviSynth.
i heave read dependencies from the SMDegrain script and i can't find any information about external plugins which needs to be added.
this is also mentioned in the script:
Wrapper for BM3D CUDA by WolframRhodium for AviSynth+
# Requires TransformsPack for OPP=true, RGB clips or processing chroma
#
# Disclaimer: ffvideosource() causes issues with BM3D for UV=1 or r>3
# BM3D() causes issues when gpuid >= 0 (CUDA) and you crop with DGSource()
# BM3D() causes issues when gpuid >= 0 (CUDA) and a high combination of radius + sigma unless you fine tune 'block_step' argument
#
# # Some of the following arguments aren't available on the BM3D AVS+ port but included here for reference (namely group_size, block_size, bm_step and ps_step)
so i added few additional avsi+ scripts into my StaxRip. Maybe it is to much but....
Import("E:\4k encode\Avisynth-Scripts-master\ResizersPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MIX mods\LSFplus.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MIX mods\SharpenersPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\GradePack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\ScenesPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MasksPack.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\MIX mods\Spresso.avsi")
Import("E:\4k encode\Avisynth-Scripts-master\SMDegrain v3.5.1d\SMDegrain v3.5.1d.avsi")
import("E:\4k encode\Avisynth-Scripts-master\ExTools.avsi")
import("E:\4k encode\Avisynth-Scripts-master\EX mods\GrainFactory3mod.avsi")
import("E:\4k encode\Avisynth-Scripts-master\EX mods\DeblockPack.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Main.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Models.avsi")
import("E:\4k encode\Avisynth-Scripts-master\TransformsPack - Transfers.avsi")
loadplugin("C:\Users\lukas\Downloads\VapourSynth-BM3DCUDA_RTC-R2.8\bm3dcuda_rtc.dll")
SetMemoryMax()
ConvertBits(16)
SMDegrain(tr=2, thSAD=600, thSCD2=80, contrasharp=false, prefilter=6, truemotion=true, refinemotion=true, LFR=150, DCTflicker=true, pel=2, subpixel=2, chroma=true, plane=4)
ConvertBits(bits=10, dither=1)
in my humble opinion if i use "prefilter=6" which is defined in the SMDgrain script (script line 1018) i should not be forced to load something - i can be wrong of course.
Hi madey83,
I can relate to your frustration here, and although I don't use Staxrip, this is what I need to use it in RipBot264 :-
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\LSF-PLUS\LSFplus.avs")
Import("%AVISYNTHPLUGINS%\EXTOOLS\ExTools.avs")
Import("%AVISYNTHPLUGINS%\GRADE-PACK\Grade Pack.avs")
Import("%AVISYNTHPLUGINS%\RESIZERS-PACK\Resizers Pack.avs")
Import("%AVISYNTHPLUGINS%\SHARPENERS-PACK\Sharpeners Pack.avs")
Import("%AVISYNTHPLUGINS%\SMDEGRAIN\SMDegrain.avs")
Import("%AVISYNTHPLUGINS%\TRANSFORM-PACK\Transforms Pack.avs")
Import("%AVISYNTHPLUGINS%\UTILS-R41\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\Zs_RF_Shared\Zs_RF_Shared.avs")
I use Avisynth "test 8" build of BM3D, by default it uses CUDA, but with a couple of simple changes to SMDegrain, you can have it use the CPU, instead (which I think is the better option)
Good luck.
madey83
23rd June 2022, 07:22
My link share him had your link but he is blind to see that
https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues/7#issuecomment-886173346
https://i.imgur.com/YPK5ulj.jpg
@kedautinh12
thank you, but i missed look on this and did not though that this is the avs+ file i was looking for.
madey83
23rd June 2022, 07:22
thank you for direct link :)
madey83
23rd June 2022, 07:23
I've not actually tried it myself, but I think the BM3DCUDA release version at https://github.com/WolframRhodium/VapourSynth-BM3DCUDA: is for VapourSynth, not Avisynth. On that repository you need to go to Issues, "AVS+ Support" and download the "test8" version, which is the latest experimental port for Avisynth+ --- https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/files/8068864/BM3DCUDA_AVS-test8.zip
thank you for direct link :)
madey83
23rd June 2022, 07:26
Hi madey83,
I can relate to your frustration here, and although I don't use Staxrip, this is what I need to use it in RipBot264 :-
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3D_VAggregate_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
Import("%AVISYNTHPLUGINS%\LSF-PLUS\LSFplus.avs")
Import("%AVISYNTHPLUGINS%\EXTOOLS\ExTools.avs")
Import("%AVISYNTHPLUGINS%\GRADE-PACK\Grade Pack.avs")
Import("%AVISYNTHPLUGINS%\RESIZERS-PACK\Resizers Pack.avs")
Import("%AVISYNTHPLUGINS%\SHARPENERS-PACK\Sharpeners Pack.avs")
Import("%AVISYNTHPLUGINS%\SMDEGRAIN\SMDegrain.avs")
Import("%AVISYNTHPLUGINS%\TRANSFORM-PACK\Transforms Pack.avs")
Import("%AVISYNTHPLUGINS%\UTILS-R41\Utils-r41.avs")
Import("%AVISYNTHPLUGINS%\Zs_RF_Shared\Zs_RF_Shared.avs")
I use Avisynth "test 8" build of BM3D, by default it uses CUDA, but with a couple of simple changes to SMDegrain, you can have it use the CPU, instead (which I think is the better option)
Good luck.
@TDS,
could you please share those changes for SMDgrain?
i would like to compare both CUDA and CPU results and see if it worth to use CPU over CUDA.
Thank you in advance.
guest
23rd June 2022, 07:52
@TDS,
could you please share those changes for SMDegrain?
i would like to compare both CUDA and CPU results and see if it worth to use CPU over CUDA.
Thank you in advance.
Yes, if you go here, you'll see what I needed to change, in SMDegrain :-
https://forum.doom9.org/showthread.php?p=1969908#post1969908
And you'll have re-direct these,
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3D_VAggregate_AVS.dll")
mainly BM3DCUDA, to BM3DCPU.
Good luck.
kedautinh12
23rd June 2022, 08:13
@TDS,
could you please share those changes for SMDgrain?
i would like to compare both CUDA and CPU results and see if it worth to use CPU over CUDA.
Thank you in advance.
Cause r9 5950x of him stronger than rtx 3050 in encode :D
guest
23rd June 2022, 10:34
Cause r9 5950x of him stronger than rtx 3050 in encode :D
Hi ked, it actually had nothing to do with that, I found the quality of the encode to be quite bad, in comparison to the CPU variant.
But I have stopped using any of the BM3D filters.
ChaosKing
23rd June 2022, 12:32
Not sure if it affects only the gpu version but the readme says
Lowering the value of "block_step" will be useful in reducing blocking artifacts at the cost of slower processing.
https://github.com/WolframRhodium/VapourSynth-BM3DCUDA
kedautinh12
23rd June 2022, 12:57
Hi ked, it actually had nothing to do with that, I found the quality of the encode to be quite bad, in comparison to the CPU variant.
But I have stopped using any of the BM3D filters.
Why??
madey83
23rd June 2022, 14:32
Yes, if you go here, you'll see what I needed to change, in SMDegrain :-
https://forum.doom9.org/showthread.php?p=1969908#post1969908
And you'll have re-direct these,
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3DCUDA_AVS.dll")
LoadPlugin("%AVISYNTHPLUGINS%\BM3DCUDA\BM3D_VAggregate_AVS.dll")
mainly BM3DCUDA, to BM3DCPU.
Good luck.
Thank you :D
guest
24th June 2022, 05:34
Why??
Well, one encode I did using BM3D CUDA, a particular scene had a large lake in the background, and it was all "swirled up" (not the water), and looked terrible, encoding it with BM3D CPU it was good, so that was enough for me.
But I am using medium settings with pre-filter 2, pretty happy with the results.
kedautinh12
24th June 2022, 06:31
Well, one encode I did using BM3D CUDA, a particular scene had a large lake in the background, and it was all "swirled up" (not the water), and looked terrible, encoding it with BM3D CPU it was good, so that was enough for me.
But I am using medium settings with pre-filter 2, pretty happy with the results.
Try Lowering the value of "block_step"
guest
24th June 2022, 06:50
Try Lowering the value of "block_step"
So I would have to add this to the "call"...
video=SMDegrain(video,tr=4,thSAD=400,thSADC=200,thSCD1=400,thSCD2=130,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true,block_step = [8,8,8])
or
pre=ex_BM3D(video,sigma=5,radius=1,block_step = [8,8,8]) with or without the brackets ?
Are you sure this is an Avisynth option ???, 'cause I can't get it to work.
kedautinh12
24th June 2022, 12:14
Try
pre=ex_BM3D(video,sigma=5,radius=1,preset="normal")
video=SMDegrain(video,tr=4,thSAD=400,thSADC=200,thSCD1=400,thSCD2=130,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true)
LeXXuz
24th June 2022, 21:28
What's better as a prefilter regarding quality? DFTtest or BM3D? I like the idea to run prefiltering via the GPU but not if quality is compromised.
I changed the preset for BM3D from "fast" to "normal" but can't go any higher as my GPU card is running out of memory with the higher settings and the GPU also slows down my CPU.
guest
25th June 2022, 01:13
Try
pre=ex_BM3D(video,sigma=5,radius=1,preset="normal")
video=SMDegrain(video,tr=4,thSAD=400,thSADC=200,thSCD1=400,thSCD2=130,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true)
Hi ked, thanks yet again, that has worked (meaning no errors), yet to try an encode :)
guest
25th June 2022, 01:19
What's better as a prefilter regarding quality? DFTtest or BM3D? I like the idea to run prefiltering via the GPU but not if quality is compromised.
I changed the preset for BM3D from "fast" to "normal" but can't go any higher as my GPU card is running out of memory with the higher settings and the GPU also slows down my CPU.
Hi LeXXuz,
I did quite a few encodes once I got all these pre-filters setup, and I think it is up to the individual, to which one is better.
I am currently using pre-filter #2, which in "Minblur". and it's pretty good.
kedautinh12
25th June 2022, 01:35
What's better as a prefilter regarding quality? DFTtest or BM3D? I like the idea to run prefiltering via the GPU but not if quality is compromised.
I changed the preset for BM3D from "fast" to "normal" but can't go any higher as my GPU card is running out of memory with the higher settings and the GPU also slows down my CPU.
Cause preset="normal" will increase r to 3. You will need more ram, vram to do with this preset and your encode will slower than fast and low. You can change preset to "low" will suitable with your machine
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1042
guest
25th June 2022, 01:55
Cause preset="normal" will increase r to 3. You will need more ram, vram to do with this preset and your encode will slower than fast and low. You can change preset to "low" will suitable with your machine
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1042
So just "fmi" (for my information), is "fast" the default setting, if you haven't got this command in the script ??
kedautinh12
25th June 2022, 04:00
Your default setting if you don't add preset parameter is preset="low"
guest
25th June 2022, 05:00
Your default setting if you don't add preset parameter is preset="low"
Thanks...I just tried a "normal", and it's a lot slower....
kedautinh12
25th June 2022, 05:11
Thanks...I just tried a "normal", and it's a lot slower....
Try edit 3 from here to 2 or 1. Your encode speed will increase very much
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1043
guest
25th June 2022, 05:41
Try edit 3 from here to 2 or 1. Your encode speed will increase very much
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1043
Is that the "radius" setting ??
I'm running "radius=1", atm.
kedautinh12
25th June 2022, 06:27
Is that the "radius" setting ??
I'm running "radius=1", atm.
Value below "np" you can change 3 to 2 or 1 for more speed in encode
guest
25th June 2022, 06:33
Value below "np" you can change 3 to 2 or 1 for more speed in encode
So something like this ??
pre=ex_BM3D(video,sigma=5,radius=1, preset=normal, np=3)
kedautinh12
25th June 2022, 06:42
So something like this ??
pre=ex_BM3D(video,sigma=5,radius=1, preset=normal, np=3)
Lol
Value "3" in this line
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1043
Change it to 2 or 1 for more speed in encode
kedautinh12
25th June 2022, 06:47
Try
pre=ex_BM3D(video,sigma=5,radius=1,preset="normal")
video=SMDegrain(video,tr=4,thSAD=400,thSADC=200,thSCD1=400,thSCD2=130,contrasharp=true,prefilter=pre,str=1.2,refinemotion=true)
After edited, try again with this scripts
guest
25th June 2022, 07:20
Lol
Value "3" in this line
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1043
Change it to 2 or 1 for more speed in encode
Sorry, I don't understand what you want me to do ?
# fast lc np high vn
r = Default( radius, Select(pr, 1, 2, 3, 4, 4 ) ) # temporal radius
EDIT:- I think I figured it out (by trial & error), I physically change the number under "np" to either a 2 or a 1. in SMDegrain.avs(i)
By changing that value, and checking speed with AVSMeter, it made a very noticeable difference.
Will it affect the "quality" ?
kedautinh12
25th June 2022, 07:51
Sorry, I don't understand what you want me to do ?
# fast lc np high vn
r = Default( radius, Select(pr, 1, 2, 3, 4, 4 ) ) # temporal radius
EDIT:- I think I figured it out (by trial & error), I physically change the number under "np" to either a 2 or a 1. in SMDegrain.avs(i)
By changing that value, and checking speed with AVSMeter, it made a very noticeable difference.
Will it affect the "quality" ?
You only care about block_step value than radius. Radius don't make very much different
LeXXuz
25th June 2022, 10:31
Cause preset="normal" will increase r to 3. You will need more ram, vram to do with this preset and your encode will slower than fast and low. You can change preset to "low" will suitable with your machine
https://github.com/Dogway/Avisynth-Scripts/blob/5011d2124fb1d15d5adbfa536d24512117934ac9/SMDegrain%20v3.5.1d/SMDegrain%20v3.5.1d.avsi#L1042
Yeah I already decreased radius down to 1 manually to use it only as spatial filter. However, my old GTX 1050 only has 4GB VRAM. Will do some testing with a RTX 3060 soon. The video engine is newer of course but I don't think it will be that much faster than the one implemented in GTX 1050 GPU. Will see.
guest
27th June 2022, 02:42
Why??
Hi ked, I thought I'd go back to comment on your question, again..
I have done another encode using BM3D CUDA, and again, the results are terrible, so I doubt that I will EVER use this filter again !!
BM3D CPU is good, however, but it's a little slower than the filter I generally use, which is pre-filter #2 Minblur.
I will try DFTtest (pre-filter #4) again, just for comparison.
So here's a 2 minute cut from the encode I did using BM3D CUDA, you will quickly see how bad it is :-
https://www.mediafire.com/file/ai7y4ild8fe6opn/bm3d_cuda_test.mkv/file
kedautinh12
27th June 2022, 05:28
You can report to author's bm3d
https://github.com/WolframRhodium/VapourSynth-BM3DCUDA/issues
LeXXuz
27th June 2022, 09:43
Hi ked, I thought I'd go back to comment on your question, again..
I have done another encode using BM3D CUDA, and again, the results are terrible, so I doubt that I will EVER use this filter again !!
BM3D CPU is good, however, but it's a little slower than the filter I generally use, which is pre-filter #2 Minblur.
I will try DFTtest (pre-filter #4) again, just for comparison.
So here's a 2 minute cut from the encode I did using BM3D CUDA, you will quickly see how bad it is :-
https://www.mediafire.com/file/ai7y4ild8fe6opn/bm3d_cuda_test.mkv/file
That's definitely a bug. I don't have that bug with my GTX 1050ti. Maybe it's CUDA drivers, maybe there's something wrong in BM3D that causes these faulty macroblocks with your GPU. What GPU do you have?
Driver's up to date? Is that card overclocked in any way?
LeXXuz
27th June 2022, 10:26
Right now I'm chewing my fingers on an old German movie from the 1950s which has been released on Blu-ray, remastered of course. Well, that's what is printed on the cover at least...
I usually do CRF18 10-bit encodes with x265. But if my encode gets bigger than the original, it's definitely time to do some cleaning.
With one instance of SMDegrain I couldn't get the filesize down enough. Even with tr=12 and thSAD=1000.
So, for a better understanding on how the SMDegrain script works I'd like to ask a few more questions regarding custom prefilters and cascading.
Prefiltering:
If SMDegrain is set to process all three planes, is the prefilter called just one time to process all three planes at once? Or for every plane seperately, meaning three times in total?
I'm still no good with Avisynth syntax, so maybe someone can explain to me this line from the BM3D wrapper function:
UV = Default(UV, rgb ? 3 : 1)
What does the question mark and the colon mean in that context?
If I add BM3D on my own as a prefilter, does it have to be set up to process all planes (if SMDegrain is set to process all planes) or still just luma?
Cascading:
It has been mentioned a few times now that calling SMDegrain twice in a row may be worth a try if speed is of no concern.
So for example this call of SMDegrain:
ORG=last
PREGPU=(ex_BM3D(sigma=32, preset="Low", Radius=1, CUDA=true, UV=1))
SMDegrain(tr=12, thSAD=800, contrasharp=false, LFR=width()/2, DCTFlicker=true, refinemotion=true, truemotion=false, pel=1, Str=3.0, prefilter=PREGPU, chroma=true, plane=4)
SMDegrain(tr=6, thSAD=400, contrasharp=true, CClip=ORG, limitS=false, LFR=width()/2, DCTFlicker=true, refinemotion=true, truemotion=false, pel=1, Str=3.0, prefilter=PREGPU, chroma=false, plane=0)
tr & SAD: Should the same values be used for both stages? Should the second stage have lower/higher values? If so, please briefly explain why.
Contrasharp: I think it's obvious that contrasharp should only be applied in the last stage, with optional reference to the unfiltered clip.
LFR & DCTFlicker: Should they only be used in the first, last or both stages?
prefiltering: Should the 2nd stage also use prefiltering or would that be overkill since the 2nd stage already gets a filtered version of the video from the 1st stage?
Chroma filtering: I read quite often in the forums that some people don't filter chroma as it is hardly stable enough to get decent results.
No idea if this was merely only true for old SD rather than HD content. Some of these posts are rather old.
So I was thinking not to overdo it on chroma and maybe only filter luma in the 2nd stage. Thoughts?
Globals: I did not use globals, because, if I'm not mistaken, it was mentioned that calculating fresh mv for the second stage would deliver better results.
anton_foy
27th June 2022, 12:27
Chroma filtering: I read quite often in the forums that some people don't filter chroma as it is hardly stable enough to get decent results.
No idea if this was merely only true for old SD rather than HD content. Some of these posts are rather old.
So I was thinking not to overdo it on chroma and maybe only filter luma in the 2nd stage. Thoughts?
For chroma I use CCD like this before smdegrain:
src=last
CCD(10,HD=true)
CombinePlanes(src, last, src, planes="YUV")
guest
27th June 2022, 12:32
That's definitely a bug. I don't have that bug with my GTX 1050ti. Maybe it's CUDA drivers, maybe there's something wrong in BM3D that causes these faulty macroblocks with your GPU. What GPU do you have?
Driver's up to date? Is that card overclocked in any way?
I have an RTX 3050, with almost the latest drivers, and is not overclocked.
But here's the thing, I use RipBot264, and it's Distributed Encoding feature uses multiple pc's, to dramatically decrease encoding times, BUT they will use whatever GPU is in them, so I can be using many different nVidia GPU's for a CUDA encode.
And they will have different driver version's due to the different model's of the GPU.
So I think my best option is not to use BM3D CUDA.
I know I could do a test on a single PC with the RTX 3050 in it, but there's no real point.
tormento
27th June 2022, 12:59
So I think my best option is not to use BM3D CUDA.
BM3DCUDA works perfectly fine here, alone and with other CUDA filters applied in the same script.
Dogway
27th June 2022, 13:18
@LeXXuz: The way you are cascading SMDegrain is for MDegrain cascading. I only do this for grain fest like 300 or 21 Grams, otherwise I use prefiltering cascading.
For LFR it's the same concept, initial LFR values can be somewhat higher than last LFR (wouldn't go over 300 or 400 for 1080p).
For chroma it depends how damaged it is, otherwise use @anton_foy's suggestion.
By the way, big update day today. Was holding back TransformsPack update for some time now. The big additions are Broadcast(), MatrixTranspose() refactor, RGB_to_XYZ() refactor, and probably RGB_to_ICtCp() (and reverse func). Also SVM() a sharpness metric score in SimilarityMetrics.
I ported ICtCp from this paper (https://professional.dolby.com/siteassets/pdfs/ictcp_dolbywhitepaper_v071.pdf). It passes the roundtrip test and double (triple, quadruple) checked the values and transformations, but I don't have any ICtCp encoded video to test. Unfortunately this is no IPTPQc2, even when adjusting for 2% crosstalk. There's a reshaping transfer that I might need to add to make it work, it's included in mpv which they claim to have succeeded in decoding IPTPQc2.
LeXXuz
27th June 2022, 14:14
For chroma I use CCD like this before smdegrain:
src=last
CCD(10,HD=true)
CombinePlanes(src, last, src, planes="YUV")
I can't find any binaries for AVS+. Anyone may help me out here?
anton_foy
27th June 2022, 14:39
I can't find any binaries for AVS+. Anyone may help me out here?
It is in Dogway's deblockpack.
LeXXuz
27th June 2022, 15:15
It is in Dogway's deblockpack.
Perfect. :thanks:
Even with tr=12 and thSAD=1000"
tr=12 is not highest valid value and reallt average with todays hardware. Max internal for MDegrainN is 128. So if MPEG output speed is not fine it is good to test at first how it depends on tr-setting with doubling at each step like 6-12-24-48 as example. Also pel=1 is about fast processing and not high quality. For quality it is better pel 2 or 4. Chroma planes need to be processed if they have any noise if you do colour MPEG encodings. Also it is good to try max settings of x26x executables like --placebo preset.
If you have unnaturally high noise level content you also need to raise mvtools common params or increasing of thSAD to 1000 will be useless. It is thSCD params described in commons section of mvtools2 docs.
thSCD1 (int, 400): threshold which decides whether a block has changed between the previous frame and the current one. When a block has changed, it means that motion estimation for it isn't relevant. It occurs for example at scene changes. So it is one of the thresholds used to tweak the scene changes detection engine. Raising it will lower the number of blocks detected as changed
To force process more or all blocks by MDegrainN I sometime set thSCD1 as high as 2000. But it may cause buggy blends at scene changes at real multi-scenes movie.
Here is my example of tr to MPEG and ripping speed dependance (FullHD 1080i documentaries and x264 encoding, YV12 format):
tr=15, 6 fps, MPEG speed mean 4534K
tr=30, 3 fps, 4208K (-8% to tr=15)
tr=60, 1.5 fps, 4159K (-1.1% to tr=30)
So for this ripping work (degrain output and MPEG encoding bitdepth of 8, input noise levels, other settings) I select tr in range about 12..25. Values over 30 makes very small decrease of output file size. With 10-bit MPEG it may be better benefit from higher tr but I currently do not use 10-bit MPEGs.
Also made a graphics to show how thSAD setting work with input SAD distribution because of noise - https://forum.doom9.org/showthread.php?p=1970981#post1970981
Dogway
27th June 2022, 17:33
Initial implementation of IPTPQc2. Needs to implement polynomial reshaping.
Blankmedia
27th June 2022, 20:11
Did you update? tv_in was added in last commit (https://github.com/Dogway/Avisynth-Scripts/blob/2d509f9c8dacc332c090fd3560fc1b2e331296f1/SMDegrain%20v3.5.0d/SMDegrain%20v3.5.0d.avsi#L871).
Anyway just updated SMDegrain now with the most recent changes.
Hi, with SMDegrain v3.5.1d.avsi and Flatmask I got an error here
UV == 3 ? CombinePlanes(last, clp, planes=rgb ? "RGB" : "YUV", pixel_type=PixelType(clp)).\
propCopy(clp,true,props="_ChromaLocation") : last
propSet("_ColorRange", tvo ? 1 : 0)
CombinePlanes: too many target planes(3)! Target video plane count is 1!
It works with SMDegrain v3.4.3d.avsi (if I remove "tv_in=!fs" in Flatmask ex_retinex call)
Dogway
27th June 2022, 20:31
Thanks. Yes follow this issue (https://github.com/Dogway/Avisynth-Scripts/issues/55). It was fixed last week but I'm adding a feature for ex_retinex. Will resume now since I just finished TransformsPack. The problem was mainly using CombinePlanes for single channel clips.
Blankmedia
28th June 2022, 03:29
Sorry about that, I'll look there before posting here next time.
LeXXuz
28th June 2022, 18:39
Even with tr=12 and thSAD=1000"
tr=12 is not highest valid value and reallt average with todays hardware. Max internal for MDegrainN is 128. So if MPEG output speed is not fine it is good to test at first how it depends on tr-setting with doubling at each step like 6-12-24-48 as example. Also pel=1 is about fast processing and not high quality. For quality it is better pel 2 or 4. Chroma planes need to be processed if they have any noise if you do colour MPEG encodings. Also it is good to try max settings of x26x executables like --placebo preset.
If you have unnaturally high noise level content you also need to raise mvtools common params or increasing of thSAD to 1000 will be useless. It is thSCD params described in commons section of mvtools2 docs.
thSCD1 (int, 400): threshold which decides whether a block has changed between the previous frame and the current one. When a block has changed, it means that motion estimation for it isn't relevant. It occurs for example at scene changes. So it is one of the thresholds used to tweak the scene changes detection engine. Raising it will lower the number of blocks detected as changed
To force process more or all blocks by MDegrainN I sometime set thSCD1 as high as 2000. But it may cause buggy blends at scene changes at real multi-scenes movie.
Here is my example of tr to MPEG and ripping speed dependance (FullHD 1080i documentaries and x264 encoding, YV12 format):
tr=15, 6 fps, MPEG speed mean 4534K
tr=30, 3 fps, 4208K (-8% to tr=15)
tr=60, 1.5 fps, 4159K (-1.1% to tr=30)
So for this ripping work (degrain output and MPEG encoding bitdepth of 8, input noise levels, other settings) I select tr in range about 12..25. Values over 30 makes very small decrease of output file size. With 10-bit MPEG it may be better benefit from higher tr but I currently do not use 10-bit MPEGs.
Also made a graphics to show how thSAD setting work with input SAD distribution because of noise - https://forum.doom9.org/showthread.php?p=1970981#post1970981
Thanks for your valued input DTL. :thanks: I finally start to understand a little better how the relation between these parameters influences output. And of course why my high thSAD and tr (I usuallally use about a third of these values) didn't do anything desired. Instead they just increased encoding time and decreased output quality.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.