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 6C55A445B6 for ; Sat, 19 Nov 2022 14:30:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1826568B786; Sat, 19 Nov 2022 16:30:33 +0200 (EET) Received: from w4.tutanota.de (w4.tutanota.de [81.3.6.165]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 999A468B586 for ; Sat, 19 Nov 2022 16:30:26 +0200 (EET) Received: from tutadb.w10.tutanota.de (unknown [192.168.1.10]) by w4.tutanota.de (Postfix) with ESMTP id C6E08106031C for ; Sat, 19 Nov 2022 14:30:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1668868225; s=s1; d=lynne.ee; h=From:From:To:To:Subject:Subject:Content-Description:Content-ID:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Cc:Date:Date:In-Reply-To:In-Reply-To:MIME-Version:MIME-Version:Message-ID:Message-ID:Reply-To:References:References:Sender; bh=UsAULxApVQkdgn2O3c7BfBrLmm0DhxhHJGfdEpBpBiU=; b=c/fbi9hUAY3tJJq0tC8L2tNSKp9/+R0GxE8ElUWcMrqmHU+rGNmA9Kmfc4lN+WIZ 9cbilK8vZ0H3gQRaNwW7yXlHA/5PDhWV0s8yyvwn77WEggG1csqbvDnFmSE6PGawwqw qY6CGy/kBI4LH7Ajk+adyVlwj2JK/MmtoqVTVkefvveJlycPqkf4bler7pSq/h5g8h/ n/0od+c6RYlZDiBYTAhiBamQfgv6sQ7l1E0wE0GCGwpb85aBrWxnai0PZcWpuYhJkCu bCCtiKRBSXQk6m17fvov/qyX1607I4i/mStS1xq9ib395INJErpv10vie0OhPErp5P/ ck/f19aoxA== Date: Sat, 19 Nov 2022 15:30:25 +0100 (CET) From: Lynne To: FFmpeg development discussions and patches Message-ID: In-Reply-To: <166886774865.20155.18056025533083936168@lain.khirnov.net> References: <20221117100942.6217-1-anton@khirnov.net> <20221117100942.6217-4-anton@khirnov.net> <166886774865.20155.18056025533083936168@lain.khirnov.net> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 4/7] doc/developer.texi: document the use of other languages than C 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Nov 19, 2022, 15:22 by anton@khirnov.net: > Quoting Lynne (2022-11-17 15:17:44) > >> Nov 17, 2022, 11:09 by anton@khirnov.net: >> >> > --- >> > doc/developer.texi | 15 +++++++++++++-- >> > 1 file changed, 13 insertions(+), 2 deletions(-) >> > >> > diff --git a/doc/developer.texi b/doc/developer.texi >> > index 01735e07f5..44da6e41af 100644 >> > --- a/doc/developer.texi >> > +++ b/doc/developer.texi >> > @@ -56,9 +56,9 @@ and should try to fix issues their commit causes. >> > @anchor{Coding Rules} >> > @chapter Coding Rules >> > >> > -@section C language features >> > +@section Language >> > >> > -FFmpeg is programmed in the ISO C99 language, extended with: >> > +FFmpeg is mainly programmed in the ISO C99 language, extended with: >> > @itemize @bullet >> > @item >> > Atomic operations from C11 @file{stdatomic.h}. They are emulated on >> > @@ -83,6 +83,17 @@ complex numbers; >> > mixed statements and declarations. >> > @end itemize >> > >> > +Other languages than C may be used in special cases: >> > +@itemize @bullet >> > +@item >> > +NASM is preferred for x86 SIMD or other x86 assembly. Inline assembly and >> > +intrinsics should be avoided, unless there is a strong reason to use them (e.g. >> > +code that needs to be inlined). >> > >> >> We don't accept x86 intrinsics, so should isn't really appropriate. >> Also, a word for other architectures would do. >> Something like this maybe: >> >> @item >> NASM is required for x86 assembly. Inline assembly should be avoided, >> unless there's a strong reason to use it (e.g. code that has to be inlined). >> Intrinsics or other assembly flavours are not accepted for x86. >> @item >> For other architectures, GAS syntax should be used for assembly. >> Inline assembly should be avoided, unless there's a good reason to use it. >> Intrinsics are acceptable, but not recommended. >> >> Other architectures also have different assembly syntax versions, >> but it's so niche, it's not really worth mentioning. >> > > My intent with this set is to make the document match the actual > reality, not ideal aspirations. And the actual reality is > - for x86, we have both intrinsics and inline asm. In my view > (apparently shared by several other people) intrinsics are the lesser > evil when nasm cannot be used. > We do not accept intrinsics for any SIMD DSP code which is what this whole section is about. Using them in intmath.h and other parts are insignificant and therefore not worth mentioning. This is the reality, and neglecting to mention it _is_ misdocumenting. > - intrinsics are commonly used for some other arches, like ppc or mips > > Also, the reason I didn's say anything about other platforms (most > importantly ARM, but also GPU stuff etc.) is that I never wrote any code > for them and don't really know the exact state. Patches welcome. > That's why I suggested adding that part above. _______________________________________________ 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".