DGDenoise

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Sat Mar 04, 2017 3:54 pm

Sure, but I think gonca was more concerned about people posting pron images, etc.

gonca
Moose Approved/Curly Approved
Posts: 911
Joined: Sun Apr 08, 2012 6:12 pm

Re: About DGDenoise

Post by gonca » Sat Mar 04, 2017 4:44 pm

Is it OK to like birds better?
Its ok.
bird.jpg
bird.jpg (9.98 KiB) Viewed 3722 times

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Sat Mar 04, 2017 7:52 pm

admin wrote:So you want to get more use out of your card, eh? OK, other than QTGMC (mvtools etc.) what else would you like to see implemented on CUDA? It's easy to make pipelines of kernels with intermediate frames stored in device memory. Then only the source and destination frames need to copied to/from the host, It's something I have been thinking about and whether there are useful analogies of scripting that can be applied to purely device operation flows. Sort of a CUDASynth.
Cough, well, since you did mention it whether serious or not ... a qtgmc level high quality settings deinterlacer (even though dgsource does facilitate deinterlace) and a nice lsfmod or equivalent/better in your assessment type sharpener. Oh, and the best de-haloer you have ever found. Which all run on a lowly 750Ti 2gb :?

You must be very patient, asking for such ideas from your admirers.
Image Image

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Sat Mar 04, 2017 8:07 pm

Thanks for the suggestions, hydra3333. I'm retired and have to find something to keep me busy. And optimizing the inner loops gives me an excuse to break out the Scotch.

Also, glad to see the Img tag is working. That is one laid-back dog. The cat in the second image, not so much.

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Sun Mar 05, 2017 9:14 am

@hydra3333

What lsfmod parameters do you typically use?

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Thu Mar 09, 2017 5:30 am

My goodness, just arrived home tonight and thought all my Christmases had come at once - a nice DG LSF.

Thank you very much. Now I'm off to give it a try, and then change most of my workflows over to vs/dg/denoise/sharpen -> vspipe -> ffmpeg/nvenc -> mp4box and remove unsharpmask from the ffmpeg/nvenc component.

(With settings for my sources and laziness, and willingness to accept an OKness for other than my footy team captures, mostly defaults with strength=100 to 140 depending. Something to add a little snappiness to dull/fuzzy sources, which some might consider not a "pure" approach but it works for my family.)

I hope you don't mind, but I mentioned you and your programs "in passing" to the VideoReDo support people.

Cheers

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Thu Mar 09, 2017 8:59 am

Good to hear you like DGSharpen.

I've no problem with you mentioning things to VideoRedo. I actually had a relationship with them some time ago whereby they gave me a free license in exchange for some deinterlacing code. They recently gave me a license for the more recent releases. Great people at VideoRedo. 8-)

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Thu Mar 09, 2017 8:12 pm

A quick dummy's usage question (vapoursynth).

Code: Select all

DGDenoise(float strength, float blend, bool chroma, int searchw, int device) 
DGSharpen(float strength, int device) 
is there a way to specify which clip to operate on ? e.g. seeking a "clip" parameter ...

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Thu Mar 09, 2017 8:51 pm

Can't help with Vapoursynth syntax (try your other forum), but Avisynth allows:

clip.DGDenoise(strength=0.5)

or

DGDenoise(clip, strength=0.5)

Of course, if there is no clip specified then 'last' is used. Last is implicit in this script:

DGSource()
DGDenoise()

It is equivalent to:

last = DGSource()
last.DGDenoise()

I'm sure there is an equivalent for Vapoursynth.

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Thu Mar 09, 2017 11:32 pm

yes, thanks,
DGDenoise(clip, strength=0.5)
that is what I was asking, the manual says this

Code: Select all

DGDenoise(float strength, float blend, bool chroma, int searchw, int device) 
implying clip was not a parameter.

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Fri Mar 10, 2017 4:10 am

If you feel in the mood, would it be possible to make a gpu deblocker ?

