From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Christopher Degawa <ccom@randomderp.com>
Subject: Re: [FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows
Date: Mon, 27 Mar 2023 14:34:52 +0300 (EEST)
Message-ID: <e49e883-5f4-31c0-bfb8-a0710e445a4@martin.st> (raw)
In-Reply-To: <20230102230128.972907-1-ccom@randomderp.com>
On Mon, 2 Jan 2023, Christopher Degawa wrote:
> previouslly, it only was an issue with 32-bit clang from msys2's
> mingw32 repo, however, at some point with an update to gcc 12.2.0,
> the same issue popped up. Tested with a clean clone of ffmpeg, and even
> tested with n5.0, but the issue persists, so I presume it's a compiler
> issue.
>
> Related: https://trac.ffmpeg.org/ticket/8903
>
> Signed-off-by: Christopher Degawa <ccom@randomderp.com>
> ---
> libavcodec/x86/cabac.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
> index b046a56a6b..70f990db8d 100644
> --- a/libavcodec/x86/cabac.h
> +++ b/libavcodec/x86/cabac.h
> @@ -178,7 +178,7 @@
> #if HAVE_7REGS && !BROKEN_COMPILER
> #define get_cabac_inline get_cabac_inline_x86
> static
> -#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__)
> +#if defined(_WIN32) && !defined(_WIN64)
> av_noinline
> #else
> av_always_inline
> --
> 2.39.0
I'm ok with this change (although I'd reword the commit message a bit);
the inline assembly here is brittle and it's easy to trigger this failure.
It's very hard to say whether this is a compiler bug, or just our assembly
crossing the line for what we can demand that the compiler accommodates,
in combination with deep inlineing - the patch avoids inlineing the
function which makes it much more possible to handle the inline assembly
constraints.
I and Hendrik discussed the issue on irc; I reproduced the issue with
MSYS2's 32 bit GCC, and Hendrik also separately reproduced it with a
separate build of GCC, by adding the options "-march=pentium4
-mtune=generic", which are MSYS2's current defaults, which trigger the
failure (at least in mingw builds, with GCC 12.2.0).
So if there's no reasonable opposition, I'd go ahead and push this patch
with a slightly reworded commit message.
// Martin
_______________________________________________
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".
next prev parent reply other threads:[~2023-03-27 11:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 23:01 Christopher Degawa
2023-01-02 23:35 ` Hendrik Leppkes
2023-01-03 18:32 ` Christopher Degawa
2023-01-03 18:45 ` Christopher Degawa
2023-01-03 10:15 ` Andreas Rheinhardt
2023-01-03 18:51 ` Christopher Degawa
2023-01-03 19:18 ` Christopher Degawa
2023-03-27 11:34 ` Martin Storsjö [this message]
2023-03-27 17:59 ` Christopher Degawa
2023-03-27 20:08 ` Martin Storsjö
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e49e883-5f4-31c0-bfb8-a0710e445a4@martin.st \
--to=martin@martin.st \
--cc=ccom@randomderp.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git