Revision: 17508 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17508 Author: campbellbarton Date: 2008-11-20 01:34:24 +0100 (Thu, 20 Nov 2008)
Log Message: ----------- commit yesterday broke scaling in the sequencer (dumb mistake) also changed 3 if's into a switch statement for selecting the interpolation. Modified Paths: -------------- trunk/blender/source/blender/imbuf/intern/imageprocess.c trunk/blender/source/blender/src/seqeffects.c Modified: trunk/blender/source/blender/imbuf/intern/imageprocess.c =================================================================== --- trunk/blender/source/blender/imbuf/intern/imageprocess.c 2008-11-19 23:27:47 UTC (rev 17507) +++ trunk/blender/source/blender/imbuf/intern/imageprocess.c 2008-11-20 00:34:24 UTC (rev 17508) @@ -80,16 +80,16 @@ } } } -static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char *outI, float *outF, int x, int y) +static void pixel_from_buffer(struct ImBuf *ibuf, unsigned char **outI, float **outF, int x, int y) { int offset = ibuf->x * y * 4 + 4*x; if (ibuf->rect) - outI= (unsigned char *)ibuf->rect + offset; + *outI= (unsigned char *)ibuf->rect + offset; if (ibuf->rect_float) - outF= (float *)ibuf->rect_float + offset; + *outF= (float *)ibuf->rect_float + offset; } /************************************************************************** @@ -226,7 +226,7 @@ if (in == NULL || (in->rect == NULL && in->rect_float == NULL)) return; - pixel_from_buffer(out, outI, outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */ + pixel_from_buffer(out, &outI, &outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */ bicubic_interpolation_color(in, outI, outF, u, v); } @@ -309,7 +309,7 @@ if (in == NULL || (in->rect == NULL && in->rect_float == NULL)) return; - pixel_from_buffer(out, outI, outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */ + pixel_from_buffer(out, &outI, &outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */ bilinear_interpolation_color(in, outI, outF, u, v); } @@ -370,7 +370,7 @@ if (in == NULL || (in->rect == NULL && in->rect_float == NULL)) return; - pixel_from_buffer(out, outI, outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */ + pixel_from_buffer(out, &outI, &outF, xout, yout); /* gcc warns these could be uninitialized, but its ok */ neareast_interpolation_color(in, outI, outF, x, y); -} \ No newline at end of file +} Modified: trunk/blender/source/blender/src/seqeffects.c =================================================================== --- trunk/blender/source/blender/src/seqeffects.c 2008-11-19 23:27:47 UTC (rev 17507) +++ trunk/blender/source/blender/src/seqeffects.c 2008-11-20 00:34:24 UTC (rev 17508) @@ -2007,8 +2007,8 @@ tx = scale->xIni+(xo / 2.0f) + (scale->xFin-(xo / 2.0f) - scale->xIni+(xo / 2.0f)) * facf0; ty = scale->yIni+(yo / 2.0f) + (scale->yFin-(yo / 2.0f) - scale->yIni+(yo / 2.0f)) * facf0; }else{ - tx = xo*(scale->xIni/100.0)+(xo / 2.0f) + (xo*(scale->xFin/100.0)-(xo / 2.0f) - xo*(scale->xIni/100.0)+(xo / 2.0f)) * facf0; - ty = yo*(scale->yIni/100.0)+(yo / 2.0f) + (yo*(scale->yFin/100.0)-(yo / 2.0f) - yo*(scale->yIni/100.0)+(yo / 2.0f)) * facf0; + tx = xo*(scale->xIni/100.0f)+(xo / 2.0f) + (xo*(scale->xFin/100.0f)-(xo / 2.0f) - xo*(scale->xIni/100.0f)+(xo / 2.0f)) * facf0; + ty = yo*(scale->yIni/100.0f)+(yo / 2.0f) + (yo*(scale->yFin/100.0f)-(yo / 2.0f) - yo*(scale->yIni/100.0f)+(yo / 2.0f)) * facf0; } //factor Rotate @@ -2036,12 +2036,17 @@ ys += (yo / 2.0f); //interpolate - if(scale->interpolation==0) + switch(scale->interpolation) { + case 0: neareast_interpolation(ibuf1,out, xs,ys,xi,yi); - if(scale->interpolation==1) + break; + case 1: bilinear_interpolation(ibuf1,out, xs,ys,xi,yi); - if(scale->interpolation==2) + break; + case 2: bicubic_interpolation(ibuf1,out, xs,ys,xi,yi); + break; + } } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs