/*
- 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);
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 ();
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);