ImfKeyCode.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. //
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Copyright (c) Contributors to the OpenEXR Project.
  4. //
  5. #ifndef INCLUDED_IMF_KEY_CODE_H
  6. #define INCLUDED_IMF_KEY_CODE_H
  7. //-----------------------------------------------------------------------------
  8. //
  9. // class KeyCode
  10. //
  11. // A KeyCode object uniquely identifies a motion picture film frame.
  12. // The following fields specify film manufacturer, film type, film
  13. // roll and the frame's position within the roll:
  14. //
  15. // filmMfcCode film manufacturer code
  16. // range: 0 - 99
  17. //
  18. // filmType film type code
  19. // range: 0 - 99
  20. //
  21. // prefix prefix to identify film roll
  22. // range: 0 - 999999
  23. //
  24. // count count, increments once every perfsPerCount
  25. // perforations (see below)
  26. // range: 0 - 9999
  27. //
  28. // perfOffset offset of frame, in perforations from
  29. // zero-frame reference mark
  30. // range: 0 - 119
  31. //
  32. // perfsPerFrame number of perforations per frame
  33. // range: 1 - 15
  34. //
  35. // typical values:
  36. //
  37. // 1 for 16mm film
  38. // 3, 4, or 8 for 35mm film
  39. // 5, 8 or 15 for 65mm film
  40. //
  41. // perfsPerCount number of perforations per count
  42. // range: 20 - 120
  43. //
  44. // typical values:
  45. //
  46. // 20 for 16mm film
  47. // 64 for 35mm film
  48. // 80 or 120 for 65mm film
  49. //
  50. // For more information about the interpretation of those fields see
  51. // the following standards and recommended practice publications:
  52. //
  53. // SMPTE 254 Motion-Picture Film (35-mm) - Manufacturer-Printed
  54. // Latent Image Identification Information
  55. //
  56. // SMPTE 268M File Format for Digital Moving-Picture Exchange (DPX)
  57. // (section 6.1)
  58. //
  59. // SMPTE 270 Motion-Picture Film (65-mm) - Manufacturer- Printed
  60. // Latent Image Identification Information
  61. //
  62. // SMPTE 271 Motion-Picture Film (16-mm) - Manufacturer- Printed
  63. // Latent Image Identification Information
  64. //
  65. //-----------------------------------------------------------------------------
  66. #include "ImfExport.h"
  67. #include "ImfNamespace.h"
  68. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
  69. class IMF_EXPORT_TYPE KeyCode
  70. {
  71. public:
  72. //-------------------------------------
  73. // Constructors and assignment operator
  74. //-------------------------------------
  75. IMF_EXPORT
  76. KeyCode (int filmMfcCode = 0,
  77. int filmType = 0,
  78. int prefix = 0,
  79. int count = 0,
  80. int perfOffset = 0,
  81. int perfsPerFrame = 4,
  82. int perfsPerCount = 64);
  83. IMF_EXPORT
  84. KeyCode (const KeyCode &other);
  85. ~KeyCode() = default;
  86. IMF_EXPORT
  87. KeyCode & operator = (const KeyCode &other);
  88. //----------------------------
  89. // Access to individual fields
  90. //----------------------------
  91. IMF_EXPORT
  92. int filmMfcCode () const;
  93. IMF_EXPORT
  94. void setFilmMfcCode (int filmMfcCode);
  95. IMF_EXPORT
  96. int filmType () const;
  97. IMF_EXPORT
  98. void setFilmType (int filmType);
  99. IMF_EXPORT
  100. int prefix () const;
  101. IMF_EXPORT
  102. void setPrefix (int prefix);
  103. IMF_EXPORT
  104. int count () const;
  105. IMF_EXPORT
  106. void setCount (int count);
  107. IMF_EXPORT
  108. int perfOffset () const;
  109. IMF_EXPORT
  110. void setPerfOffset (int perfOffset);
  111. IMF_EXPORT
  112. int perfsPerFrame () const;
  113. IMF_EXPORT
  114. void setPerfsPerFrame (int perfsPerFrame);
  115. IMF_EXPORT
  116. int perfsPerCount () const;
  117. IMF_EXPORT
  118. void setPerfsPerCount (int perfsPerCount);
  119. private:
  120. int _filmMfcCode;
  121. int _filmType;
  122. int _prefix;
  123. int _count;
  124. int _perfOffset;
  125. int _perfsPerFrame;
  126. int _perfsPerCount;
  127. };
  128. OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
  129. #endif