This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] 1920x1012 10bit YUV444 file wird in AviSynth falsch verarbeitet
#1
Hi,

bin beim basteln an einem benchmark-batchfile für AVS/VPS Filter (momentan geht's hauptsächlich um das berühmte fft3dgpu), für das ich die von Hybrid generierten AVS / VPS Skripte als Basis nehme, bei einem 1920x1012 10bit YUV444 file darauf gestoßen, dass es von Hybrid bei der Verwendung von AVS nicht korrekt als 10bit verarbeitet wird.

Jedenfalls meckert mindestens der fft3dgpu vorangestellte ConvertToYUY2(interlaced=false) Befehl, dass er nur 8bit input verarbeitet (wenn ich das script außerhalb von Hybrid laufen lasse, dort wird halt "Crash" angezeigt).
Es wird auch statt ffmpeg avs2yuv64 verwendet, obwohl 64bit AviSynth eingestellt ist:
avs2yuv64 "C:\Users\Anonymous\AppData\Local\Temp\encodingTempSynthSkript_2022-05-08@14_02_54_1910.avs" -depth 10 -o - | x264 --crf 19.00 --profile high10 --level 5.2 --ref 1 --no-mixed-refs --keyint 250 --min-keyint 0 --scenecut 40 --bframes 3 --b-bias 0 --b-pyramid normal --direct spatial --b-adapt 1 --sync-lookahead 16 --cplxblur 20.0 --qcomp 0.60 --qblur 0.50 --mbtree --rc-lookahead 10 --ipratio 1.40 --pbratio 1.30 --chroma-qp-offset 0 --qpmin 0 --qpmax 69 --qpstep 4 --partitions i4x4,i8x8,p8x8,b8x8 --8x8dct --me hex --merange 16 --mvrange -1 --subme 2 --cabac --trellis 0 --weightp 1 --aq-mode 1 --aq-strength 1.00 --vbv-maxrate 240000 --vbv-bufsize 720000 --nr 0 --deadzone-inter 21 --deadzone-intra 11 --cqm flat --threads 16 --sar 1:1 --deblock 0:0 --non-deterministic --range tv --colormatrix bt709 --demuxer y4m  --input-range tv --fps 24/1 --output-csp i420 --output-depth 10 --output "C:\Users\Anonymous\AppData\Local\Temp\2022-05-08@14_02_54_1910_02.264" -

AVS-script:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\64bit\Avisynth\avisynthPlugins\LoadDll.dll")
LoadDLL("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\d3d9.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\64bit\Avisynth\avisynthPlugins\FFT3dGPU.dll")
# loading source: C:\TMP\FFT3DGPU FFT3DFILTER NEO_FFT3D\4K\cut_TGM_TLR2_IMAX_1920x1012_H265_YUV444_10BIT-thedigitaltheater.mkv
# color sampling YV24@10, matrix: bt709, scantyp: progressive, luminance scale: limited
LWLibavVideoSource("C:\TMP\FFT3DGPU FFT3DFILTER NEO_FFT3D\4K\cut_TGM_TLR2_IMAX_1920x1012_H265_YUV444_10BIT-thedigitaltheater.mkv",cache=false,format="YUV444P16", prefer_hw=0,repeat=true)
# current resolution: 1920x1012
# denoising using fft3dgpu
ConvertToYUY2(interlaced=false)
FFT3DGPU(plane=4,mode=2,bordersize=1,precision=1)
# Dithering from 16 to 10bit for encoder
ConvertBits(10)
# adjust color to YV12 (color matrix: Rec709)
ConvertToYUV420()
PreFetch(2)
# setting output fps to 24.000fps
AssumeFPS(24,1)
#  output: color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last

Das VPS-script läuft zwar (ich musste hier allerdings fft3dfilter verwenden, da fft3dgpu ja in Hybrid nicht vorhanden ist) aber ich bin mir nicht sicher, ob die Verarbeitung korrekt ist, da hier auf color range tv reduziert wird (zumindest laut Kommentar):
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
core = vs.core
# Limit thread count to 16
core.num_threads = 16
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/fft3dfilter.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# source: 'C:\TMP\FFT3DGPU FFT3DFILTER NEO_FFT3D\4K\cut_TGM_TLR2_IMAX_1920x1012_H265_YUV444_10BIT-thedigitaltheater.mkv'
# current color space: YUV444P10, bit depth: 10, resolution: 1920x1012, fps: 24, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading C:\TMP\FFT3DGPU FFT3DFILTER NEO_FFT3D\4K\cut_TGM_TLR2_IMAX_1920x1012_H265_YUV444_10BIT-thedigitaltheater.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/TMP/FFT3DGPU FFT3DFILTER NEO_FFT3D/4K/cut_TGM_TLR2_IMAX_1920x1012_H265_YUV444_10BIT-thedigitaltheater.mkv", format="YUV444P10", cache=0, prefer_hw=0)
# Setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=1)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 24
clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1)
# denoising using FFT3DFilter
clip = core.fft3dfilter.FFT3DFilter(clip=clip)
# adjusting output color from: YUV444P10 to YUV420P10 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 24.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1)
# Output
clip.set_output()


