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

Comparing ray/src/px/pcond.c (file contents):
Revision 3.29 by greg, Thu Aug 2 18:33:44 2018 UTC vs.
Revision 3.33 by greg, Wed Sep 11 18:56:11 2024 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8  
9   #include "platform.h"
10   #include "paths.h"
11 #include "paths.h"
11   #include "pcond.h"
12  
13  
14   #define LDMAX           100             /* default max. display luminance */
15 < #define LDDYN           32              /* default dynamic range */
15 > #define LDDYN           100             /* default dynamic range */
16  
17   int     what2do = 0;                    /* desired adjustments */
18  
# Line 220 | Line 219 | headline(                              /* process header line */
219          char    fmt[MAXFMTLEN];
220  
221          if (formatval(fmt, s)) {        /* check if format string */
222 <                if (!strcmp(fmt,COLRFMT)) lumf = rgblum;
223 <                else if (!strcmp(fmt,CIEFMT)) lumf = cielum;
224 <                else lumf = NULL;
222 >                if (!strcmp(fmt,COLRFMT) || !strcmp(fmt,SPECFMT))
223 >                        lumf = rgblum;
224 >                else if (!strcmp(fmt,CIEFMT))
225 >                        lumf = cielum;
226 >                else
227 >                        lumf = NULL;
228                  return(0);              /* don't echo */
229          }
230 <        if (isprims(s)) {               /* get input primaries */
231 <                primsval(inprimS, s);
232 <                inprims= inprimS;
230 >        if (isncomp(s)) {
231 >                NCSAMP = ncompval(s);
232 >                return(0);
233 >        }
234 >        if (iswlsplit(s)) {
235 >                wlsplitval(WLPART, s);
236 >                return(0);
237 >        }
238 >                                        /* get input primaries */
239 >        if (isprims(s) && primsval(inprimS, s)) {
240 >                inprims = inprimS;
241                  return(0);              /* don't echo */
242          }
243          if (isexpos(s)) {               /* picture exposure */
# Line 349 | Line 359 | getfovimg(void)                        /* load foveal sampled image */
359          if (fgetresolu(&x, &y, fp) < 0 || (x != fvxr) | (y != fvyr))
360                  goto readerr;
361          for (y = 0; y < fvyr; y++)
362 <                if (freadscan(fovscan(y), fvxr, fp) < 0)
362 >                if (fread2scan(fovscan(y), fvxr, fp, NCSAMP, WLPART) < 0)
363                          goto readerr;
364          pclose(fp);
365          return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines