You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
663 B

  1. https://gitlab.com/sane-project/backends/issues/237
  2. --- a/backend/genesys/image_pipeline.cpp
  3. +++ b/backend/genesys/image_pipeline.cpp
  4. @@ -703,7 +703,11 @@ bool ImagePipelineNodeCalibrate::get_nex
  5. float value_f = static_cast<float>(value) / max_value;
  6. value_f = (value_f - offset_[curr_calib_i]) * multiplier_[curr_calib_i];
  7. +#if defined(__UCLIBC__)
  8. + value_f = round(value_f * max_value);
  9. +#else
  10. value_f = std::round(value_f * max_value);
  11. +#endif
  12. value = clamp<std::int32_t>(static_cast<std::int32_t>(value_f), 0, max_value);
  13. set_raw_channel_to_row(out_data, x, ch, value, format);