Some tidying up.
authorCarl Hetherington <cth@carlh.net>
Mon, 27 Jan 2014 12:01:17 +0000 (12:01 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 27 Jan 2014 12:01:17 +0000 (12:01 +0000)
52 files changed:
src/colour_matrix.cc
src/colour_matrix.h
src/cpl.cc
src/cpl.h
src/dcp_time.cc
src/dcp_time.h
src/gamma_lut.cc
src/image.cc
src/image.h
src/kdm.h
src/key.cc
src/key.h
src/lut.h
src/lut_cache.h
src/metadata.cc
src/metadata.h
src/mono_picture_mxf.cc
src/mono_picture_mxf.h
src/mono_picture_mxf_writer.cc
src/mono_picture_mxf_writer.h
src/mxf.cc
src/mxf.h
src/picture_mxf.cc
src/picture_mxf.h
src/picture_mxf_writer_common.cc
src/rec709_linearised_gamma_lut.cc [deleted file]
src/rec709_linearised_gamma_lut.h [deleted file]
src/reel.cc
src/reel.h
src/reel_subtitle_asset.h
src/rgb_xyz.cc
src/rgb_xyz.h
src/signer.h
src/sound_frame.cc
src/sound_frame.h
src/sound_mxf.cc
src/srgb_linearised_gamma_lut.cc [deleted file]
src/srgb_linearised_gamma_lut.h [deleted file]
src/stereo_picture_frame.cc
src/stereo_picture_frame.h
src/stereo_picture_mxf.cc
src/stereo_picture_mxf.h
src/stereo_picture_mxf_writer.cc
src/stereo_picture_mxf_writer.h
src/types.cc
src/types.h
src/wscript
src/xml.h
src/xyz_frame.cc
src/xyz_frame.h
test/lut_test.cc [deleted file]
test/wscript

index 19243d4de65d66cfc84d9771902898d608646d00..72f952c3fbf888b84336bdeff5948629aeef19fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index 010ac3b9b02b30d6ffa26e7dd39691b91a83e7bb..ce15051cbbd066545943310897b3bc70a671f1ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index a27e8fda9c04cc04a290fa984e191dd5d043fe5a..813eb0ed0bebde250de339e5755e609ee4b45f9d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 83fc4b9d552c63f528ebb6814492b29a2e586567..9e7d5aae16371bec9799c7594b9b92c51400bd54 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014 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
 #ifndef LIBDCP_CPL_H
 #define LIBDCP_CPL_H
 
-#include <list>
+#include "types.h"
+#include "certificates.h"
+#include "key.h"
+#include "asset.h"
+#include <libxml++/libxml++.h>
 #include <boost/shared_ptr.hpp>
 #include <boost/function.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <boost/optional.hpp>
 #include <boost/filesystem.hpp>
-#include <libxml++/libxml++.h>
-#include "types.h"
-#include "certificates.h"
-#include "key.h"
-#include "asset.h"
+#include <list>
 
 namespace dcp {
        
index 605c4a4028d82e8fe1c3fa3cf46b301cacb891d6..5376b9724e08a9f7ddef6907ec7fd05cd4edf0c4 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
 */
 
 /** @file  src/dcp_time.cc
- *  @brief A representation of time within a DCP.
+ *  @brief Time class.
  */
 
-#include <iostream>
-#include <vector>
+#include "dcp_time.h"
+#include "exceptions.h"
 #include <boost/algorithm/string.hpp>
 #include <boost/lexical_cast.hpp>
+#include <iostream>
+#include <vector>
 #include <cmath>
-#include "dcp_time.h"
-#include "exceptions.h"
 
 using namespace std;
 using namespace boost;
index 885393c10fa8de5645a78f13071af00b393d975d..697ca230745b4cd46f53d65c5cad9a8e34484df0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
 */
 
 /** @file  src/dcp_time.h
- *  @brief A representation of time within a DCP.
+ *  @brief Time class.
  */
 
 #ifndef LIBDCP_TIME_H
 #define LIBDCP_TIME_H
 
+#include <stdint.h>
 #include <string>
 #include <iostream>
-#include <stdint.h>
 
 namespace dcp {
 
index 1a954914616130e89df3486c90d2133bd9329c82..b994aaccbe2220f143f5625d667bf2c447f6afd0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 2cb5a7a40784663c5f05cc0e314b4d2f71e02fe3..f12ceea28cacdd7217a7a2f694749d00c5d1385a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index a8786b7721d7dd399cafd563234a531d06fa555c..069534eacd7296ef5832407206b77f838728aa23 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index f6d96b39662d3e2544bef96e2b5406a55ed8de33..c4bd8c86802cc59aebbeafac0a71a52b02e4aea7 100644 (file)
--- a/src/kdm.h
+++ b/src/kdm.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index 0e04c27a538b63854f80de8fc64a52f7243a3e4c..43e59dfc6de756a078731c5cf87687d8bcb614ea 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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 <sstream>
-#include <string>
-#include <iomanip>
+/** @file  src/key.cc
+ *  @brief Key class.
+ */
+
+#include "key.h"
 #include "AS_DCP.h"
 #include "KM_prng.h"
 #include "KM_util.h"
-#include "key.h"
+#include <sstream>
+#include <string>
+#include <iomanip>
 
 using std::string;
 using std::stringstream;
index d6b2f2f27d683964fb3d26fe21eae417b36e6051..43897bafa46fce051dfdf72b92a508e032ce066d 100644 (file)
--- a/src/key.h
+++ b/src/key.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
@@ -18,7 +18,7 @@
 */
 
 /** @file  src/key.h
- *  @brief Class to hold a key for encrypting MXFs.
+ *  @brief Key class.
  */
 
 #ifndef LIBDCP_KEY_H
index f56676a20dd5e6f48106b9d976b055b9ddee0dc1..154541a700eabaa6a5fb26c653d3c465b6028d20 100644 (file)
--- a/src/lut.h
+++ b/src/lut.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
@@ -20,8 +20,8 @@
 #ifndef LIBDCP_LUT_H
 #define LIBDCP_LUT_H
 
-#include <cmath>
 #include <boost/utility.hpp>
+#include <cmath>
 
 namespace dcp {
 
index b60ee109009521ee3b7d50db1947ba65d0b4c39e..0985a0c0cb5a08c0f38f6796b8b7e6970446a1c2 100644 (file)
@@ -1,3 +1,22 @@
+/*
+    Copyright (C) 2013-2014 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
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
 #ifndef LIBDCP_LUT_CACHE_H
 #define LIBDCP_LUT_CACHE_H
 
index d2357a1f23872331f7b94505f144c9ce69e2f878..e33826139d82a1d42886ce3b4d4e58446de35127 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
 */
 
 /** @file  src/metadata.cc
- *  @brief Metadata for writing to the DCP.
+ *  @brief XMLMetadata and MXFMetadata classes.
  */
 
-#include <sstream>
-#include <iomanip>
-#include <time.h>
+#include "metadata.h"
+#include "util.h"
 #ifdef LIBDCP_WINDOWS
 #include <windows.h>
 #endif
-#include "metadata.h"
-#include "util.h"
+#include <sstream>
+#include <iomanip>
+#include <time.h>
 
 using namespace std;
 using namespace dcp;
index 0a707534e4cae292d17ae538ef147f14f683a2dc..e1ce6986fb00ad61e984bb445979d75acc34d83f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
@@ -21,7 +21,7 @@
 #define LIBDCP_METADATA_H
 
 /** @file  src/metadata.h
- *  @brief Metadata for writing to the DCP.
+ *  @brief XMLMetadata and MXFMetadata classes.
  */
 
 #include <string>
index e33454dc0cdd5045d5caaca5a4ff6bfadc9e6fb0..699cfc230ea335b7e9fe3e87987609e065de79ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 9f0a2eead3f174a833c1418c3e26578e639ad2d3..c742ae3736807f65387adb78d4ec087201c149c5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 619d298e26ef1db3bff596227f2b7462d4c86e32..96c054d7a5341033289834ec13380e11c527c916 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 7ff87a5ddb169c383092e0b0795f6b694292bd45..727fc68821582076540ec3e5df6e4c4537e813a6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 42d925368a35f633c9a2617fa8728a36e4c6437e..d2ec5629c38def67b21b59757563fbc55d9b1a03 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 3aaadfd78d0d09091969f92f28204b3532b226e3..92b7b6b9d43634061be318339a7b8e4a3d4bd679 100644 (file)
--- a/src/mxf.h
+++ b/src/mxf.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
@@ -17,8 +17,8 @@
 
 */
 
-#ifndef LIBDCP_MXF_ASSET_H
-#define LIBDCP_MXF_ASSET_H
+#ifndef LIBDCP_MXF_H
+#define LIBDCP_MXF_H
 
 #include "content.h"
 #include "key.h"
index 7634493d95f1414b718ab3d992263620d1e527dc..e59550472ca212497bdac2b5c97135b97466ab04 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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 <list>
-#include <stdexcept>
-#include <iostream>
-#include <sstream>
-#include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
-#include <openjpeg.h>
-#include <libxml++/nodes/element.h>
-#include "AS_DCP.h"
-#include "KM_fileio.h"
 #include "picture_mxf.h"
 #include "util.h"
 #include "exceptions.h"
 #include "xyz_frame.h"
 #include "picture_mxf_writer.h"
+#include "AS_DCP.h"
+#include "KM_fileio.h"
+#include <libxml++/nodes/element.h>
+#include <openjpeg.h>
+#include <boost/filesystem.hpp>
+#include <boost/lexical_cast.hpp>
+#include <list>
+#include <stdexcept>
+#include <iostream>
+#include <sstream>
 
 using std::string;
 using std::ostream;
index df75625cee9167b9186786f683c444c5ebecfc27..4653196dc14f70d0546779a60053926f5b7cd552 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 9836f03e9116935df523018b1d4be7eb9b2d800f..d2073f77fa6f56f840151de0ee74900bfaafee35 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
diff --git a/src/rec709_linearised_gamma_lut.cc b/src/rec709_linearised_gamma_lut.cc
deleted file mode 100644 (file)
index 29f39ac..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-    Copyright (C) 2012-2013 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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "rec709_linearised_gamma_lut.h"
-
-using namespace dcp;
-
-LUTCache<Rec709LinearisedGammaLUT> Rec709LinearisedGammaLUT::cache;
-
-Rec709LinearisedGammaLUT::Rec709LinearisedGammaLUT (int bits, float gamma)
-       : LUT (bits, gamma)
-{
-       int const bit_length = pow (2, bits);
-       for (int i = 0; i < bit_length; ++i) {
-               float const p = static_cast<float> (i) / (bit_length - 1);
-               if (p > 0.08125) {
-                       _lut[i] = pow ((p + 0.099) / 1.099, gamma);
-               } else {
-                       _lut[i] = p / 4.5;
-               }
-       }
-}
diff --git a/src/rec709_linearised_gamma_lut.h b/src/rec709_linearised_gamma_lut.h
deleted file mode 100644 (file)
index e7130ef..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-    Copyright (C) 2012-2013 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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "lut.h"
-#include "lut_cache.h"
-
-namespace dcp {
-
-class Rec709LinearisedGammaLUT : public LUT
-{
-public:
-       Rec709LinearisedGammaLUT (int bit_length, float gamma);
-       static LUTCache<Rec709LinearisedGammaLUT> cache;
-};
-
-}
index 27fc0329ab9601721d05bd96ce56738d32782244..8326c197d5f8bde676c54d34dadc3443276e43b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014 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
index 8aaebf5135d42616f28546ebf30f93a7f89ae48c..ea7e1c4180f6e43199d5ba900c25c418bd96eca6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 7b17b8a99c2b41b24a59d60f638c61498332df36..429c9859d7524505ac157682000e1e188ef51995 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 7d30d32e6327390ffc2d378a6849d3819dfa7c9f..6fc28e3d412c491a61308d69d52ce6fd428cb4e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index f4c8b68665ee90c6015bd1b262779e8939a57ebf..6b0f18426bdc3729cc2e82ba198030eeb3b7019e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index c57c73cf64ef48f16c7f5c744e9b71d36351ceb1..9ee5852b07a9431971f4e6859ac26029d9260fc3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index 06d2b88e3a5e5e6cd0e8c131f838cacdebc14173..6471ee0a78d0b9358c4cf59b1f61a3206e604323 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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 "AS_DCP.h"
-#include "KM_fileio.h"
 #include "sound_frame.h"
 #include "exceptions.h"
+#include "AS_DCP.h"
+#include "KM_fileio.h"
 
 using namespace std;
 using namespace dcp;
index bc46b53a2209a64f2da5b3c2fdc0262fa32d546c..eedfc477a9434a0b00b41d3bd2c4aca2b03e8567 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 82ab08234898a4c164dc7826f0c7857c0d39b572..b97da94aff260523ae1d678a8aea43cf65a3b2ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
diff --git a/src/srgb_linearised_gamma_lut.cc b/src/srgb_linearised_gamma_lut.cc
deleted file mode 100644 (file)
index bab36cb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-    Copyright (C) 2012-2013 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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "srgb_linearised_gamma_lut.h"
-
-using namespace dcp;
-
-LUTCache<SRGBLinearisedGammaLUT> SRGBLinearisedGammaLUT::cache;
-
-SRGBLinearisedGammaLUT::SRGBLinearisedGammaLUT (int bits, float gamma)
-       : LUT (bits, gamma)
-{
-       int const bit_length = pow (2, bits);
-       for (int i = 0; i < bit_length; ++i) {
-               float const p = static_cast<float> (i) / (bit_length - 1);
-               if (p > 0.04045) {
-                       _lut[i] = pow ((p + 0.055) / 1.055, gamma);
-               } else {
-                       _lut[i] = p / 12.92;
-               }
-       }
-}
diff --git a/src/srgb_linearised_gamma_lut.h b/src/srgb_linearised_gamma_lut.h
deleted file mode 100644 (file)
index 6803061..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-    Copyright (C) 2012-2013 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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "lut.h"
-#include "lut_cache.h"
-
-namespace dcp {
-
-class SRGBLinearisedGammaLUT : public LUT
-{
-public:
-       SRGBLinearisedGammaLUT (int bit_length, float gamma);
-       static LUTCache<SRGBLinearisedGammaLUT> cache;
-};
-
-}
index 790fcc1a2593f6a5ba510dc7951994c347e58d40..b21c79029d3297d3c1dc29f996f77963e77aed65 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 40c2a44140d2e2a1a1e2aa25ee7c63f46276df43..fa7620fbec8a543aa97eb6d122dac446c36093a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 980c6ad52e110f045ad762dc5f08ddba50e9ce0f..59f16c93a62c3f0203af48862b3c3e2aecf395db 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index eb527a1e1b78eca76f082d548770ddc008ceafcd..f4a4771a48a7aa22ba71e3a360a5bedafe387985 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 4ea65e05931a930ce8ac36eacf8420b8aa5a02c6..5c5030985309ad1d28f39fc17fb3dfbff3a0f01a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 8773eccd59b126a4d67e28191bd932e2a9d1b8a6..ebd9dbecae29f0946e9bd2488b2ac2e1ec7d8da5 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 113fc85fc18c353475bad13d72041979cfbfe64e..106fb44c35ed657b3e501ed5111450b157797d4d 100644 (file)
@@ -1,10 +1,29 @@
+/*
+    Copyright (C) 2012-2014 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
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "types.h"
+#include "exceptions.h"
+#include <boost/lexical_cast.hpp>
+#include <boost/algorithm/string.hpp>
 #include <vector>
 #include <cstdio>
 #include <iomanip>
-#include <boost/lexical_cast.hpp>
-#include <boost/algorithm/string.hpp>
-#include "types.h"
-#include "exceptions.h"
 
 using namespace std;
 using namespace dcp;
index 85dc836259573dd2d397a1e0dbf74fe55591ad80..1397dfdcda0538c8ad50a4888d05333aaedcc197 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
index 60d442feae546a728078f46687d8d759e253a534..9ad37fc586ec57db7f0c54b11b86b5fe650829a1 100644 (file)
@@ -37,7 +37,6 @@ def build(bld):
                  object.cc
                  picture_mxf.cc
                  picture_mxf_writer.cc
-                 rec709_linearised_gamma_lut.cc
                  reel.cc
                  reel_asset.cc
                  reel_mono_picture_asset.cc
@@ -51,7 +50,6 @@ def build(bld):
                  sound_mxf.cc
                  sound_mxf_writer.cc
                  sound_frame.cc
-                 srgb_linearised_gamma_lut.cc
                  stereo_picture_mxf.cc
                  stereo_picture_mxf_writer.cc
                  stereo_picture_frame.cc
@@ -87,14 +85,12 @@ def build(bld):
               picture_mxf.h
               picture_mxf_writer.h
               rgb_xyz.h
-              rec709_linearised_gamma_lut.h
               reel.h
               argb_frame.h
               signer.h
               signer_chain.h
               sound_mxf.h
               sound_frame.h
-              srgb_linearised_gamma_lut.h
               stereo_picture_mxf.h
               stereo_picture_frame.h
               subtitle_asset.h
index 665cfe4327bcf1b3b61d9673c104d5ddf0ca2a41..6af3c0c67ab3472fa88a5e72f83408c79e1420eb 100644 (file)
--- a/src/xml.h
+++ b/src/xml.h
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2014 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
index e75a43bc5ef2f61e98739be9112901af7a542286..4c793f22eb53388e7882ece863094c5fae8a69a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
@@ -17,9 +17,9 @@
 
 */
 
+#include "xyz_frame.h"
 #include <cassert>
 #include <stdexcept>
-#include "xyz_frame.h"
 
 using namespace dcp;
 
index 2118331ce5de9945ec7a2b48bf710e03eab39d38..e825b0a96434e9295c8677b7c737f6d1a6b1bedf 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
diff --git a/test/lut_test.cc b/test/lut_test.cc
deleted file mode 100644 (file)
index 32dac97..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-    Copyright (C) 2013 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
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include <boost/test/unit_test.hpp>
-#include "opendcp_lut.h"
-#include "opendcp_lut.cc"
-#include "srgb_linearised_gamma_lut.h"
-#include "rec709_linearised_gamma_lut.h"
-#include "gamma_lut.h"
-
-/* Check that some of our LUTs match the ones from OpenDCP that
-   DVD-o-matic uses / once used.
-*/
-BOOST_AUTO_TEST_CASE (lut_test)
-{
-       dcp::SRGBLinearisedGammaLUT lut_in_srgb (12, 2.4);
-       for (int i = 0; i < 4096; ++i) {
-               /* Hmm; 1% isn't exactly great... */
-               BOOST_CHECK_CLOSE (opendcp::lut_in[0][i], lut_in_srgb.lut()[i], 1);
-       }
-
-       dcp::Rec709LinearisedGammaLUT lut_in_rec709 (12, 1 / 0.45);
-       for (int i = 0; i < 4096; ++i) {
-               /* Hmm; 1% isn't exactly great... */
-               BOOST_CHECK_CLOSE (opendcp::lut_in[1][i], lut_in_rec709.lut()[i], 1);
-       }
-
-       dcp::GammaLUT lut_out (16, 1 / 2.6);
-       for (int i = 0; i < 65536; ++i) {
-               BOOST_CHECK_CLOSE (opendcp::lut_out[0][i], lut_out.lut()[i] * 4096, 1);
-       }
-}
index 0cc0e20217b58a56102dd2273eeb795466424765..83232216ec8aefa18b8af6d12977208122ebb200 100644 (file)
@@ -31,7 +31,6 @@ def build(bld):
                  frame_info_test.cc
                  kdm_key_test.cc
                  kdm_test.cc
-                 lut_test.cc
                  read_dcp_test.cc
                  recovery_test.cc
                  round_trip_test.cc