summaryrefslogtreecommitdiff
path: root/src/lib/format.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-26 22:51:54 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-26 22:51:54 +0000
commitb1873c51b2e8265a01a8f0eced7fc3465f1677dc (patch)
treed0eb1d779f6f9e145e57693162af06a2390e84fb /src/lib/format.cc
parent494b6ee180e531358bab39e72f6123e90f9314e5 (diff)
parentd641aee73077e93ca17b30acd5b9ed82f1e14cb9 (diff)
Merge master into direct-mxf.
Diffstat (limited to 'src/lib/format.cc')
-rw-r--r--src/lib/format.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/format.cc b/src/lib/format.cc
index 4583dd0e5..016c21fde 100644
--- a/src/lib/format.cc
+++ b/src/lib/format.cc
@@ -148,6 +148,9 @@ FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d
}
+/** @return Number of pixels (int the DCP image) to pad either side of the film
+ * (so there are dcp_padding() pixels on the left and dcp_padding() on the right)
+ */
int
Format::dcp_padding (shared_ptr<const Film> f) const
{
@@ -161,6 +164,12 @@ Format::dcp_padding (shared_ptr<const Film> f) const
return p;
}
+float
+Format::container_ratio_as_float () const
+{
+ return static_cast<float> (_dcp_size.width) / _dcp_size.height;
+}
+
VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d)
: Format (dcp, id, n, d)
{