1
#ifndef INCLUDED_IMF_PXR24_COMPRESSOR_H
2
#define INCLUDED_IMF_PXR24_COMPRESSOR_H
4
/////////////////////////////////////////////////////////////////////////////
6
// Copyright (c) 2004, Pixar Animation Studios
8
// All rights reserved.
10
// Redistribution and use in source and binary forms, with or without
11
// modification, are permitted provided that the following conditions are
13
// * Redistributions of source code must retain the above copyright
14
// notice, this list of conditions and the following disclaimer.
15
// * Redistributions in binary form must reproduce the above
16
// copyright notice, this list of conditions and the following disclaimer
17
// in the documentation and/or other materials provided with the
19
// * Neither the name of Pixar Animation Studios nor the names of
20
// its contributors may be used to endorse or promote products derived
21
// from this software without specific prior written permission.
23
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
29
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
30
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
31
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
/////////////////////////////////////////////////////////////////////////////
37
//-----------------------------------------------------------------------------
39
// class Pxr24Compressor -- Loren Carpenter's 24-bit float compressor
41
//-----------------------------------------------------------------------------
43
#include <ImfCompressor.h>
50
class Pxr24Compressor: public Compressor
54
Pxr24Compressor (const Header &hdr,
55
size_t maxScanLineSize,
58
virtual ~Pxr24Compressor ();
60
virtual int numScanLines () const;
62
virtual Format format () const;
64
virtual int compress (const char *inPtr,
69
virtual int compressTile (const char *inPtr,
74
virtual int uncompress (const char *inPtr,
79
virtual int uncompressTile (const char *inPtr,
85
int compress (const char *inPtr,
90
int uncompress (const char *inPtr,
97
unsigned char * _tmpBuffer;
99
const ChannelList & _channels;