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
35
36 #include "ImfDeepScanLineInputPart.h"
37 #include "ImfNamespace.h"
38
39 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER
40
DeepScanLineInputPart(MultiPartInputFile & multiPartFile,int partNumber)41 DeepScanLineInputPart::DeepScanLineInputPart(MultiPartInputFile& multiPartFile, int partNumber)
42 {
43 file = multiPartFile.getInputPart<DeepScanLineInputFile>(partNumber);
44 }
45
46
47 const char *
fileName() const48 DeepScanLineInputPart::fileName () const
49 {
50 return file->fileName();
51 }
52
53
54 const Header &
header() const55 DeepScanLineInputPart::header () const
56 {
57 return file->header();
58 }
59
60
61 int
version() const62 DeepScanLineInputPart::version () const
63 {
64 return file->version();
65 }
66
67
68 void
setFrameBuffer(const DeepFrameBuffer & frameBuffer)69 DeepScanLineInputPart::setFrameBuffer (const DeepFrameBuffer &frameBuffer)
70 {
71 file->setFrameBuffer(frameBuffer);
72 }
73
74
75 const DeepFrameBuffer &
frameBuffer() const76 DeepScanLineInputPart::frameBuffer () const
77 {
78 return file->frameBuffer();
79 }
80
81
82 bool
isComplete() const83 DeepScanLineInputPart::isComplete () const
84 {
85 return file->isComplete();
86 }
87
88
89 void
readPixels(int scanLine1,int scanLine2)90 DeepScanLineInputPart::readPixels (int scanLine1, int scanLine2)
91 {
92 file->readPixels(scanLine1, scanLine2);
93 }
94
95
96 void
readPixels(int scanLine)97 DeepScanLineInputPart::readPixels (int scanLine)
98 {
99 file->readPixels(scanLine);
100 }
101
102
103 void
rawPixelData(int firstScanLine,char * pixelData,Int64 & pixelDataSize)104 DeepScanLineInputPart::rawPixelData (int firstScanLine,
105 char *pixelData,
106 Int64 &pixelDataSize)
107 {
108 file->rawPixelData(firstScanLine, pixelData, pixelDataSize);
109 }
110
111
112 void
readPixelSampleCounts(int scanline1,int scanline2)113 DeepScanLineInputPart::readPixelSampleCounts(int scanline1,
114 int scanline2)
115 {
116 file->readPixelSampleCounts(scanline1, scanline2);
117 }
118
119
120 void
readPixelSampleCounts(int scanline)121 DeepScanLineInputPart::readPixelSampleCounts(int scanline)
122 {
123 file->readPixelSampleCounts(scanline);
124 }
125
126 int
firstScanLineInChunk(int y) const127 DeepScanLineInputPart::firstScanLineInChunk(int y) const
128 {
129 return file->firstScanLineInChunk(y);
130 }
131
132 int
lastScanLineInChunk(int y) const133 DeepScanLineInputPart::lastScanLineInChunk(int y) const
134 {
135 return file->lastScanLineInChunk(y);
136 }
137
138 void
readPixels(const char * rawPixelData,const DeepFrameBuffer & frameBuffer,int scanLine1,int scanLine2) const139 DeepScanLineInputPart::readPixels(const char* rawPixelData, const DeepFrameBuffer& frameBuffer, int scanLine1, int scanLine2) const
140 {
141 return file->readPixels(rawPixelData,frameBuffer,scanLine1,scanLine2);
142 }
143 void
readPixelSampleCounts(const char * rawdata,const DeepFrameBuffer & frameBuffer,int scanLine1,int scanLine2) const144 DeepScanLineInputPart::readPixelSampleCounts(const char* rawdata, const DeepFrameBuffer& frameBuffer, int scanLine1, int scanLine2) const
145 {
146 return file->readPixelSampleCounts(rawdata,frameBuffer,scanLine1,scanLine2);
147 }
148
149 OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EXIT
150