CUDASynth

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Please re-download and test. Thank you.

BTW, that clip is not interlaced.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Sat Feb 17, 2024 6:58 pm
BTW, that clip is not interlaced.
Thanks. As a rule here, OTA mpeg2 567i across various channels historically are (were?) so I'll need to revisit that since broadcasters are a law unto themselves.
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

As an interim, I had a go with the samsung h.265 "HDR10+" video ...

An interesting result for h.265 input and using DGHDRtoSDR.
Vspipe with ffmpeg encoding: 26 fps (non-CUDASynth) vs 28 fps (CUDASynth).
Perhaps the closeness of speeds is to be expected for such a small input sample and the transpose/flip used to rotate the video ?

Source file(s):
https://drive.google.com/drive/folders/ ... sp=sharing

Equipment:
PC: 3099X 32Gb
VGA: nvidia 2060 Super 8Gb, driver 551.52

Code: Select all

G:\HDTV\DGtest>"C:\SOFTWARE\MediaInfo\MediaInfo.exe" --Legacy "!QSF_VIDEO!" 
General
Complete name                            : G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4
Format                                   : MPEG-4
Format profile                           : Base Media / Version 2
Codec ID                                 : mp42 (isom/mp42)
File size                                : 134 MiB
Duration                                 : 11 s 674 ms
Overall bit rate                         : 96.4 Mb/s
Frame rate                               : 29.235 FPS
Performer                                : Samsung SM-S901E
Encoded date                             : 2024-02-17 01:46:33 UTC
Tagged date                              : 2024-02-17 01:46:33 UTC
xyz                                      : -34.9460+138.6245/
com.android.version                      : 14

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5@High
HDR format                               : SMPTE ST 2094 App 4, Version 1, HDR10+ Profile B compatible
Codec ID                                 : hvc1
Codec ID/Info                            : High Efficiency Video Coding
Duration                                 : 11 s 674 ms
Source duration                          : 11 s 664 ms
Bit rate                                 : 96.2 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Rotation                                 : 90°
Frame rate mode                          : Variable
Frame rate                               : 29.235 FPS
Minimum frame rate                       : 5.001 FPS
Maximum frame rate                       : 30.010 FPS
Real frame rate                          : 30.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.397
Stream size                              : 134 MiB (100%)
Source stream size                       : 134 MiB (100%)
Title                                    : VideoHandle
Language                                 : English
Encoded date                             : 2024-02-17 01:46:33 UTC
Tagged date                              : 2024-02-17 01:46:33 UTC
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 200 cd/m2
mdhd_Duration                            : 11674
Codec configuration box                  : hvcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 11 s 648 ms
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 364 KiB (0%)
Title                                    : SoundHandle
Language                                 : English
Encoded date                             : 2024-02-17 01:46:33 UTC
Tagged date                              : 2024-02-17 01:46:33 UTC

G:\HDTV\DGtest>"!vapoursynth_root!\DGIndex\DGIndexNV.exe" -version  
DGIndexNV 251.0.0.0 (64 bit)

G:\HDTV\DGtest>"!vapoursynth_root!\DGIndex\DGIndexNV.exe" -i "!QSF_VIDEO!" -e -h -o "!_DGI_FILE!" 
Project
100

G:\HDTV\DGtest>TYPE "!_DGI_LOG!" 
Stream Type: MP4
Video Type: HEVC
HDR: PQ
Profile: Main 10
Level: 5/High
Coded Size: 3840x2176
Display Size: 3840x2160
PAR: 1:1
Frame Rate: 29.210211 fps
Colorimetry: BT.2020 [9]
Frame Structure: Progressive
Field Order: Progressive
Frame Type: 
Coded Number: 341
Playback Number: 341
Frame Repeats: 0
Field Repeats: 0
Film Percent: 0.00
Bitrate: 
Bitrate (Avg): 93.883
Bitrate (Max): 
Elapsed: 
Remain: 0:00:00
FPS: 
Info: Finished!

Log of non-CUDASynth:

Code: Select all

G:\HDTV\DGtest>TYPE "!_OLD_VPY_file!"  2>&1 
import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
#import functool 
#import mvsfunc as mvs			# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
#import havsfunc as haf		# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGHDRtoSDR.dll') 
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF" 
video = core.dgdecodenv.DGSource(r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False) 
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1) 
video = core.avs.DGHDRtoSDR(video, mode="pq") 
# DGDecNV changes - 
# 2020.10.21 Added new parameters cstrength and cblend to independently control the chroma denoising. 
# 2020.11.07 Revised DGDenoise parameters. The 'chroma' option is removed. 
#            Now, if 'strength' is set to 0.0 then luma denoising is disabled, 
#            and if cstrength is set to 0.0 then chroma denoising is disabled. 
#            'cstrength' is now defaulted to 0.0, and 'searchw' is defaulted to 9. 
# example: video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06) # replaced chroma=True 
video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06) 
video = core.avs.DGSharpen(video, strength=0.2) 
video = core.std.Transpose(video) 
video = core.std.FlipHorizontal(video) 
#video = vs.core.text.ClipInfo(video) 
# the video needs rotating 90 degrees 
video.set_output() 

G:\HDTV\DGtest>set bitrate=6000000 

G:\HDTV\DGtest>set min_bitrate=500000 

G:\HDTV\DGtest>set max_bitrate=10000000 

G:\HDTV\DGtest>set bufsize=!max_bitrate! 

