Add new comment

OK, looks like over

OK, looks like over-optimization in COLOR:

  int COLOR(int row, int col)
  {
    return libraw_internal_data.internal_output_params.fuji_width ? FCF(row, col) : FC(row, col);
  }
  int FC(int row, int col) { return (imgdata.idata.filters >> (((row << 1 & 14) | (col & 1)) << 1) & 3); }
  int fcol(int row, int col);

where FCF() is for 'fuji-rotated' images (S5 Pro, etc).

It should be

  int COLOR(int row, int col)
  {
    return imgdata.idata.filters < 1000 ? fcol(row,col): (libraw_internal_data.internal_output_params.fuji_width ? FCF(row, col) : FC(row, col));
  }

To be fixed in 0.19 (0.18 is security-only-patches now)

-- Alex Tutubalin @LibRaw LLC