From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 00F5543C88 for ; Thu, 28 Jul 2022 01:05:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 42E6968B974; Thu, 28 Jul 2022 04:05:14 +0300 (EEST) Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 89EC868B8D1 for ; Thu, 28 Jul 2022 04:05:08 +0300 (EEST) Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-10d845dcf92so596539fac.12 for ; Wed, 27 Jul 2022 18:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=+vrz+DZlTPgrw0+6Kw9MwOjIpOzauRkk7EMmxleYx8k=; b=QcjTxElRm4nyslqJUgStFiIGO2Ff1A5X+aJfVt3QRR94FNeg2+Qpvm37VvuD0oaYJP hfxHn/O63HqxqhIPEArkQVKpTNJWf6MJ7NpajZGuZNA0oBeIPv2u6bI2mfY/zVEURCeQ Ptl3wrMvMGtPQ8FmuMLRzLUfk+2QioTTvzeAUYiYNAjLx63fUqgjmY3hpwOvPkFajswX hdZEJ6mPYwScfDgRMMJBu9xdnFmJ1aRui05fxsi/yTjrAs/9dILwDIEX6qAFN+fv1vCm qxpzMF3iV03h6kxqvRH13hdgNJNqnmdapwHSUwKVQKHOyd4ECA59oEG5CJ5YDPef+k4S W3Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=+vrz+DZlTPgrw0+6Kw9MwOjIpOzauRkk7EMmxleYx8k=; b=JKqp1djQ6Ve8JWKsrhccZ3FnaocyKSeolRP+ju7ZLX0sagMYK1tsO2kFTNGryzKnVP 5KftPrBkDFz86WILd3SAw8ndg/+OQdLcyOOcV/h8tLQqsGt57pIQdw+VCuPL5UWyWA7t Hy09jqKsFSJTMZHQFmbjkXMXYtZgG3ycS9GoOWK5ZncEumpwOxlS9pYtcx67+KrQFgkR FPQ3MTHY4lhPoSkyvLIG/1vJp/L7hF91nkcfz9N9zWx95bXVhBJ/XhiqpvxD1sVNGVq5 qtrXY0La49xol6H7VIbFMCvACwXmRxKdH5twrhamNeEGiOAng/gNww+AH8xx2bBvCe4F kDPQ== X-Gm-Message-State: AJIora+D+tPdl5DOZPPaTeUVQkG37RRT0oiTtm+kiXhFsohdxvBDeoit rKM3t7eXPf9suKRq/hOlLDvfSBPGMN3C4Q== X-Google-Smtp-Source: AGRyM1sHY5OyYEXP3u9Q6xwGpEbosC2/SM9liPfeq6rOdS9Vdl2L9Q66VGpunL0aNUfQ4zne2x3LEA== X-Received: by 2002:a05:6870:709e:b0:10d:752a:9ce7 with SMTP id v30-20020a056870709e00b0010d752a9ce7mr3737055oae.233.1658970306584; Wed, 27 Jul 2022 18:05:06 -0700 (PDT) Received: from [192.168.0.11] ([186.136.131.204]) by smtp.gmail.com with ESMTPSA id x20-20020a056870b41400b0010df94cac37sm6663882oap.34.2022.07.27.18.05.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jul 2022 18:05:06 -0700 (PDT) Message-ID: Date: Wed, 27 Jul 2022 22:05:04 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <05a46152f1b2458ea326edd9cfb6d817@amazon.com> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] enable auto vectorization for gcc 7 and higher X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/27/2022 10:02 PM, Soft Works wrote: > >> -----Original Message----- >> From: ffmpeg-devel On Behalf Of >> Hendrik Leppkes >> Sent: Wednesday, July 27, 2022 10:42 PM >> To: FFmpeg development discussions and patches > devel@ffmpeg.org> >> Subject: Re: [FFmpeg-devel] [PATCH] enable auto vectorization for gcc >> 7 and higher >> >> On Wed, Jul 27, 2022 at 7:39 PM James Almer >> wrote: >>> On 7/27/2022 2:34 PM, Swinney, Jonathan wrote: >>>> I recognize that this patch is going to be somewhat >> controversial. I'm submitting it mostly to see what the opinions are >> and evaluate options. I am working on improving performance for >> aarch64. On that architecture, there are fewer hand written assembly >> implementations of hot functions than there are for x86_64 and >> allowing gcc to auto-vectorize yields noticeable improvements. >>>> Gcc vectorization has improved recently and it hasn't been >> evaluated on the mailing list for a few years. This is the latest >> discussion I found in my searches: >> http://ffmpeg.org/pipermail/ffmpeg-devel/2016-May/193977.html >>> Every time this was done, it was inevitably reverted after >> complains and >>> crash reports started piling up because gcc can't really handle all >> the >>> inline code our codebase has, among other things. >>> >> No need to wait for issues, I just tested, and the same issues still >> persist that have existed for years with GCC now. They don't seem to >> care to make it compatible with inline asm, which might be fair >> enough, but it means it just can't work here. >> >> In file included from libavcodec/cabac_functions.h:49, >> from libavcodec/h264_cabac.c:36: >> libavcodec/h264_cabac.c: In function 'ff_h264_decode_mb_cabac': >> libavcodec/x86/cabac.h:199:5: error: 'asm' operand has impossible >> constraints > I wonder why it doesn't fail when I try the same on MINGW32: > > gcc -I. -Isrc/ -D_FORTIFY_SOURCE=0 -D__USE_MINGW_ANSI_STDIO=1 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DOPJ_STATIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avcodec -mthreads -DLIBTWOLAME_STATIC -std=c11 -IV:/ffbuild/mas/local32/include -IV:/ffbuild/mas/msys64/mingw32/include -I/mingw32/include -IF:/ffbuild/mas/local32/include -DLIBARCHIVE_STATIC -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts -O3 -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wno-maybe-uninitialized - > ftree-vectorize -MMD -MF libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o libavcodec/h264_cabac.o src/libavcodec/h264_cabac.c You didn't set CPU to haswell (Which will add -march=haswell to the command line). _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".