]> git.sesse.net Git - mlt/commitdiff
fix clang errors
authorDan Dennedy <dan@dennedy.org>
Mon, 18 Jun 2012 17:34:50 +0000 (10:34 -0700)
committerDan Dennedy <dan@dennedy.org>
Mon, 18 Jun 2012 17:34:50 +0000 (10:34 -0700)
src/modules/rotoscoping/filter_rotoscoping.c
src/modules/vmfx/filter_shape.c
src/modules/xine/vf_yadif_template.h
src/modules/xine/yadif.c

index a5cabb41613304e55b677469c516d33b4473a62b..4a40bbe2f5cce1aadb6a99ad5724a13de50e9f50 100644 (file)
@@ -54,7 +54,7 @@ const char *ALPHAOPERATIONSTR[5] = { "clear", "max", "min", "add", "sub" };
 
 /** Returns the index of \param string in \param stringList.
  * Useful for assigning string parameters to enums. */
-int stringValue( const char *string, const char **stringList, int max )
+static int stringValue( const char *string, const char **stringList, int max )
 {
     int i;
     for ( i = 0; i < max; i++ )
@@ -72,7 +72,7 @@ static void rotoPropertyChanged( mlt_service owner, mlt_filter this, char *name
 }
 
 /** Linear interp */
-inline void lerp( const PointF *a, const PointF *b, PointF *result, double t )
+static inline void lerp( const PointF *a, const PointF *b, PointF *result, double t )
 {
     result->x = a->x + ( b->x - a->x ) * t;
     result->y = a->y + ( b->y - a->y ) * t;
@@ -80,7 +80,7 @@ inline void lerp( const PointF *a, const PointF *b, PointF *result, double t )
 
 /** Linear interp. with t = 0.5
  * Speed gain? */
-inline void lerpHalf( const PointF *a, const PointF *b, PointF *result )
+static inline void lerpHalf( const PointF *a, const PointF *b, PointF *result )
 {
     result->x = ( a->x + b->x ) * .5;
     result->y = ( a->y + b->y ) * .5;
@@ -93,7 +93,7 @@ int ncompare( const void *a, const void *b )
 }
 
 /** Turns a json array with two children into a point (x, y tuple). */
-void jsonGetPoint( cJSON *json, PointF *point )
+static void jsonGetPoint( cJSON *json, PointF *point )
 {
     if ( cJSON_GetArraySize( json ) == 2 )
     {
@@ -109,7 +109,7 @@ void jsonGetPoint( cJSON *json, PointF *point )
  * \param points pointer to array of points. Will be allocated and filled with the points in \param array
  * \return number of points
  */
-int json2BCurves( cJSON *array, BPointF **points )
+static int json2BCurves( cJSON *array, BPointF **points )
 {
     int count = cJSON_GetArraySize( array );
     cJSON *child = array->child;
@@ -134,7 +134,7 @@ int json2BCurves( cJSON *array, BPointF **points )
 }
 
 /** Blurs \param src horizontally. \See funtion blur. */
-void blurHorizontal( uint8_t *src, uint8_t *dst, int width, int height, int radius)
+static void blurHorizontal( uint8_t *src, uint8_t *dst, int width, int height, int radius)
 {
     int x, y, kx, yOff, total, amount, amountInit;
     amountInit = radius * 2 + 1;
@@ -167,7 +167,7 @@ void blurHorizontal( uint8_t *src, uint8_t *dst, int width, int height, int radi
 }
 
 /** Blurs \param src vertically. \See funtion blur. */
-void blurVertical( uint8_t *src, uint8_t *dst, int width, int height, int radius)
+static void blurVertical( uint8_t *src, uint8_t *dst, int width, int height, int radius)
 {
     int x, y, ky, total, amount, amountInit;
     amountInit = radius * 2 + 1;
@@ -202,7 +202,7 @@ void blurVertical( uint8_t *src, uint8_t *dst, int width, int height, int radius
  * \param radius blur radius
  * \param passes blur passes
  */
-void blur( uint8_t *map, int width, int height, int radius, int passes )
+static void blur( uint8_t *map, int width, int height, int radius, int passes )
 {
     uint8_t *src = mlt_pool_alloc( width * height );
     uint8_t *tmp = mlt_pool_alloc( width * height );
@@ -229,7 +229,7 @@ void blur( uint8_t *map, int width, int height, int radius, int passes )
  * \param map array of integers of the dimension width * height.
  *            The map entries belonging to the points in the polygon will be set to \param set * 255 the others to !set * 255.
  */
-void fillMap( PointF *vertices, int count, int width, int height, int invert, uint8_t *map )
+static void fillMap( PointF *vertices, int count, int width, int height, int invert, uint8_t *map )
 {
     int nodes, nodeX[1024], pixelY, i, j, value;
 
@@ -270,7 +270,7 @@ void fillMap( PointF *vertices, int count, int width, int height, int invert, ui
 /** Determines the point in the middle of the Bézier curve (t = 0.5) defined by \param p1 and \param p2
  * using De Casteljau's algorithm.
  */
-void deCasteljau( BPointF *p1, BPointF *p2, BPointF *mid )
+static void deCasteljau( BPointF *p1, BPointF *p2, BPointF *mid )
 {
     struct PointF ab, bc, cd;
 
@@ -292,7 +292,7 @@ void deCasteljau( BPointF *p1, BPointF *p2, BPointF *mid )
  * \param count Number of calculated points in \param points
  * \param size Allocated size of \param points (in elements not in bytes)
  */
-void curvePoints( BPointF p1, BPointF p2, PointF **points, int *count, int *size )
+static void curvePoints( BPointF p1, BPointF p2, PointF **points, int *count, int *size )
 {
     double errorSqr = SQR( p1.p.x - p2.p.x ) + SQR( p1.p.y - p2.p.y );
 
index a3a0e9698eee84b63306494f7218210b165fa6de..cfe0ee6243b652f2d096d6cb8e232f3d4036e33e 100644 (file)
@@ -25,7 +25,7 @@
 #include <framework/mlt_producer.h>
 #include <framework/mlt_geometry.h>
 
-inline double smoothstep( const double e1, const double e2, const double a )
+static inline double smoothstep( const double e1, const double e2, const double a )
 {
     if ( a < e1 ) return 0.0;
     if ( a > e2 ) return 1.0;
index 2a57d418ee3fc8a2c5aa23e9af68bb6f9b1d304b..e224844427e6c9159d193ca968cef877724a90d6 100644 (file)
@@ -144,8 +144,8 @@ static attribute_align_arg void FILTER_LINE_FUNC_NAME(int mode, uint8_t *dst, co
             "pmaxub      %%xmm3, %%xmm2 \n\t"\\r
             /*"pshuflw      $9,%%xmm2, %%xmm3 \n\t"*/\\r
             /*"pshufhw      $9,%%xmm2, %%xmm3 \n\t"*/\\r
-            "movdqa %%xmm2, %%xmm3 \n\t" /* correct replacement (here)  */\
-            "psrldq $2, %%xmm3 \n\t"/* for "pshufw $9,%%mm2, %%mm3" - fix by Fizick */\
+            "movdqa %%xmm2, %%xmm3 \n\t" /* correct replacement (here)  */\\r
+            "psrldq $2, %%xmm3 \n\t"/* for "pshufw $9,%%mm2, %%mm3" - fix by Fizick */\\r
             "punpcklbw   %%xmm7, %%xmm2 \n\t" /* ABS(cur[x-refs-1] - cur[x+refs-1]) */\\r
             "punpcklbw   %%xmm7, %%xmm3 \n\t" /* ABS(cur[x-refs+1] - cur[x+refs+1]) */\\r
             "paddw       %%xmm2, %%xmm0 \n\t"\\r
@@ -163,7 +163,7 @@ static attribute_align_arg void FILTER_LINE_FUNC_NAME(int mode, uint8_t *dst, co
 \\r
             /* if(yadctx->mode<2) ... */\\r
             "movdqa      %[tmp3], %%xmm6 \n\t" /* diff */\\r
-            "cmp         $2, %[mode] \n\t"\\r
+            "cmpl        $2, %[mode] \n\t"\\r
             "jge         1f \n\t"\\r
             LOAD8("(%["prev2"],%[mrefs],2)", %%xmm2) /* prev2[x-2*refs] */\\r
             LOAD8("(%["next2"],%[mrefs],2)", %%xmm4) /* next2[x-2*refs] */\\r
index 3995a074e4ca75db8529d1b3dbad075e328c6a64..f072c4c9f6e7160173e75d4b532f931c2dddd8a6 100644 (file)
@@ -169,7 +169,7 @@ static void filter_line_mmx2(int mode, uint8_t *dst, const uint8_t *prev, const
 \
             /* if(p->mode<2) ... */\
             "movq    %[tmp3], %%mm6 \n\t" /* diff */\
-            "cmp       $2, %[mode] \n\t"\
+            "cmpl      $2, %[mode] \n\t"\
             "jge       1f \n\t"\
             LOAD4("(%["prev2"],%[mrefs],2)", %%mm2) /* prev2[x-2*refs] */\
             LOAD4("(%["next2"],%[mrefs],2)", %%mm4) /* next2[x-2*refs] */\
@@ -452,7 +452,7 @@ static attribute_align_arg void  YUY2ToPlanes_mmx(const unsigned char *srcYUY2,
         "packuswb %%mm4, %%mm4 \n\t" /* xxxxVVVV */\
         "movd %%mm2, (%%edx,%%eax) \n\t" /* store u */\
         "add $4, %%eax \n\t" \
-        "cmp %%ecx, %%eax \n\t" \
+        "cmpl %%ecx, %%eax \n\t" \
         "movd %%mm4, -4(%%esi,%%eax) \n\t" /* store v */\
         "jl xloop%= \n\t"\
         : : "D"(srcYUY2), "b"(py), "d"(pu), "S"(pv), "c"(widthdiv2) : "%eax");
@@ -486,7 +486,7 @@ static attribute_align_arg void YUY2FromPlanes_mmx(unsigned char *dstYUY2, int p
         "punpckhbw %%mm1, %%mm3 \n\t" /* VYUYVYUY */\
         "movntq %%mm0, -16(%%edi,%%eax,4) \n\t" /*store */\
         "movntq %%mm3, -8(%%edi,%%eax,4) \n\t" /*  store */\
-        "cmp %%ecx, %%eax \n\t"\
+        "cmpl %%ecx, %%eax \n\t"\
         "jl xloop%= \n\t"\
         : : "b"(py), "d"(pu), "S"(pv), "D"(dstYUY2), "c"(widthdiv2) : "%eax");
         py += pitch_y;