|
Boost : |
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2020-01-18 23:02:14
Hi,
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
https://github.com/boostorg/gil/commit/77b9620a8b86598780e445fec3999267a14f8d33#diff-6fc5a534ad0eb2369c09bff568415232R341
Long time ago, the min_fast_uint metafunction was defined as this
Later, it was re-defined
Hint: Operator < vs <=
Question:
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, http://mateusz.loskot.net
Boost list run by Boost-Gil-Owners