mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-11 13:30:47 -04:00
chore(ricepp): fixes for windows/clang build
This commit is contained in:
parent
f125999ffa
commit
b4f9bcc863
@ -130,7 +130,7 @@ class codec final {
|
|||||||
|
|
||||||
[[nodiscard]] size_t worst_case_bit_count(size_t pixel_count) const noexcept {
|
[[nodiscard]] size_t worst_case_bit_count(size_t pixel_count) const noexcept {
|
||||||
static constexpr size_t const kFsBits{
|
static constexpr size_t const kFsBits{
|
||||||
std::countr_zero(pixel_traits::kBitCount)};
|
static_cast<size_t>(std::countr_zero(pixel_traits::kBitCount))};
|
||||||
assert(pixel_count % kComponentStreamCount == 0);
|
assert(pixel_count % kComponentStreamCount == 0);
|
||||||
pixel_count /= kComponentStreamCount;
|
pixel_count /= kComponentStreamCount;
|
||||||
size_t num = pixel_traits::kBitCount; // initial value
|
size_t num = pixel_traits::kBitCount; // initial value
|
||||||
|
@ -40,7 +40,8 @@ void decode_block(V block, BitstreamReader& reader, PixelTraits const& traits,
|
|||||||
typename PixelTraits::value_type& last_value) {
|
typename PixelTraits::value_type& last_value) {
|
||||||
using pixel_value_type = typename PixelTraits::value_type;
|
using pixel_value_type = typename PixelTraits::value_type;
|
||||||
static constexpr unsigned kPixelBits{PixelTraits::kBitCount};
|
static constexpr unsigned kPixelBits{PixelTraits::kBitCount};
|
||||||
static constexpr unsigned kFsBits{std::countr_zero(kPixelBits)};
|
static constexpr unsigned kFsBits{
|
||||||
|
static_cast<unsigned>(std::countr_zero(kPixelBits))};
|
||||||
static constexpr unsigned kFsMax{kPixelBits - 2};
|
static constexpr unsigned kFsMax{kPixelBits - 2};
|
||||||
|
|
||||||
auto last = last_value;
|
auto last = last_value;
|
||||||
|
@ -91,7 +91,8 @@ void encode_block(V block, BitstreamWriter& writer, PixelTraits const& traits,
|
|||||||
typename PixelTraits::value_type& last_value) {
|
typename PixelTraits::value_type& last_value) {
|
||||||
using pixel_value_type = typename PixelTraits::value_type;
|
using pixel_value_type = typename PixelTraits::value_type;
|
||||||
static constexpr unsigned kPixelBits{PixelTraits::kBitCount};
|
static constexpr unsigned kPixelBits{PixelTraits::kBitCount};
|
||||||
static constexpr unsigned kFsBits{std::countr_zero(kPixelBits)};
|
static constexpr unsigned kFsBits{
|
||||||
|
static_cast<unsigned>(std::countr_zero(kPixelBits))};
|
||||||
static constexpr unsigned kFsMax{kPixelBits - 2};
|
static constexpr unsigned kFsMax{kPixelBits - 2};
|
||||||
static constexpr pixel_value_type kPixelMsb{static_cast<pixel_value_type>(1)
|
static constexpr pixel_value_type kPixelMsb{static_cast<pixel_value_type>(1)
|
||||||
<< (kPixelBits - 1)};
|
<< (kPixelBits - 1)};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user