X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage.h;h=6b9ade99eefccb8b3d92e7c023300c14f9ac9601;hb=7f203e4df9ca94a44099c26158c6c81b5299567f;hp=adee8bc4d1e5196d9c3e086322b1e68c9c3b00c6;hpb=b3ff5b97d437086f07a1ae6c4460ab60b13defa1;p=dcpomatic.git diff --git a/src/lib/image.h b/src/lib/image.h index adee8bc4d..6b9ade99e 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -65,9 +65,11 @@ public: /** @return Array of strides for each line (including any alignment padding bytes) */ virtual int * stride () const = 0; - /** @return libdcp::Size of the image, in pixels */ + /** @return Size of the image, in pixels */ virtual libdcp::Size size () const = 0; + virtual bool aligned () const = 0; + int components () const; int lines (int) const; @@ -90,7 +92,10 @@ protected: virtual void swap (Image &); float bytes_per_pixel (int) const; -private: +private: + void yuv_16_black (uint16_t); + static uint16_t swap_16 (uint16_t); + AVPixelFormat _pixel_format; ///< FFmpeg's way of describing the pixel format of this Image }; @@ -107,6 +112,7 @@ public: int * line_size () const; int * stride () const; libdcp::Size size () const; + bool aligned () const; private: /* Not allowed */ @@ -114,6 +120,7 @@ private: FilterBufferImage& operator= (FilterBufferImage const &); AVFilterBufferRef* _buffer; + int* _line_size; }; /** @class SimpleImage @@ -131,6 +138,7 @@ public: int * line_size () const; int * stride () const; libdcp::Size size () const; + bool aligned () const; protected: void allocate ();