summaryrefslogtreecommitdiff
path: root/src/lib/j2k_image_proxy.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-04-13 23:23:00 +0100
committerCarl Hetherington <cth@carlh.net>2018-04-13 23:23:00 +0100
commit0ff4fa6058b305476e7bc60c590acb6135c49b1c (patch)
tree1ea7e181846964bd1bab52bbfafc118f49b584f8 /src/lib/j2k_image_proxy.h
parent9106e6ed551b13e1b7c7ee2088d54ce0ae430bcf (diff)
Account for J2K decoding at lower-than-maximum resolution when croppingv2.13.14
the resulting images; fixes #1274.
Diffstat (limited to 'src/lib/j2k_image_proxy.h')
-rw-r--r--src/lib/j2k_image_proxy.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h
index 3680de111..77d53a9e5 100644
--- a/src/lib/j2k_image_proxy.h
+++ b/src/lib/j2k_image_proxy.h
@@ -50,7 +50,7 @@ public:
J2KImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
- boost::shared_ptr<Image> image (
+ std::pair<boost::shared_ptr<Image>, int> image (
boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> (),
boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
) const;
@@ -59,7 +59,7 @@ public:
void send_binary (boost::shared_ptr<Socket>) const;
/** @return true if our image is definitely the same as another, false if it is probably not */
bool same (boost::shared_ptr<const ImageProxy>) const;
- void prepare (boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const;
+ int prepare (boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const;
AVPixelFormat pixel_format () const {
return _pixel_format;
}
@@ -85,6 +85,7 @@ private:
boost::optional<dcp::Eye> _eye;
mutable boost::shared_ptr<dcp::OpenJPEGImage> _decompressed;
mutable boost::optional<dcp::Size> _target_size;
+ mutable boost::optional<int> _reduce;
AVPixelFormat _pixel_format;
mutable boost::mutex _mutex;
boost::optional<int> _forced_reduction;