Unless I'm missing something, isn't this simply:
size_t compute_mem_area() const {
return (m_buffer_size * 8 - 7) / pixel_type::bit_depth;
}
Explanation:
((i * 1 * pixel_type::bit_depth) + 7) / 8 == m_buffer_size
(i * pixel_type::bit_depth) + 7 == m_buffer_size * 8
i * pixel_type::bit_depth == (m_buffer_size * 8) - 7
i == ((m_buffer_size * 8) - 7) / pixel_type::bit_depth
You might just need to play with the rounding / truncation.