RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
DeflateDecompressor.h
Go to the documentation of this file.
1
/*
2
RawSpeed - RAW file decoder.
3
4
Copyright (C) 2017 Roman Lebedev
5
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Lesser General Public
8
License as published by the Free Software Foundation; either
9
version 2 of the License, or (at your option) any later version.
10
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Lesser General Public License for more details.
15
16
You should have received a copy of the GNU Lesser General Public
17
License along with this library; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
*/
20
21
#pragma once
22
23
#include "rawspeedconfig.h"
24
25
#ifdef HAVE_ZLIB
26
27
#include "
common/RawImage.h
"
28
#include "
decompressors/AbstractDecompressor.h
"
29
#include "
io/Buffer.h
"
30
#include <memory>
31
32
namespace
rawspeed
{
33
34
class
iPoint2D
;
35
36
class
DeflateDecompressor final :
public
AbstractDecompressor
{
37
Buffer input;
38
RawImage mRaw;
39
int
predFactor;
40
int
bps;
41
42
public
:
43
DeflateDecompressor(Buffer bs, RawImage img,
int
predictor,
int
bps_);
44
45
// NOLINTNEXTLINE(modernize-avoid-c-arrays)
46
void
decode(std::unique_ptr<
unsigned
char
[]>* uBuffer, iPoint2D maxDim,
47
iPoint2D
dim
, iPoint2D off);
48
};
49
50
}
// namespace rawspeed
51
52
#else
53
54
#pragma message \
55
"ZLIB is not present! Deflate compression will not be supported!"
56
57
#endif
AbstractDecompressor.h
Buffer.h
RawImage.h
dim
iPoint2D dim(rawspeed::implicit_cast< int >(ceil(sqSide *sqARatio)), rawspeed::implicit_cast< int >(ceil(sqSide/sqARatio)))
Definition
Common.cpp:55
rawspeed::AbstractDecompressor
Definition
AbstractDecompressor.h:25
rawspeed::iPoint2D
Definition
Point.h:35
rawspeed
Definition
CoalescingOutputIteratorBenchmark.cpp:35
librawspeed
decompressors
DeflateDecompressor.h
Generated by
1.15.0