~ubuntu-branches/ubuntu/saucy/darktable/saucy

« back to all changes in this revision

Viewing changes to src/rawspeed/RawSpeed/NefDecoder.h

  • Committer: Bazaar Package Importer
  • Author(s): David Bremner
  • Date: 2011-08-02 21:32:31 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110802213231-r9v63trgyk1e822j
Tags: 0.9.1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef NEF_DECODER_H
2
 
#define NEF_DECODER_H
3
 
 
4
 
#include "RawDecoder.h"
5
 
#include "LJpegPlain.h"
6
 
#include "TiffIFD.h"
7
 
#include "BitPumpPlain.h"
8
 
#include "TiffParser.h"
9
 
#include "NikonDecompressor.h"
10
 
/* 
11
 
    RawSpeed - RAW file decoder.
12
 
 
13
 
    Copyright (C) 2009 Klaus Post
14
 
 
15
 
    This library is free software; you can redistribute it and/or
16
 
    modify it under the terms of the GNU Lesser General Public
17
 
    License as published by the Free Software Foundation; either
18
 
    version 2 of the License, or (at your option) any later version.
19
 
 
20
 
    This library is distributed in the hope that it will be useful,
21
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23
 
    Lesser General Public License for more details.
24
 
 
25
 
    You should have received a copy of the GNU Lesser General Public
26
 
    License along with this library; if not, write to the Free Software
27
 
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
28
 
 
29
 
    http://www.klauspost.com
30
 
*/
31
 
 
32
 
namespace RawSpeed {
33
 
 
34
 
class NefDecoder :
35
 
  public RawDecoder
36
 
{
37
 
public:
38
 
  NefDecoder(TiffIFD *rootIFD, FileMap* file);
39
 
  virtual ~NefDecoder(void);
40
 
  virtual RawImage decodeRaw();
41
 
  virtual void decodeMetaData(CameraMetaData *meta);
42
 
  virtual void checkSupport(CameraMetaData *meta);
43
 
  TiffIFD *mRootIFD;
44
 
private:
45
 
  bool D100IsCompressed(uint32 offset);
46
 
  void DecodeUncompressed();
47
 
  void DecodeD100Uncompressed();
48
 
  void readCoolpixMangledRaw(ByteStream &input, iPoint2D& size, iPoint2D& offset, int inputPitch);
49
 
  void readCoolpixSplitRaw(ByteStream &input, iPoint2D& size, iPoint2D& offset, int inputPitch);
50
 
  TiffIFD* FindBestImage(vector<TiffIFD*>* data);
51
 
};
52
 
 
53
 
class NefSlice {
54
 
public:
55
 
  NefSlice() { h = offset = count = 0;};
56
 
  ~NefSlice() {};
57
 
  uint32 h;
58
 
  uint32 offset;
59
 
  uint32 count;
60
 
};
61
 
 
62
 
} // namespace RawSpeed
63
 
#endif