diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-14 21:06:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-14 21:06:47 +0100 |
| commit | 009a58293bf2e9727d544d1a2648422cc395d81e (patch) | |
| tree | c581d457104195a0219a0197c523981756bf9ecd /src/lib/image.h | |
| parent | b5001080a3e5b414f6cad1c52926ed757f2d8574 (diff) | |
| parent | ade28a703b15af710161faa017cddf95d66c4118 (diff) | |
Merge branch 'subs'
Diffstat (limited to 'src/lib/image.h')
| -rw-r--r-- | src/lib/image.h | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/src/lib/image.h b/src/lib/image.h index 0161d2b01..3e16d43bf 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -34,7 +34,7 @@ extern "C" { class Scaler; class RGBFrameImage; -class PostProcessImage; +class SimpleImage; /** @class Image * @brief Parent class for wrappers of some image, in some format, that @@ -57,16 +57,21 @@ public: /** @return Array of pointers to arrays of the component data */ virtual uint8_t ** data () const = 0; - /** @return Array of sizes of each line, in pixels */ + /** @return Array of sizes of the data in each line, in bytes (without any alignment padding bytes) */ virtual int * line_size () const = 0; + /** @return Array of strides for each line (including any alignment padding bytes) */ + virtual int * stride () const = 0; + /** @return Size of the image, in pixels */ virtual Size size () const = 0; int components () const; int lines (int) const; - boost::shared_ptr<RGBFrameImage> scale_and_convert_to_rgb (Size, int, Scaler const *) const; - boost::shared_ptr<PostProcessImage> post_process (std::string) const; + boost::shared_ptr<Image> scale_and_convert_to_rgb (Size, int, Scaler const *) const; + boost::shared_ptr<Image> scale (Size, Scaler const *) const; + boost::shared_ptr<Image> post_process (std::string) const; + void alpha_blend (boost::shared_ptr<Image> image, Position pos); void make_black (); @@ -89,6 +94,7 @@ public: uint8_t ** data () const; int * line_size () const; + int * stride () const; Size size () const; private: @@ -106,14 +112,15 @@ public: uint8_t ** data () const; int * line_size () const; + int * stride () const; Size size () const; - void set_line_size (int, int); - private: Size _size; ///< size in pixels uint8_t** _data; ///< array of pointers to components - int* _line_size; ///< array of widths of each line, in bytes + 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 RGBFrameImage @@ -127,6 +134,7 @@ public: uint8_t ** data () const; int * line_size () const; + int * stride () const; Size size () const; AVFrame * frame () const { return _frame; @@ -138,23 +146,4 @@ private: uint8_t* _data; }; -/** @class PostProcessImage - * @brief An image that is the result of an FFmpeg post-processing run. - */ -class PostProcessImage : public Image -{ -public: - PostProcessImage (PixelFormat, Size); - ~PostProcessImage (); - - uint8_t ** data () const; - int * line_size () const; - Size size () const; - -private: - Size _size; - uint8_t** _data; - int* _line_size; -}; - #endif |