Our local OTA stations almost always broadcast our footy games at very blocky mpeg2 576i or infrequently blocky mpeg4 1080i, where the feed has been sourced from a cable provider and horribly mangled for (free TV) re-broadcast at pitifully small bitrates. The OTA stations are finding it hard to survive nowadays, and they wonder why.

In the interregnum (hoping for a new gpu qtgmc) deblocking and denoising and a quick sharpen before re-interlacing, are a must for those sources. I'm hoping for maybe better than 5 fps end-to-end :)

I wonder if maybe it could/should be rolled into the denoiser with say a flag deblock=true and some parameters so that it does a deblock before the denoise whilst the frame(s) are already in the gpu ? Just a thought.
Last edited by hydra3333 on Fri Mar 10, 2017 7:19 am, edited 1 time in total.

Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGDenoise

Post by Sharc » Fri Mar 10, 2017 6:20 am

Colorspace must be YV12 for DGDenoise() and DGSharpen(), right?

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Fri Mar 10, 2017 7:18 am

I'm not quite sure how to report this or, since it involves vapoursynth whether it means anything useful nor whether you'd consider it, but here goes anyway.

This vs script

Code: Select all

import vapoursynth as vs 
##import havsfunc as haf # http://forum.doom9.org/showthread.php?t=166582 
import havsfuncTS as haf # this version uses vanilla TemporalSoften instead of TemporalSoften2, as it will be "better" over time 
import mvsfunc as mvs  # http://forum.doom9.org/showthread.php?t=172564 
import finesharp as finesharp # http://forum.doom9.org/showthread.php?p=1777815#post1777815 http://avisynth.nl/index.php/FineSharp 
#---------------------------------------------------------------------------------------------------- 
# INITIALIZE - load the core and then DLLs 
core = vs.get_core(accept_lowercase=True) # leave off threads=8 so it auto-detects threads 
#---------------------------------------------------------------------------------------------------- 
# LOAD NATIVE plugins which aren't already autoloaded (we don't autoload any) 
# the r'' indicates do not treat special characters and accept backslashes 
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\vapoursynth64\plugins\dll-to-choose-from\fmtconv.dll') # the r'' indicates do not treat special characters and accept backslashes 
#---------------------------------------------------------------------------------------------------- 
# LOAD 64 bit AVISYNTH  plugins  into the avs namespace 
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll')  
#---------------------------------------------------------------------------------------------------- 
# NOTE:: INDENTING IS CRITICAL AND MUST BE PRECISELY THE SAME WITHIN EACH FUNCTION  
def main(): 
    #---------------------------------------------------------------------------------------------------- 
    # LOAD VIDEO 1080i
    video = core.avs.DGSource(r'.\z.dgi',deinterlace=1,resize_w=720,resize_h=576) # deinterlace=1 means single rate deinterlacing 
    #video = core.avs.DGDenoise(video,strength=0.25) #  
    #video = core.avs.DGSharpen(video,strength=1.0) # 
    video.set_output() 
    return True 
main() 
with this .bat file

Code: Select all

@echo on
@setlocal ENABLEDELAYEDEXPANSION
@setlocal enableextensions
call :z2 > "%~0.vslog.log" 2>&1
pause
exit
:z2
CALL ".\000-setup-exe-paths.bat"
"C:\SOFTWARE\Vapoursynth-x64\VSPipe.exe" --y4m ".\z.vpy" - | "C:\SOFTWARE\ffmpeg\0-homebuilt-x64\ffmpeg.exe" -threads 0 -i pipe: -threads 0 -an -threads 0 -map_metadata -1 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter:v setdar=dar=16/9 -c:v h264_nvenc -preset hq -bf 2 -g 50 -refs 3 -rc:v constqp -global_quality 22 -profile:v high -level 4.1 -pixel_format yuv420p  -threads 0 -movflags +faststart -y ".\z-temp-h264.MP4"  
goto :eof
works just fine with no odd console messages arising as long as both of the DGDenoise/DGSharpen lines are commented out.

