From patchwork Thu Nov 17 10:09:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 39305 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:999a:b0:a4:2148:650a with SMTP id ve26csp993982pzb; Thu, 17 Nov 2022 02:10:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf74AJUMBz9b0hFlhA7I3EozMLtwl5ajhqkjkRV96hKT8DCgELMwZSfWEDpv1Ey28Rj8V5cq X-Received: by 2002:a17:907:774e:b0:7ae:39b4:7208 with SMTP id kx14-20020a170907774e00b007ae39b47208mr1483653ejc.766.1668679826418; Thu, 17 Nov 2022 02:10:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668679826; cv=none; d=google.com; s=arc-20160816; b=OmPct4sW7E07i+L+q6DC60VgybtbG/WS6sE7wvzEeg9xbMafxAGLo9shV2Iw7Zb6zN 95HNDqvTTbyvTjm32dfZ/vP7JU+UN/vZErAaaU5kZsgJPs6Ta47d9AMcOsY9eEMtC2Sb 50O0WwCHQWDcA46pnVfAFJSxR8UiIprYsbsu2op3fomamZ0PxXMJNhH7E2838+MTyICZ 6hUvexw0+MPl8iZyQ+GltV1+blzge3Dtcew0Je89haaEl0AQnw3hhaiUjqSw482or4yI Kgo8xMS5nBEn9hna/BWfxtmyN4S6PWirJ+XKbL2o3QJ2K47V1U9NXIlfD+TOgNHNlzbC Y0Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=agVlcyzgQbbK/C9awtjyA3bd7RVPYKcs3KLkaD3w9ok=; b=U8EtmDXDNxYyFXN2XR6ObouHrIj/hMemOLQWLoe3FVcvQZutXn+MIaOT4uLjdDzxO6 Rmhk1qQWZcrXIHg1Xa0cCScg+oUU4Ktj4UooInX6zM2WARQO/1+zbXjhv+ts9cg+8tyb SYqHo3iFLdxMk22YxJHzchjkWyS52WZ9UY0Sy+5w27eXimj/utj7Qyp6qIk/TwBCiOhj zU65O/+Yk3TTwbKD+9wy6hKBGui6eaD1zwdPtxwY0TZkyjPjKAEunblPN8IKSUq1Vczj ehdXmP20vft2Juoy/HtA9yf3/8eWx3vQr0mV+6RCkAR7h4ZuDw0hO1HIogKrbJBgZ1Ov QIxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id x11-20020a056402414b00b0044f2fb68fe6si514897eda.495.2022.11.17.02.10.25; Thu, 17 Nov 2022 02:10:26 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 712BC68BCCB; Thu, 17 Nov 2022 12:10:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 84CD768BA90 for ; Thu, 17 Nov 2022 12:09:58 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 41B0F2404F8 for ; Thu, 17 Nov 2022 11:09:58 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id wo6Momse-QuR for ; Thu, 17 Nov 2022 11:09:57 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 83560240591 for ; Thu, 17 Nov 2022 11:09:56 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 29F943A054D for ; Thu, 17 Nov 2022 11:09:50 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Nov 2022 11:09:39 +0100 Message-Id: <20221117100942.6217-4-anton@khirnov.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221117100942.6217-1-anton@khirnov.net> References: <20221117100942.6217-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: r7Bwa2oHv44x --- 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). + +@item +Objective-C where required for interacting with macOS-specific interfaces. +@end itemize + @section Code formatting conventions There are the following guidelines regarding the indentation in files: