Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2008-01-01 14:44:42 +0300
committerPeter Schlaile <peter@schlaile.de>2008-01-01 14:44:42 +0300
commit3ef896a9453acb8c564b8a8fd97885958c733436 (patch)
treec747dac3b48bc60b161c949b16aa4eefe67a06bc /source/blender/imbuf
parent0a62df356d85eb61cbacf826cc9fb00e4593051b (diff)
== Sequencer ==
Attention! Rather large sequencer rewrite: * Implemented layer blending using implicit effects. (works like layers in "The Gimp" or Photoshop.) * Fixed Space-Bar start-stop in preview windows. You can start playback using spacebar within a preview-window and it _works_! * Fixed Flip Y (didn't work for float) * Fixed premul (didn't work for float) * Added IPOs to _all_ tracks. In blend-mode REPLACE it drives the "mul"-parameter in all other blend modes it drives the effect. * you can meta single tracks. * moved "mute track" from "M" to "Shift-M" * added "Shift-L" for "lock track" * changed inner workings for Metas. Now all ImBufs have to use the reference counting mechanism. (Only interesting for coders :) !!! Really important change, that affects current files! Since you can mute tracks and now there is real layer blending capabilities in place, I changed the silly behaviour that chose the output track. Old behaviour: if we have an effect track visible, use the uppermost effect track. If there is _no_ effect track visible, use the lowest input track. New behaviour: always use the uppermost track. With blend modes active: work our way down starting from the uppermost track to the first "replace"-mode track. This is the way the gimp, photoshop, basically _all_ other applications work... So if this change ruins your day: please try to fix your files using "mute". If this doesn't work out, I can still restore the old behaviour, but I really hope, that this is _not_ necessary! Rational: most people won't get affected by this change, since you can't really do anything usefull with the (old) sequencer without at least one effect track and then you are on the safe side...
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/rotate.c61
1 files changed, 34 insertions, 27 deletions
diff --git a/source/blender/imbuf/intern/rotate.c b/source/blender/imbuf/intern/rotate.c
index 42b30d6284f..8f5fb39d956 100644
--- a/source/blender/imbuf/intern/rotate.c
+++ b/source/blender/imbuf/intern/rotate.c
@@ -43,48 +43,55 @@
void IMB_flipy(struct ImBuf * ibuf)
{
- short x, y;
- unsigned int *top, *bottom, do_float=0, *line;
- float *topf=NULL, *bottomf=NULL, *linef=NULL;
+ int x, y;
if (ibuf == NULL) return;
- if (ibuf->rect == NULL) return;
-
- if (ibuf->rect_float) do_float =1;
- x = ibuf->x;
- y = ibuf->y;
+ if (ibuf->rect) {
+ unsigned int *top, *bottom, *line;
+
+ x = ibuf->x;
+ y = ibuf->y;
- top = ibuf->rect;
- bottom = top + ((y-1) * x);
- line= MEM_mallocN(x*sizeof(int), "linebuf");
+ top = ibuf->rect;
+ bottom = top + ((y-1) * x);
+ line= MEM_mallocN(x*sizeof(int), "linebuf");
- if (do_float) {
+ y >>= 1;
+
+ for(;y>0;y--) {
+ memcpy(line, top, x*sizeof(int));
+ memcpy(top, bottom, x*sizeof(int));
+ memcpy(bottom, line, x*sizeof(int));
+ bottom -= x;
+ top+= x;
+ }
+
+ MEM_freeN(line);
+ }
+
+ if (ibuf->rect_float) {
+ float *topf=NULL, *bottomf=NULL, *linef=NULL;
+
+ x = ibuf->x;
+ y = ibuf->y;
+
topf= ibuf->rect_float;
bottomf = topf + 4*((y-1) * x);
linef= MEM_mallocN(4*x*sizeof(float), "linebuff");
- }
- y >>= 1;
-
- for(;y>0;y--) {
-
- memcpy(line, top, x*sizeof(int));
- memcpy(top, bottom, x*sizeof(int));
- memcpy(bottom, line, x*sizeof(int));
- bottom -= x;
- top+= x;
-
- if(do_float) {
+
+ y >>= 1;
+
+ for(;y>0;y--) {
memcpy(linef, topf, 4*x*sizeof(float));
memcpy(topf, bottomf, 4*x*sizeof(float));
memcpy(bottomf, linef, 4*x*sizeof(float));
bottomf -= 4*x;
topf+= 4*x;
}
+
+ MEM_freeN(linef);
}
-
- MEM_freeN(line);
- if(linef) MEM_freeN(linef);
}
void IMB_flipx(struct ImBuf * ibuf)