However, if we uncomment either or both then the resulting log (below) shows some strange things,
(i) the prefetch messages alway for the first 199 frames only (other filters don't appear to yield them)
(ii) the "Core freed but 645120 bytes still allocated in framebuffers"
The final .mp4 file still gets created ok as far as I can tell.

Code: Select all

Input #0, yuv4mpegpipe, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 720x576, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
Output #0, mp4, to 'D:\TEMP\SCRATCH\Sample0.HD.mpg-temp.MP4':
  Metadata:
    encoder         : Lavf57.66.103
    Stream #0:0: Video: h264 (h264_nvenc) (High) ([33][0][0][0] / 0x0021), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=-1--1, 2000 kb/s, 25 fps, 12800 tbn, 25 tbc
    Metadata:
      encoder         : Lavc57.82.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: -1
frame=    2 fps=0.0 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
Avisynth Compat: requested frame 0 not prefetched, using slow method
Avisynth Compat: requested frame 1 not prefetched, using slow method
Avisynth Compat: requested frame 2 not prefetched, using slow method
Avisynth Compat: requested frame 3 not prefetched, using slow method
Avisynth Compat: requested frame 4 not prefetched, using slow method
Avisynth Compat: requested frame 5 not prefetched, using slow method
Avisynth Compat: requested frame 6 not prefetched, using slow method
Avisynth Compat: requested frame 7 not prefetched, using slow method
Avisynth Compat: requested frame 8 not prefetched, using slow method
Avisynth Compat: requested frame 9 not prefetched, using slow method
Avisynth Compat: requested frame 10 not prefetched, using slow method
Avisynth Compat: requested frame 11 not prefetched, using slow method
Avisynth Compat: requested frame 12 not prefetched, using slow method
Avisynth Compat: requested frame 13 not prefetched, using slow method
Avisynth Compat: requested frame 14 not prefetched, using slow method
Avisynth Compat: requested frame 15 not prefetched, using slow method
Avisynth Compat: requested frame 16 not prefetched, using slow method
Avisynth Compat: requested frame 17 not prefetched, using slow method
Avisynth Compat: requested frame 18 not prefetched, using slow method
Avisynth Compat: requested frame 19 not prefetched, using slow method
Avisynth Compat: requested frame 20 not prefetched, using slow method
Avisynth Compat: requested frame 21 not prefetched, using slow method
Avisynth Compat: requested frame 22 not prefetched, using slow method
Avisynth Compat: requested frame 23 not prefetched, using slow method
Avisynth Compat: requested frame 24 not prefetched, using slow method
Avisynth Compat: requested frame 25 not prefetched, using slow method
Avisynth Compat: requested frame 26 not prefetched, using slow method
Avisynth Compat: requested frame 27 not prefetched, using slow method
Avisynth Compat: requested frame 28 not prefetched, using slow method
Avisynth Compat: requested frame 29 not prefetched, using slow method
Avisynth Compat: requested frame 30 not prefetched, using slow method
Avisynth Compat: requested frame 31 not prefetched, using slow method
Avisynth Compat: requested frame 32 not prefetched, using slow method
Avisynth Compat: requested frame 33 not prefetched, using slow method
Avisynth Compat: requested frame 34 not prefetched, using slow method
Avisynth Compat: requested frame 35 not prefetched, using slow method
Avisynth Compat: requested frame 36 not prefetched, using slow method
Avisynth Compat: requested frame 37 not prefetched, using slow method
Avisynth Compat: requested frame 38 not prefetched, using slow method
Avisynth Compat: requested frame 39 not prefetched, using slow method
Avisynth Compat: requested frame 40 not prefetched, using slow method
Avisynth Compat: requested frame 41 not prefetched, using slow method
Avisynth Compat: requested frame 42 not prefetched, using slow method
Avisynth Compat: requested frame 43 not prefetched, using slow method
Avisynth Compat: requested frame 44 not prefetched, using slow method
Avisynth Compat: requested frame 45 not prefetched, using slow method
Avisynth Compat: requested frame 46 not prefetched, using slow method
Avisynth Compat: requested frame 47 not prefetched, using slow method
Avisynth Compat: requested frame 48 not prefetched, using slow method
Avisynth Compat: requested frame 49 not prefetched, using slow method
Avisynth Compat: requested frame 50 not prefetched, using slow method
Avisynth Compat: requested frame 51 not prefetched, using slow method
Avisynth Compat: requested frame 52 not prefetched, using slow method
Avisynth Compat: requested frame 53 not prefetched, using slow method
Avisynth Compat: requested frame 54 not prefetched, using slow method
Avisynth Compat: requested frame 55 not prefetched, using slow method
Avisynth Compat: requested frame 56 not prefetched, using slow method
Avisynth Compat: requested frame 57 not prefetched, using slow method
Avisynth Compat: requested frame 58 not prefetched, using slow method
Avisynth Compat: requested frame 59 not prefetched, using slow method
Avisynth Compat: requested frame 60 not prefetched, using slow method
Avisynth Compat: requested frame 61 not prefetched, using slow method
Avisynth Compat: requested frame 62 not prefetched, using slow method
Avisynth Compat: requested frame 63 not prefetched, using slow method
Avisynth Compat: requested frame 64 not prefetched, using slow method
Avisynth Compat: requested frame 65 not prefetched, using slow method
Avisynth Compat: requested frame 66 not prefetched, using slow method
Avisynth Compat: requested frame 67 not prefetched, using slow method
Avisynth Compat: requested frame 68 not prefetched, using slow method
Avisynth Compat: requested frame 69 not prefetched, using slow method
Avisynth Compat: requested frame 70 not prefetched, using slow method
Avisynth Compat: requested frame 71 not prefetched, using slow method
Avisynth Compat: requested frame 72 not prefetched, using slow method
Avisynth Compat: requested frame 73 not prefetched, using slow method
Avisynth Compat: requested frame 74 not prefetched, using slow method
Avisynth Compat: requested frame 75 not prefetched, using slow method
Avisynth Compat: requested frame 76 not prefetched, using slow method
Avisynth Compat: requested frame 77 not prefetched, using slow method
Avisynth Compat: requested frame 78 not prefetched, using slow method
Avisynth Compat: requested frame 79 not prefetched, using slow method
Avisynth Compat: requested frame 80 not prefetched, using slow method
Avisynth Compat: requested frame 81 not prefetched, using slow method
Avisynth Compat: requested frame 82 not prefetched, using slow method
Avisynth Compat: requested frame 83 not prefetched, using slow method
Avisynth Compat: requested frame 84 not prefetched, using slow method
Avisynth Compat: requested frame 85 not prefetched, using slow method
Avisynth Compat: requested frame 86 not prefetched, using slow method
Avisynth Compat: requested frame 87 not prefetched, using slow method
Avisynth Compat: requested frame 88 not prefetched, using slow method
Avisynth Compat: requested frame 89 not prefetched, using slow method
Avisynth Compat: requested frame 90 not prefetched, using slow method
Avisynth Compat: requested frame 91 not prefetched, using slow method
Avisynth Compat: requested frame 92 not prefetched, using slow method
Avisynth Compat: requested frame 93 not prefetched, using slow method
Avisynth Compat: requested frame 94 not prefetched, using slow method
Avisynth Compat: requested frame 95 not prefetched, using slow method
Avisynth Compat: requested frame 96 not prefetched, using slow method
Avisynth Compat: requested frame 97 not prefetched, using slow method
Avisynth Compat: requested frame 98 not prefetched, using slow method
Avisynth Compat: requested frame 99 not prefetched, using slow method
Avisynth Compat: requested frame 100 not prefetched, using slow method
Avisynth Compat: requested frame 101 not prefetched, using slow method
Avisynth Compat: requested frame 102 not prefetched, using slow method
Avisynth Compat: requested frame 103 not prefetched, using slow method
Avisynth Compat: requested frame 104 not prefetched, using slow method
Avisynth Compat: requested frame 105 not prefetched, using slow method
Avisynth Compat: requested frame 106 not prefetched, using slow method
Avisynth Compat: requested frame 107 not prefetched, using slow method
Avisynth Compat: requested frame 108 not prefetched, using slow method
Avisynth Compat: requested frame 109 not prefetched, using slow method
Avisynth Compat: requested frame 110 not prefetched, using slow method
Avisynth Compat: requested frame 111 not prefetched, using slow method
Avisynth Compat: requested frame 112 not prefetched, using slow method
Avisynth Compat: requested frame 113 not prefetched, using slow method
Avisynth Compat: requested frame 114 not prefetched, using slow method
Avisynth Compat: requested frame 115 not prefetched, using slow method
Avisynth Compat: requested frame 116 not prefetched, using slow meframe=  125 fps=117 q=21.0 size=    2446kB time=00:00:03.72 bitrate=5385.3kbits/s speed=3.49x    
thod
Avisynth Compat: requested frame 117 not prefetched, using slow method
Avisynth Compat: requested frame 118 not prefetched, using slow method
Avisynth Compat: requested frame 119 not prefetched, using slow method
Avisynth Compat: requested frame 120 not prefetched, using slow method
Avisynth Compat: requested frame 121 not prefetched, using slow method
Avisynth Compat: requested frame 122 not prefetched, using slow method
Avisynth Compat: requested frame 123 not prefetched, using slow method
Avisynth Compat: requested frame 124 not prefetched, using slow method
Avisynth Compat: requested frame 125 not prefetched, using slow method
Avisynth Compat: requested frame 126 not prefetched, using slow method
Avisynth Compat: requested frame 127 not prefetched, using slow method
Avisynth Compat: requested frame 128 not prefetched, using slow method
Avisynth Compat: requested frame 129 not prefetched, using slow method
Avisynth Compat: requested frame 130 not prefetched, using slow method
Avisynth Compat: requested frame 131 not prefetched, using slow method
Avisynth Compat: requested frame 132 not prefetched, using slow method
Avisynth Compat: requested frame 133 not prefetched, using slow method
Avisynth Compat: requested frame 134 not prefetched, using slow method
Avisynth Compat: requested frame 135 not prefetched, using slow method
Avisynth Compat: requested frame 136 not prefetched, using slow method
Avisynth Compat: requested frame 137 not prefetched, using slow method
Avisynth Compat: requested frame 138 not prefetched, using slow method
Avisynth Compat: requested frame 139 not prefetched, using slow method
Avisynth Compat: requested frame 140 not prefetched, using slow method
Avisynth Compat: requested frame 141 not prefetched, using slow method
Avisynth Compat: requested frame 142 not prefetched, using slow method
Avisynth Compat: requested frame 143 not prefetched, using slow method
Avisynth Compat: requested frame 144 not prefetched, using slow method
Avisynth Compat: requested frame 145 not prefetched, using slow method
Avisynth Compat: requested frame 146 not prefetched, using slow method
Avisynth Compat: requested frame 147 not prefetched, using slow method
Avisynth Compat: requested frame 148 not prefetched, using slow method
Avisynth Compat: requested frame 149 not prefetched, using slow method
Avisynth Compat: requested frame 150 not prefetched, using slow method
Avisynth Compat: requested frame 151 not prefetched, using slow method
Avisynth Compat: requested frame 152 not prefetched, using slow method
Avisynth Compat: requested frame 153 not prefetched, using slow method
Avisynth Compat: requested frame 154 not prefetched, using slow method
Avisynth Compat: requested frame 155 not prefetched, using slow method
Avisynth Compat: requested frame 156 not prefetched, using slow method
Avisynth Compat: requested frame 157 not prefetched, using slow method
Avisynth Compat: requested frame 158 not prefetched, using slow method
Avisynth Compat: requested frame 159 not prefetched, using slow method
Avisynth Compat: requested frame 160 not prefetched, using slow method
Avisynth Compat: requested frame 161 not prefetched, using slow method
Avisynth Compat: requested frame 162 not prefetched, using slow method
Avisynth Compat: requested frame 163 not prefetched, using slow method
Avisynth Compat: requested frame 164 not prefetched, using slow method
Avisynth Compat: requested frame 165 not prefetched, using slow method
Avisynth Compat: requested frame 166 not prefetched, using slow method
Avisynth Compat: requested frame 167 not prefetched, using slow method
Avisynth Compat: requested frame 168 not prefetched, using slow method
Avisynth Compat: requested frame 169 not prefetched, using slow method
Avisynth Compat: requested frame 170 not prefetched, using slow method
Avisynth Compat: requested frame 171 not prefetched, using slow method
Avisynth Compat: requested frame 172 not prefetched, using slow method
Avisynth Compat: requested frame 173 not prefetched, using slow method
Avisynth Compat: requested frame 174 not preframe=  251 fps=160 q=21.0 size=    4540kB time=00:00:08.76 bitrate=4245.5kbits/s speed= 5.6x    
frame=  399 fps=193 q=21.0 size=    5847kB time=00:00:14.68 bitrate=3262.8kbits/s speed=7.11x    
frame=  547 fps=213 q=21.0 size=    9643kB time=00:00:20.60 bitrate=3834.7kbits/s speed=8.03x    
frame=  694 fps=226 q=21.0 size=   13581kB time=00:00:26.48 bitrate=4201.4kbits/s speed=8.64x    
frame=  843 fps=236 q=21.0 size=   15008kB time=00:00:32.44 bitrate=3789.9kbits/s speed= 9.1x    
frame=  991 fps=244 q=21.0 size=   16192kB time=00:00:38.36 bitrate=3457.9kbits/s speed=9.44x    
frame= 1137 fps=249 q=21.0 size=   20104kB time=00:00:44.20 bitrate=3726.0kbits/s speed=9.68x    
frame= 1287 fps=254 q=21.0 size=   21961kB time=00:00:50.20 bitrate=3583.8kbits/s speed=9.91x    
frame= 1433 fps=257 q=21.0 size=   25088kB time=00:00:56.04 bitrate=3667.4kbits/s speed=10.1x    
frame= 1577 fps=260 q=21.0 size=   29066kB time=00:01:01.80 bitrate=3852.9kbits/s speed=10.2x    
frame= 1724 fps=263 q=21.0 size=   31617kB time=00:01:07.68 bitrate=3826.9kbits/s speed=10.3x    
frame= 1873 fps=265 q=21.0 size=   34277kB time=00:01:13.64 bitrate=3813.1kbits/s speed=10.4x    
frame= 2021 fps=267 q=21.0 size=   35776kB time=00:01:19.56 bitrate=3683.7kbits/s speed=10.5x    
fetched, using slow method
Avisynth Compat: requested frame 175 not prefetched, using slow method
Avisynth Compat: requested frame 176 not prefetched, using slow method
Avisynth Compat: requested frame 177 not prefetched, using slow method
Avisynth Compat: requested frame 178 not prefetched, using slow method
Avisynth Compat: requested frame 179 not prefetched, using slow method
Avisynth Compat: requested frame 180 not prefetched, using slow method
Avisynth Compat: requested frame 181 not prefetched, using slow method
Avisynth Compat: requested frame 182 not prefetched, using slow method
Avisynth Compat: requested frame 183 not prefetched, using slow method
Avisynth Compat: requested frame 184 not prefetched, using slow method
Avisynth Compat: requested frame 185 not prefetched, using slow method
Avisynth Compat: requested frame 186 not prefetched, using slow method
Avisynth Compat: requested frame 187 not prefetched, using slow method
Avisynth Compat: requested frame 188 not prefetched, using slow method
Avisynth Compat: requested frame 189 not prefetched, using slow method
Avisynth Compat: requested frame 190 not prefetched, using slow method
Avisynth Compat: requested frame 191 not prefetched, using slow method
Avisynth Compat: requested frame 192 not prefetched, using slow method
Avisynth Compat: requested frame 193 not prefetched, using slow method
Avisynth Compat: requested frame 194 not prefetched, using slow method
Avisynth Compat: requested frame 195 not prefetched, using slow method
Avisynth Compat: requested frame 196 not prefetched, using slow method
Avisynth Compat: requested frame 197 not prefetched, using slow method
Avisynth Compat: requested frame 198 not prefetched, using slow method
Avisynth Compat: requested frame 199 not prefetched, using slow method
Output 2052 frames in 8.20 seconds (250.30 fps)
Core freed but 645120 bytes still allocated in framebuffers
Any advice ?

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Fri Mar 10, 2017 7:32 am

Good morning hydra3333.

I don't do Vapoursynth. It's obviously related to its support of Avisynth, so my advice is to ask the Vapoursynth author about it and if he says anything that suggests I could do anything (other than make Vapoursynth native versions) that could be helpful for your issue, please let me know.

Regarding your other posts, I will update the document to show the clip parameter and to say that YV12 is expected. Thank you for pointing those out.

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Fri Mar 10, 2017 7:35 am

Mmm, some googling: am I correct in suggesting it looks as if vapoursynth code needs updating for DGDenoise and DGsharpen ?

edit: good morning and OK I'll post over there. PS thank you.

edit 2: from the looks of this code, Fredrick may possibly ask how many frames before and after that the filters use. What should I reply ?

Code: Select all

#define WARNING(fname, warning) if (name == #fname) vsapi->logMessage(mtWarning, std::string("Avisynth Compat: ") + #fname + " - " + #warning).c_str());
#define BROKEN(fname) if (name == #fname) vsapi->logMessage(mtWarning, ("Avisynth Compat: Invoking known broken function " + name).c_str());
#define OTHER(fname) if (name == #fname) return PrefetchInfo(1, 1, 0, 0);
#define SOURCE(fname) if (name == #fname) return PrefetchInfo(1, 1, 0, 0);
#define PREFETCHR0(fname) if (name == #fname) return PrefetchInfo(1, 1, 0, 0);
#define PREFETCHR1(fname) if (name == #fname) return PrefetchInfo(1, 1, -1, 1);
#define PREFETCHR2(fname) if (name == #fname) return PrefetchInfo(1, 1, -2, 2);
#define PREFETCHR3(fname) if (name == #fname) return PrefetchInfo(1, 1, -3, 3);
#define PREFETCH(fname, div, mul, from, to) if (name == #fname) return PrefetchInfo(div, mul, from, to);

PREFETCHR1(MDegrain1)
PREFETCHR2(MDegrain2)
PREFETCHR3(MDegrain3)

// AutoAdjust
temp = int64ToIntS(vsapi->propGetInt(in, "temporal_radius", 0, &err));
if (err || temp < 0)
    temp = 20;
PREFETCH(AutoAdjust, 1, 1, -temp, temp)
[/size]
Last edited by hydra3333 on Fri Mar 10, 2017 8:19 am, edited 1 time in total.

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Fri Mar 10, 2017 8:12 am

The names are DGDenoise and DGSharpen and they both use only the current frame.

I'm not impressed by an Avisynth import design that requires such hard coding. E.g., I can't ever change my filter name or design? Goofy. :?

If it has to be done that way, any thinking person would make it a text config file that users can alter. But hard-coding it into Vapoursynth? It's some kind of joke.

Why do you think I don't hard code gpus.txt into DGDecNV? Ding, ding, correct! New GPUs can be added without needing a new code release.

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Fri Mar 10, 2017 8:30 am

:) life is messy, isn't it. My work is like that, many more compromises and workarounds than I'd ever thought possible before working there, however in an operational role "whatever it takes" applies ... figuratively speaking, fiddling with systems and keep them up and going using bits of fencing wire and a pair of pliers http://collections.slsa.sa.gov.au/resource/B+8387

