Remove unnecessary Film variable in ContentPart.
[dcpomatic.git] / src / lib / image.h
index fabcb5675f676bafa0cfcb5b7d83062297e11de3..b8d48275a5fed39dc9a9515a4951b9ec85ff85b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #include "position.h"
 #include "position_image.h"
 #include "types.h"
-#include <dcp/colour_conversion.h>
 extern "C" {
-#include <libavcodec/avcodec.h>
-#include <libavfilter/avfilter.h>
+#include <libavutil/pixfmt.h>
 }
+#include <dcp/colour_conversion.h>
 #include <boost/shared_ptr.hpp>
-#include <boost/function.hpp>
-#include <string>
 
+struct AVFrame;
 class Socket;
 
 class Image
 {
 public:
-       Image (AVPixelFormat, dcp::Size, bool);
+       Image (AVPixelFormat, dcp::Size, bool, int extra_pixels = 0);
        Image (AVFrame *);
        Image (Image const &);
        Image (boost::shared_ptr<const Image>, bool);
@@ -59,8 +57,10 @@ public:
        int line_factor (int) const;
        dcp::Size sample_size (int) const;
 
-       boost::shared_ptr<Image> scale (dcp::Size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat, bool aligned) const;
-       boost::shared_ptr<Image> crop_scale_window (Crop c, dcp::Size, dcp::Size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat, bool aligned) const;
+       boost::shared_ptr<Image> scale (dcp::Size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat, bool aligned, bool fast) const;
+       boost::shared_ptr<Image> crop_scale_window (
+               Crop c, dcp::Size, dcp::Size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat, bool aligned, bool fast)
+               const;
 
        void make_black ();
        void make_transparent ();
@@ -90,6 +90,7 @@ private:
        int* _line_size; ///< array of sizes of the data in each line, in pixels (without any alignment padding bytes)
        int* _stride; ///< array of strides for each line (including any alignment padding bytes)
        bool _aligned;
+       int _extra_pixels;
 };
 
 extern PositionImage merge (std::list<PositionImage> images);