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 "ImfTiledOutputPart.h"
36 #include "ImfNamespace.h"
37 
38 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
39 
TiledOutputPart(MultiPartOutputFile & multiPartFile,int partNumber)40 TiledOutputPart::TiledOutputPart(MultiPartOutputFile& multiPartFile, int partNumber)
41 {
42     file = multiPartFile.getOutputPart<TiledOutputFile>(partNumber);
43 }
44 
45 const char *
fileName() const46 TiledOutputPart::fileName () const
47 {
48     return file->fileName();
49 }
50 
51 const Header &
header() const52 TiledOutputPart::header () const
53 {
54     return file->header();
55 }
56 
57 void
setFrameBuffer(const FrameBuffer & frameBuffer)58 TiledOutputPart::setFrameBuffer (const FrameBuffer &frameBuffer)
59 {
60     file->setFrameBuffer(frameBuffer);
61 }
62 
63 const FrameBuffer &
frameBuffer() const64 TiledOutputPart::frameBuffer () const
65 {
66     return file->frameBuffer();
67 }
68 
69 unsigned int
tileXSize() const70 TiledOutputPart::tileXSize () const
71 {
72     return file->tileXSize();
73 }
74 
75 unsigned int
tileYSize() const76 TiledOutputPart::tileYSize () const
77 {
78     return file->tileYSize();
79 }
80 
81 LevelMode
levelMode() const82 TiledOutputPart::levelMode () const
83 {
84     return file->levelMode();
85 }
86 
87 LevelRoundingMode
levelRoundingMode() const88 TiledOutputPart::levelRoundingMode () const
89 {
90     return file->levelRoundingMode();
91 }
92 
93 int
numLevels() const94 TiledOutputPart::numLevels () const
95 {
96     return file->numLevels();
97 }
98 
99 int
numXLevels() const100 TiledOutputPart::numXLevels () const
101 {
102     return file->numXLevels();
103 }
104 
105 int
numYLevels() const106 TiledOutputPart::numYLevels () const
107 {
108     return file->numYLevels();
109 }
110 
111 bool
isValidLevel(int lx,int ly) const112 TiledOutputPart::isValidLevel (int lx, int ly) const
113 {
114     return file->isValidLevel(lx, ly);
115 }
116 
117 int
levelWidth(int lx) const118 TiledOutputPart::levelWidth  (int lx) const
119 {
120     return file->levelWidth(lx);
121 }
122 
123 int
levelHeight(int ly) const124 TiledOutputPart::levelHeight (int ly) const
125 {
126     return file->levelHeight(ly);
127 }
128 
129 int
numXTiles(int lx) const130 TiledOutputPart::numXTiles (int lx) const
131 {
132     return file->numXTiles(lx);
133 }
134 
135 int
numYTiles(int ly) const136 TiledOutputPart::numYTiles (int ly) const
137 {
138     return file->numYTiles(ly);
139 }
140 
141 IMATH_NAMESPACE::Box2i
dataWindowForLevel(int l) const142 TiledOutputPart::dataWindowForLevel (int l) const
143 {
144     return file->dataWindowForLevel(l);
145 }
146 
147 IMATH_NAMESPACE::Box2i
dataWindowForLevel(int lx,int ly) const148 TiledOutputPart::dataWindowForLevel (int lx, int ly) const
149 {
150     return file->dataWindowForLevel(lx, ly);
151 }
152 
153 IMATH_NAMESPACE::Box2i
dataWindowForTile(int dx,int dy,int l) const154 TiledOutputPart::dataWindowForTile (int dx, int dy, int l) const
155 {
156     return file->dataWindowForTile(dx, dy, l);
157 }
158 
159 IMATH_NAMESPACE::Box2i
dataWindowForTile(int dx,int dy,int lx,int ly) const160 TiledOutputPart::dataWindowForTile (int dx, int dy, int lx, int ly) const
161 {
162     return file->dataWindowForTile(dx, dy, lx, ly);
163 }
164 
165 void
writeTile(int dx,int dy,int l)166 TiledOutputPart::writeTile  (int dx, int dy, int l)
167 {
168     file->writeTile(dx, dy, l);
169 }
170 
171 void
writeTile(int dx,int dy,int lx,int ly)172 TiledOutputPart::writeTile  (int dx, int dy, int lx, int ly)
173 {
174     file->writeTile(dx, dy, lx, ly);
175 }
176 
177 void
writeTiles(int dx1,int dx2,int dy1,int dy2,int lx,int ly)178 TiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2, int lx, int ly)
179 {
180     file->writeTiles(dx1, dx2, dy1, dy2, lx, ly);
181 }
182 
183 void
writeTiles(int dx1,int dx2,int dy1,int dy2,int l)184 TiledOutputPart::writeTiles (int dx1, int dx2, int dy1, int dy2, int l)
185 {
186     file->writeTiles(dx1, dx2, dy1, dy2, l);
187 }
188 
189 void
copyPixels(TiledInputFile & in)190 TiledOutputPart::copyPixels (TiledInputFile &in)
191 {
192     file->copyPixels(in);
193 }
194 
195 void
copyPixels(InputFile & in)196 TiledOutputPart::copyPixels (InputFile &in)
197 {
198     file->copyPixels(in);
199 }
200 
201 void
copyPixels(TiledInputPart & in)202 TiledOutputPart::copyPixels (TiledInputPart &in)
203 {
204     file->copyPixels(in);
205 }
206 
207 void
copyPixels(InputPart & in)208 TiledOutputPart::copyPixels (InputPart &in)
209 {
210     file->copyPixels(in);
211 }
212 
213 
214 
215 void
updatePreviewImage(const PreviewRgba newPixels[])216 TiledOutputPart::updatePreviewImage (const PreviewRgba newPixels[])
217 {
218     file->updatePreviewImage(newPixels);
219 }
220 
221 void
breakTile(int dx,int dy,int lx,int ly,int offset,int length,char c)222 TiledOutputPart::breakTile  (int dx, int dy, int lx, int ly, int offset, int length, char c)
223 {
224     file->breakTile(dx, dy, lx, ly, offset, length, c);
225 }
226 
227 
228 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT
229