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
#29
Bin noch einer anderen Sache nachgegangen, die mir in Hybrid bei AviSynth usage aufgefallen ist.
Hat jetzt nichts mit fft3dgpu zu tun, sondern rein damit wie 10bit yuv444p10 files gehandelt werden.
Sowohl die 1080p version, als auch die 4K version des files, das ich häufiger gebencht habe wird nämlich - im Gegensatz zur Umsetzung in VapourSynth - immer als YUV444p16 file identifiziert und anschließend wird deswegen unnötigerweise converBits(10) und ConvertToYUV444() ausgeführt.

Hab hier mal die Version die der Hybrid AviSynth Umsetzung gebencht (wieder 3 Wiederholungsmessungen pro prefetch setting für bessere Genauigkeit):
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" -depth 10 -nstdr "%cd%\%dynFileName%.avs" -o - | "%hybridFolderWin%\64bit\x264.exe" --crf 19.00 --profile high444 --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 i444 --output-depth 10 --output "%cd%\%dynFileName%.264" -
goto :EOF

ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE",MT_MULTI_INSTANCE)
SetFilterMTMode("FFT3dGPU",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)
# LWLibavVideoSource("$$SOURCEVID$$",cache=false,format="YUV444P10", prefer_hw=0,repeat=true)
# FFVideoSource("$$SOURCEVID$$",colorspace="YV12")
#####
# current resolution:

# scaling to 3840x2026
Spline16Resize(3840,2026)

# Converting from 16 to 10bit for encoder
ConvertBits(10)

# adjust color to YV24 (color matrix: Rec709)
ConvertToYUV444()
PreFetch($$DYNMEASUREVAR$$)

#####
# setting output fps to 24.000fps
AssumeFPS(24,1)
#####
#  output: color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last
--------------------------------------------------------------------------------

REPLACEMENTS:
$$SIGMA$$ replaced with '2.00'
$$BW$$ replaced with '32'
$$BH$$ replaced with '32'
$$BT$$ replaced with '3'
$$PLANE$$ replaced with '4'
$$MODE$$ replaced with '0'
$$PRECISION$$ replaced with '1'
$$BORDERSIZE$$ replaced with '1'
$$HYBRIDFOLDER$$ replaced with 'C:\Program Files\Hybrid'
$$HYBRIDFOLDER_VS$$ replaced with 'C:/Program Files/Hybrid'
$$SOURCEVID$$ replaced with 'C:\BENCH_AVS_VPS_FILTER\Hybrid YUV444P10 handling\cut_TGM_TLR2_IMAX_3840x2025_H265_YUV444_10BIT-thedigitaltheater.mkv'
$$SOURCEVID_VS$$ replaced with 'C:/BENCH_AVS_VPS_FILTER/Hybrid YUV444P10 handling/cut_TGM_TLR2_IMAX_3840x2025_H265_YUV444_10BIT-thedigitaltheater.mkv'
$$DYNMEASUREVAR$$ replaced dynamically [start,step,end] with '0,2,8'
$$DYNMEASUREVARGAP$$ replaced dynamically [start,step,end] with '0,2,8' +- gap of '+1'

--------------------------------------------------------------------------------

x0 convertbits(10)-ConvertToYUV444 - lsmash - avs2yuv - 4K YUV444P16 in YUV444P10 out 0-8T
encoded 1666 frames, 6.62 fps, 28606.15 kb/s

x2 convertbits(10)-ConvertToYUV444 - lsmash - avs2yuv - 4K YUV444P16 in YUV444P10 out 0-8T
encoded 1666 frames, 6.69 fps, 28607.94 kb/s

x4 convertbits(10)-ConvertToYUV444 - lsmash - avs2yuv - 4K YUV444P16 in YUV444P10 out 0-8T
encoded 1666 frames, 6.68 fps, 28612.34 kb/s

x6 convertbits(10)-ConvertToYUV444 - lsmash - avs2yuv - 4K YUV444P16 in YUV444P10 out 0-8T
encoded 1666 frames, 6.69 fps, 28609.66 kb/s

x8 convertbits(10)-ConvertToYUV444 - lsmash - avs2yuv - 4K YUV444P16 in YUV444P10 out 0-8T
encoded 1666 frames, 6.64 fps, 28607.28 kb/s

