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

« back to all changes in this revision

Viewing changes to src/rawspeed/RawSpeed/Cr2Decoder.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 CR2_DECODER_H
2
 
#define CR2_DECODER_H
3
 
 
4
 
#include "RawDecoder.h"
5
 
#include "LJpegPlain.h"
6
 
#include "TiffIFD.h"
7
 
/* 
8
 
    RawSpeed - RAW file decoder.
9
 
 
10
 
    Copyright (C) 2009 Klaus Post
11
 
 
12
 
    This library is free software; you can redistribute it and/or
13
 
    modify it under the terms of the GNU Lesser General Public
14
 
    License as published by the Free Software Foundation; either
15
 
    version 2 of the License, or (at your option) any later version.
16
 
 
17
 
    This library is distributed in the hope that it will be useful,
18
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20
 
    Lesser General Public License for more details.
21
 
 
22
 
    You should have received a copy of the GNU Lesser General Public
23
 
    License along with this library; if not, write to the Free Software
24
 
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
 
 
26
 
    http://www.klauspost.com
27
 
*/
28
 
 
29
 
namespace RawSpeed {
30
 
 
31
 
class Cr2Decoder :
32
 
  public RawDecoder
33
 
{
34
 
public:
35
 
  Cr2Decoder(TiffIFD *rootIFD, FileMap* file);
36
 
  virtual RawImage decodeRaw();
37
 
  virtual void checkSupport(CameraMetaData *meta);
38
 
  virtual void decodeMetaData(CameraMetaData *meta);
39
 
  virtual ~Cr2Decoder(void);
40
 
protected:
41
 
  int sraw_coeffs[3];
42
 
 
43
 
  void sRawInterpolate();
44
 
  void interpolate_420(int w, int h, int start_h , int end_h);
45
 
  void interpolate_422(int w, int h, int start_h , int end_h);
46
 
  void interpolate_422_old(int w, int h, int start_h , int end_h);
47
 
  TiffIFD *mRootIFD;
48
 
};
49
 
 
50
 
class Cr2Slice {
51
 
public:
52
 
  Cr2Slice() { w = h = offset = count = 0;};
53
 
  ~Cr2Slice() {};
54
 
  uint32 w;
55
 
  uint32 h;
56
 
  uint32 offset;
57
 
  uint32 count;
58
 
};
59
 
 
60
 
} // namespace RawSpeed
61
 
#endif