summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2024-02-07 16:24:31 +0100
committerAnton Khirnov <anton@khirnov.net>2024-03-01 16:57:24 +0100
commit105a1bc1502ea62f40f5892e7a16133860203245 (patch)
tree929196afcfa4b587446b2467052e8c0c7e26130b /libavutil
parente48055fdceceab3aed09b0f82299bc3fbbb94b54 (diff)
lavu/opt: cosmetics, change option flags to (1 << N) style
It is easier to read. Also, change their doxy comments to use the same style.
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/opt.h48
1 files 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
/**