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 19E3243F09 for ; Thu, 17 Nov 2022 14:25:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5A45468BB10; Thu, 17 Nov 2022 16:25:41 +0200 (EET) Received: from mail-oa1-f53.google.com (mail-oa1-f53.google.com [209.85.160.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 517B468B859 for ; Thu, 17 Nov 2022 16:25:35 +0200 (EET) Received: by mail-oa1-f53.google.com with SMTP id 586e51a60fabf-12c8312131fso2312256fac.4 for ; Thu, 17 Nov 2022 06:25:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=0HSOtzpgWRCj5TBP3KPJ8SYD8bRdKDWiHcpj+0l+Pu0=; b=RycxcAubwoIdqddoR/ScDdeybelUFIsg4js0PYMzgtIA9g/KVCZnoUKcR7yhNVCgcY ccS3b2VfQdSpuaZyiHIoSGFPljF150fids+tjNhC9KBDkLfbHkxrd3e6X6E7BjTtcr+s 07Fw5F6Zkl99LBWYdEGDLk5TYCLU5M9JIWbJbuAXbJGUPKjJGOdxPpJO2d9B9KNsA1m+ dFfo9x+52zbevLozgA4yqh75cEE16aB6yKzQtt3oxB4aRkhRQXo6bLP7qO98FNCkmFE3 +OiBiIPsLFqqmHYj5RIbhMUR6VIYP2CeJUXdj8vKj7XAdMfnJ9Dnk0JX2Xl95aShoqaO yy5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0HSOtzpgWRCj5TBP3KPJ8SYD8bRdKDWiHcpj+0l+Pu0=; b=STU2+J1GdUK76DHRnyF+angrDzM7Y/1/jVI0T7Ll1hmWwwNab3fvKZ3GwruUUa+bPC V6it3F56/YqXA9mxFQHTMmX7aHDlei1kx/5+bwbwQrz6JdHwMsvaCM3nI09BNyWaNOku Mp3S+49yRzAFQ+u3cJSx5baGE79jBvzuRrHZp67uMP7jtv0pUqB/f3uhfHUB3Vk+9yKk ZqxKFk66G9VaGRz4rN4s4OkPwkn3ERfbmKv6/lsB01RsJH38rhBIwgBGwYtVsEkUypkG u07gzBbMJybNyfa4yG/AU3fWegx/P67ProVTpQdKZ/hhkWPBS0LvI8fPa770bIvm98gc Ibqg== X-Gm-Message-State: ANoB5pl20eugPdv1HW6Qp8WxJ+t5AfWe8QHNyqxo26ZnHb+hwT16nb+R aapbKp7qN3YKlPzCccSyI5G27mXCppw= X-Google-Smtp-Source: AA0mqf4zEVZB2uSY3dTH6qMP4VAhjyzfRRIU5wBNHM+LnQLUYk1BFrR5OmbNraY9TWRSUDieyVgMfw== X-Received: by 2002:a05:6870:44c6:b0:13d:a278:6fb4 with SMTP id t6-20020a05687044c600b0013da2786fb4mr4228009oai.213.1668695133412; Thu, 17 Nov 2022 06:25:33 -0800 (PST) Received: from [192.168.0.15] ([181.85.72.69]) by smtp.gmail.com with ESMTPSA id n3-20020a4ad123000000b0049bdee12662sm375359oor.6.2022.11.17.06.25.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Nov 2022 06:25:32 -0800 (PST) Message-ID: <6f01cbaa-4f5b-e0de-de48-661d93427db2@gmail.com> Date: Thu, 17 Nov 2022 11:25:58 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 To: ffmpeg-devel@ffmpeg.org References: <20221117100942.6217-1-anton@khirnov.net> <20221117100942.6217-4-anton@khirnov.net> Content-Language: en-US From: James Almer In-Reply-To: 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-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 11/17/2022 11:17 AM, Lynne wrote: > 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. This is already not the case. See the stuff in libavutil/x86/intmath.h Intrinsics are ok as long as they are single instructions for inlined stuff, much like with inline asm. Builtins are obviously preferred, but they tend to be GCC/Clang only and at times limited in scope. > @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. > > Other patches look good. > _______________________________________________ > 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". _______________________________________________ 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".