HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ImfHuf.h
Go to the documentation of this file.
1
//
2
// SPDX-License-Identifier: BSD-3-Clause
3
// Copyright (c) Contributors to the OpenEXR Project.
4
//
5
6
7
#ifndef INCLUDED_IMF_HUF_H
8
#define INCLUDED_IMF_HUF_H
9
10
#include "
ImfExport.h
"
11
#include "
ImfNamespace.h
"
12
13
//-----------------------------------------------------------------------------
14
//
15
// 16-bit Huffman compression and decompression:
16
//
17
// hufCompress (r, nr, c)
18
//
19
// Compresses the contents of array r (of length nr),
20
// stores the compressed data in array c, and returns
21
// the size of the compressed data (in bytes).
22
//
23
// To avoid buffer overflows, the size of array c should
24
// be at least 2 * nr + 65536.
25
//
26
// hufUncompress (c, nc, r, nr)
27
//
28
// Uncompresses the data in array c (with length nc),
29
// and stores the results in array r (with length nr).
30
//
31
//-----------------------------------------------------------------------------
32
33
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
34
35
36
IMF_EXPORT
37
int
38
hufCompress
(
const
unsigned
short
raw[
/*nRaw*/
],
39
int
nRaw,
40
char
compressed[
/*2 * nRaw + 65536*/
]);
41
42
IMF_EXPORT
43
void
44
hufUncompress
(
const
char
compressed[
/*nCompressed*/
],
45
int
nCompressed,
46
unsigned
short
raw[
/*nRaw*/
],
47
int
nRaw);
48
49
50
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
51
52
#endif
ImfNamespace.h
hufCompress
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER IMF_EXPORT int hufCompress(const unsigned short raw[], int nRaw, char compressed[])
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
Definition:
ImfNamespace.h:80
hufUncompress
IMF_EXPORT void hufUncompress(const char compressed[], int nCompressed, unsigned short raw[], int nRaw)
IMF_EXPORT
#define IMF_EXPORT
Definition:
ImfExport.h:54
ImfExport.h
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
#define OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
Definition:
ImfNamespace.h:79
OpenEXR
ImfHuf.h
Generated on Sun May 12 2024 03:16:20 for HDK by
1.8.6