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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd October 2013, 07:11   #1  |  Link
hogtop
Registered User
 
Join Date: Nov 2008
Posts: 39
DO FFDSHOW Support - AVX 2 or AVX512 ?

DO FFDSHOW Support - AVX 2 or AVX512 ?
http://software.intel.com/en-us/blogs/2013/avx-512-instructions
hogtop is offline   Reply With Quote
Old 3rd October 2013, 17:28   #2  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
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, 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)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 3rd October 2013 at 20:32.
LoRd_MuldeR is offline   Reply With Quote
Old 3rd October 2013, 19:26   #3  |  Link
hogtop
Registered User
 
Join Date: Nov 2008
Posts: 39
from all the answer I realized that you do not know if FFDSHOW works with AVX2/AVX512
hogtop is offline   Reply With Quote
Old 3rd October 2013, 19:37   #4  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
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...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 3rd October 2013 at 19:52.
LoRd_MuldeR is offline   Reply With Quote
Old 3rd October 2013, 20:54   #5  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
As far as I know none of the libavcodec decoders have AVX2 assembly yet.
Dark Shikari is offline   Reply With Quote
Old 4th October 2013, 04:31   #6  |  Link
hogtop
Registered User
 
Join Date: Nov 2008
Posts: 39
Well I read your reply and as it says you do not know
Please read your answer

Quote:
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
hogtop is offline   Reply With Quote
Old 4th October 2013, 07:23   #7  |  Link
the_weirdo
Yes, I'm weird.
 
the_weirdo's Avatar
 
Join Date: May 2010
Location: Southeast Asia
Posts: 271
Quote:
Originally Posted by hogtop View Post
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.
__________________
“Never argue with stupid people, they will drag you down to their level and then beat you with experience.” — Mark Twain
the_weirdo is offline   Reply With Quote
Old 4th October 2013, 11:17   #8  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by hogtop View Post
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...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 4th October 2013 at 14:00.
LoRd_MuldeR is offline   Reply With Quote
Old 4th October 2013, 21:47   #9  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,647
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...
__________________
MPC-HC 2.2.1
clsid is offline   Reply With Quote
Old 5th October 2013, 15:16   #10  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by clsid View Post
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 ???

Quote:
Originally Posted by clsid View Post
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...

Quote:
Originally Posted by clsid View Post
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
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 6th October 2013 at 12:41.
LoRd_MuldeR 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 02:34.


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