G:\HDTV\DGtest>if not exist "!OLD_TARGET_VIDEO!" (
 "!old_vspipeexe64!" --container y4m --filter-time "!_OLD_VPY_file!" -   | "!old_ffmpegexe64_OpenCL!" -hide_banner -v verbose -nostats -f yuv4mpegpipe -i pipe: -probesize 200M -analyzeduration 200M  -i "!QSF_VIDEO!" -map 0:v:0 -map 1:a:0 -fps_mode passthrough -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 -b:v !bitrate! -minrate:v !min_bitrate! -maxrate:v !max_bitrate! -bufsize !bufsize! -profile:v high -level 5.2 -movflags +faststart+write_colr  -c:a libfdk_aac -cutoff 18000 -ab 256k -ar 48000 -y  "!OLD_TARGET_VIDEO!" 
) 
Routing option strict to both codec and muxer layer
Warning: Avisynth Compat: requested frame 2 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 0 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 1 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 3 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 4 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 5 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 6 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 7 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 8 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 9 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 10 not prefetched, using slow method
Input #0, yuv4mpegpipe, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p(progressive, center), 2160x3840, 30 fps, 30 tbr, 30 tbn
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2024-02-17T01:46:33.000000Z
    location        : -34.9460+138.6245/
    location-eng    : -34.9460+138.6245/
    com.android.version: 14
    com.android.capture.fps: 30.000000
  Duration: 00:00:11.67, start: 0.000000, bitrate: 96396 kb/s
  Stream #1:0[0x1](eng): Video: hevc (Main 10), 1 reference frame (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, left), 3840x2160, 96219 kb/s, 29.24 fps, 30 tbr, 90k tbn (default)
      Metadata:
        creation_time   : 2024-02-17T01:46:33.000000Z
        handler_name    : VideoHandle
        vendor_id       : [0][0][0][0]
      Side data:
        displaymatrix: rotation of -90.00 degrees
  Stream #1:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
      Metadata:
        creation_time   : 2024-02-17T01:46:33.000000Z
        handler_name    : SoundHandle
        vendor_id       : [0][0][0][0]
