Commit d553f44b for libheif
commit d553f44b6a325b968c9c88c424b54f9cf956637d
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Fri Dec 26 22:20:54 2025 +0100
integer cast
diff --git a/libheif/color-conversion/yuv2rgb.cc b/libheif/color-conversion/yuv2rgb.cc
index f6b077f5..c98893be 100644
--- a/libheif/color-conversion/yuv2rgb.cc
+++ b/libheif/color-conversion/yuv2rgb.cc
@@ -180,8 +180,8 @@ Op_YCbCr_to_RGB<Pixel>::convert_colorspace(const std::shared_ptr<const HeifPixel
}
- uint16_t halfRange = (uint16_t) (1 << (bpp_y - 1));
- int16_t halfRange_chroma = 1 << (bpp_cb - 1);
+ uint16_t halfRange = static_cast<uint16_t>(1 << (bpp_y - 1));
+ int16_t halfRange_chroma = static_cast<int16_t>(1 << (bpp_cb - 1));
int32_t fullRange = (1 << bpp_y) - 1;
int limited_range_offset_int = 16 << (bpp_y - 8);