/** 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++ )
}
/** 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;
/** 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;
}
/** 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 )
{
* \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;
}
/** 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;
}
/** 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;
* \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 );
* \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;
/** 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;
* \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 );
"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
\\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
\
/* 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] */\
"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");
"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;