diff options
author | Benjamin Otte <otte@gnome.org> | 2002-04-06 03:40:14 +0000 |
---|---|---|
committer | Benjamin Otte <otte@gnome.org> | 2002-04-06 03:40:14 +0000 |
commit | ffd4b556cc0e94ccdc92b6fa47a0d1b93ab6a26b (patch) | |
tree | 84480c8c8541ea0aafc2c7982e44bd88b1d73afc /gst/goom | |
parent | 30cb4afbf65b8b6b3285cca41ffe81a7f1c78754 (diff) |
fixed first bunch of compiler warnings
Original commit message from CVS:
fixed first bunch of compiler warnings
Diffstat (limited to 'gst/goom')
-rw-r--r-- | gst/goom/filters.c | 37 | ||||
-rw-r--r-- | gst/goom/goom_core.c | 15 |
2 files changed, 33 insertions, 19 deletions
diff --git a/gst/goom/filters.c b/gst/goom/filters.c index 12fcca56..06dd68ea 100644 --- a/gst/goom/filters.c +++ b/gst/goom/filters.c @@ -92,17 +92,20 @@ inline void calculatePXandPY (int x, int y, int *px, int *py) static int wavesp = 0 ; int yy ; - yy = y + RAND () % 4 - RAND () % 4 + wave / 10 ; + yy = y + RAND () % 4 + wave / 10 ; + yy -= RAND () % 4; if (yy < 0) yy = 0 ; if (yy >= resoly) yy = resoly - 1 ; *px = (x<<4) + firedec [yy] + (wave / 10) ; *py = (y<<4) + 132 - ((vitesse < 132) ? vitesse : 131) ; - wavesp += RAND () % 3 - RAND () % 3 ; + wavesp += RAND () % 3; + wavesp -= RAND () % 3; if (wave < -10) wavesp += 2 ; if (wave > 10) wavesp -= 2 ; - wave += (wavesp / 10) + RAND () % 3 - RAND () % 3 ; + wave += (wavesp / 10) + RAND () % 3; + wave -= RAND () % 3; if (wavesp > 100) wavesp = (wavesp * 9) / 10 ; } else @@ -113,8 +116,10 @@ inline void calculatePXandPY (int x, int y, int *px, int *py) if (noisify) { - x += RAND() % noisify - RAND() % noisify ; - y += RAND() % noisify - RAND() % noisify ; + x += RAND() % noisify; + x -= RAND() % noisify; + y += RAND() % noisify; + y -= RAND() % noisify; } if (hPlaneEffect) vx = ((x - middleX) << 9) + hPlaneEffect * (y - middleY); @@ -356,7 +361,8 @@ void zoomFilterFastRGB (Uint *pix1, loopv -- ; firedec [loopv] = decc ; decc += spdc / 10 ; - spdc = spdc + RAND () % 3 - RAND () % 3 ; + spdc+= RAND () % 3; + spdc-= RAND () % 3; if (decc > 4) spdc -= 1 ; @@ -377,7 +383,8 @@ void zoomFilterFastRGB (Uint *pix1, if (decc > 8 || decc < -8) decc = decc * 8 / 9 ; - accel += RAND () % 2 - RAND () % 2 ; + accel += RAND () % 2; + accel -= RAND () % 2; if (accel > 20) accel -= 2 ; if (accel < -20) @@ -419,7 +426,7 @@ void zoomFilterFastRGB (Uint *pix1, { int npx10 ; int npy10 ; - int pos = (y*prevX+x)*2; + int pos; npx10 = (px/sqrtperte) ; npy10 = (py/sqrtperte) ; @@ -430,6 +437,7 @@ void zoomFilterFastRGB (Uint *pix1, coefh = px % sqrtperte ; coefv = py % sqrtperte ; #ifdef USE_ASM + pos = (y*prevX+x)*2; coeffs[pos] = (npx10 + prevX * npy10) * 4; if (!(coefh || coefv)) @@ -443,16 +451,17 @@ void zoomFilterFastRGB (Uint *pix1, coeffs[pos+1] |= ((sqrtperte-coefh) * coefv) << 16 ; coeffs[pos+1] |= (coefh * coefv)<<24 ; #else - pos10[y*prevX+x]= npx10 + prevX * npy10 ; + pos = y*prevX+x; + pos10[pos]= npx10 + prevX * npy10 ; if (!(coefh || coefv)) - c1[y*prevX+x] = sqrtperte*sqrtperte-1 ; + c1[pos] = sqrtperte*sqrtperte-1 ; else - c1[y*prevX+x] = (sqrtperte-coefh) * (sqrtperte-coefv); + c1[pos] = (sqrtperte-coefh) * (sqrtperte-coefv); - c2[y*prevX+x] = coefh * (sqrtperte-coefv) ; - c3[y*prevX+x] = (sqrtperte-coefh) * coefv ; - c4[y*prevX+x] = coefh * coefv ; + c2[pos] = coefh * (sqrtperte-coefv) ; + c3[pos] = (sqrtperte-coefh) * coefv ; + c4[pos] = coefh * coefv ; #endif } } diff --git a/gst/goom/goom_core.c b/gst/goom/goom_core.c index 5f243b40..ab2fea69 100644 --- a/gst/goom/goom_core.c +++ b/gst/goom/goom_core.c @@ -245,18 +245,22 @@ guint32 * goom_update (gint16 data [2][512]) switch (vtmp = (iRAND (27))) { case 0: - zfd.vPlaneEffect = iRAND(3) - iRAND(3); - zfd.hPlaneEffect = iRAND(3) - iRAND(3); + zfd.vPlaneEffect = iRAND(3); + zfd.vPlaneEffect -= iRAND(3); + zfd.hPlaneEffect = iRAND(3); + zfd.hPlaneEffect -= iRAND(3); break; case 3: zfd.vPlaneEffect = 0 ; - zfd.hPlaneEffect = iRAND(8) - iRAND(8); + zfd.hPlaneEffect = iRAND(8); + zfd.hPlaneEffect -= iRAND(8); break; case 4: case 5: case 6: case 7: - zfd.vPlaneEffect = iRAND(5) - iRAND (5); + zfd.vPlaneEffect = iRAND(5); + zfd.vPlaneEffect -= iRAND(5); zfd.hPlaneEffect = - zfd.vPlaneEffect; break; case 8: @@ -269,7 +273,8 @@ guint32 * goom_update (gint16 data [2][512]) break; case 13: zfd.hPlaneEffect = 0; - zfd.vPlaneEffect = iRAND(10) - iRAND(10); + zfd.vPlaneEffect = iRAND(10); + zfd.vPlaneEffect -= iRAND(10); break; default: if (vtmp < 10) |