View Full Version : DO FFDSHOW Support - AVX 2 or AVX512 ?
hogtop
3rd October 2013, 07:11
DO FFDSHOW Support - AVX 2 or AVX512 ?
http://software.intel.com/en-us/blogs/2013/avx-512-instructions
LoRd_MuldeR
3rd October 2013, 17:28
You have to distinguished between compiler-optimizations and hand-written assembly code here:
Compiler-optimizations are solely a question about the compiler (and compiler settings) being use to build the software! So any software can use AVX2 and/or AVX512, if it gets built with a compiler that supports generating AVX2/AVX512 code - and if that option is enabled in the compiler settings (which generally breaks compatibility to CPU's without AVX2/AVX512 support). Having said that, I don't know which compilers support AVX2 and/or AVX512 yet, but the Intel C Compiler probably is your best bet. Once you have such a compiler, you simply need to re-compile FFdshow with AVX2/AVX512 optimizations enabled. How much speed improvement (if any) you'd get from that is a completely different question though!
(But looking at the manual (http://software.intel.com/sites/products/documentation/doclib/iss/2013/compiler/cpp-lin/GUID-09734487-1819-4C1E-B314-2497F2B64C45.htm), it seems the latest Intel C Compiler at least has AVX2 support, but there's no sign of AVX512. The Microsoft compiler, as of VS2012, definitely does not support AVX2 or AVX512, only AVX)
At the same time, hand-written assembly that takes advantage of AVX2 and/or AVX512 has to be added to the software by the developers. This is usually takes some time. And it will only be done, if at all, where the new AVX2 and/or AVX512 instructions are actually beneficial for the specific software! In case of FFdshow, you need to be aware that FFdshow is nothing but a DirectShow-wrapper around the libavcodec library from FFmpeg (and a few other libraries). So, if AVX2/AVX512 assembly code ever gets added, then it will be added to libavcodec, by the FFmpeg developers - it will not be added to FFdshow itself. Having said that, I have no idea whether FFmpeg/libavcodec already has any AVX2/AVX512 code yet.
(Though looking at the CPU flags in "libavutil/cpu.h" it seems that ffmpeg/libav currently has AVX support, but I cannot see any sign of explicit AVX2 and/or AVX512 support at the moment)
hogtop
3rd October 2013, 19:26
from all the answer I realized that you do not know if FFDSHOW works with AVX2/AVX512
LoRd_MuldeR
3rd October 2013, 19:37
If you had read (and understood) my explanations, you would now know that there is no definitive answer to your question, because it depends on how (i.e. with which compiler and with which compiler settings) the specific build of FFdshow was created! Also you would now know that adding AVX2/AVX512 assembly code to FFdshow itself, which is (more or less) only a wrapper, doesn't matter. Instead, adding AVX2/AVX512 assembly to the actual decoder libraries (i.e. libavcodec) is what might be of interest here! Last but not least, and regardless of FFdshow, the question is not whether a specific software "works" with AVX2/AVX512, but whether that software is capable of taking advantage from AVX2/AVX512 instructions.
Reading your reply, I have to assume you did not understand the above, so I recommend you read my first post again...
Dark Shikari
3rd October 2013, 20:54
As far as I know none of the libavcodec decoders have AVX2 assembly yet.
hogtop
4th October 2013, 04:31
Well I read your reply and as it says you do not know
Please read your answer
if you had read (and understood) my explanations, you would now know that there is no definitive answer
yes there is Simple answer
Or having or no having
Dark Shikari give me clear answer
the_weirdo
4th October 2013, 07:23
yes there is Simple answer
Or having or no having
I can recompile FFDshow with a compiler support AVX2/AVX512, set it to optimize for AVX2/AVX512 and then I can say FFDshow now support AVX2/AVX512, no?
Like LoRd_MuldeR said, the answer is not that simple, at least for your question.
LoRd_MuldeR
4th October 2013, 11:17
Dark Shikari give me clear answer
He answered a question you did not even ask for, while I explained (see above) why that is the right question you probably should have asked...
clsid
4th October 2013, 21:47
This question shows up every time a new instruction set is introduced. Some seem to expect major performance benefits. Well, that all just marketing bullshit.
The new instructions are only useful for very specific types of calculations. They have little to no benefit for most applications.
But a more relevant answer to the question:
The ffdshow project has been pretty much dead for more than a year...
LoRd_MuldeR
5th October 2013, 15:16
This question shows up every time a new instruction set is introduced. Some seem to expect major performance benefits. Well, that all just marketing bullshit.
I'd say it's 1/3 marketing bullshit and 2/3 people expecting the wrong things, because they have no idea about assembler code.
It's like: Hey, my brand new CPU supports that fancy instruction set I have heard about. I assume this magically makes everything faster. So why the heck doesn't every single program in existence make use of it ???
The new instructions are only useful for very specific types of calculations. They have little to no benefit for most applications.
Definitely. These new instructions wouldn't have been added, if they weren't useful for something. But whether that "something" occurs in a specific program, that's a completely different question!
If there's no suitable use case for the new instructions in a specific program, it simply isn't possible to use those instructions in that program (in a reasonable way).
And even if the program actually can benefit from the new instructions, still somebody has to think up smart algorithms that make use of the new instructions and outperform the previous algorithms.
That's not trivial at all and thus won't happen all of a sudden...
But a more relevant answer to the question:
The ffdshow project has been pretty much dead for more than a year...
Still, shouldn't this be mostly a matter of rebuilding FFshow with the latest ffmepg/libav libraries - once new optimizations have arrived in the decoders?
Given, of course, that they didn't break the API ;)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.