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:37   #6021  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 167
Quote:
Originally Posted by Kavitha View Post
x265 has static levels of refinement(--refine inter <level>/refine intra <level>) which can be used with --analysis-reuse-level 10.
Efficiency in terms of quality increases as the levels of refinement increases. This quality increase results from additional computation thereby increasing the overall encoding time.
For a better quality-speed trade-off, dynamic refinement was introduced where the encoder dynamically switches between different inter refine levels.
This basically exploits the fact that not all CUs are required to be encoded with same level for better performance/quality.
Considering the complexity of video content and the analysis information from first pass, the encoder can intelligently decide the optimal level of refinement for each CU.
Intra frames are usually encoded with best quality as they are used as references by the consecutive frames. Hence error introduced in intra frames due to reusing analysis data can propagate to frames that use these intra frames as reference.
To minimize the chances of error propagation, refine-intra 4 (level with best quality) restricts reusing analysis data for intra frames and forces the encoder to perform full intra analysis in the second pass.
This is why x265 documentation suggests to use dynamic refinement along with refine-intra 4 and this setting is expected to give improved quality than other refine intra levels for some videos.
any suggested quality wise settings recommendation for 4K HDR encoding? with CRF ie 17?
jlpsvk is offline   Reply With Quote
Old 12th April 2018, 21:37   #6022  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,420
Quote:
Originally Posted by Stephen R. Savage View Post
It's actually not so bad at higher frequencies, because each 100 MHz increment saves a lot more power, compared to 2.5 GHz server SKUs. i9-7900X can reach 4.1-4.2 GHz AVX-512 frequency with an aftermarket cooling solution.
You can reach that if you boost the power you give the CPU, but unfortunately that also boosts the power outside of AVX512 mode, making your CPU overall less efficient. The integrated voltage controller has no option to increase the core voltage only in AVX512 mode, unfortunately.

But this is probably going a bit off-topic for X265.
I would've thought the X265 people already learned the down-clocking lesson with AVX2 though, where they experienced the same effect - fancy instructions that made the overall encode slower, especially on server systems, due to clock changes.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 12th April 2018, 21:44   #6023  |  Link
mandarinka
Registered User
 
mandarinka's Avatar
 
Join Date: Jan 2007
Posts: 676
https://forums.anandtech.com/threads...#post-39149633

Quote:
RZN vs. CFL vs. SKL-X in X265 2.5+31:

RZN: /w AVX2 = 100.00%, /wo AVX2 = 105.21%
CFL: /w AVX2 = 130.61%, /wo AVX2 = 101.13%
SKL-X: w/ AVX2 = 135.47%, /wo AVX2 = 105.21%

Ryzen's performance without AVX2 is impressive, but it is sad to see that there is still a penalty (like on Excavator) when running 256-bit code.
I wish somebody would adjust the CPU detection code to disable AVX2 on Zen. Easy performance gain just from that simple change: Zen gets 5.2% faster by disabling AVX2.
mandarinka is offline   Reply With Quote
Old 12th April 2018, 21:51   #6024  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 167
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   #6025  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 3,259
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   #6026  |  Link
jlpsvk
Registered User
 
Join Date: Dec 2014
Posts: 167
@Asmodian

aaaaah... forgot it..
jlpsvk is offline   Reply With Quote
Old 12th April 2018, 23:24   #6027  |  Link
Stephen R. Savage
Registered User
 
Stephen R. Savage's Avatar
 
Join Date: Nov 2009
Posts: 337
Quote:
Originally Posted by nevcairiel View Post
But this is probably going a bit off-topic for X265.
I would've thought the X265 people already learned the down-clocking lesson with AVX2 though, where they experienced the same effect - fancy instructions that made the overall encode slower, especially on server systems, due to clock changes.
To be fair, the AVX2 speedup is still larger than the frequency penalty, so it made sense. AVX-512 was always going to be a stretch, seeing as the incremental speedup would necessarily be less than AVX2 (30%). Looking through the Bitbucket commit log, a lot of the AVX-512 kernels are getting poor scaling from the AVX2 version. For example, the iDCT, a fundamental operation, didn't see any improvement from AVX-512.

Code:
https://bitbucket.org/multicoreware/x265/commits/b7149d1068997ee2a92dd3d48a848d1d65698e82

[x265-avx512]x86: AVX512 idct16x16
AVX2 Performance    :    11.67x
AVX512 Performance  :    12.80x
AVX-512 is probably too wide (64 bytes, 32 words) for the primitives in HEVC (16x16 and 32x32 blocks). There was a similar limit to x264's scaling from SSE to AVX, which yielded only 10%, and only in 10-bit mode.
Stephen R. Savage is offline   Reply With Quote
Old 12th April 2018, 23:28   #6028  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,420
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   #6029  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 57
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 10C cooler, so maybe i can get away with +100MHz. i like it
RieGo is offline   Reply With Quote
Old 13th April 2018, 17:15   #6030  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,660
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   #6031  |  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   #6032  |  Link
WhatZit
Registered User
 
Join Date: Aug 2016
Posts: 57
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   #6033  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 301
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   #6034  |  Link
RieGo
Registered User
 
Join Date: Nov 2009
Posts: 57
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   #6035  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,650
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   #6036  |  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   #6037  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,650
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   #6038  |  Link
Ma
Registered User
 
Join Date: Feb 2015
Posts: 301
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   #6039  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,650
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   #6040  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,383
x265-2.7+336-07defe235cde.7z VS 17 x64, crt is statically linked so no install needed. Debug pdbs included.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis 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 14:12.


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