Boost logo

Boost :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2020-01-18 23:02:14


I've got a quiz for detectives keen in GIL code history :-)

There was this change

- typedef typename detail::min_fast_uint<bit_size>::type bitfield_t;
+ typedef typename detail::min_fast_uint<bit_size+7>::type bitfield_t;

committed in long time ago

Long time ago, the min_fast_uint metafunction was defined as this

Later, it was re-defined

Hint: Operator < vs <=


Given the current definition of the min_fast_uint metafunction,
why min_fast_uint needs to round up adding +7 in bit_aligned_image_type?

In other words, why this pixel_t needs 32-bit, as per the current
implementation with +7 above, instead of 16-bit?

using image_t = gil::bit_aligned_image3_type<5, 6, 5, gil::rgb_layout_t>::type;
using pixel_t = i_t::view_t::value_type;

Please, feel free to brainstorm :-)

Best regards,

Mateusz Loskot,

Boost list run by Boost-Gil-Owners