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.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th April 2018, 21:51   #6021  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 240
is it just me? using cpu capabilities with the new x265 not listing AVX-512. i7-7820X
jlpsvk is offline   Reply With Quote
Old 12th April 2018, 22:56   #6022  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,403
Don't forget the "--asm avx512", it isn't enabled by default. This seems good if it is slower on most systems due to the multiplier offsets for AVX-512.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 12th April 2018, 23:01   #6023  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 240
@Asmodian

aaaaah... forgot it..
jlpsvk is offline   Reply With Quote
Old 12th April 2018, 23:28   #6024  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,336
Quote:
Originally Posted by Stephen R. Savage View Post
To be fair, the AVX2 speedup is still larger than the frequency penalty, so it made sense.
It is now, because they reigned in AVX2 use in some irrelevant functions with minimal speedups to reduce the effect of downclocks. They even had a presentation about that "adventure" and their findings on some conference once
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 13th April 2018, 15:43   #6025  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 59
no AVX512:
encoded 1780 frames in 169.38s (10.51 fps), 2541.97 kb/s, Avg QP:20.40
AVX512:
encoded 1780 frames in 161.94s (10.99 fps), 2541.97 kb/s, Avg QP:20.40

makes a ~5% speed increase
considering avx512 encode was almost 10°C cooler, so maybe i can get away with +100MHz. i like it
RieGo is offline   Reply With Quote
Old 13th April 2018, 17:15   #6026  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
okay, so nice, but not worth buying a new cpu because of it.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 14th April 2018, 03:01   #6027  |  Link
Xizer
Registered User
 
Join Date: Sep 2008
Posts: 4
Is anyone else having problems with getting it to work on Skylake Xeons?

x265 crashes on my Xeon Platinum 8176 server when I start it with the --asm avx512 flag.

Quote:
Error: fwrite() call failed when writing frame: 3, plane: 2, errno: 32
Output 80 frames in 13.46 fps (5.90 fps)
It'll work fine on the Xeon Platinum machine as soon as I remove the avx512 flag.

And it works on my i9 7940X with the avx512 flag.
Xizer is offline   Reply With Quote
Old 14th April 2018, 03:30   #6028  |  Link
WhatZit
Registered User
 
Join Date: Aug 2016
Posts: 60
Quote:
Originally Posted by Selur View Post
okay, so nice, but not worth buying a new cpu because of it.
Not until the i7-9700K shows up (November 2018?).
WhatZit is offline   Reply With Quote
Old 14th April 2018, 08:41   #6029  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
Quote:
Originally Posted by Xizer View Post
x265 crashes on my Xeon Platinum 8176 server when I start it with the --asm avx512 flag.
One bug that can lead to crash is fixed in version 2.7+338 so please do not use older versions. Which version do you use?
Ma is offline   Reply With Quote
Old 14th April 2018, 10:59   #6030  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 59
i'm seeing very inconsistent results

CRF-20 preset-"medium"
--------------------
Run1:
encoded 1128 frames in 27.42s (41.14 fps), 3355.47 kb/s, Avg QP:20.21
Run2 (AVX512):
encoded 1128 frames in 30.23s (37.32 fps), 3355.47 kb/s, Avg QP:20.21
Run3:
encoded 1128 frames in 27.77s (40.62 fps), 3355.47 kb/s, Avg QP:20.21
Run4 (AVX512):
encoded 1128 frames in 27.04s (41.71 fps), 3355.47 kb/s, Avg QP:20.21

but temps are still very low on avx512. i didn't expect this. probably x265 just uses very little avx512 and that's why we don't see much improvement - if any - running on lowered frequency.
maybe we can run at default speed without getting too much heat/power, if we only use it on x265... i'll give it a try

btw: i agree that avx512 is not worth getting a new cpu
RieGo is offline   Reply With Quote
Old 14th April 2018, 22:54   #6031  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
x265 2.7+340-aa9102400f24

remove unused asmname from x265_param; added a newline in the help
(fixed VMAF warning not applicable under Windows)
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 15th April 2018 at 18:37. Reason: Not the fixed version yet
LigH is offline   Reply With Quote
Old 15th April 2018, 18:31   #6032  |  Link
Xizer
Registered User
 
Join Date: Sep 2008
Posts: 4
Quote:
Originally Posted by LigH View Post
x265 2.7+340-aa9102400f24

remove unused asmname from x265_param (may fix some crashes on Xeons); added a newline in the help
(fixed VMAF warning not applicable under Windows)
2.7+340 is the version I'm using when it crashes.
Attached Images
 
Xizer is offline   Reply With Quote
Old 15th April 2018, 18:36   #6033  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Sorry to hear ... so the fix is not yet committed, only proposed?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 15th April 2018, 19:33   #6034  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
Quote:
Originally Posted by Xizer View Post
2.7+340 is the version I'm using when it crashes.
Thanks for more info. It looks like more serious bug (x265 works for a while). The error message is probably from decoding app that writes graphics data via pipe to x265.

