X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage.h;h=6b9ade99eefccb8b3d92e7c023300c14f9ac9601;hb=8eabffda9a95de36df560c1b6eadd1a7baa852c7;hp=5ca3f337c82cc15df66b8779e20ece84771b5d6f;hpb=039ac5848730d154e0b3f3dd841a55e45ba922d8;p=dcpomatic.git diff --git a/src/lib/image.h b/src/lib/image.h index 5ca3f337c..6b9ade99e 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -68,6 +68,8 @@ public: /** @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 ();