Boost logo

Boost Users :

Subject: [Boost-users] [GIL] Help on rgba 10 bits views
From: Eloi Du Bois (eloi.du.bois_at_[hidden])
Date: 2009-11-25 07:28:35


Hi,

I would like to know how can I create a 10 bits view that makes it possible
to use interleaved_view.
My data are described as follow:
R10G10B10A10;R10G10B10A10;R10G10B10A10;R10G10B10A10;.....

You understand easily that a rgba pixel is stored on 40 bits...
I tried this:

            typedef bit_aligned_pixel_reference<uint64_t,
> mpl::vector4_c<uint16_t, 10, 10, 10, 10>, rgba_layout_t, true>
> rgba10101010_ref_t;
> // A mutable iterator over RGB101010 pixels
> typedef bit_aligned_pixel_iterator<rgba10101010_ref_t>
> rgba10101010_ptr_t;
> typedef std::iterator_traits<rgba10101010_ptr_t>::value_type
> rgba10101010_pixel_t;
> // View type from pixel type
> typedef view_type_from_pixel<rgba10101010_pixel_t>::type
> rgba10101010_view_t;
>
            rgba10101010_view_t src;
>

But it does a mess with my pixels... (and makes it impossible to use
copy_and_convert_pixels(src, rgba16_view_t(view(img))); )

If anyone could help me, that would be great !

Thank you by advance,
Eloi.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net