ImfKeyCode.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. ///////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2004, Industrial Light & Magic, a division of Lucas
  4. // Digital Ltd. LLC
  5. //
  6. // All rights reserved.
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions are
  10. // met:
  11. // * Redistributions of source code must retain the above copyright
  12. // notice, this list of conditions and the following disclaimer.
  13. // * Redistributions in binary form must reproduce the above
  14. // copyright notice, this list of conditions and the following disclaimer
  15. // in the documentation and/or other materials provided with the
  16. // distribution.
  17. // * Neither the name of Industrial Light & Magic nor the names of
  18. // its contributors may be used to endorse or promote products derived
  19. // from this software without specific prior written permission.
  20. //
  21. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. //
  33. ///////////////////////////////////////////////////////////////////////////
  34. #ifndef INCLUDED_IMF_KEY_CODE_H
  35. #define INCLUDED_IMF_KEY_CODE_H
  36. //-----------------------------------------------------------------------------
  37. //
  38. // class KeyCode
  39. //
  40. // A KeyCode object uniquely identifies a motion picture film frame.
  41. // The following fields specifiy film manufacturer, film type, film
  42. // roll and the frame's position within the roll:
  43. //
  44. // filmMfcCode film manufacturer code
  45. // range: 0 - 99
  46. //
  47. // filmType film type code
  48. // range: 0 - 99
  49. //
  50. // prefix prefix to identify film roll
  51. // range: 0 - 999999
  52. //
  53. // count count, increments once every perfsPerCount
  54. // perforations (see below)
  55. // range: 0 - 9999
  56. //
  57. // perfOffset offset of frame, in perforations from
  58. // zero-frame reference mark
  59. // range: 0 - 119
  60. //
  61. // perfsPerFrame number of perforations per frame
  62. // range: 1 - 15
  63. //
  64. // typical values:
  65. //
  66. // 1 for 16mm film
  67. // 3, 4, or 8 for 35mm film
  68. // 5, 8 or 15 for 65mm film
  69. //
  70. // perfsPerCount number of perforations per count
  71. // range: 20 - 120
  72. //
  73. // typical values:
  74. //
  75. // 20 for 16mm film
  76. // 64 for 35mm film
  77. // 80 or 120 for 65mm film
  78. //
  79. // For more information about the interpretation of those fields see
  80. // the following standards and recommended practice publications:
  81. //
  82. // SMPTE 254 Motion-Picture Film (35-mm) - Manufacturer-Printed
  83. // Latent Image Identification Information
  84. //
  85. // SMPTE 268M File Format for Digital Moving-Picture Exchange (DPX)
  86. // (section 6.1)
  87. //
  88. // SMPTE 270 Motion-Picture Film (65-mm) - Manufacturer- Printed
  89. // Latent Image Identification Information
  90. //
  91. // SMPTE 271 Motion-Picture Film (16-mm) - Manufacturer- Printed
  92. // Latent Image Identification Information
  93. //
  94. //-----------------------------------------------------------------------------
  95. #include "ImfNamespace.h"
  96. #include "ImfExport.h"
  97. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
  98. class KeyCode
  99. {
  100. public:
  101. //-------------------------------------
  102. // Constructors and assignment operator
  103. //-------------------------------------
  104. IMF_EXPORT
  105. KeyCode (int filmMfcCode = 0,
  106. int filmType = 0,
  107. int prefix = 0,
  108. int count = 0,
  109. int perfOffset = 0,
  110. int perfsPerFrame = 4,
  111. int perfsPerCount = 64);
  112. IMF_EXPORT
  113. KeyCode (const KeyCode &other);
  114. IMF_EXPORT
  115. KeyCode & operator = (const KeyCode &other);
  116. //----------------------------
  117. // Access to individual fields
  118. //----------------------------
  119. IMF_EXPORT
  120. int filmMfcCode () const;
  121. IMF_EXPORT
  122. void setFilmMfcCode (int filmMfcCode);
  123. IMF_EXPORT
  124. int filmType () const;
  125. IMF_EXPORT
  126. void setFilmType (int filmType);
  127. IMF_EXPORT
  128. int prefix () const;
  129. IMF_EXPORT
  130. void setPrefix (int prefix);
  131. IMF_EXPORT
  132. int count () const;
  133. IMF_EXPORT
  134. void setCount (int count);
  135. IMF_EXPORT
  136. int perfOffset () const;
  137. IMF_EXPORT
  138. void setPerfOffset (int perfOffset);
  139. IMF_EXPORT
  140. int perfsPerFrame () const;
  141. IMF_EXPORT
  142. void setPerfsPerFrame (int perfsPerFrame);
  143. IMF_EXPORT
  144. int perfsPerCount () const;
  145. IMF_EXPORT
  146. void setPerfsPerCount (int perfsPerCount);
  147. private:
  148. int _filmMfcCode;
  149. int _filmType;
  150. int _prefix;
  151. int _count;
  152. int _perfOffset;
  153. int _perfsPerFrame;
  154. int _perfsPerCount;
  155. };
  156. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
  157. #endif