1 ///////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2011, 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 
35 #include "ImfDeepTiledOutputPart.h"
36 #include "ImfMultiPartOutputFile.h"
37 #include "ImfNamespace.h"
38 
39 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
40 
DeepTiledOutputPart(MultiPartOutputFile & multiPartFile,int partNumber)41 DeepTiledOutputPart::DeepTiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber)
42 {
43     file = multiPartFile.getOutputPart<DeepTiledOutputFile>(partNumber);
44 }
45 
46 const char *
fileName() const47 DeepTiledOutputPart::fileName () const
48 {
49     return file->fileName();
50 }
51 
52 
53 const Header &
header() const54 DeepTiledOutputPart::header () const
55 {
56     return file->header();
57 }
58 
59 
60 void
setFrameBuffer(const DeepFrameBuffer & frameBuffer)61 DeepTiledOutputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer)
62 {
63     file->setFrameBuffer(frameBuffer);
64 }
65 
66 
67 const DeepFrameBuffer &
frameBuffer() const68 DeepTiledOutputPart::frameBuffer () const
69 {
70     return file->frameBuffer();
71 }
72 
73 
74 unsigned int
tileXSize() const75 DeepTiledOutputPart::tileXSize () const
76 {
77     return file->tileXSize();
78 }
79 
80 
81 unsigned int
tileYSize() const82 DeepTiledOutputPart::tileYSize () const
83 {
84     return file->tileYSize();
85 }
86 
87 
88 LevelMode
levelMode() const89 DeepTiledOutputPart::levelMode () const
90 {
91     return file->levelMode();
92 }
93 
94 
95 LevelRoundingMode
levelRoundingMode() const96 DeepTiledOutputPart::levelRoundingMode () const
97 {
98     return file->levelRoundingMode();
99 }
100 
101 
102 int
numLevels() const103 DeepTiledOutputPart::numLevels () const
104 {
105     return file->numLevels();
106 }
107 
108 
109 int
numXLevels() const110 DeepTiledOutputPart::numXLevels () const
111 {
112     return file->numXLevels();
113 }
114 
115 
116 int
numYLevels() const117 DeepTiledOutputPart::numYLevels () const
118 {
119     return file->numYLevels();
120 }
121 
122 
123 bool
isValidLevel(int lx,int ly) const124 DeepTiledOutputPart::isValidLevel (int lx, int ly) const
125 {
126     return file->isValidLevel(lx, ly);
127 }
128 
129 
130 int
levelWidth(int lx) const131 DeepTiledOutputPart::levelWidth  (int lx) const
132 {
133     return file->levelWidth(lx);
134 }
135 
136 
137 int
levelHeight(int ly) const138 DeepTiledOutputPart::levelHeight (int ly) const
139 {
140     return file->levelHeight(ly);
141 }
142 
143 
144 int
numXTiles(int lx) const145 DeepTiledOutputPart::numXTiles (int lx) const
146 {
147     return file->numXTiles(lx);
148 }
149 
150 
151 int
numYTiles(int ly) const152 DeepTiledOutputPart::numYTiles (int ly) const
153 {
154     return file->numYTiles(ly);
155 }
156 
157 
158 
159 IMATH_NAMESPACE::Box2i
dataWindowForLevel(int l) const160 DeepTiledOutputPart::dataWindowForLevel (int l) const
161 {
162     return file->dataWindowForLevel(l);
163 }
164 
165 
166 IMATH_NAMESPACE::Box2i
dataWindowForLevel(int lx,int ly) const167 DeepTiledOutputPart::dataWindowForLevel (int lx, int ly) const
168 {
169     return file->dataWindowForLevel(lx, ly);
170 }
171 
172 
173 IMATH_NAMESPACE::Box2i
dataWindowForTile(int dx,int dy,int l) const174 DeepTiledOutputPart::dataWindowForTile (int dx, int dy,
175                                         int l) const
176 {
177     return file->dataWindowForTile(dx, dy, l);
178 }
179 
180 
181 IMATH_NAMESPACE::Box2i
dataWindowForTile(int dx,int dy,int lx,int ly) const182 DeepTiledOutputPart::dataWindowForTile (int dx, int dy,
183                                         int lx, int ly) const
184 {
185     return file->dataWindowForTile(dx, dy, lx, ly);
186 }
187 
188 
189 void
writeTile(int dx,int dy,int l)190 DeepTiledOutputPart::writeTile  (int dx, int dy, int l)
191 {
192     file->writeTile(dx, dy, l);
193 }
194 
195 
196 void
writeTile(int dx,int dy,int lx,int ly)197 DeepTiledOutputPart::writeTile  (int dx, int dy, int lx, int ly)
198 {
199     file->writeTile(dx, dy, lx, ly);
200 }
201 
202 
203 void
writeTiles(int dx1,int dx2,int dy1,int dy2,int lx,int ly)204 DeepTiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2,
205                                  int lx, int ly)
206 {
207     file->writeTiles(dx1, dx2, dy1, dy2, lx, ly);
208 }
209 
210 
211 void
writeTiles(int dx1,int dx2,int dy1,int dy2,int l)212 DeepTiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2,
213                                  int l)
214 {
215     file->writeTiles(dx1, dx2, dy1, dy2, l);
216 }
217 
218 
219 void
copyPixels(DeepTiledInputFile & in)220 DeepTiledOutputPart::copyPixels (DeepTiledInputFile &in)
221 {
222     file->copyPixels(in);
223 }
224 
225 
226 void
copyPixels(DeepTiledInputPart & in)227 DeepTiledOutputPart::copyPixels (DeepTiledInputPart &in)
228 {
229     file->copyPixels(in);
230 }
231 
232 
233 void
updatePreviewImage(const PreviewRgba newPixels[])234 DeepTiledOutputPart::updatePreviewImage (const PreviewRgba newPixels[])
235 {
236     file->updatePreviewImage(newPixels);
237 }
238 
239 
240 void
breakTile(int dx,int dy,int lx,int ly,int offset,int length,char c)241 DeepTiledOutputPart::breakTile  (int dx, int dy,
242                                  int lx, int ly,
243                                  int offset,
244                                  int length,
245                                  char c)
246 {
247     file->breakTile(dx, dy, lx, ly, offset, length, c);
248 }
249 
250 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT
251