OK, I'd thought DGDenoise was temporal too, sorry, I'll re-read the thread.

Cheers !

PS link to the request: http://www.vapoursynth.com/discussion/#comment-14282 and [link removed]
Last edited by hydra3333 on Fri Mar 10, 2017 8:37 am, edited 2 times in total.

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Fri Mar 10, 2017 8:32 am

DGDenoise is currently spatial but I was considering adding temporal processing. Too bad, I'm locked in now. :facepalm:

I love Aussies. Are you one? If so, we may need a "Super Distinguished Member" category. :D

BTW, I just noticed your blocking filter request. It's already on my list but thank you for the suggestion.

User avatar
hydra3333
Moose Approved
Posts: 206
Joined: Wed Oct 06, 2010 3:34 am
Contact:

Re: About DGDenoise

Post by hydra3333 » Fri Mar 10, 2017 8:52 am

admin wrote:I love Aussies. Are you one? If so, we may need a "Super Distinguished Member" category. :D
So do I, although I married a 10 pound Pom's daughter. A super dummies category is more where I fit :)
Yes, a city bloke ... as a kid raised with every weekend up at an old old shack up the River Murray (we only have one big one river in the South Aus) where you could see the outside from the inside, pinging bunnies with a .22 for dinner, and a one-boy rowboat fishing for fish as tucker for the grandparents. No horse, but an old bike which used to get punctures every 500m from the 3 cornered jacks on the dirt road. You can actually learn to levitate, I did, when about to tread on a brown or tiger joe blake (snake).
This wasn't me (it hung on the shack wall for 30 years) but it may as well have been https://drive.google.com/open?id=0B5RV2 ... WhpcjZnY3M
Oh why not, a relative of mine is in this one https://drive.google.com/open?id=0B5RV2 ... HRZYWtFbDQ
Last edited by hydra3333 on Fri Mar 10, 2017 4:39 pm, edited 5 times in total.

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Fri Mar 10, 2017 8:57 am