[out#0/mp4 @ 0000013759d05700] Adding streams from explicit maps...
[vost#0:0/h264_nvenc @ 000001375ab18a00] Created video stream from input stream 0:0
[aost#0:1/libfdk_aac @ 0000013759c8e140] Created audio stream from input stream 1:1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
  Stream #1:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
[vost#0:0/h264_nvenc @ 000001375ab18a00] Starting thread...
[aost#0:1/libfdk_aac @ 0000013759c8e140] Starting thread...
[vf#0:0 @ 0000013759c8e9c0] Starting thread...
[af#0:1 @ 0000013759c8e640] Starting thread...
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Starting thread...
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Starting thread...
[in#0/yuv4mpegpipe @ 0000013759c72740] Starting thread...
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Starting thread...
[graph_1_in_1_1 @ 0000013759cf80c0] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[graph 0 input from stream 0:0 @ 0000013759cf81c0] w:2160 h:3840 pixfmt:yuv420p tb:1/30 fr:30/1 sar:0/1 csp:unknown range:unknown
[format_out_0_1 @ 0000013759d3a8c0] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_scale_0 @ 0000013759d3ad00] w:iw h:ih flags:'' interl:0
[format @ 0000013759d3ac00] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_aresample_0 @ 0000013759d3b100] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
Warning: Avisynth Compat: requested frame 11 not prefetched, using slow method
[auto_scale_0 @ 0000013759d3ad00] w:2160 h:3840 fmt:yuv420p csp:unknown range:unknown sar:0/1 -> w:2160 h:3840 fmt:nv12 csp:unknown range:unknown sar:0/1 flags:0x00046200
[graph 0 input from stream 0:0 @ 0000013759cf81c0] video frame properties congruent with link at pts_time: 0
[h264_nvenc @ 0000013759d079c0] Loaded Nvenc version 12.2
[h264_nvenc @ 0000013759d079c0] Nvenc initialized successfully
Warning: Avisynth Compat: requested frame 12 not prefetched, using slow method
[h264_nvenc @ 0000013759d079c0] 1 CUDA capable devices found
[h264_nvenc @ 0000013759d079c0] [ GPU #0 - < NVIDIA GeForce RTX 2060 SUPER > has Compute SM 7.5 ]
Warning: Avisynth Compat: requested frame 13 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 14 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 15 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 16 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 17 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 18 not prefetched, using slow method
[h264_nvenc @ 0000013759d079c0] supports NVENC
[h264_nvenc @ 0000013759d079c0] AQ enabled.
[h264_nvenc @ 0000013759d079c0] Temporal AQ enabled.
[h264_nvenc @ 0000013759d079c0] Lookahead enabled: depth 28, scenecut enabled, B-adapt enabled.
Warning: Avisynth Compat: requested frame 19 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 20 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 21 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 22 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 23 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 24 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 25 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 26 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 27 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 28 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 29 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 30 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 31 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 32 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 33 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 34 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 35 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 36 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 37 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 38 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 39 not prefetched, using slow method
Output #0, mp4, to 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.OLD.mp4':
  Metadata:
    encoder         : Lavf60.21.100
  Stream #0:0: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), nv12(progressive, center), 2160x3840, q=2-31, 6000 kb/s, 30 fps, 15360 tbn
      Metadata:
        encoder         : Lavc60.39.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 10000000/0/6000000 buffer size: 10000000 vbv_delay: N/A
  Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, delay 2048, 256 kb/s (default)
      Metadata:
        creation_time   : 2024-02-17T01:46:33.000000Z
        handler_name    : SoundHandle
        vendor_id       : [0][0][0][0]
        encoder         : Lavc60.39.100 libfdk_aac
[out#0/mp4 @ 0000013759d05700] Starting thread...
Warning: Avisynth Compat: requested frame 40 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 41 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 42 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 43 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 44 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 45 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 46 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 47 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 48 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 49 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 50 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 51 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 52 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 53 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 54 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 55 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 56 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 57 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 58 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 59 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 60 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 61 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 62 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 63 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 64 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 65 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 66 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 67 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 68 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 69 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 70 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 71 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 72 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 73 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 74 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 75 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 76 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 77 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 78 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 79 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 80 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 81 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 82 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 83 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 84 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 85 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 86 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 87 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 88 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 89 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 90 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 91 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 92 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 93 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 94 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 95 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 96 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 97 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 98 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 99 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 100 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 101 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 102 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 103 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 104 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 105 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 106 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 107 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 108 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 109 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 110 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 111 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 112 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 113 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 114 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 115 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 116 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 117 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 118 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 119 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 120 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 121 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 122 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 123 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 124 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 125 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 126 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 127 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 128 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 129 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 130 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 131 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 132 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 133 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 134 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 135 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 136 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 137 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 138 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 139 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 140 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 141 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 142 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 143 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 144 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 145 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 146 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 147 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 148 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 149 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 150 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 151 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 152 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 153 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 154 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 155 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 156 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 157 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 158 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 159 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 160 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 161 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 162 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 163 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 164 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 165 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 166 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 167 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 168 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 169 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 170 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 171 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 172 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 173 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 174 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 175 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 176 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 177 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 178 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 179 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 180 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 181 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 182 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 183 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 184 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 185 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 186 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 187 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 188 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 189 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 190 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 191 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 192 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 193 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 194 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 195 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 196 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 197 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 198 not prefetched, using slow method
Warning: Avisynth Compat: requested frame 199 not prefetched, using slow method
Output 341 frames in 12.60 seconds (27.06 fps)
Filtername           Filter mode   Time (%)   Time (s)
DGDenoise            parreq          99.10      12.49
DGHDRtoSDR           fstate          41.95       5.29
DGSharpen            parreq          35.44       4.47
DGSource             unordered       26.63       3.36
FlipHorizontal       parallel        15.08       1.90
Transpose            parallel         7.27       0.92
AssumeFPS            parallel         0.01       0.00
[in#0/yuv4mpegpipe @ 0000013759c72740] EOF while reading input
[in#0/yuv4mpegpipe @ 0000013759c72740] Terminating thread with return code 0 (success)
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Decoder thread received EOF packet
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Decoder returned EOF, finishing
[vist#0:0/rawvideo @ 0000013759c87840] [dec:rawvideo @ 0000013759c8d180] Terminating thread with return code 0 (success)
[vf#0:0 @ 0000013759c8e9c0] Filtergraph returned EOF, finishing
[vf#0:0 @ 0000013759c8e9c0] All consumers returned EOF
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] EOF while reading input
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Terminating thread with return code 0 (success)
[vf#0:0 @ 0000013759c8e9c0] Terminating thread with return code 0 (success)
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Decoder thread received EOF packet
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Decoder returned EOF, finishing
[aist#1:1/aac @ 0000013759c8d6c0] [dec:aac @ 0000013759c8d2c0] Terminating thread with return code 0 (success)
[af#0:1 @ 0000013759c8e640] Filtergraph returned EOF, finishing
[af#0:1 @ 0000013759c8e640] All consumers returned EOF
[vost#0:0/h264_nvenc @ 000001375ab18a00] Encoder thread received EOF
[af#0:1 @ 0000013759c8e640] Terminating thread with return code 0 (success)
[aost#0:1/libfdk_aac @ 0000013759c8e140] Encoder thread received EOF
[aost#0:1/libfdk_aac @ 0000013759c8e140] Terminating thread with return code 0 (success)
[vost#0:0/h264_nvenc @ 000001375ab18a00] Terminating thread with return code 0 (success)
[out#0/mp4 @ 0000013759d05700] All streams finished
[out#0/mp4 @ 0000013759d05700] Terminating thread with return code 0 (success)
[mp4 @ 0000013759ce7340] Starting second pass: moving the moov atom to the beginning of the file
no ICC profile found, will write nclx/nclc colour info instead
    Last message repeated 1 times
[AVIOContext @ 0000013759cf9fc0] Statistics: 9918706 bytes read, 0 seeks
no ICC profile found, will write nclx/nclc colour info instead
[AVIOContext @ 000001375aa67e80] Statistics: 19850252 bytes written, 4 seeks, 79 writeouts
[out#0/mp4 @ 0000013759d05700] Output file #0 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.OLD.mp4):
[out#0/mp4 @ 0000013759d05700]   Output stream #0:0 (video): 341 frames encoded; 341 packets muxed (9544368 bytes); 
[out#0/mp4 @ 0000013759d05700]   Output stream #0:1 (audio): 546 frames encoded (559104 samples); 548 packets muxed (374290 bytes); 
[out#0/mp4 @ 0000013759d05700]   Total: 889 packets (9918658 bytes) muxed
[out#0/mp4 @ 0000013759d05700] video:9321KiB audio:366KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.130219%
frame=  341 fps= 26 q=41.0 Lsize=    9699KiB time=00:00:11.26 bitrate=7052.0kbits/s speed=0.847x    
[h264_nvenc @ 0000013759d079c0] Nvenc unloaded
[in#0/yuv4mpegpipe @ 0000013759c72740] Input file #0 (pipe:):
[in#0/yuv4mpegpipe @ 0000013759c72740]   Input stream #0:0 (video): 341 packets read (4242585600 bytes); 341 frames decoded; 0 decode errors; 
[in#0/yuv4mpegpipe @ 0000013759c72740]   Total: 341 packets (4242585600 bytes) demuxed
[AVIOContext @ 0000013759c87200] Statistics: 4242587699 bytes read, 0 seeks
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40] Input file #1 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4):
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40]   Input stream #1:1 (audio): 546 packets read (372823 bytes); 546 frames decoded; 0 decode errors (559104 samples); 
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 0000013759c87e40]   Total: 546 packets (372823 bytes) demuxed
[AVIOContext @ 0000013759c88780] Statistics: 1610759 bytes read, 12 seeks

Log of CUDASynth:

Code: Select all

G:\HDTV\DGtest>TYPE "!_VPY_file!"  2>&1 
import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
#import functool 
#import mvsfunc as mvs			# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
#import havsfunc as haf		# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF" 
# dn_enable=x DENOISE 
# default 0  0: disabled  1: spatial denoising only  2: temporal denoising only  3: spatial and temporal denoising 
# dn_quality="x" default "good"    "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="best", dn_strength=0.06, dn_cstrength=0.06 ) 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="better", dn_strength=0.06, dn_cstrength=0.06 ) 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=3, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 ) 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1 h2s_mode="pq" ) 
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.DGI', deinterlace=0, use_top_field=True, use_pf=False, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 ) 
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1) 
video = core.avs.DGSharpen( video, strength=0.2 ) 
# the video needs rotating 90 degrees 
video = core.std.Transpose(video) 
video = core.std.FlipHorizontal(video) 
#video = vs.core.text.ClipInfo(video) 
video.set_output() 

G:\HDTV\DGtest>"!vspipeexe64!" --container y4m --filter-time "!_VPY_file!" -   | "!ffmpegexe64_OpenCL!" -hide_banner -v verbose -nostats -f yuv4mpegpipe -i pipe: -probesize 200M -analyzeduration 200M  -i "!QSF_VIDEO!" -map 0:v:0 -map 1:a:0 -fps_mode passthrough -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 -b:v !bitrate! -minrate:v !min_bitrate! -maxrate:v !max_bitrate! -bufsize !bufsize! -profile:v high -level 5.2 -movflags +faststart+write_colr  -c:a libfdk_aac -cutoff 18000 -ab 256k -ar 48000 -y  "!TARGET_VIDEO!" 
Routing option strict to both codec and muxer layer
Input #0, yuv4mpegpipe, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Video: rawvideo, 1 reference frame (Y3[11][16] / 0x100B3359), yuv420p16le(progressive), 2160x3840, 30 fps, 30 tbr, 30 tbn
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2024-02-17T01:46:33.000000Z
    location        : -34.9460+138.6245/
    location-eng    : -34.9460+138.6245/
    com.android.version: 14
    com.android.capture.fps: 30.000000
  Duration: 00:00:11.67, start: 0.000000, bitrate: 96396 kb/s
  Stream #1:0[0x1](eng): Video: hevc (Main 10), 1 reference frame (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/smpte2084, left), 3840x2160, 96219 kb/s, 29.24 fps, 30 tbr, 90k tbn (default)
      Metadata:
        creation_time   : 2024-02-17T01:46:33.000000Z
        handler_name    : VideoHandle
        vendor_id       : [0][0][0][0]
      Side data:
        displaymatrix: rotation of -90.00 degrees
  Stream #1:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
      Metadata:
        creation_time   : 2024-02-17T01:46:33.000000Z
        handler_name    : SoundHandle
        vendor_id       : [0][0][0][0]
[out#0/mp4 @ 00000203ef136080] Adding streams from explicit maps...
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Created video stream from input stream 0:0
[aost#0:1/libfdk_aac @ 00000203ef0be140] Created audio stream from input stream 1:1
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc))
  Stream #1:1 -> #0:1 (aac (native) -> aac (libfdk_aac))
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Starting thread...
[aost#0:1/libfdk_aac @ 00000203ef0be140] Starting thread...
[vf#0:0 @ 00000203ef0bef00] Starting thread...
[af#0:1 @ 00000203ef0be8c0] Starting thread...
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Starting thread...
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Starting thread...
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Starting thread...
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Starting thread...
[graph_1_in_1_1 @ 00000203ef122680] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:stereo
[graph 0 input from stream 0:0 @ 00000203ef122780] w:2160 h:3840 pixfmt:yuv420p16le tb:1/30 fr:30/1 sar:0/1 csp:unknown range:unknown
[format_out_0_1 @ 00000203ef109340] auto-inserting filter 'auto_aresample_0' between the filter 'Parsed_anull_0' and the filter 'format_out_0_1'
[auto_aresample_0 @ 00000203ef126b80] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[auto_scale_0 @ 00000203f0b3ee80] w:iw h:ih flags:'' interl:0
[format @ 00000203ef166840] auto-inserting filter 'auto_scale_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scale_0 @ 00000203f0b3ee80] w:2160 h:3840 fmt:yuv420p16le csp:unknown range:unknown sar:0/1 -> w:2160 h:3840 fmt:nv12 csp:unknown range:unknown sar:0/1 flags:0x00046200
[graph 0 input from stream 0:0 @ 00000203ef122780] video frame properties congruent with link at pts_time: 0
[h264_nvenc @ 00000203ef1379c0] Loaded Nvenc version 12.2
[h264_nvenc @ 00000203ef1379c0] Nvenc initialized successfully
[h264_nvenc @ 00000203ef1379c0] 1 CUDA capable devices found
[h264_nvenc @ 00000203ef1379c0] [ GPU #0 - < NVIDIA GeForce RTX 2060 SUPER > has Compute SM 7.5 ]
[h264_nvenc @ 00000203ef1379c0] supports NVENC
[h264_nvenc @ 00000203ef1379c0] AQ enabled.
[h264_nvenc @ 00000203ef1379c0] Temporal AQ enabled.
[h264_nvenc @ 00000203ef1379c0] Lookahead enabled: depth 28, scenecut enabled, B-adapt enabled.
Output #0, mp4, to 'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.mp4':
  Metadata:
    encoder         : Lavf60.21.100
  Stream #0:0: Video: h264 (High), 1 reference frame (avc1 / 0x31637661), nv12(progressive), 2160x3840, q=2-31, 6000 kb/s, 30 fps, 15360 tbn
      Metadata:
        encoder         : Lavc60.39.100 h264_nvenc
      Side data:
        cpb: bitrate max/min/avg: 10000000/0/6000000 buffer size: 10000000 vbv_delay: N/A
  Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, delay 2048, 256 kb/s (default)
      Metadata:
        creation_time   : 2024-02-17T01:46:33.000000Z
        handler_name    : SoundHandle
        vendor_id       : [0][0][0][0]
        encoder         : Lavc60.39.100 libfdk_aac
[out#0/mp4 @ 00000203ef136080] Starting thread...
Output 341 frames in 11.51 seconds (29.63 fps)
Filtername           Filter mode   Time (%)   Time (s)
DGSource             unordered       99.63      11.46
DGSharpen            parreq          46.13       5.31
FlipHorizontal       parallel        17.65       2.03
Transpose            parallel        16.05       1.85
AssumeFPS            parallel         0.01       0.00
[in#0/yuv4mpegpipe @ 00000203ef0a2740] EOF while reading input
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Terminating thread with return code 0 (success)
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Decoder thread received EOF packet
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Decoder returned EOF, finishing
[vist#0:0/rawvideo @ 00000203ef0b7840] [dec:rawvideo @ 00000203ef0bd180] Terminating thread with return code 0 (success)
[vf#0:0 @ 00000203ef0bef00] Filtergraph returned EOF, finishing
[vf#0:0 @ 00000203ef0bef00] All consumers returned EOF
[vf#0:0 @ 00000203ef0bef00] Terminating thread with return code 0 (success)
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] EOF while reading input
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Terminating thread with return code 0 (success)
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Decoder thread received EOF packet
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Decoder returned EOF, finishing
[aist#1:1/aac @ 00000203ef0bd6c0] [dec:aac @ 00000203ef0bd2c0] Terminating thread with return code 0 (success)
[af#0:1 @ 00000203ef0be8c0] Filtergraph returned EOF, finishing
[af#0:1 @ 00000203ef0be8c0] All consumers returned EOF
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Encoder thread received EOF
[af#0:1 @ 00000203ef0be8c0] Terminating thread with return code 0 (success)
[aost#0:1/libfdk_aac @ 00000203ef0be140] Encoder thread received EOF
[aost#0:1/libfdk_aac @ 00000203ef0be140] Terminating thread with return code 0 (success)
[vost#0:0/h264_nvenc @ 00000203f0b28a00] Terminating thread with return code 0 (success)
[out#0/mp4 @ 00000203ef136080] All streams finished
[out#0/mp4 @ 00000203ef136080] Terminating thread with return code 0 (success)
[mp4 @ 00000203ef117bc0] Starting second pass: moving the moov atom to the beginning of the file
no ICC profile found, will write nclx/nclc colour info instead
    Last message repeated 1 times
[AVIOContext @ 00000203f0a38000] Statistics: 9803190 bytes read, 0 seeks
no ICC profile found, will write nclx/nclc colour info instead
[AVIOContext @ 00000203f0a77e80] Statistics: 19619212 bytes written, 4 seeks, 79 writeouts
[out#0/mp4 @ 00000203ef136080] Output file #0 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.result.mp4):
[out#0/mp4 @ 00000203ef136080]   Output stream #0:0 (video): 341 frames encoded; 341 packets muxed (9428852 bytes); 
[out#0/mp4 @ 00000203ef136080]   Output stream #0:1 (audio): 546 frames encoded (559104 samples); 548 packets muxed (374290 bytes); 
[out#0/mp4 @ 00000203ef136080]   Total: 889 packets (9803142 bytes) muxed
[out#0/mp4 @ 00000203ef136080] video:9208KiB audio:366KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.131672%
frame=  341 fps= 28 q=40.0 Lsize=    9586KiB time=00:00:11.26 bitrate=6970.0kbits/s speed=0.926x    
[h264_nvenc @ 00000203ef1379c0] Nvenc unloaded
[in#0/yuv4mpegpipe @ 00000203ef0a2740] Input file #0 (pipe:):
[in#0/yuv4mpegpipe @ 00000203ef0a2740]   Input stream #0:0 (video): 341 packets read (8485171200 bytes); 341 frames decoded; 0 decode errors; 
[in#0/yuv4mpegpipe @ 00000203ef0a2740]   Total: 341 packets (8485171200 bytes) demuxed
[AVIOContext @ 00000203ef0b7200] Statistics: 8485173302 bytes read, 0 seeks
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40] Input file #1 (G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.qsf.mp4):
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40]   Input stream #1:1 (audio): 546 packets read (372823 bytes); 546 frames decoded; 0 decode errors (559104 samples); 
[in#1/mov,mp4,m4a,3gp,3g2,mj2 @ 00000203ef0b7e40]   Total: 546 packets (372823 bytes) demuxed
[AVIOContext @ 00000203ef0b8780] Statistics: 1610759 bytes read, 12 seeks
I haven't as yet tried to resize them down to 1080p transposed.

I must check the manual to see if dgsource has a "rotate" option (I guess being done after deinterlacing and resizing).
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

OK, using the updated .dll on the notionally 576i MPEG2 source, it works. :D

pre-CUDASynth: 391 fps

Code: Select all

import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
#import functool 
#import mvsfunc as mvs			# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
#import havsfunc as haf		# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
core.std.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'C:\SOFTWARE\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF" 
video = core.dgdecodenv.DGSource(r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False) 
# DGDecNV changes - 
# 2020.10.21 Added new parameters cstrength and cblend to independently control the chroma denoising. 
# 2020.11.07 Revised DGDenoise parameters. The 'chroma' option is removed. 
#            Now, if 'strength' is set to 0.0 then luma denoising is disabled, 
#            and if cstrength is set to 0.0 then chroma denoising is disabled. 
#            'cstrength' is now defaulted to 0.0, and 'searchw' is defaulted to 9. 
# example: video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06) # replaced chroma=True 
video = core.avs.DGDenoise(video, strength=0.06, cstrength=0.06) 
video = core.avs.DGSharpen(video, strength=0.2) 
#video = vs.core.text.ClipInfo(video) 
video.set_output() 
CUDASynth: 438 fps

Code: Select all

import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
#import functool 
#import mvsfunc as mvs			# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
#import havsfunc as haf		# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
# NOTE: deinterlace=1, use_top_field=True for "Interlaced"/"TFF" 
# dn_enable=x DENOISE 
# default 0  0: disabled  1: spatial denoising only  2: temporal denoising only  3: spatial and temporal denoising 
# dn_quality="x" default "good"    "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=1, dn_quality="best", dn_strength=0.06, dn_cstrength=0.06 ) 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=1, dn_quality="better", dn_strength=0.06, dn_cstrength=0.06 ) 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=3, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 ) 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False ) 
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\MPEG2_INTERLACED.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 ) 
video = core.avs.DGSharpen( video, strength=0.2 ) 
#video = vs.core.text.ClipInfo(video) 
video.set_output() 
Cool. Thank you.
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Re-ran the h.265 test on a tad longer clip, 3410 frames ...

non-CUDASynth fps= 27
CUDASynth fps=30
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Thank you for your testing, hydra3333.

Regarding your 391/438 fps result, I have two observations. 1) In the new case, you have deinterlacing enabled, but not in the old case. 2) You have external Sharpen() for both. Both of these reduce the apparent performance improvement. For 1) please use the same settings. For 2) that will be ameliorated by addition of DGSharpen() to DGSource().

Regarding your 27/30 fps result, all of the extra processing overwhelms what DGSource() is doing.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Sun Feb 18, 2024 8:43 am
Regarding your 391/438 fps result, I have two observations.
1) In the new case, you have deinterlacing enabled, but not in the old case.
2) You have external Sharpen() for both.
Both of these reduce the apparent performance improvement.
For 1) please use the same settings.
For 2) that will be ameliorated by addition of DGSharpen() to DGSource().
Ah. For 391/438 fps result
1) OK, thanks, will find and fix that
2) Yes that would be great.
Rocky wrote:
Sun Feb 18, 2024 8:43 am
Regarding your 27/30 fps result, all of the extra processing overwhelms what DGSource() is doing.
Yes. Unfortunately for ubiquitous handheld samsung phone cameras, I see people tending to record in
portrait mode (flagged in the .mp4 metadata as to be rotated 90 degreed clockwise) and in
landscape mode (flagged in the .mp4 metadata as to be rotated 0 degreed clockwise).
If I looked harder, I'd probably find people holding their cameras upside down in both portrait and landscape, also requiring 180 and 270 degree rotation (anything else can go jump in the lake).

Would it be possible to consider adding in the list of desirable future CUDASynth things:
- the 3 standard rotations (90, 180, 270).
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Hello. A little query on resizing using CUDASynth dgsource.

I use a .bat script to find some media info and hard-code values into a .vpy script.

If I use this (vapoursynth resizer), it all works and the video plays OK.

Code: Select all

import math 
import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
#import functool 
#import mvsfunc as mvs			# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
#import havsfunc as haf		# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
if int(90.000) == 90: 
   #REM this is for resizing BEFORE rotated 90 degrees h.265 from samsung camera which is when one films in portrait mode 
   #REM so before rotation it appears sideways long with the top to the left and we must resize according to that 
   #REM x is long and will become vertical and when rotated must fit into 1080 
   #REM y is skinny and will become horizontal and when rotated must fit into 1920 
   #REM so, when rotated it will be adjusted to fit into 1080p 
   x = 3840 
   y = 2160 
   x_target = 1080 
   y_target = 1920 
   x_ratio = x_target / x 
   y_ratio = y_target / y 
   resize_factor = min(x_ratio, y_ratio) 
   new_x = min(math.ceil(x * resize_factor), x_target) 
   new_y = min(math.ceil(y * resize_factor), y_target) 
else: 
   #REM this is for resizing BEFORE rotated 0 degrees h.265 from samsung camera which is when one films in landscape mode 
   #REM so NO rotation and it appears sideways long with the top at the top and we must resize according to that 
   #REM x is long and will become vertical and when rotated must fit into 1920 
   #REM y is skinny and will become horizontal and when rotated must fit into 1080 
   #REM so, when rotated it will be adjusted to fit into 1080p 
   x = 3840 
   y = 2160 
   x_target = 1920 
   y_target = 1080 
   x_ratio = x_target / x 
   y_ratio = y_target / y 
   resize_factor = min(x_ratio, y_ratio) 
   new_x = min(math.ceil(x * resize_factor), x_target) 
   new_y = min(math.ceil(y * resize_factor), y_target) 
# dn_enable=x DENOISE 
# default 0  0: disabled  1: spatial denoising only  2: temporal denoising only  3: spatial and temporal denoising 
# dn_quality="x" default "good"    "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 ) 
# 1. get dgsource to resize 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y) 
# 2. use vapoursynth resize 
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI') 
video = core.resize.Lanczos(video, width=new_x, height=new_y) 
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1) 
#video = core.avs.DGSharpen( video, strength=0.2 ) 
if int(90.000) == 90: 
   ## the video needs rotating 90 degrees 
   video = core.std.Transpose(video) 
   video = core.std.FlipHorizontal(video) 
#video = vs.core.text.ClipInfo(video) 
video.set_output() 
Whereas if I use the same script but with dgsource resizing like this:

Code: Select all

import math 
import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
#import functool 
#import mvsfunc as mvs			# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
#import havsfunc as haf		# this relies on the .py residing at the VS folder root level - see run_vsrepo.bat 
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
if int(90.000) == 90: 
   #REM this is for resizing BEFORE rotated 90 degrees h.265 from samsung camera which is when one films in portrait mode 
   #REM so before rotation it appears sideways long with the top to the left and we must resize according to that 
   #REM x is long and will become vertical and when rotated must fit into 1080 
   #REM y is skinny and will become horizontal and when rotated must fit into 1920 
   #REM so, when rotated it will be adjusted to fit into 1080p 
   x = 3840 
   y = 2160 
   x_target = 1080 
   y_target = 1920 
   x_ratio = x_target / x 
   y_ratio = y_target / y 
   resize_factor = min(x_ratio, y_ratio) 
   new_x = min(math.ceil(x * resize_factor), x_target) 
   new_y = min(math.ceil(y * resize_factor), y_target) 
else: 
   #REM this is for resizing BEFORE rotated 0 degrees h.265 from samsung camera which is when one films in landscape mode 
   #REM so NO rotation and it appears sideways long with the top at the top and we must resize according to that 
   #REM x is long and will become vertical and when rotated must fit into 1920 
   #REM y is skinny and will become horizontal and when rotated must fit into 1080 
   #REM so, when rotated it will be adjusted to fit into 1080p 
   x = 3840 
   y = 2160 
   x_target = 1920 
   y_target = 1080 
   x_ratio = x_target / x 
   y_ratio = y_target / y 
   resize_factor = min(x_ratio, y_ratio) 
   new_x = min(math.ceil(x * resize_factor), x_target) 
   new_y = min(math.ceil(y * resize_factor), y_target) 
# dn_enable=x DENOISE 
# default 0  0: disabled  1: spatial denoising only  2: temporal denoising only  3: spatial and temporal denoising 
# dn_quality="x" default "good"    "good" "better" "best" ... "best" halves the speed compared pre-CUDASynth 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y, h2s_enable=1, h2s_mode="pq", dn_enable=1, dn_quality="good", dn_strength=0.06, dn_cstrength=0.06 ) 
# 1. get dgsource to resize 
video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=new_x, rh=new_y) 
# 2. use vapoursynth resize 
#video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI') 
#video = core.resize.Lanczos(video, width=new_x, height=new_y) 
video = core.std.AssumeFPS(video, fpsnum=30, fpsden=1) 
#video = core.avs.DGSharpen( video, strength=0.2 ) 
if int(90.000) == 90: 
   ## the video needs rotating 90 degrees 
   video = core.std.Transpose(video) 
   video = core.std.FlipHorizontal(video) 
#video = vs.core.text.ClipInfo(video) 
video.set_output() 
Then I get the crash below (also noting the '"!vspipeexe64!" --filter-time --progress' yields nothing):

Code: Select all

G:\HDTV\DGtest>"!vspipeexe64!" --version  2>&1 
VapourSynth Video Processing Library
Copyright (c) 2012-2023 Fredrik Mellbin
Core R65
API R4.0
API R3.6
Options: -

G:\HDTV\DGtest>"!vspipeexe64!" --info "!_VPY_file!"  2>&1 
Width: 608
Height: 1080
Frames: 3410
FPS: 30/1 (30.000 fps)
Format Name: YUV420P16
Color Family: YUV
Alpha: No
Sample Type: Integer
Bits: 16
SubSampling W: 1
SubSampling H: 1

G:\HDTV\DGtest>"!vspipeexe64!" --filter-time --progress --container y4m "!_VPY_file!" --  2>&1 
Script evaluation done in 0.30 seconds

G:\HDTV\DGtest>set bitrate=6000000 

G:\HDTV\DGtest>set min_bitrate=500000 

G:\HDTV\DGtest>set max_bitrate=10000000 

G:\HDTV\DGtest>set bufsize=!max_bitrate! 

G:\HDTV\DGtest>"!vspipeexe64!" --container y4m --filter-time "!_VPY_file!" -   | "!ffmpegexe64_OpenCL!" -hide_banner -v verbose -nostats -f yuv4mpegpipe -i pipe: -probesize 200M -analyzeduration 200M  -i "!QSF_VIDEO!" -map 0:v:0 -map 1:a:0 -fps_mode passthrough -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -strict experimental -c:v h264_nvenc -pix_fmt nv12 -preset p7 -multipass fullres -forced-idr 1 -g 25 -coder:v cabac -spatial-aq 1 -temporal-aq 1 -dpb_size 0 -bf:v 3 -b_ref_mode:v 0 -rc:v vbr -cq:v 0 -b:v !bitrate! -minrate:v !min_bitrate! -maxrate:v !max_bitrate! -bufsize !bufsize! -profile:v high -level 5.2 -movflags +faststart+write_colr  -c:a libfdk_aac -cutoff 18000 -ab 256k -ar 48000 -y  "!TARGET_VIDEO!" 
Routing option strict to both codec and muxer layer
[yuv4mpegpipe @ 00000245416333c0] Header too large.
[AVIOContext @ 00000245416481c0] Statistics: 0 bytes read, 0 seeks
[in#0 @ 0000024541632e40] Error opening input: Invalid argument
Error opening input file pipe:.
Error opening input files: Invalid argument
Suggestions would be welcomed on how to fix the dgsource resizing.
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Sorry for the delay. Some stuff is kicking my butt. Couldn't look away.

I don't know what new_x and new_y are evaluating to. Can you give me a simple DGSource() line that crashes on it's own?

Like:

DGSource("file.dgi", rw=720,rh=576)

If you can't do that then it must be in your pipe etc. stuff. Note that new_x and new_y must be integers, not floats.

Could add rotates but not for a while.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Sure ! Ignoring other filtering, eg transposes etc,

This fails (no video produced):

Code: Select all

video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI', rw=1080, rh=608) 
This works:

Code: Select all

video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\H265_PROGRESSIVE_HDR10.mp4_concatenated.DGI') 
video = core.resize.Lanczos(video, width=1080, height=608) 
Input:
H265_PROGRESSIVE_HDR10.mp4_concatenated.mp4 in https://drive.google.com/drive/folders/ ... sp=sharing

Rocky wrote:
Sun Feb 18, 2024 3:06 pm
Could add rotates but not for a while.
Cool.

On a usage tack,
I have circa 200 vhs-c family tapes from the early 90's and the only capture device I have (i.e. can afford) is an existing vhs-to-dvd recorder (professional capture is prohibitively expensive). Output from that is speckly and fairly blocky even at best settings.
The new CUDASynth speed makes the cleanup process more doable and an incentive to actually start it :)
Thank you :salute:
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Attempting to duplicate. Sorry for causing you to have more on your plate with the VHS project. :(
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Ha ha. Crasherooo! Only for vapoursynth. I'm on it.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Please re-download test 4 for the fix.

The current bug I am working on is that for dn_show=1, the black areas are not fully black, the chroma is not being wiped out properly. That is kicking my butt. I'll emerge victorious, though, don't worry.

Some other new behavior. The temporal denoising won't kick in until two previous frames are available. Chroma temporal denoising had a little bug that I fixed.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Sun Feb 18, 2024 8:24 pm
Please re-download test 4 for the fix.
Nice, it works fine (of course).
Rocky wrote:
Sun Feb 18, 2024 8:24 pm
The current bug I am working on is that for dn_show=1, the black areas are not fully black, the chroma is not being wiped out properly. That is kicking my butt. I'll emerge victorious, though, don't worry.
He he, in other times and ways been there done that, I feel your determination.
Rocky wrote:
Sun Feb 18, 2024 8:24 pm
Some other new behavior. The temporal denoising won't kick in until two previous frames are available. Chroma temporal denoising had a little bug that I fixed.
OK, thanks. I perceived the temporal denoising to be fairly strong (prior download rather than the latest), so I'll probably tend to use that more for VHS sources. I'll give it another whirl using the latest download for fun.
edit: I suspect your fix may address what I was looking at !

I guess for interlaced sources (eg 576i VHS) spatial and temporal denoising occurs after dgsource deinterlacing.
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Lower dn_tthresh to reduce temporal denoising strength.

Features controlled by options without dn_ and h2s_ prefixes come first.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Rocky wrote:
Sun Feb 18, 2024 8:24 pm
The current bug I am working on is that for dn_show=1, the black areas are not fully black, the chroma is not being wiped out properly. That is kicking my butt. I'll emerge victorious, though, don't worry.
After a night of refreshing REM sleep fueled by 5mg of melatonin, I fixed this in half an hour this morning. I'm changing from black to white to denote filtered areas as it was at first, as it makes things easier to visualize. The reason I went to black for a while was it somewhat disguised the chroma bleed-through bug. 8-)

Revised test4 coming shortly.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Please re-download test4 to get the fixes for the dn_show=1 option.

Next I will update DGDenoise() standalone.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Mon Feb 19, 2024 9:03 am
I fixed this in half an hour this morning. I'm changing from black to white to denote filtered areas as it was at first, as it makes things easier to visualize. The reason I went to black for a while was it somewhat disguised the chroma bleed-through bug. 8-)
And who doesn't like a good cover-up from time to time :) Ask any politician :lol:
Testing new test4 and dn_show=1 now after arising at 11am and daydreaming for a while ...

edit: I get notifications for some things and interestingly one popped up about use of dgdenoise https://github.com/Dogway/Avisynth-Scripts/issues/84
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Pretty happy with the new dgdenoise (mode 3 spatial+temporal) as ran over some really rough old VHS 576i tapes.
Still fiddling with the denoise settings, the tapes were fairly poor condition.

I suppose I should test spatial and temporal separately, perhaps in the next day or three.

Couldn't find a handy set of .mpg files, so trimmed some of my own and popped copies into https://drive.google.com/drive/folders/ ... sp=sharing
A lot of tapes, captured via a affordable box which unfortunately creates a lot of blocking, are not yet considered.
I really do like it here.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

A quick question of an expert:

In the image below, top is unfiltered and bottom is filtered per

Code: Select all

import vapoursynth as vs		# this allows use of constants eg vs.YUV420P8 
from vapoursynth import core	# actual vapoursynth core 
core.std.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
core.avs.LoadPlugin(r'G:\HDTV\DGtest\Vapoursynth-x64\DGIndex\DGDecodeNV.dll') # do it like gonca https://forum.doom9.org/showthread.php?p=1877765#post1877765 
before_video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\RESULTS\00_PostcardsFromMannum_sample-unprocessed_interlaced_CUT.DGI', deinterlace=1, use_top_field=True, use_pf=False ) 
after_video = core.dgdecodenv.DGSource( r'G:\HDTV\DGtest\RESULTS\00_PostcardsFromMannum_sample-unprocessed_interlaced_CUT.DGI', deinterlace=1, use_top_field=True, use_pf=False, dn_enable=3, dn_quality="best", dn_strength=0.06, dn_cstrength=0.06, dn_tthresh=75.0, dn_show=0 ) 
after_video = core.avs.DGSharpen( after_video, strength=0.3 ) 
stacked_video = core.std.StackVertical( [before_video, after_video] ) 
stacked_video.set_output() 
capture_lightened_colours_from_clip_00.png
The filtered clip appears lightened (somewhat pleasingly in this case) by the denoising - is this to be expected or am I doing something wrong ?
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Thank you for the links and information.

The effect you mentioned is probably due to DGSharpen(). Try without it and report back.

I'm curious why you always load the AVS compat version along with the Vapoursynth native version:

core.std.LoadPlugin(...)
core.avs.LoadPlugin(...)
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Watch out, guys, we're currently defaulting to dn_quality="best" when I wanted it to be "good". Will fix for next test version.
User avatar
hydra3333
Posts: 406
Joined: Wed Oct 06, 2010 3:34 am
Contact:

CUDASynth

Post by hydra3333 »

Rocky wrote:
Tue Feb 20, 2024 4:32 am
I'm curious why you always load the AVS compat version along with the Vapoursynth native version:

core.std.LoadPlugin(...)
core.avs.LoadPlugin(...)
Nothing more than ongoing laziness on my part.
Circa 5 years ago I saw gonca did it and seemed to know what was a good thing, so I did it too.
It may have been to do with the filters gonca was using at the time, and I liked a generic approach so kept it even though it is likely no longer applicable.
So, I'm a sheep :)

PS I've been too lazy to get off my butt and google namespaces so I'm unsure what is in what namespace eg std.dgdecodenv. or something. Oh well, one day.

Many thanks for your beaut stuff !
I really do like it here.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Thank you. gonca told me it was to allow loading of our bundled filters that don't have native Vapoursynth versions. So that is OK and you can leave it that way.
User avatar
Rocky
Posts: 3621
Joined: Fri Sep 06, 2019 12:57 pm

CUDASynth

Post by Rocky »

Standalone DGDenoise() is working for spatial and temporal denoising. I'll give y'all a test5 build later today.
Post Reply