PBRT
|
00001 00002 // 00003 // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas 00004 // Digital Ltd. LLC 00005 // 00006 // All rights reserved. 00007 // 00008 // Redistribution and use in source and binary forms, with or without 00009 // modification, are permitted provided that the following conditions are 00010 // met: 00011 // * Redistributions of source code must retain the above copyright 00012 // notice, this list of conditions and the following disclaimer. 00013 // * Redistributions in binary form must reproduce the above 00014 // copyright notice, this list of conditions and the following disclaimer 00015 // in the documentation and/or other materials provided with the 00016 // distribution. 00017 // * Neither the name of Industrial Light & Magic nor the names of 00018 // its contributors may be used to endorse or promote products derived 00019 // from this software without specific prior written permission. 00020 // 00021 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00022 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00023 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00024 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00025 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00026 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00027 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00028 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00029 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00030 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00031 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00032 // 00034 00035 00036 #ifndef INCLUDED_IMF_KEY_CODE_H 00037 #define INCLUDED_IMF_KEY_CODE_H 00038 00039 //----------------------------------------------------------------------------- 00040 // 00041 // class KeyCode 00042 // 00043 // A KeyCode object uniquely identifies a motion picture film frame. 00044 // The following fields specifiy film manufacturer, film type, film 00045 // roll and the frame's position within the roll: 00046 // 00047 // filmMfcCode film manufacturer code 00048 // range: 0 - 99 00049 // 00050 // filmType film type code 00051 // range: 0 - 99 00052 // 00053 // prefix prefix to identify film roll 00054 // range: 0 - 999999 00055 // 00056 // count count, increments once every perfsPerCount 00057 // perforations (see below) 00058 // range: 0 - 9999 00059 // 00060 // perfOffset offset of frame, in perforations from 00061 // zero-frame reference mark 00062 // range: 0 - 119 00063 // 00064 // perfsPerFrame number of perforations per frame 00065 // range: 1 - 15 00066 // 00067 // typical values: 00068 // 00069 // 1 for 16mm film 00070 // 3, 4, or 8 for 35mm film 00071 // 5, 8 or 15 for 65mm film 00072 // 00073 // perfsPerCount number of perforations per count 00074 // range: 20 - 120 00075 // 00076 // typical values: 00077 // 00078 // 20 for 16mm film 00079 // 64 for 35mm film 00080 // 80 or 120 for 65mm film 00081 // 00082 // For more information about the interpretation of those fields see 00083 // the following standards and recommended practice publications: 00084 // 00085 // SMPTE 254 Motion-Picture Film (35-mm) - Manufacturer-Printed 00086 // Latent Image Identification Information 00087 // 00088 // SMPTE 268M File Format for Digital Moving-Picture Exchange (DPX) 00089 // (section 6.1) 00090 // 00091 // SMPTE 270 Motion-Picture Film (65-mm) - Manufacturer- Printed 00092 // Latent Image Identification Information 00093 // 00094 // SMPTE 271 Motion-Picture Film (16-mm) - Manufacturer- Printed 00095 // Latent Image Identification Information 00096 // 00097 //----------------------------------------------------------------------------- 00098 00099 namespace Imf { 00100 00101 00102 class KeyCode 00103 { 00104 public: 00105 00106 //------------------------------------- 00107 // Constructors and assignment operator 00108 //------------------------------------- 00109 00110 KeyCode (int filmMfcCode = 0, 00111 int filmType = 0, 00112 int prefix = 0, 00113 int count = 0, 00114 int perfOffset = 0, 00115 int perfsPerFrame = 4, 00116 int perfsPerCount = 64); 00117 00118 KeyCode (const KeyCode &other); 00119 KeyCode & operator = (const KeyCode &other); 00120 00121 00122 //---------------------------- 00123 // Access to individual fields 00124 //---------------------------- 00125 00126 int filmMfcCode () const; 00127 void setFilmMfcCode (int filmMfcCode); 00128 00129 int filmType () const; 00130 void setFilmType (int filmType); 00131 00132 int prefix () const; 00133 void setPrefix (int prefix); 00134 00135 int count () const; 00136 void setCount (int count); 00137 00138 int perfOffset () const; 00139 void setPerfOffset (int perfOffset); 00140 00141 int perfsPerFrame () const; 00142 void setPerfsPerFrame (int perfsPerFrame); 00143 00144 int perfsPerCount () const; 00145 void setPerfsPerCount (int perfsPerCount); 00146 00147 private: 00148 00149 int _filmMfcCode; 00150 int _filmType; 00151 int _prefix; 00152 int _count; 00153 int _perfOffset; 00154 int _perfsPerFrame; 00155 int _perfsPerCount; 00156 }; 00157 00158 00159 } // namespace Imf 00160 00161 #endif