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. |
10th October 2018, 20:20 | #6401 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,784
|
@katzenjoghurt:
For the core functions of the x265 encoder (especially those which are most often called in tight loops), some of the following sentences may be true, depending on performance gain, development progress in different bit depths, etc.:
Usually all these code variants are present in a binary of (lib)x265, except they are excluded during compilation (e.g. you may disable all assembler code paths; but why would you want that?). Last edited by LigH; 10th October 2018 at 20:40. |
10th October 2018, 22:35 | #6402 | Link | ||
Registered User
Join Date: Feb 2007
Posts: 128
|
Quote:
I ignored the right table as I always pick my versions from the left side. Thanks again! Quote:
I understand this as: Unless a build mentions something else all optimizations are enabled. (?) I just was looking for some way to verify. Some context: What led me to the question was a current version of StaxRip which contained an x265.exe and a "x265 AVX2" zip file - and I couldn't tell if the zip was just some oversight or if the "normal" x265.exe is a version without AVX2 optimiziations. I will just replace it and be done with it... though... I was wondering how to make sure an unknown x265.exe is indeed the "right" version for my machine. Last edited by katzenjoghurt; 10th October 2018 at 22:47. |
||
10th October 2018, 23:40 | #6403 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,784
|
Just a hint:
Code:
x265.exe --no-asm --version x265 [info]: HEVC encoder version 2.9+1-169e76b6bbcc x265 [info]: build info [Windows][GCC 8.2.0][64 bit] 8bit+10bit+12bit x265 [info]: using cpu capabilities: none! But if all assembler optimizations are enabled (and all of them are usually linked in the encoder), it only means they are available in case your CPU supports them (which is detected at runtime). It doesn't mean all of them are used on every hardware. If you don't limit them with the --asm mask parameter, x265 detects what your CPU supports while starting, and selects the code paths with the optimal speed supported by your specific CPU. Code:
x265.exe --version x265 [info]: HEVC encoder version 2.9+1-169e76b6bbcc x265 [info]: build info [Windows][GCC 8.2.0][64 bit] 8bit+10bit+12bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT The very same x265.exe can use AVX or even AVX2 code if you copy it onto a PC with a CPU that supports AVX or even AVX2 and run it there. {EDIT}If your CPU even supports AVX512, and you insist in using AVX512 instructions, then you need to enable it with an additional parameter --asm avx512 in your command line because it is a bit risky and does not always provide better performance, especially not when your CPU gets temperature throttled. And it will crash if your CPU does not support AVX512.{/EDIT} So what are these special executables provided on a few sites? In addition to multiple code paths for time-critical assembler routines, also non-critical C/C++ routines get optimized for a modern instruction set, which limits their compatibility; these builds will not even start on older CPU's. If I would use an x265.exe which was built with C/C++ compiler optimizations for AVX (that is probably what you read for special binaries), it would crash right at the start if run on an AMD Athlon/Phenom which doesn't support AVX, because it would use AVX instructions already for the initialization, already before the encoding even starts. But this is not a time-critical part. There is no serious need to speed up code which runs only once or a few times. – (Jedi mind powers) "This is not the build you are looking for." Rather generic builds, like mine or Barough's or Midzuki's, are fine for a large range of PC's; builds for x86-64 are probably optimized at least for SSE2 in the code generated by the C/C++ compiler, which is the minimal widely supported instruction set of AMD64 compatible CPU's. And the selection of highly optimized assembler routines for the really time-critical parts is done in the encoder at runtime. Last edited by LigH; 11th October 2018 at 08:17. |
11th October 2018, 01:19 | #6404 | Link | ||
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Quote:
Do I have that wrong? AVX-512 is only useful with slower UHD resolutions, so it makes sense for it to require an opt in. Quote:
|
||
11th October 2018, 11:55 | #6406 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,816
|
Quote:
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
|
12th October 2018, 01:15 | #6407 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Quote:
That said, an updated microarchitecture could potentially make AVX-512 be more generally useful. AVX2 became a lot more useful with (IIRC) Skylake's microarchitectural change which reduced thermal throttling doing AVX2, really improving throughput. |
|
12th October 2018, 03:47 | #6409 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,771
|
Plausibly. But x265 maybe the most CPU stressful real software in the world, hitting the cores, caches, and SIMD super hard at once. Hopefully Intel is benchmarking x265 during development!
It is hard to predict the optimal performance tuning of a given CPU without actually having it, as theoretical improvements don’t always work as expected. I’m curious if anyone has benchmarked performance improvements from arch-specific and profile-driven builds. X265 is also pretty stressful for compilers too. |
12th October 2018, 04:04 | #6410 | Link |
Registered User
Join Date: Jun 2018
Posts: 56
|
The x265 reported an error that the file "F:\x265" is not found(maybe it shows file could not open if I recall correctly) when I use --analysis-reuse-file F:\x265 during the second pass encoding.
Great, now I couldn't reproduce this error again. It has been five days that zeranoe ffmpeg does not release a new version with x265 2.9. Last edited by alex1399; 12th October 2018 at 04:45. |
12th October 2018, 09:58 | #6411 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,816
|
Quote:
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper Last edited by Atak_Snajpera; 12th October 2018 at 10:01. |
|
12th October 2018, 10:22 | #6412 | Link | |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,784
|
Fresh build by media-autobuild_suite, GPL v3, Zeranoe-like selection.
Quote:
|
|
12th October 2018, 18:56 | #6413 | Link |
Herr
Join Date: Apr 2009
Location: North Europe
Posts: 556
|
x265 2.9+2 released now!
http://www.msystem.waw.pl/x265/ |
14th October 2018, 17:12 | #6416 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,784
|
As far as I remember from previous discussions...
Most of all: Temperature throttling. AVX512 can be a heavy burden. Furthermore, switching the CPU into and out of AVX modes can be quite time consuming, which has to be considered in the optimization efforts, and it can make it less efficient for lower resolutions. Please try to read back, and I believe a thread about AVX512 and AMD Ryzen got even separated from this generic x265 encoder thread. |
15th October 2018, 04:51 | #6417 | Link |
Registered User
Join Date: Jul 2018
Posts: 450
|
Tested binaries download from here.
input.mkv - hevc (Main 10), yuv420p10le(tv), 3840x1606 AVX2 clock speed = AVX512 clock speed Code:
ffmpeg -i input.mkv -f yuv4mpegpipe -strict -1 - | .\resources\x265-10b.exe --y4m - --ctu 32 -o .\OUTPUT.mkv x265 [info]: HEVC encoder version 2.8+74-fd517ae68f93 x265 [info]: build info [Windows][GCC 8.2.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 encoded 498 frames in 51.34s (9.70 fps), 5044.61 kb/s, Avg QP:31.42 x265 [info]: HEVC encoder version 2.8+74-fd517ae68f93 x265 [info]: build info [Windows][MSVC 1915][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 encoded 498 frames in 51.80s (9.61 fps), 5044.61 kb/s, Avg QP:31.42 Code:
ffmpeg -i input.mkv -f yuv4mpegpipe -strict -1 - | .\resources\x265-10b.exe --y4m - --ctu 32 -o .\OUTPUT.mkv x265 [info]: HEVC encoder version 2.9+2-7e978ed93d60 x265 [info]: build info [Windows][GCC 8.2.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 encoded 498 frames in 52.82s (9.43 fps), 5044.61 kb/s, Avg QP:31.42 x265 [info]: HEVC encoder version 2.9+2-7e978ed93d60 x265 [info]: build info [Windows][MSVC 1915][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 encoded 498 frames in 51.55s (9.66 fps), 5044.61 kb/s, Avg QP:31.42 Code:
ffmpeg -i input.mkv -f yuv4mpegpipe -strict -1 - | .\resources\x265-10b.exe --y4m - --ctu 32 -o .\OUTPUT.mkv VS 2017 Generic compilation ("none") encoded 498 frames in 51.49s (9.67 fps), 5044.61 kb/s, Avg QP:31.42 VS 2017 AVX2 compilation ("AVX2") encoded 498 frames in 52.27s (9.53 fps), 5044.61 kb/s, Avg QP:31.42 Code:
ffmpeg -i input.mkv -f yuv4mpegpipe -strict -1 - | .\resources\x265-10b.exe --y4m - --ctu 32 (--asm avx512) -o .\OUTPUT.mkv x265 [info]: HEVC encoder version 2.9+2-7e978ed93d60 x265 [info]: build info [Windows][MSVC 1915][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 encoded 498 frames in 52.05s (9.57 fps), 5044.61 kb/s, Avg QP:31.42 x265 [info]: HEVC encoder version 2.9+2-7e978ed93d60 x265 [info]: build info [Windows][MSVC 1915][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512 encoded 498 frames in 50.79s (9.80 fps), 5044.61 kb/s, Avg QP:31.42 |
15th October 2018, 07:21 | #6418 | Link |
Registered User
Join Date: Aug 2014
Posts: 28
|
I tried a short test clip with avx512 enabled and disabled on a 4K source using the slower preset. FPS went up to 1.37 from 0.84 when I enabled 512.
Encoded clip looks good, no obvious errors that is. File size is roughly the same, but clip length and crf might have something to do with the tiny difference between the two. 64bit x265 on an intel 7820x. Temps are roughly equal to when 512 is disabled. Load is mostly at 100% on all cores with the occasional dip down to 87% every minute or so. |
15th October 2018, 12:16 | #6420 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,816
|
Quote:
The longer you encode the more heat your cpu will produce and hence more aggressive AVX negative offset will be activated.
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
|
|
|