~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/libkdcraw/libraw/RawSpeed/NikonDecompressor.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef NIKON_DECOMPRESSOR_H
 
2
#define NIKON_DECOMPRESSOR_H
 
3
 
 
4
#include "LJpegDecompressor.h"
 
5
#include "BitPumpMSB.h"
 
6
/* 
 
7
    RawSpeed - RAW file decoder.
 
8
 
 
9
    Copyright (C) 2009 Klaus Post
 
10
 
 
11
    This library is free software; you can redistribute it and/or
 
12
    modify it under the terms of the GNU Lesser General Public
 
13
    License as published by the Free Software Foundation; either
 
14
    version 2 of the License, or (at your option) any later version.
 
15
 
 
16
    This library is distributed in the hope that it will be useful,
 
17
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
    Lesser General Public License for more details.
 
20
 
 
21
    You should have received a copy of the GNU Lesser General Public
 
22
    License along with this library; if not, write to the Free Software
 
23
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
24
 
 
25
    http://www.klauspost.com
 
26
*/
 
27
 
 
28
namespace RawSpeed {
 
29
 
 
30
class NikonDecompressor :
 
31
  public LJpegDecompressor
 
32
{
 
33
public:
 
34
  NikonDecompressor(FileMap* file, RawImage img );
 
35
public:
 
36
  virtual ~NikonDecompressor(void);
 
37
  void DecompressNikon(ByteStream *meta, uint32 w, uint32 h, uint32 bitsPS, uint32 offset, uint32 size);
 
38
private:
 
39
  void initTable(uint32 huffSelect);
 
40
  int HuffDecodeNikon();
 
41
  ushort16 curve[0x8000];
 
42
  BitPumpMSB *bits;
 
43
};
 
44
 
 
45
static const uchar8 nikon_tree[][32] = {
 
46
  { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,    /* 12-bit lossy */
 
47
  5,4,3,6,2,7,1,0,8,9,11,10,12 },
 
48
  { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,    /* 12-bit lossy after split */
 
49
  0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 },
 
50
  { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,  /* 12-bit lossless */
 
51
  5,4,6,3,7,2,8,1,9,0,10,11,12 },
 
52
  { 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,    /* 14-bit lossy */
 
53
  5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 },
 
54
  { 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,    /* 14-bit lossy after split */
 
55
  8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 },
 
56
  { 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,    /* 14-bit lossless */
 
57
  7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 } };
 
58
  
 
59
} // namespace RawSpeed
 
60
 
 
61
#endif