There are many possible reasons for the crash, one of them is the OS (and msvcrt.dll file in your OS). Could you test VS 2015 and VS 2017 x265 binaries? They are not based on msvcrt.dll.
Ma is offline   Reply With Quote
Old 15th April 2018, 20:22   #6035  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
I don't have such compilers installed; someone else may have to build them.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 15th April 2018, 21:24   #6036  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,556
x265-2.7+336-07defe235cde.7z VS 17 x64, crt is statically linked so no install needed. Debug pdbs included.
foxyshadis is offline   Reply With Quote
Old 15th April 2018, 22:03   #6037  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
Bisection is one of the most common method of finding bugs.
In source file common/x86/asm-primitives.cpp it is function pointers assignment with avx512 code -- from line # 4696 to 5385.
We can turn off (comment) first half of this functions (x265-1.exe) and then second half (x265-2.exe).
You can download avx512-bisect1.7z VS 2015 binaries with diff files -- if x265.exe (from clean sources) hangs, please try x265-1.exe and then x265-2.exe -- it should be that one of them hangs and second not.
Please report back the results (which from the 3 binaries hangs and which not).
Ma is offline   Reply With Quote
Old 15th April 2018, 22:38   #6038  |  Link
Xizer
Registered User
 
Join Date: Sep 2008
Posts: 4
Quote:
Originally Posted by Ma View Post
Bisection is one of the most common method of finding bugs.
In source file common/x86/asm-primitives.cpp it is function pointers assignment with avx512 code -- from line # 4696 to 5385.
We can turn off (comment) first half of this functions (x265-1.exe) and then second half (x265-2.exe).
You can download avx512-bisect1.7z VS 2015 binaries with diff files -- if x265.exe (from clean sources) hangs, please try x265-1.exe and then x265-2.exe -- it should be that one of them hangs and second not.
Please report back the results (which from the 3 binaries hangs and which not).
All three binaries crash with the avx512 flag I'm afraid.

Is there additional information that can be provided for debug?
Attached Files
File Type: txt DxDiag.txt (75.4 KB, 43 views)
Xizer is offline   Reply With Quote
Old 15th April 2018, 22:56   #6039  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 326
Quote:
Originally Posted by Xizer View Post
All three binaries crash with the avx512 flag I'm afraid.

Is there additional information that can be provided for debug?
Thanks for the info.

Could you post results of the command
x265 -V && x265 --asm avx2 -V && x265 --asm avx512 -V
For example in my system it looks like
Code:
F:\x265p\ma\avx512>x265 -V && x265 --asm avx2 -V && x265 --asm avx512 -V
x265 [info]: HEVC encoder version 2.7+340-aa9102400f24
x265 [info]: build info [Windows][MSVC 1900][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: HEVC encoder version 2.7+340-aa9102400f24
x265 [info]: build info [Windows][MSVC 1900][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: HEVC encoder version 2.7+340-aa9102400f24
x265 [info]: build info [Windows][MSVC 1900][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512
This bug could be not related directly to avx512 code -- could you check if it hangs if you use '--asm avx2' instead of '--asm avx512' (it is important to use --asm avx2 option).
------------------------------------------------------
Your OS is Win 8.1 that do not support avx512. This bug in x265 is not technical but conceptual -- avx512 is not auto recognized by default so option '--asm avx512' should not turn on avx512 without any check.
You can test file avx512-patch.7z with x265 that check what is supported by CPU & OS up to avx512 if option '--asm avx512' is used.
On Win 8.1 it should work with '--asm avx512' exactly like without this option, on Win 10 it should turn on avx512 if you have CPU with avx512 and you use option '--asm avx512'.

Last edited by Ma; 15th April 2018 at 23:58.
Ma is offline   Reply With Quote
Old 17th April 2018, 07:31   #6040  |  Link
Bhavnahari
Registered User
 
Join Date: Nov 2016
Posts: 4
Quote:
Originally Posted by jlpsvk View Post
any suggested quality wise settings recommendation for 4K HDR encoding? with CRF ie 17?
If the data that is being reused comes from encoding a downscaled video (scale-factor=2), it does not make a lot of sense to use intra/inter refinement levels 0/1 as levels 0 and 1 reuse most of the information from the previous pass with no or minimal re-evaluation of analysis information. This can have a huge impact on the quality of the encode.

We have observed that --refine-inter=3 and --refine-intra=4 gives the best quality, even better than standalone x265 encodes in some cases, with a performance gain of up to 1.8X.

For 4K HDR content, you will have to modify the display settings based on the monitor. Please refer the docs for more information - http://x265.readthedocs.io/en/defaul...mation-options
Bhavnahari is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.