Gruß, mogobime
Reply
#2
Ich schau mal drauf. Problem ist, dass es YUY2 nur in 8 bit gibt, aber neuere FFT3DGPU Versionen sollten auch YUV422 unterstützen.
Reply
#3
Ich finde gerade keine Möglichkeit eine Datei anzuhängen, und der Debug ist zu groß um ihn als Text zu posten,...
Reply
#4
Quote:Ich finde gerade keine Möglichkeit eine Datei anzuhängen, und der Debug ist zu groß um ihn als Text zu posten,...
Debug packen mit 7z, rar, zip,...

Quote:Das VPS-script läuft zwar (ich musste hier allerdings fft3dfilter verwenden, da fft3dgpu ja in Hybrid nicht vorhanden ist) a
Weil es keine FFT3DGPU Version für Vapoursynth gibt,...

Quote:ob die Verarbeitung korrekt ist, da hier auf color range tv reduziert wird (zumindest laut Kommentar)
Sowohl in AviSynth als auch Vaporusynth wird davon ausgegangen, dass die Luma Scale limited range ist.
In keinem der beiden Skripte wird diese Information wirklich benutzt, da keine RGB<>YUV Konvertierung statt findet.
Beides Skripte und auch das Encoding gehen aber von limted range aus.

Cu Selur
Reply
#5
Wo ist denn hier der button für nen Anhang im Forum Blush
Ich hab dir mal nen Link per PM geschickt.
Reply
#6
Hab Dir mal ne Lin zu ner dev Version zum Testen geschickt.
Quote:Wo ist denn hier der button für nen Anhang im Forum
New Reply -> [Image: Attachment.png]

Cu Selur
Reply
#7
Den größten Knopf aller Zeiten übersehen Blush 

Das war wohl zu schnell mit der dev-Version, siehe Anhang.


Attached Files Thumbnail(s)
   
Reply
#8
Grummel, ist vermutlich ein problem mit ner dll.
Habe auf die aktuelle Qt6.3 aktualisiert, hatte eigentlich nur die dlls im Hybrid Hauptordner erneuert.
-> Ich schau mal drauf. -> Installer hat noch die alten dlls reingepackt.

Cu Selur
Reply
#9
dass trotz eingestelltem 64bit AviSynth avs2yuv64 statt ffmpeg bei dem video verwendet wurde, war ein bug, oder? Falls nicht, was ist der Hintergrund? Scheint ziemlich zu bremsen das tool.
Reply
#10
Quote:dass trotz eingestelltem 64bit AviSynth avs2yuv64 statt ffmpeg bei dem video verwendet wurde, war ein bug, oder?
Ne,..
using avs2yuv due to high bit depth,..

Bin mir auch nicht sicher ob die 64bit FFmpeg Version Avisynth unterstützt,...

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)