Use newer format to specify filter graphs; don't filter unless necessary; fix tiny...
[dcpomatic.git] / src / lib / image.h
index ad2aa79bd0bd6de3cd7e517ce236766a0deb0e49..16fbd28c24b93c4064045368cf87e171444c16c9 100644 (file)
@@ -91,6 +91,8 @@ protected:
        virtual void swap (Image &);
        float bytes_per_pixel (int) const;
 
+       friend class pixel_formats_test;
+
 private:
        void yuv_16_black (uint16_t);
        static uint16_t swap_16 (uint16_t);
@@ -98,14 +100,14 @@ private:
        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 *, bool);
+       ~FrameImage ();
 
        uint8_t ** data () const;
        int * line_size () const;
@@ -115,10 +117,11 @@ public:
 
 private:
        /* Not allowed */
-       FilterBufferImage (FilterBufferImage const &);
-       FilterBufferImage& operator= (FilterBufferImage const &);
+       FrameImage (FrameImage const &);
+       FrameImage& operator= (FrameImage const &);
        
-       AVFilterBufferRef* _buffer;
+       AVFrame* _frame;
+       bool _own;
        int* _line_size;
 };