Ha ha, I love it. Had to google "10 pound pom" because I couldn't believe your wife weighs only 10 pounds.

Rank updated.

Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGDenoise

Post by Sharc » Fri Mar 10, 2017 9:08 am

Is the YV12 a CUDA/Nvidia restriction? I am asking because I try to avoid colorspace conversion to YV12 because of the Chroma upsampling and Chroma Interlace Problem.

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Fri Mar 10, 2017 9:24 am

What color space are you interested in support for? Typical script?

These filters are designed to be used with DGSource() so obviously I implemented only YV12. That could change, however.

Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGDenoise

Post by Sharc » Fri Mar 10, 2017 9:31 am

My tape captures are normally YUV or YUY2, 4:2:0 or 4:2:2. Hmm, now I think to remember that lossless 4:2:2 is not supported by Nvidia .....

Script like:
AviSource(xxxx.avi) #typically interlaced YUY2 4:2:2
bob() #optional
Crop(....)
Resize(....) #optional
addborders(...) #optional
ConverttoYV12() #for DGfilters
DGDenoise().DGSharpen()
separatefields().selectevery(4,0,3).weave() #optional re-interlace - when bobbed before

Then encode with x264 interlaced

Edit:
I am aware that x264 will convert to YV12 anyway, however I thought it would be better - if possible - to keep YUY2 for all the editing and filtering until the last step.

