Merge master.
[dcpomatic.git] / src / lib / image.h
index 39d84fcd4c35cee34ff6ba947218d3827cde493b..f9bda7460327e62706ef2fa3a982c0b4efe478b3 100644 (file)
@@ -21,8 +21,8 @@
  *  @brief A set of classes to describe video images.
  */
 
-#ifndef DVDOMATIC_IMAGE_H
-#define DVDOMATIC_IMAGE_H
+#ifndef DCPOMATIC_IMAGE_H
+#define DCPOMATIC_IMAGE_H
 
 #include <string>
 #include <boost/shared_ptr.hpp>
@@ -34,7 +34,6 @@ extern "C" {
 #include "util.h"
 
 class Scaler;
-class RGBFrameImage;
 class SimpleImage;
 
 /** @class Image
@@ -72,10 +71,11 @@ public:
        int components () const;
        int lines (int) const;
 
-       boost::shared_ptr<Image> scale_and_convert_to_rgb (libdcp::Size out_size, int padding, Scaler const * scaler, bool aligned) const;
+       boost::shared_ptr<Image> scale_and_convert_to_rgb (libdcp::Size, Scaler const *, bool) const;
        boost::shared_ptr<Image> scale (libdcp::Size, Scaler const *, bool aligned) const;
        boost::shared_ptr<Image> post_process (std::string, bool aligned) const;
        void alpha_blend (boost::shared_ptr<const Image> image, Position pos);
+       void copy (boost::shared_ptr<const Image> image, Position pos);
        boost::shared_ptr<Image> crop (Crop c, bool aligned) const;
        
        void make_black ();
@@ -100,30 +100,6 @@ private:
        AVPixelFormat _pixel_format; ///< FFmpeg's way of describing the pixel format of this Image
 };
 
-/** @class FrameImage
- *  @brief An Image that is held in an AVFrame.
- */
-class FrameImage : public Image
-{
-public:
-       FrameImage (AVFrame *);
-       ~FrameImage ();
-
-       uint8_t ** data () const;
-       int * line_size () const;
-       int * stride () const;
-       libdcp::Size size () const;
-       bool aligned () const;
-
-private:
-       /* Not allowed */
-       FrameImage (FrameImage const &);
-       FrameImage& operator= (FrameImage const &);
-       
-       AVFrame* _frame;
-       int* _line_size;
-};
-
 /** @class SimpleImage
  *  @brief An Image for which memory is allocated using a `simple' av_malloc().
  */
@@ -131,6 +107,7 @@ class SimpleImage : public Image
 {
 public:
        SimpleImage (AVPixelFormat, libdcp::Size, bool);
+       SimpleImage (AVFrame *);
        SimpleImage (SimpleImage const &);
        SimpleImage (boost::shared_ptr<const Image>);
        SimpleImage& operator= (SimpleImage const &);