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 64A1848CEB for ; Fri, 23 Feb 2024 14:31:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D787B68C736; Fri, 23 Feb 2024 16:31:37 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EF82568C5E7 for ; Fri, 23 Feb 2024 16:31:29 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=gUuha/6i; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 862C04492 for ; Fri, 23 Feb 2024 15:31:29 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id Y3J1CdAUuK3F for ; Fri, 23 Feb 2024 15:31:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1708698687; bh=8oYw8yJ4LcKDwAN70h9sG1ZtRrVNz00BkniMJ9/e8S0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gUuha/6i+udxBsBsEmsE/PcQCDGFpDL3osbENWM39L8NBwrc/6/wT7DoDA2j4bBwJ m2jZ2tlwrMlz3NwMn/jLUu3SkgjIl0/6rCvuFnoU9Dn7veMVppVsPcm5LboaMxqegx +YH/U5qSMG9v9GVv47nXFr9o17+92P3NMHK3Nu9tQ/Uc9hX/ttg8ziIm0mg5uRII4t 7HCRLIp7XmZOnk0vV8/ybLKC+3gZzEAAZU/ak97TqbVb+jF1AK0Y6tppvC3okQ/75t KwKGmLjmCLxU4Zbr7KZSAMJTqtvvnmW3+pO0cZ4UtGgLehObUB+iYkwosGvUalDisN zRuv7VcPB+l0w== 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 mail1.khirnov.net (Postfix) with ESMTPS id 38C2B448A for ; Fri, 23 Feb 2024 15:31:27 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id D213C3A0582 for ; Fri, 23 Feb 2024 15:31:21 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 23 Feb 2024 14:58:23 +0100 Message-ID: <20240223143115.16521-2-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240223143115.16521-1-anton@khirnov.net> References: <20240223143115.16521-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 01/38] lavu/opt: cosmetics, change option flags to (1 << N) style 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: It is easier to read. Also, change their doxy comments to use the same style. --- libavutil/opt.h | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/libavutil/opt.h b/libavutil/opt.h index 461b5d3b6b..6ed3407b09 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -278,25 +278,49 @@ typedef struct AVOption { double max; ///< maximum valid value for the option int flags; -#define AV_OPT_FLAG_ENCODING_PARAM 1 ///< a generic parameter which can be set by the user for muxing or encoding -#define AV_OPT_FLAG_DECODING_PARAM 2 ///< a generic parameter which can be set by the user for demuxing or decoding -#define AV_OPT_FLAG_AUDIO_PARAM 8 -#define AV_OPT_FLAG_VIDEO_PARAM 16 -#define AV_OPT_FLAG_SUBTITLE_PARAM 32 + +/** + * A generic parameter which can be set by the user for muxing or encoding. + */ +#define AV_OPT_FLAG_ENCODING_PARAM (1 << 0) +/** + * A generic parameter which can be set by the user for demuxing or decoding. + */ +#define AV_OPT_FLAG_DECODING_PARAM (1 << 1) +#define AV_OPT_FLAG_AUDIO_PARAM (1 << 3) +#define AV_OPT_FLAG_VIDEO_PARAM (1 << 4) +#define AV_OPT_FLAG_SUBTITLE_PARAM (1 << 5) /** * The option is intended for exporting values to the caller. */ -#define AV_OPT_FLAG_EXPORT 64 +#define AV_OPT_FLAG_EXPORT (1 << 6) /** * The option may not be set through the AVOptions API, only read. * This flag only makes sense when AV_OPT_FLAG_EXPORT is also set. */ -#define AV_OPT_FLAG_READONLY 128 -#define AV_OPT_FLAG_BSF_PARAM (1<<8) ///< a generic parameter which can be set by the user for bit stream filtering -#define AV_OPT_FLAG_RUNTIME_PARAM (1<<15) ///< a generic parameter which can be set by the user at runtime -#define AV_OPT_FLAG_FILTERING_PARAM (1<<16) ///< a generic parameter which can be set by the user for filtering -#define AV_OPT_FLAG_DEPRECATED (1<<17) ///< set if option is deprecated, users should refer to AVOption.help text for more information -#define AV_OPT_FLAG_CHILD_CONSTS (1<<18) ///< set if option constants can also reside in child objects +#define AV_OPT_FLAG_READONLY (1 << 7) +/** + * A generic parameter which can be set by the user for bit stream filtering. + */ +#define AV_OPT_FLAG_BSF_PARAM (1 << 8) + +/** + * A generic parameter which can be set by the user at runtime. + */ +#define AV_OPT_FLAG_RUNTIME_PARAM (1 << 15) +/** + * A generic parameter which can be set by the user for filtering. + */ +#define AV_OPT_FLAG_FILTERING_PARAM (1 << 16) +/** + * Set if option is deprecated, users should refer to AVOption.help text for + * more information. + */ +#define AV_OPT_FLAG_DEPRECATED (1 << 17) +/** + * Set if option constants can also reside in child objects. + */ +#define AV_OPT_FLAG_CHILD_CONSTS (1 << 18) //FIXME think about enc-audio, ... style flags /** -- 2.42.0 _______________________________________________ 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".