-AlignedImage::AlignedImage (AVPixelFormat f, Size s)
- : SimpleImage (f, s, boost::bind (stride_round_up, _1, _2, 32))
-{
-
-}
-
-AlignedImage::AlignedImage (shared_ptr<Image> im)
- : SimpleImage (im->pixel_format(), im->size(), boost::bind (stride_round_up, _1, _2, 32))
-{
- assert (components() == im->components());
-
- for (int c = 0; c < components(); ++c) {
-
- assert (line_size()[c] == im->line_size()[c]);
-
- uint8_t* t = data()[c];
- uint8_t* o = im->data()[c];
-
- for (int y = 0; y < lines(c); ++y) {
- memcpy (t, o, line_size()[c]);
- t += stride()[c];
- o += im->stride()[c];
- }
- }
-}
-
-CompactImage::CompactImage (AVPixelFormat f, Size s)
- : SimpleImage (f, s, boost::bind (stride_round_up, _1, _2, 1))
-{
-
-}
-
-CompactImage::CompactImage (shared_ptr<Image> im)
- : SimpleImage (im->pixel_format(), im->size(), boost::bind (stride_round_up, _1, _2, 1))
-{
- assert (components() == im->components());
-
- for (int c = 0; c < components(); ++c) {
-
- assert (line_size()[c] == im->line_size()[c]);
-
- uint8_t* t = data()[c];
- uint8_t* o = im->data()[c];
-
- for (int y = 0; y < lines(c); ++y) {
- memcpy (t, o, line_size()[c]);
- t += stride()[c];
- o += im->stride()[c];
- }
- }
-}
-