From 2cc2026701c9e8268ba154ec9330c5d56cbdc240 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 Jan 2014 12:01:17 +0000 Subject: Some tidying up. --- src/colour_matrix.cc | 2 +- src/colour_matrix.h | 2 +- src/cpl.cc | 2 +- src/cpl.h | 14 +++++------ src/dcp_time.cc | 12 +++++----- src/dcp_time.h | 6 ++--- src/gamma_lut.cc | 2 +- src/image.cc | 2 +- src/image.h | 2 +- src/kdm.h | 2 +- src/key.cc | 14 +++++++---- src/key.h | 4 ++-- src/lut.h | 4 ++-- src/lut_cache.h | 19 +++++++++++++++ src/metadata.cc | 14 +++++------ src/metadata.h | 4 ++-- src/mono_picture_mxf.cc | 2 +- src/mono_picture_mxf.h | 2 +- src/mono_picture_mxf_writer.cc | 2 +- src/mono_picture_mxf_writer.h | 2 +- src/mxf.cc | 2 +- src/mxf.h | 6 ++--- src/picture_mxf.cc | 22 ++++++++--------- src/picture_mxf.h | 2 +- src/picture_mxf_writer_common.cc | 2 +- src/rec709_linearised_gamma_lut.cc | 38 ------------------------------ src/rec709_linearised_gamma_lut.h | 32 ------------------------- src/reel.cc | 2 +- src/reel.h | 2 +- src/reel_subtitle_asset.h | 2 +- src/rgb_xyz.cc | 2 +- src/rgb_xyz.h | 2 +- src/signer.h | 2 +- src/sound_frame.cc | 6 ++--- src/sound_frame.h | 2 +- src/sound_mxf.cc | 2 +- src/srgb_linearised_gamma_lut.cc | 38 ------------------------------ src/srgb_linearised_gamma_lut.h | 32 ------------------------- src/stereo_picture_frame.cc | 2 +- src/stereo_picture_frame.h | 2 +- src/stereo_picture_mxf.cc | 2 +- src/stereo_picture_mxf.h | 2 +- src/stereo_picture_mxf_writer.cc | 2 +- src/stereo_picture_mxf_writer.h | 2 +- src/types.cc | 27 +++++++++++++++++---- src/types.h | 2 +- src/wscript | 4 ---- src/xml.h | 2 +- src/xyz_frame.cc | 4 ++-- src/xyz_frame.h | 2 +- test/lut_test.cc | 48 -------------------------------------- test/wscript | 1 - 52 files changed, 130 insertions(+), 281 deletions(-) delete mode 100644 src/rec709_linearised_gamma_lut.cc delete mode 100644 src/rec709_linearised_gamma_lut.h delete mode 100644 src/srgb_linearised_gamma_lut.cc delete mode 100644 src/srgb_linearised_gamma_lut.h delete mode 100644 test/lut_test.cc diff --git a/src/colour_matrix.cc b/src/colour_matrix.cc index 19243d4d..72f952c3 100644 --- a/src/colour_matrix.cc +++ b/src/colour_matrix.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/colour_matrix.h b/src/colour_matrix.h index 010ac3b9..ce15051c 100644 --- a/src/colour_matrix.h +++ b/src/colour_matrix.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/cpl.cc b/src/cpl.cc index a27e8fda..813eb0ed 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/cpl.h b/src/cpl.h index 83fc4b9d..9e7d5aae 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2014 Carl Hetherington 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,17 +20,17 @@ #ifndef LIBDCP_CPL_H #define LIBDCP_CPL_H -#include +#include "types.h" +#include "certificates.h" +#include "key.h" +#include "asset.h" +#include #include #include #include #include #include -#include -#include "types.h" -#include "certificates.h" -#include "key.h" -#include "asset.h" +#include namespace dcp { diff --git a/src/dcp_time.cc b/src/dcp_time.cc index 605c4a40..5376b972 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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,16 +18,16 @@ */ /** @file src/dcp_time.cc - * @brief A representation of time within a DCP. + * @brief Time class. */ -#include -#include +#include "dcp_time.h" +#include "exceptions.h" #include #include +#include +#include #include -#include "dcp_time.h" -#include "exceptions.h" using namespace std; using namespace boost; diff --git a/src/dcp_time.h b/src/dcp_time.h index 885393c1..697ca230 100644 --- a/src/dcp_time.h +++ b/src/dcp_time.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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,15 +18,15 @@ */ /** @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 #include #include -#include namespace dcp { diff --git a/src/gamma_lut.cc b/src/gamma_lut.cc index 1a954914..b994aacc 100644 --- a/src/gamma_lut.cc +++ b/src/gamma_lut.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/image.cc b/src/image.cc index 2cb5a7a4..f12ceea2 100644 --- a/src/image.cc +++ b/src/image.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/image.h b/src/image.h index a8786b77..069534ea 100644 --- a/src/image.h +++ b/src/image.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/kdm.h b/src/kdm.h index f6d96b39..c4bd8c86 100644 --- a/src/kdm.h +++ b/src/kdm.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/key.cc b/src/key.cc index 0e04c27a..43e59dfc 100644 --- a/src/key.cc +++ b/src/key.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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,13 +17,17 @@ */ -#include -#include -#include +/** @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 +#include +#include using std::string; using std::stringstream; diff --git a/src/key.h b/src/key.h index d6b2f2f2..43897baf 100644 --- a/src/key.h +++ b/src/key.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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 diff --git a/src/lut.h b/src/lut.h index f56676a2..154541a7 100644 --- a/src/lut.h +++ b/src/lut.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 #include +#include namespace dcp { diff --git a/src/lut_cache.h b/src/lut_cache.h index b60ee109..0985a0c0 100644 --- a/src/lut_cache.h +++ b/src/lut_cache.h @@ -1,3 +1,22 @@ +/* + Copyright (C) 2013-2014 Carl Hetherington + + 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 diff --git a/src/metadata.cc b/src/metadata.cc index d2357a1f..e3382613 100644 --- a/src/metadata.cc +++ b/src/metadata.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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,17 +18,17 @@ */ /** @file src/metadata.cc - * @brief Metadata for writing to the DCP. + * @brief XMLMetadata and MXFMetadata classes. */ -#include -#include -#include +#include "metadata.h" +#include "util.h" #ifdef LIBDCP_WINDOWS #include #endif -#include "metadata.h" -#include "util.h" +#include +#include +#include using namespace std; using namespace dcp; diff --git a/src/metadata.h b/src/metadata.h index 0a707534..e1ce6986 100644 --- a/src/metadata.h +++ b/src/metadata.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 diff --git a/src/mono_picture_mxf.cc b/src/mono_picture_mxf.cc index e33454dc..699cfc23 100644 --- a/src/mono_picture_mxf.cc +++ b/src/mono_picture_mxf.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/mono_picture_mxf.h b/src/mono_picture_mxf.h index 9f0a2eea..c742ae37 100644 --- a/src/mono_picture_mxf.h +++ b/src/mono_picture_mxf.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/mono_picture_mxf_writer.cc b/src/mono_picture_mxf_writer.cc index 619d298e..96c054d7 100644 --- a/src/mono_picture_mxf_writer.cc +++ b/src/mono_picture_mxf_writer.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/mono_picture_mxf_writer.h b/src/mono_picture_mxf_writer.h index 7ff87a5d..727fc688 100644 --- a/src/mono_picture_mxf_writer.h +++ b/src/mono_picture_mxf_writer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/mxf.cc b/src/mxf.cc index 42d92536..d2ec5629 100644 --- a/src/mxf.cc +++ b/src/mxf.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/mxf.h b/src/mxf.h index 3aaadfd7..92b7b6b9 100644 --- a/src/mxf.h +++ b/src/mxf.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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" diff --git a/src/picture_mxf.cc b/src/picture_mxf.cc index 7634493d..e5955047 100644 --- a/src/picture_mxf.cc +++ b/src/picture_mxf.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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,21 +17,21 @@ */ -#include -#include -#include -#include -#include -#include -#include -#include -#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 +#include +#include +#include +#include +#include +#include +#include using std::string; using std::ostream; diff --git a/src/picture_mxf.h b/src/picture_mxf.h index df75625c..4653196d 100644 --- a/src/picture_mxf.h +++ b/src/picture_mxf.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/picture_mxf_writer_common.cc b/src/picture_mxf_writer_common.cc index 9836f03e..d2073f77 100644 --- a/src/picture_mxf_writer_common.cc +++ b/src/picture_mxf_writer_common.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 index 29f39ac0..00000000 --- a/src/rec709_linearised_gamma_lut.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2012-2013 Carl Hetherington - - 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::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 (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 index e7130ef3..00000000 --- a/src/rec709_linearised_gamma_lut.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2012-2013 Carl Hetherington - - 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 cache; -}; - -} diff --git a/src/reel.cc b/src/reel.cc index 27fc0329..8326c197 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2014 Carl Hetherington 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/reel.h b/src/reel.h index 8aaebf51..ea7e1c41 100644 --- a/src/reel.h +++ b/src/reel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/reel_subtitle_asset.h b/src/reel_subtitle_asset.h index 7b17b8a9..429c9859 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_subtitle_asset.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/rgb_xyz.cc b/src/rgb_xyz.cc index 7d30d32e..6fc28e3d 100644 --- a/src/rgb_xyz.cc +++ b/src/rgb_xyz.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/rgb_xyz.h b/src/rgb_xyz.h index f4c8b686..6b0f1842 100644 --- a/src/rgb_xyz.h +++ b/src/rgb_xyz.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/signer.h b/src/signer.h index c57c73cf..9ee5852b 100644 --- a/src/signer.h +++ b/src/signer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/sound_frame.cc b/src/sound_frame.cc index 06d2b88e..6471ee0a 100644 --- a/src/sound_frame.cc +++ b/src/sound_frame.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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,10 +17,10 @@ */ -#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; diff --git a/src/sound_frame.h b/src/sound_frame.h index bc46b53a..eedfc477 100644 --- a/src/sound_frame.h +++ b/src/sound_frame.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/sound_mxf.cc b/src/sound_mxf.cc index 82ab0823..b97da94a 100644 --- a/src/sound_mxf.cc +++ b/src/sound_mxf.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 index bab36cb1..00000000 --- a/src/srgb_linearised_gamma_lut.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (C) 2012-2013 Carl Hetherington - - 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::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 (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 index 68030610..00000000 --- a/src/srgb_linearised_gamma_lut.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (C) 2012-2013 Carl Hetherington - - 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 cache; -}; - -} diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc index 790fcc1a..b21c7902 100644 --- a/src/stereo_picture_frame.cc +++ b/src/stereo_picture_frame.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/stereo_picture_frame.h b/src/stereo_picture_frame.h index 40c2a441..fa7620fb 100644 --- a/src/stereo_picture_frame.h +++ b/src/stereo_picture_frame.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/stereo_picture_mxf.cc b/src/stereo_picture_mxf.cc index 980c6ad5..59f16c93 100644 --- a/src/stereo_picture_mxf.cc +++ b/src/stereo_picture_mxf.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/stereo_picture_mxf.h b/src/stereo_picture_mxf.h index eb527a1e..f4a4771a 100644 --- a/src/stereo_picture_mxf.h +++ b/src/stereo_picture_mxf.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/stereo_picture_mxf_writer.cc b/src/stereo_picture_mxf_writer.cc index 4ea65e05..5c503098 100644 --- a/src/stereo_picture_mxf_writer.cc +++ b/src/stereo_picture_mxf_writer.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/stereo_picture_mxf_writer.h b/src/stereo_picture_mxf_writer.h index 8773eccd..ebd9dbec 100644 --- a/src/stereo_picture_mxf_writer.h +++ b/src/stereo_picture_mxf_writer.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/types.cc b/src/types.cc index 113fc85f..106fb44c 100644 --- a/src/types.cc +++ b/src/types.cc @@ -1,10 +1,29 @@ +/* + Copyright (C) 2012-2014 Carl Hetherington + + 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 +#include #include #include #include -#include -#include -#include "types.h" -#include "exceptions.h" using namespace std; using namespace dcp; diff --git a/src/types.h b/src/types.h index 85dc8362..1397dfdc 100644 --- a/src/types.h +++ b/src/types.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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/wscript b/src/wscript index 60d442fe..9ad37fc5 100644 --- a/src/wscript +++ b/src/wscript @@ -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 diff --git a/src/xml.h b/src/xml.h index 665cfe43..6af3c0c6 100644 --- a/src/xml.h +++ b/src/xml.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington 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/xyz_frame.cc b/src/xyz_frame.cc index e75a43bc..4c793f22 100644 --- a/src/xyz_frame.cc +++ b/src/xyz_frame.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 #include -#include "xyz_frame.h" using namespace dcp; diff --git a/src/xyz_frame.h b/src/xyz_frame.h index 2118331c..e825b0a9 100644 --- a/src/xyz_frame.h +++ b/src/xyz_frame.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2013 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 index 32dac97a..00000000 --- a/test/lut_test.cc +++ /dev/null @@ -1,48 +0,0 @@ -/* - Copyright (C) 2013 Carl Hetherington - - 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 -#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); - } -} diff --git a/test/wscript b/test/wscript index 0cc0e202..83232216 100644 --- a/test/wscript +++ b/test/wscript @@ -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 -- cgit v1.2.3