User avatar
admin
Site Admin
Posts: 4415
Joined: Thu Sep 09, 2010 3:08 pm

Re: About DGDenoise

Post by admin » Fri Mar 10, 2017 12:52 pm

If your source is interlaced then you have to tell all the following filters for proper handling. So telling DGDenoise() the same via either ConvertToYV12() or directly if I added a parameter would be necessary.

And I would of course have to convert internally if I were to support YUY2 input, and that's why I would need a parameter to tell if the source is interlaced.

So I don't really follow your thinking. You can't get away from telling filters if the source is interlaced/progressive, unless of course you rely on the defaults. But in that case won't ConvertToYV12 default too?

Finally, you have to deinterlace first anyway unless you want trash as output.

Please help me to understand what you ask for here and why, in light of the above. I don't always grok things straightaway.

Sharc
Moose Approved
Posts: 231
Joined: Thu Sep 23, 2010 1:53 pm

Re: About DGDenoise

Post by Sharc » Fri Mar 10, 2017 1:31 pm

I thought leaving the YUY2 4:2:2 colorspace untouched would a priori eliminate certain chroma problems. For example YV12 interlaced needs to be cropped mod4 vertically, whereas YUY2 would accept mod2 cropping without chroma damage, if I am not mistaken.
Maybe it's just a fart as I have to deinterlace or separate the fields anyway for applying most of the filters, and putting converttoYV12(interlaced=true) early in the script is the way to go.

Post Reply