On Wed, May 21, 2025 at 06:32:49PM +0800, Jiawei wrote:
> 
> 在 2025/5/21 15:46, Michael Niedermayer 写道:
> > On Wed, May 21, 2025 at 02:17:50PM +0800, Jiawei wrote:
> > > This patch modifies the FFmpeg build system to remove the explicit 
> > > disabling
> > > of GCC's auto-vectorization feature.
> > > 
> > > Modern GCC versions (>= 10.0) have demonstrated stable auto-vectorization
> > > capabilities through extensive optimizations in loop analysis and SIMD
> > > code generation. The explicit -fno-tree-vectorize flag originally added
> > > in commit 973859f (2009) to workaround early GCC vectorization instability
> > > is no longer necessary.
> > > 
> > > Key improvements justifying this change:
> > > 1. Enhanced heuristics for loop vectorization cost models
> > > 2. Mature handling of alignment and memory access patterns
> > > 3. Robust fallback mechanisms for unsupported architectures
> > > 
> > > This change allows FFmpeg to benefit from automated SIMD optimizations
> > > when built with -O3 optimization level, particularly improving
> > > performance on x86_64 (AVX), ARM64 (SVE) and RISC-V(RVV) architectures.
> > > 
> > > [1] 
> > > https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/973859f5230e77beea7bb59dc081870689d6d191
> > > 
> > > ---
> > >   configure | 1 -
> > >   1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/configure b/configure
> > > index 3730b0524c..b9e95ce4ec 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -7656,7 +7656,6 @@ if enabled icc; then
> > >               disable aligned_stack
> > >       fi
> > >   elif enabled gcc; then
> > > -    check_optflags -fno-tree-vectorize
> > >       check_cflags -Werror=format-security
> > >       check_cflags -Werror=implicit-function-declaration
> > >       check_cflags -Werror=missing-prototypes
> > Your text speaks about this change being ok in a gcc version dependant
> > way
> > 
> > Your patch has no gcc version dependancy
> > 
> > If you claim that all issues where solved, please show the issues happening
> > in version v and no longer happening in w>v . Then it make sense to
> > change the flags for version w
> > 
> > Thx
> > [...]
> 
> 
> Sorry I forgot about that, thanks for reminding me. Here still exist many
> old version gcc user,
> 
> And I am not sure how will this impact them.
> 

> Maybe a later version gcc checking is good, like gcc 13-15, what you think
> about it?

i cannot speak about gcc versions, i know of them little more than i know
numbers from a dice throw.

But if we can turn on optimizations and make the code faster without breaking
anything, iam in favor of that. Its just that i cannot awnser the question
what checks, what exact version or other spatial limitation may be needed.
You would have to verify that the issues people encountered previously
no longer affect version XY and then put a XY check in the patch.

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to