summaryrefslogtreecommitdiff
path: root/src/lib/image.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-15 12:40:47 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-15 12:40:47 +0100
commit43990add893eccf350f280e2dd3f947a94f3e9aa (patch)
tree2dc1dcec95446a323460140c5afa44c45cfca487 /src/lib/image.h
parent82e38014d0cc17f3c73b593f3da9c9923484665b (diff)
Some work on DCI naming. Clean up compacted / aligned image handling somewhat.
Diffstat (limited to 'src/lib/image.h')
-rw-r--r--src/lib/image.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/image.h b/src/lib/image.h
index 3e16d43bf..30c8519e7 100644
--- a/src/lib/image.h
+++ b/src/lib/image.h
@@ -26,6 +26,7 @@
#include <string>
#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavfilter/avfilter.h>
@@ -107,7 +108,7 @@ private:
class SimpleImage : public Image
{
public:
- SimpleImage (PixelFormat, Size);
+ SimpleImage (PixelFormat, Size, boost::function<int (int)> rounder);
~SimpleImage ();
uint8_t ** data () const;
@@ -116,11 +117,24 @@ public:
Size size () const;
private:
+
Size _size; ///< size in pixels
uint8_t** _data; ///< array of pointers to components
int* _line_size; ///< array of sizes of the data in each line, in pixels (without any alignment padding bytes)
int* _stride; ///< array of strides for each line (including any alignment padding bytes)
+};
+
+class AlignedImage : public SimpleImage
+{
+public:
+ AlignedImage (PixelFormat, Size);
+};
+class CompactImage : public SimpleImage
+{
+public:
+ CompactImage (PixelFormat, Size);
+ CompactImage (boost::shared_ptr<Image>);
};
/** @class RGBFrameImage