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:
authorJanne Karhu <jhkarh@gmail.com>2010-10-30 19:20:48 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-10-30 19:20:48 +0400
commitd29d972e335daad56a7ba6b552db9aa8d870adfe (patch)
treeb8ebacbb4e2c9e9d75816000a0d080cbf9418a96 /source/blender/blenkernel/intern/seqeffects.c
parente548e3e1d81e03c94993734de8af1ed7670a6d1c (diff)
Fix for [#23318] SEQUENCER EFFECT: Glow blur amount should be relative
Diffstat (limited to 'source/blender/blenkernel/intern/seqeffects.c')
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 6477c6b4f75..66cad5090f8 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -2631,32 +2631,30 @@ static void copy_glow_effect(Sequence *dst, Sequence *src)
}
//void do_glow_effect(Cast *cast, float facf0, float facf1, int xo, int yo, ImBuf *ibuf1, ImBuf *ibuf2, ImBuf *outbuf, ImBuf *use)
-static void do_glow_effect_byte(Sequence *seq, float facf0, float UNUSED(facf1),
+static void do_glow_effect_byte(Sequence *seq, int render_size, float facf0, float UNUSED(facf1),
int x, int y, char *rect1,
char *UNUSED(rect2), char *out)
{
unsigned char *outbuf=(unsigned char *)out;
unsigned char *inbuf=(unsigned char *)rect1;
GlowVars *glow = (GlowVars *)seq->effectdata;
- int size= 100; // renderdata XXX
RVIsolateHighlights_byte(inbuf, outbuf , x, y, glow->fMini*765, glow->fBoost * facf0, glow->fClamp);
- RVBlurBitmap2_byte (outbuf, x, y, glow->dDist * (size / 100.0f),glow->dQuality);
+ RVBlurBitmap2_byte (outbuf, x, y, glow->dDist * (render_size / 100.0f),glow->dQuality);
if (!glow->bNoComp)
RVAddBitmaps_byte (inbuf , outbuf, outbuf, x, y);
}
-static void do_glow_effect_float(Sequence *seq, float facf0, float UNUSED(facf1),
+static void do_glow_effect_float(Sequence *seq, int render_size, float facf0, float UNUSED(facf1),
int x, int y,
float *rect1, float *UNUSED(rect2), float *out)
{
float *outbuf = out;
float *inbuf = rect1;
GlowVars *glow = (GlowVars *)seq->effectdata;
- int size= 100; // renderdata XXX
RVIsolateHighlights_float(inbuf, outbuf , x, y, glow->fMini*3.0f, glow->fBoost * facf0, glow->fClamp);
- RVBlurBitmap2_float (outbuf, x, y, glow->dDist * (size / 100.0f),glow->dQuality);
+ RVBlurBitmap2_float (outbuf, x, y, glow->dDist * (render_size / 100.0f),glow->dQuality);
if (!glow->bNoComp)
RVAddBitmaps_float (inbuf , outbuf, outbuf, x, y);
}
@@ -2664,19 +2662,19 @@ static void do_glow_effect_float(Sequence *seq, float facf0, float UNUSED(facf1)
static struct ImBuf * do_glow_effect(
Main *UNUSED(bmain), Scene *UNUSED(scene), Sequence *seq, float UNUSED(cfra),
float facf0, float facf1, int x, int y,
- int UNUSED(preview_render_size),
+ int render_size,
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
struct ImBuf *ibuf3)
{
struct ImBuf * out = prepare_effect_imbufs(x, y, ibuf1, ibuf2, ibuf3);
if (out->rect_float) {
- do_glow_effect_float(seq,
+ do_glow_effect_float(seq, render_size,
facf0, facf1, x, y,
ibuf1->rect_float, ibuf2->rect_float,
out->rect_float);
} else {
- do_glow_effect_byte(seq,
+ do_glow_effect_byte(seq, render_size,
facf0, facf1, x, y,
(char*) ibuf1->rect, (char*) ibuf2->rect,
(char*) out->rect);