Und hier eine Variante, die der Umsetzung in VapourSynth entsprechen würde, bei welcher das file korrekt als YUV444P10 identifiziert wird, und die 2 zusätzlichen Umwandlungsschritte wegfallen:

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" -depth 10 -nstdr "%cd%\%dynFileName%.avs" -o - | "%hybridFolderWin%\64bit\x264.exe" --crf 19.00 --profile high444 --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 i444 --output-depth 10 --output "%cd%\%dynFileName%.264" -
goto :EOF

ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE",MT_MULTI_INSTANCE)
SetFilterMTMode("FFT3dGPU",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)
LWLibavVideoSource("$$SOURCEVID$$",cache=false,format="YUV444P10", prefer_hw=0,repeat=true)
# FFVideoSource("$$SOURCEVID$$",colorspace="YV12")
#####
# current resolution:

# scaling to 3840x2026
Spline16Resize(3840,2026)

# Converting from 16 to 10bit for encoder
# ConvertBits(10)

# adjust color to YV24 (color matrix: Rec709)
# ConvertToYUV444()

PreFetch($$DYNMEASUREVAR$$)
#####
# setting output fps to 24.000fps
AssumeFPS(24,1)
#####
#  output: color sampling YUY2@10, matrix: bt709, scantyp: progressive, luminance scale: limited
return last
--------------------------------------------------------------------------------

REPLACEMENTS:
$$SIGMA$$ replaced with '2.00'
$$BW$$ replaced with '32'
$$BH$$ replaced with '32'
$$BT$$ replaced with '3'
$$PLANE$$ replaced with '4'
$$MODE$$ replaced with '0'
$$PRECISION$$ replaced with '1'
$$BORDERSIZE$$ replaced with '1'
$$HYBRIDFOLDER$$ replaced with 'C:\Program Files\Hybrid'
$$HYBRIDFOLDER_VS$$ replaced with 'C:/Program Files/Hybrid'
$$SOURCEVID$$ replaced with 'C:\BENCH_AVS_VPS_FILTER\Hybrid YUV444P10 handling\cut_TGM_TLR2_IMAX_3840x2025_H265_YUV444_10BIT-thedigitaltheater.mkv'
$$SOURCEVID_VS$$ replaced with 'C:/BENCH_AVS_VPS_FILTER/Hybrid YUV444P10 handling/cut_TGM_TLR2_IMAX_3840x2025_H265_YUV444_10BIT-thedigitaltheater.mkv'
$$DYNMEASUREVAR$$ replaced dynamically [start,step,end] with '0,2,8'
$$DYNMEASUREVARGAP$$ replaced dynamically [start,step,end] with '0,2,8' +- gap of '+1'

--------------------------------------------------------------------------------

x0 lsmash - avs2yuv - 4K YUV444P10 in YUV444P10 out 0-8T
encoded 1666 frames, 6.76 fps, 28592.31 kb/s

x2 lsmash - avs2yuv - 4K YUV444P10 in YUV444P10 out 0-8T
encoded 1666 frames, 6.79 fps, 28589.79 kb/s

x4 lsmash - avs2yuv - 4K YUV444P10 in YUV444P10 out 0-8T
encoded 1666 frames, 6.83 fps, 28592.18 kb/s

x6 lsmash - avs2yuv - 4K YUV444P10 in YUV444P10 out 0-8T
encoded 1666 frames, 6.79 fps, 28590.56 kb/s

x8 lsmash - avs2yuv - 4K YUV444P10 in YUV444P10 out 0-8T
encoded 1666 frames, 6.71 fps, 28591.17 kb/s

Sind 2.1% Unterschied bei den Bestwerten und jedes einzelne prefetch setting ist ebenfalls schneller.
Vermutlich wäre der Unterschied noch etwas deutlicher ausgefallen, hätte ich ein x264 preset verwendet, welches dazu führt, dass meine CPU beim encoding wirklich konstant mit 100% ausgelastet ist, aber das kostet bei 3 Wiederholungsmessungen auf ner lahmen CPU halt wieder jede Menge Zeit...

Ich weiß, hört sich auf den ersten Blick etwas pingelig an, aber sollte man in diesen Zeiten nicht versuchen jeden (Energie) Effizienzgewinn zu heben, der "auf der Straße" bzw. im Code liegt?  Undecided

Im Anhang nochmal die aktuellste Version des bench-batchfiles mit den dafür gemoddeten Skripten und Messergebnissen, falls du oder jemand anderes das auf seinem System nachvollziehen will.
Oder das ganze hier zusammen mit der entsprechenden YUV444P10 version des Videos: Link
Reply


Messages In This Thread
RE: 1920x1012 10bit YUV444 file wird in AviSynth falsch verarbeitet - by mogobime - 15.05.2022, 19:22

Forum Jump:


Users browsing this thread: 1 Guest(s)