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:
authorMike Erwin <significant.bit@gmail.com>2016-07-22 01:14:58 +0300
committerMike Erwin <significant.bit@gmail.com>2016-07-22 01:16:08 +0300
commit23f1b2073f4a98256dc368fccb9603295d04fa6a (patch)
tree3faf062028c370d1510c660d21dcc32783fa0a1a /source/blender/imbuf
parentd1f9342e37c3ead139559249b8a2cb35fdabad55 (diff)
fix comparison of identicals
Some of these check that dimensions match before running code that assumes they do match. For imb_stereo3d_write_anaglyph I *assume* this change reflects the intended behavior. Before it was always grabbing alpha from buffer 0. Found with PVS-Studio T48917
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/filter.c2
-rw-r--r--source/blender/imbuf/intern/stereoimbuf.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 26ced49a333..1987c6d2a9a 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -206,7 +206,7 @@ void imb_filterx(struct ImBuf *ibuf)
static void imb_filterN(ImBuf *out, ImBuf *in)
{
BLI_assert(out->channels == in->channels);
- BLI_assert(out->x == in->x && out->y == out->y);
+ BLI_assert(out->x == in->x && out->y == in->y);
const int channels = in->channels;
const int rowlen = in->x;
diff --git a/source/blender/imbuf/intern/stereoimbuf.c b/source/blender/imbuf/intern/stereoimbuf.c
index a55cef60943..a4418443790 100644
--- a/source/blender/imbuf/intern/stereoimbuf.c
+++ b/source/blender/imbuf/intern/stereoimbuf.c
@@ -117,7 +117,7 @@ static void imb_stereo3d_write_anaglyph(Stereo3DData *s3d, enum eStereo3dAnaglyp
to[0] = from[r][0];
to[1] = from[g][1];
to[2] = from[b][2];
- to[3] = MAX2(from[0][3], from[0][3]);
+ to[3] = MAX2(from[0][3], from[1][3]);
}
}
}
@@ -154,7 +154,7 @@ static void imb_stereo3d_write_anaglyph(Stereo3DData *s3d, enum eStereo3dAnaglyp
to[0] = from[r][0];
to[1] = from[g][1];
to[2] = from[b][2];
- to[3] = MAX2(from[0][3], from[0][3]);
+ to[3] = MAX2(from[0][3], from[1][3]);
}
}
}