[FFmpeg-devel] [PATCH 6/6] Make av_fill_image_max_pixsteps() non static non inline.

Stefano Sabatini stefano.sabatini-lala
Thu Aug 26 02:27:46 CEST 2010


---
 libavcore/imgutils.c |   18 ++++++++++++++++++
 libavcore/imgutils.h |   19 ++-----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/libavcore/imgutils.c b/libavcore/imgutils.c
index 0a36f9e..a48364b 100644
--- a/libavcore/imgutils.c
+++ b/libavcore/imgutils.c
@@ -25,6 +25,24 @@
 #include "imgutils.h"
 #include "libavutil/pixdesc.h"
 
+void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
+                                const AVPixFmtDescriptor *pixdesc)
+{
+    int i;
+    memset(max_pixsteps, 0, 4*sizeof(max_pixsteps[0]));
+    if (max_pixstep_comps)
+        memset(max_pixstep_comps, 0, 4*sizeof(max_pixstep_comps[0]));
+
+    for (i = 0; i < 4; i++) {
+        const AVComponentDescriptor *comp = &(pixdesc->comp[i]);
+        if ((comp->step_minus1+1) > max_pixsteps[comp->plane]) {
+            max_pixsteps[comp->plane] = comp->step_minus1+1;
+            if (max_pixstep_comps)
+                max_pixstep_comps[comp->plane] = i;
+        }
+    }
+}
+
 int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane)
 {
     const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
diff --git a/libavcore/imgutils.h b/libavcore/imgutils.h
index 54fc1c1..1ca6ed6 100644
--- a/libavcore/imgutils.h
+++ b/libavcore/imgutils.h
@@ -43,23 +43,8 @@
  * @param max_pixstep_comps an array which is filled with the component
  * for each plane which has the max pixel step. May be NULL.
  */
-static inline void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
-                                              const AVPixFmtDescriptor *pixdesc)
-{
-    int i;
-    memset(max_pixsteps, 0, 4*sizeof(max_pixsteps[0]));
-    if (max_pixstep_comps)
-        memset(max_pixstep_comps, 0, 4*sizeof(max_pixstep_comps[0]));
-
-    for (i = 0; i < 4; i++) {
-        const AVComponentDescriptor *comp = &(pixdesc->comp[i]);
-        if ((comp->step_minus1+1) > max_pixsteps[comp->plane]) {
-            max_pixsteps[comp->plane] = comp->step_minus1+1;
-            if (max_pixstep_comps)
-                max_pixstep_comps[comp->plane] = i;
-        }
-    }
-}
+void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
+                                const AVPixFmtDescriptor *pixdesc);
 
 /**
  * Compute the size of an image line with format pix_fmt and width
-- 
1.7.1




More information about the ffmpeg-devel mailing list