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
#22
Die niedrige CPU-Auslastung bei mir hatte nichts mit avs2yuv64 zu tun. Bin nicht dahinter gestiegen was der Grund für die Limitierung ist, die GPU limitiert da im mode 0 von fft3dgpu noch lange nicht.
Hab mal ffmpeg, avs2yuv64 und Vapoursynth/Vspipe mit verschiedenen vielen MT threads mit meinem benchmark batchfile gegeneinander antreten lassen. Jede MT thread Einstellung wurde durch eine Wiederholungsmessung bestätigt und der höhere Wert gespeichert:

ffmpeg skript:
REM ### First 3 lines will be skipped when generating AVS/VPY script from this file. 2nd line must have vspipe/ffmpeg/avs2yuv64 call. Do not remove GOTO :EOF in 3rd line!
"%hybridFolderWin%\64bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 8 -i "%cd%\%dynFileName%.avs" -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p10le -strict -1 -vsync 0 -f rawvideo - | "%hybridFolderWin%\64bit\x264.exe" --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 raw --input-res 1920x1012 --input-csp i420 --input-range tv --input-depth 10 --fps 24/1 --output-depth 10 --output "%cd%\%dynFileName%.264" -
goto :EOF

ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\LoadDll.dll")
LoadDLL("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\d3d9.dll")
LoadPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
LoadCPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\ffms2.dll")
LoadPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\FFT3dGPU.dll")
# loading source: $$SOURCEVID$$
# color sampling YV24@10, matrix: bt709, scantyp: progressive, luminance scale: limited
#####
LWLibavVideoSource("$$SOURCEVID$$",cache=false,format="YUV444P16", prefer_hw=0,repeat=true)
# FFVideoSource("$$SOURCEVID$$",colorspace="YV12")
#####
# current resolution:
# denoising using fft3dgpu
#####
# ConvertToYUY2(interlaced=false)
FFT3DGPU(bw=$$BW$$,bh=$$BH$$,plane=$$PLANE$$,mode=$$MODE$$,bordersize=$$BORDERSIZE$$,precision=$$PRECISION$$)
#####
# Dithering from 16 to 10bit for encoder
ConvertBits(10)
# adjust color to YV12 (color matrix: Rec709)
ConvertToYUV420()
#####
PreFetch($$MTTHREADS$$)
# setting output fps to 24.000fps
AssumeFPS(24,1)
#####
#  output: color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last

ffmpeg Ergebnis: 15.08 fps
x1 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 14.87 fps, 4020.75 kb/s

x2 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 15.08 fps, 4020.80 kb/s

x3 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 15.04 fps, 4020.33 kb/s

x4 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 14.97 fps, 4020.91 kb/s

x5 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 14.98 fps, 4020.83 kb/s

x6 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 14.94 fps, 4020.88 kb/s

x7 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 14.90 fps, 4020.76 kb/s

x8 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source ffmpeg
encoded 1730 frames, 14.90 fps, 4020.69 kb/s


avs2yuv64 skript:
REM ### First 3 lines will be skipped when generating AVS/VPY script from this file. 2nd line must have vspipe/ffmpeg/avs2yuv64 call. Do not remove GOTO :EOF in 3rd line!
"%hybridFolderWin%\64bit\Avisynth\avs2yuv64.exe" "%cd%\%dynFileName%.avs" -depth 10 -o - | "%hybridFolderWin%\64bit\x264.exe" --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 "%cd%\%dynFileName%.264" -
goto :EOF

ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\LoadDll.dll")
LoadDLL("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\d3d9.dll")
LoadPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\LSMASHSource.dll")
LoadCPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\ffms2.dll")
LoadPlugin("$$HYBRIDFOLDER$$\64bit\Avisynth\avisynthPlugins\FFT3dGPU.dll")
# loading source: $$SOURCEVID$$
# color sampling YV24@10, matrix: bt709, scantyp: progressive, luminance scale: limited
#####
LWLibavVideoSource("$$SOURCEVID$$",cache=false,format="YUV444P16", prefer_hw=0,repeat=true)
# FFVideoSource("$$SOURCEVID$$",colorspace="YV12")
#####
# current resolution:
# denoising using fft3dgpu
#####
# ConvertToYUY2(interlaced=false)
FFT3DGPU(bw=$$BW$$,bh=$$BH$$,plane=$$PLANE$$,mode=$$MODE$$,bordersize=$$BORDERSIZE$$,precision=$$PRECISION$$)
#####
# Dithering from 16 to 10bit for encoder
ConvertBits(10)
# adjust color to YV12 (color matrix: Rec709)
ConvertToYUV420()
#####
PreFetch($$MTTHREADS$$)
# setting output fps to 24.000fps
AssumeFPS(24,1)
#####
#  output: color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last

