diff mbox series

[FFmpeg-devel,35/35] avfilter/avfilter: Reorder structure fields

Message ID DU0P250MB07479FA8D5F901B8079C34B68F4A2@DU0P250MB0747.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series Major library version bump | expand

Checks

Context Check Description
yinshiyou/configure_loongarch64 warning Failed to apply patch
andriy/configure_x86 warning Failed to apply patch

Commit Message

Andreas Rheinhardt Feb. 10, 2024, 11:04 p.m. UTC
Move related fields closer together and try to plug holes.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/avfilter.h | 41 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 21 deletions(-)
diff mbox series

Patch

diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 35840cfd54..f376d25efc 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -441,6 +441,13 @@  struct AVFilterContext {
      */
     int thread_type;
 
+    /**
+     * Max number of threads allowed in this filter instance.
+     * If <= 0, its value is ignored.
+     * Overrides global number of threads set per filter graph.
+     */
+    int nb_threads;
+
     struct AVFilterCommand *command_queue;
 
     char *enable_str;               ///< enable expression string
@@ -461,13 +468,6 @@  struct AVFilterContext {
      */
     AVBufferRef *hw_device_ctx;
 
-    /**
-     * Max number of threads allowed in this filter instance.
-     * If <= 0, its value is ignored.
-     * Overrides global number of threads set per filter graph.
-     */
-    int nb_threads;
-
     /**
      * Ready status of the filter.
      * A non-0 value means that the filter needs activating;
@@ -548,14 +548,25 @@  struct AVFilterLink {
 
     enum AVMediaType type;      ///< filter media type
 
+    int format;                 ///< agreed upon media format
+
     /* These parameters apply only to video */
     int w;                      ///< agreed upon image width
     int h;                      ///< agreed upon image height
     AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio
+    /**
+     * For non-YUV links, these are respectively set to fallback values (as
+     * appropriate for that colorspace).
+     *
+     * Note: This includes grayscale formats, as these are currently treated
+     * as forced full range always.
+     */
+    enum AVColorSpace colorspace;   ///< agreed upon YUV color space
+    enum AVColorRange color_range;  ///< agreed upon YUV color range
+
     /* These parameters apply only to audio */
     int sample_rate;            ///< samples per second
-
-    int format;                 ///< agreed upon media format
+    AVChannelLayout ch_layout;  ///< channel layout of current buffer (see libavutil/channel_layout.h)
 
     /**
      * Define the time base used by the PTS of the frames/samples
@@ -566,18 +577,6 @@  struct AVFilterLink {
      */
     AVRational time_base;
 
-    AVChannelLayout ch_layout;  ///< channel layout of current buffer (see libavutil/channel_layout.h)
-
-    /**
-     * For non-YUV links, these are respectively set to fallback values (as
-     * appropriate for that colorspace).
-     *
-     * Note: This includes grayscale formats, as these are currently treated
-     * as forced full range always.
-     */
-    enum AVColorSpace colorspace;   ///< agreed upon YUV color space
-    enum AVColorRange color_range;  ///< agreed upon YUV color range
-
     /*****************************************************************
      * All fields below this line are not part of the public API. They
      * may not be used outside of libavfilter and can be changed and