[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49391] branches/soc-2011-tomato/source/ blender: Color management: fix crash in partial display buffer update
Sergey Sharybin
sergey.vfx at gmail.com
Mon Jul 30 12:35:34 CEST 2012
Revision: 49391
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49391
Author: nazgul
Date: 2012-07-30 10:35:34 +0000 (Mon, 30 Jul 2012)
Log Message:
-----------
Color management: fix crash in partial display buffer update
Crash was caused by the difference in how compositor walks tile
rectangles and how they were walked in partial update function:
compositor excludes right / top bound and partial update handled
it which lead to reading / writing to wrong memory.
Switch partial update routines to the same logic as it's used
in tile compositor, which made it kind of unified with render
rectangle update.
Modified Paths:
--------------
branches/soc-2011-tomato/source/blender/editors/render/render_internal.c
branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c
Modified: branches/soc-2011-tomato/source/blender/editors/render/render_internal.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/render/render_internal.c 2012-07-30 09:47:39 UTC (rev 49390)
+++ branches/soc-2011-tomato/source/blender/editors/render/render_internal.c 2012-07-30 10:35:34 UTC (rev 49391)
@@ -153,7 +153,7 @@
xmax, ymax, ibuf->x, rr->rectx);
IMB_partial_display_buffer_update(ibuf, rectf, rr->rectx, rxmin, rymin,
- rxmin, rymin, rxmin + xmax - 1, rymin + ymax - 1);
+ rxmin, rymin, rxmin + xmax, rymin + ymax);
}
/* ****************************** render invoking ***************** */
Modified: branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c
===================================================================
--- branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c 2012-07-30 09:47:39 UTC (rev 49390)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c 2012-07-30 10:35:34 UTC (rev 49391)
@@ -1789,8 +1789,8 @@
{
int x, y;
- for (y = ymin; y <= ymax; y++) {
- for (x = xmin; x <= xmax; x++) {
+ for (y = ymin; y < ymax; y++) {
+ for (x = xmin; x < xmax; x++) {
int display_index = (y * display_stride + x) * channels;
int linear_index = ((y - linear_offset_y) * linear_stride + (x - linear_offset_x)) * channels;
float pixel[4];
More information about the Bf-blender-cvs
mailing list