avs2yuv64 Ergebnis: 15.82 fps
x1 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.50 fps, 4020.42 kb/s

x2 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.76 fps, 4020.51 kb/s

x3 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.82 fps, 4020.50 kb/s

x4 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.70 fps, 4020.85 kb/s

x5 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.65 fps, 4020.69 kb/s

x6 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.69 fps, 4020.78 kb/s

x7 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.68 fps, 4020.87 kb/s

x8 FFT3DGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source avs2yuv64
encoded 1730 frames, 15.65 fps, 4020.56 kb/s


vspipe / VapourSynth skript:
REM ### First 3 lines will be skipped when generating AVS/VPY script from this file. 2nd line must have vspipe/ffmpeg call. Do not remove GOTO :EOF in 3rd line!
"%hybridFolderWin%\64bit\Vapoursynth\vspipe.exe" "%cd%\%dynFileName%.vpy" - -c y4m | "%hybridFolderWin%\64bit\x264.exe" --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 12 --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 auto --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 "%cd%\%dynFileName%.264" -
goto :EOF

# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("$$HYBRIDFOLDER_VS$$/64bit/vsfilters/Support/libfftw3f-3.dll")
Dllref = ctypes.windll.LoadLibrary("$$HYBRIDFOLDER_VS$$/64bit/Avisynth/avisynthPlugins/d3d9.dll")
# getting Vapoursynth core
core = vs.core

# Limit thread count
core.num_threads = $$MTTHREADS$$

# Loading Plugins
core.std.LoadPlugin(path="$$HYBRIDFOLDER_VS$$/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
core.std.LoadPlugin(path="$$HYBRIDFOLDER_VS$$/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
core.avs.LoadPlugin(path="$$HYBRIDFOLDER_VS$$/64bit/Avisynth/avisynthPlugins/LoadDll.dll")
core.avs.LoadPlugin(path="$$HYBRIDFOLDER_VS$$/64bit/Avisynth/avisynthPlugins/FFT3dGPU.dll")

# LOADING SOURCE VIA LSMASH OR FFINDEX
clip = core.lsmas.LWLibavSource(source="$$SOURCEVID_VS$$", 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)

# Execute fft3dGPU
clip = core.avs.fft3dGPU(c1=clip,bw=$$BW$$,bh=$$BH$$,plane=$$PLANE$$,mode=$$MODE$$,bordersize=$$BORDERSIZE$$,precision=$$PRECISION$$)

# Resizing using bicubic spline16
# clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1920, h=1080, interlaced=False, interlacedd=False)

# 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()

Ergebnis vspipe/VapourSynth: 15.91 fps
x2 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.90 fps, 4010.25 kb/s

x4 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.90 fps, 4010.27 kb/s

x6 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.89 fps, 4010.29 kb/s

x8 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.89 fps, 4010.33 kb/s

x10 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.91 fps, 4010.36 kb/s

x12 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.90 fps, 4010.21 kb/s

x14 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.88 fps, 4010.30 kb/s

x16 core.avs.fft3dGPU(mode=0,bw=32,bh=32,precision=1,bordersize=1,plane=4) 10bit source vspipe
encoded 1730 frames, 15.88 fps, 4010.30 kb/s

-> Avs2yuv ist bei mir auch 4,9% schneller als ffmpeg, aber irgendwas limitiert hier. Normalerweise ist auch VapourSynth mehr als 5,5% schneller als ffmpeg.

Mir ist aufgefallen, dass distributor() nicht von Hybrid ins AVS-skript eingefügt wird, egal ob er unter filtering->avisynth->misc->script->miscellaneous aktiv ist oder nicht.
Reply


Messages In This Thread
RE: 1920x1012 10bit YUV444 file wird in AviSynth falsch verarbeitet - by mogobime - 08.05.2022, 20:17

Forum Jump:


Users browsing this thread: 2 Guest(s)