From: Lynne <dev@lynne.ee> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH 4/7] doc/developer.texi: document the use of other languages than C Date: Sat, 19 Nov 2022 15:30:25 +0100 (CET) Message-ID: <NHFI2ae--3-9@lynne.ee> (raw) In-Reply-To: <166886774865.20155.18056025533083936168@lain.khirnov.net> 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".
next prev parent reply other threads:[~2022-11-19 14:30 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-17 10:09 [FFmpeg-devel] [PATCH 1/7] configure: drop support for complex functions Anton Khirnov 2022-11-17 10:09 ` [FFmpeg-devel] [PATCH 2/7] doc/developer.texi: move the language feature section higher up Anton Khirnov 2022-11-17 10:09 ` [FFmpeg-devel] [PATCH 3/7] doc/developer.texi: update the language feature section Anton Khirnov 2022-11-17 10:09 ` [FFmpeg-devel] [PATCH 4/7] doc/developer.texi: document the use of other languages than C Anton Khirnov 2022-11-17 14:17 ` Lynne 2022-11-17 14:25 ` James Almer 2022-11-17 14:33 ` Lynne 2022-11-19 14:22 ` Anton Khirnov 2022-11-19 14:30 ` Lynne [this message] 2022-11-17 10:09 ` [FFmpeg-devel] [PATCH 5/7] doc/developer.texi: move editor configuration under formatting Anton Khirnov 2022-11-17 10:09 ` [FFmpeg-devel] [PATCH 6/7] doc/developer.texi: drop a misplaced sentence from code formatting section Anton Khirnov 2022-11-17 10:09 ` [FFmpeg-devel] [PATCH 7/7] doc/developer.texi: extend and update naming conventions Anton Khirnov 2022-11-17 19:43 ` [FFmpeg-devel] [PATCH 1/7] configure: drop support for complex functions Paul B Mahol
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=NHFI2ae--3-9@lynne.ee \ --to=dev@lynne.ee \ --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