Page MenuHome
Paste P235

fix for T45086
ActivePublic

Authored by Campbell Barton (campbellbarton) on Jun 15 2015, 9:07 PM.
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 9cce929..7fce5a6 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -1056,6 +1056,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings *
void *cache_handle = NULL;
struct ColormanageProcessor *cm_processor = NULL;
int rows_per_sample_line;
+ int ibuf_y_scan;
if (ibuf->rect == NULL && ibuf->rect_float == NULL) return;
@@ -1125,9 +1126,12 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings *
&cache_handle);
}
+ /* account for rounding */
+ ibuf_y_scan = rows_per_sample_line * scopes->sample_lines;
+
/* Keep number of threads in sync with the merge parts below. */
#pragma omp parallel for private(y) schedule(static) num_threads(num_threads) if(ibuf->y > 256)
- for (y = 0; y < ibuf->y; y++) {
+ for (y = 0; y < ibuf_y_scan; y++) {
#ifdef _OPENMP
const int thread_idx = omp_get_thread_num();
#else

Event Timeline

Campbell Barton (campbellbarton) changed the title of this paste from untitled to fix for T45086.
Campbell Barton (campbellbarton) updated the paste's language from autodetect to diff.