ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rcollate.c
(Generate patch)

Comparing ray/src/util/rcollate.c (file contents):
Revision 2.33 by greg, Fri Nov 8 16:36:36 2019 UTC vs.
Revision 2.34 by greg, Fri Nov 8 22:12:33 2019 UTC

# Line 387 | Line 387 | get_input_pos(int r, int c)
387          if (outLevels > 1) {            /* block reordering */
388                  n = get_block_pos(r, c, outArray, outLevels);
389                  if (transpose) {
390 <                        r = n/no_columns;
391 <                        c = n - r*no_columns;
392 <                        n = (long)r*ni_columns + c;
390 >                        r = n/ni_rows;
391 >                        c = n - r*ni_rows;
392 >                        n = (long)c*ni_columns + r;
393                  }
394          } else if (transpose)           /* transpose only */
395                  n = (long)c*ni_columns + r;
# Line 439 | Line 439 | do_reorder(const MEMLOAD *mp)
439                          no_columns = ni_rows;
440                  if (no_rows <= 0)
441                          no_rows = ni_columns;
442 <                if ((no_rows != ni_columns) | (no_columns != ni_rows))
442 >                if (outLevels <= 1 &&
443 >                                (no_rows != ni_columns) | (no_columns != ni_rows))
444                          goto badspec;
445          } else {
446                  if (no_columns <= 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines