X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage.h;h=00768ee028e5bdcb551f6f1aa2f516e026e7c70c;hb=8889cf7126810fb9b754643a45dcc94ad578125f;hp=23f13a648c8b8cd29d16d1c25772d3dd50b89bf1;hpb=420adb1fd2910fd24eb84be98169afc209f76a0e;p=dcpomatic.git diff --git a/src/lib/image.h b/src/lib/image.h index 23f13a648..00768ee02 100644 --- a/src/lib/image.h +++ b/src/lib/image.h @@ -32,7 +32,6 @@ extern "C" { #include } #include "util.h" -#include "ffmpeg_compatibility.h" class Scaler; class RGBFrameImage; @@ -92,18 +91,21 @@ 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 }; -/** @class FilterBufferImage - * @brief An Image that is held in an AVFilterBufferRef. +/** @class FrameImage + * @brief An Image that is held in an AVFrame. */ -class FilterBufferImage : public Image +class FrameImage : public Image { public: - FilterBufferImage (AVPixelFormat, AVFilterBufferRef *); - ~FilterBufferImage (); + FrameImage (AVFrame *); + ~FrameImage (); uint8_t ** data () const; int * line_size () const; @@ -113,10 +115,11 @@ public: private: /* Not allowed */ - FilterBufferImage (FilterBufferImage const &); - FilterBufferImage& operator= (FilterBufferImage const &); + FrameImage (FrameImage const &); + FrameImage& operator= (FrameImage const &); - AVFilterBufferRef* _buffer; + AVFrame* _frame; + int* _line_size; }; /** @class SimpleImage @@ -127,6 +130,7 @@ class SimpleImage : public Image public: SimpleImage (AVPixelFormat, libdcp::Size, bool); SimpleImage (SimpleImage const &); + SimpleImage (boost::shared_ptr); SimpleImage& operator= (SimpleImage const &); ~SimpleImage ();