Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
27th April 2018, 00:35 | #6084 | Link |
Registered User
Join Date: Mar 2015
Location: New Zealand
Posts: 45
|
As a follow up to my post a few months ago re spectre/meltdown patching and its influence on x265 encoding fps,
(where I found on my skylake quad it made virtually no difference), I have now test my haswell system (4770k) with the microsoft microcode updates release two days ago (KB4091663 for 1703 I am running). The latest KB patches the microcode for spectre variant two (branch target injection), at boot time only. GRC's Inspectre shows my system is now fully patched. This latest KB DOES affect throughput fps. I have seen a drop of about 2.5%. Not a big deal luckily. I will just adjust my conservative OC from 4.1ghz to 4.2ghz. (which is +2.5%). Cheers, Divxmaster |
27th April 2018, 06:31 | #6085 | Link | |
Registered User
Join Date: Dec 2014
Posts: 240
|
Quote:
--crf 17 --keyint 240 --min-keyint 24 --profile main10 --level-idc 5.1 --output-depth 10 --ctu 32 --amp --vbv-bufsize 160000 --vbv-maxrate 160000 --me star --max-merge 5 --rc-lookahead 40 --lookahead-slices 4 --gop-lookahead 34 --ref 5 --hdr --hdr-opt --repeat-headers --no-info --no-deblock --no-sao --no-strong-intra-smoothing --high-tier --analysis-save c:\stats.dat --analysis-reuse-level 10 --scale-factor 2 --no-cutree Stats read encode at full 3840x1600: --crf 17 --keyint 240 --min-keyint 24 --profile main10 --level-idc 5.1 --output-depth 10 --ctu 32 --amp --vbv-bufsize 160000 --vbv-maxrate 160000 --me star --max-merge 5 --rc-lookahead 40 --lookahead-slices 4 --gop-lookahead 34 --ref 5 --hdr --hdr-opt --repeat-headers --no-info --no-deblock --no-sao --no-strong-intra-smoothing --high-tier --analysis-load c:\stats.dat --analysis-reuse-level 10 --scale-factor 2 --refine-inter 3 --refine-intra 4 --no-cutree With or withou AVX-512, result is the same. |
|
4th May 2018, 05:06 | #6087 | Link | |
Registered User
Join Date: Sep 2015
Posts: 48
|
Quote:
|
|
4th May 2018, 05:07 | #6088 | Link | |
Registered User
Join Date: Sep 2015
Posts: 48
|
Quote:
|
|
9th May 2018, 15:40 | #6090 | Link |
Registered User
Join Date: Feb 2007
Location: Sweden
Posts: 483
|
x265 v2.7+348-0968a46d6ba4 (GCC 7.3.0, 32 & 64-bit 8/10/12bit Multilib Windows Binaries)
Code:
https://bitbucket.org/multicoreware/x265/commits/all |
11th May 2018, 23:48 | #6092 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Does anyone see where my mistake is?
I'm trying to convert a 8bit pc range clip to 10bit x265 using: Code:
ffmpeg -y -threads 8 -i "C:\Users\Selur\Desktop\Color Range Test.MOV" -map 0:0 -an -sn -vsync 0 -strict -1 -pix_fmt yuv420p10le -f yuv4mpegpipe - | x265 --input - --output-depth 10 --y4m --profile main10 --no-open-gop --crf 18.00 --range full --colormatrix bt470bg --output "H:\Temp\x265.265" Uploaded the source to my google drive as Color Range Test.MOV. for the comparision I used: Code:
# Imports import vapoursynth as vs core = vs.get_core() # Loading Plugins core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # Loading H:\Output\Color Range Test.MOV using LibavSMASHSource clip = core.lsmas.LibavSMASHSource(source="H:/Output/Color Range Test.MOV") # making sure input color matrix is set as 470bg clip = core.resize.Point(clip, matrix_in_s="470bg") # making sure frame rate is set to 30000/1001 clip = core.std.AssumeFPS(clip, fpsnum=30000, fpsden=1001) # Making sure input color range is set to PC (full) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0) clip = core.text.Text(clip=clip, text="Original") clip = core.hist.Levels(clip=clip) clip2 = core.lsmas.LWLibavSource(source="H:/Temp/x265.265", format="YUV420P10", cache=0) # making sure input color matrix is set as 470bg clip2 = core.resize.Point(clip2, matrix_in_s="470bg") # making sure frame rate is set to 30000/1001 clip2 = core.std.AssumeFPS(clip2, fpsnum=30000, fpsden=1001) # Making sure input color range is set to PC (full) range. clip2 = core.std.SetFrameProp(clip=clip2, prop="_ColorRange", intval=0) clip2 = core.text.Text(clip=clip2, text="x265") # adjusting output color from: YUV420P8 to YUV420P10 clip2 = core.resize.Bicubic(clip=clip2, format=vs.YUV420P8) clip2 = core.hist.Levels(clip=clip2) clip = core.std.StackHorizontal([clip, clip2]) # Output clip.set_output() Cu Selur Ps.: Adding '-color_range 2' to the ffmpeg call doesn't help either. Last edited by Selur; 12th May 2018 at 00:18. |
12th May 2018, 10:24 | #6093 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
As you say this has nothing to do with x265.
You could try to "trick" ffmpeg by pretending the input was limited range. -vf zscale=rangein=limited:range=limited -pix_fmt yuv420p10le Maybe someone with more ffmpeg knowledge knows a "proper" solution ... Last edited by sneaker_ger; 12th May 2018 at 10:27. |
12th May 2018, 11:20 | #6094 | Link | |||
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
Quote:
using: Code:
-vf zscale=rangein=full:range=full Quote:
Cu Selur Last edited by Selur; 12th May 2018 at 11:23. |
|||
12th May 2018, 17:18 | #6095 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
maybe there is a bug with full range ?
waveform/histograms only match if you use lossless (even compared to low crf like --crf 8, where you 'd only expect tiny differences) , regardless if you use vapoursynth input or ffmpeg scaling with rawvideo pipe crf8 - waveform is compressed Code:
ffmpeg -i "Color Range Test.MOV" -vf scale=iw:ih:in_range=pc:out_range=pc,format=yuv420p10le -f rawvideo - | x265_10bit.exe --fps 30000/1001 --input-res 1280x720 --input-depth 10 --output-depth 10 --input-csp i420 --crf 8.00 --range full --colormatrix smpte170m -o rawpipe_x265crf8.265 - Code:
ffmpeg -i "Color Range Test.MOV" -vf scale=iw:ih:in_range=pc:out_range=pc,format=yuv420p10le -f rawvideo - | x265_10bit.exe --fps 30000/1001 --input-res 1280x720 --input-depth 10 --output-depth 10 --input-csp i420 --lossless --range full --colormatrix smpte170m -o rawpipe_x265lossless.265 - vspipe y4m --crf 8 waveform is compressed Code:
vspipe --y4m 1.vpy - | x265_10bit.exe --y4m --crf 8.00 --colormatrix smpte170m --range full -o vs_x265.265 - vspipe y4m --lossless waveform is ok Code:
vspipe --y4m 1.vpy - | x265_10bit.exe --y4m --lossless --colormatrix smpte170m --range full -o vs_x265_lossless.265 - Code:
clip = core.lsmas.LibavSMASHSource(r'F:\Color Range Test.MOV') clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10) clip.set_output() |
12th May 2018, 20:28 | #6096 | Link | |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Quote:
Cu Selur |
|
13th May 2018, 00:06 | #6098 | Link | |
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
It affects x264 too . vs rawpipe too instead of y4m for fun Code:
vspipe 1.vpy - | x264_10bit --demuxer raw --input-csp i420 --input-depth 10 --input-res 1280x720 --fps 30000/1001 --crf 8.00 --colormatrix smpte170m --input-range pc --range pc -o vs_raw_x264.264 - Something is up... |
|
13th May 2018, 08:44 | #6100 | Link | |
Registered User
Join Date: Jul 2015
Posts: 708
|
Quote:
I test conveters: Code:
ffmpeg_080518.exe -i "Color Range Test.MOV" -f yuv4mpegpipe -vf scale=1280:720:in_color_matrix=470bg:in_range=full:out_color_matrix=470bg:out_range=full,format=yuv420p10,lutyuv=val:val:val -strict -1 - | x264-10bit.exe --demuxer y4m --muxer mp4 --input-csp i420 --input-depth 10 --input-range pc --output-csp i420 --threads 4 --preset veryslow --tune grain --crf 28 --fps 29.970 --keyint 60 --nal-hrd none --colormatrix bt470bg --colorprim bt709 --transfer bt709 --range pc --output "x264_420p10le_crf28_1.mp4" - Code:
x264-10bit_2851.exe --muxer mp4 --input-csp i420 --input-depth 8 --input-range pc --output-csp i420 --threads 4 --preset veryslow --tune grain --crf 28 --fps 29.970 --keyint 60 --nal-hrd none --colormatrix bt470bg --colorprim bt709 --transfer bt709 --range pc --output "x264_420p10le_crf28_2.mp4" "Color Range Test.MOV" Code:
bpgenc_0.9.8.exe -v -b 10 -f 420 -c ycbcr_bt709 -e x265 -m 9 -q 28 -o x265_420p10le_crf28.bpg rgba.png 1)bad range, 2)bad range, no latest version 10bit 2901 (2018), 3)good. Conclusion: For me, the problem is in BT470bg. Last edited by Jamaika; 13th May 2018 at 09:28. |
|
|
|