Add 1.66-within-Flat format.
[dcpomatic.git] / src / lib / format.cc
index dcc884412487a6e2fb80fef205ac949c671e37cb..e689aa05db5b54c424e28a1cef1dacdd6e808e3a 100644 (file)
@@ -76,8 +76,13 @@ Format::as_metadata () const
 void
 Format::setup_formats ()
 {
+       _formats.push_back (new Format (119, Size (1285, 1080), "119", "1.19"));
+       _formats.push_back (new Format (133, Size (1436, 1080), "133", "1.33"));
+       _formats.push_back (new Format (138, Size (1485, 1080), "138", "1.375"));
        _formats.push_back (new Format (133, Size (1998, 1080), "133-in-flat", "4:3 within Flat"));
        _formats.push_back (new Format (137, Size (1480, 1080), "137", "Academy"));
+       _formats.push_back (new Format (166, Size (1793, 1080), "166", "1.66"));
+       _formats.push_back (new Format (166, Size (1998, 1080), "166-in-flat", "1.66 within Flat"));
        _formats.push_back (new Format (178, Size (1998, 1080), "178-in-flat", "16:9 within Flat"));
        _formats.push_back (new Format (185, Size (1998, 1080), "185", "Flat"));
        _formats.push_back (new Format (239, Size (2048, 858), "239", "Scope"));
@@ -185,5 +190,12 @@ Format::all ()
 int
 Format::dcp_padding () const
 {
-       return rint ((_dcp_size.width - (_dcp_size.height * _ratio / 100.0)) / 2.0);
+       int p = rint ((_dcp_size.width - (_dcp_size.height * _ratio / 100.0)) / 2.0);
+
+       /* This comes out -ve for Scope; bodge it */
+       if (p < 0) {
+               p = 0;
+       }
+       
+       return p;
 }