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
#ifndef INCLUDED_IMF_HUF_H
7
#define INCLUDED_IMF_HUF_H
8
9
#include "
ImfExport.h
"
10
#include "
ImfNamespace.h
"
11
12
//-----------------------------------------------------------------------------
13
//
14
// 16-bit Huffman compression and decompression:
15
//
16
// hufCompress (r, nr, c)
17
//
18
// Compresses the contents of array r (of length nr),
19
// stores the compressed data in array c, and returns
20
// the size of the compressed data (in bytes).
21
//
22
// To avoid buffer overflows, the size of array c should
23
// be at least 2 * nr + 65536.
24
//
25
// hufUncompress (c, nc, r, nr)
26
//
27
// Uncompresses the data in array c (with length nc),
28
// and stores the results in array r (with length nr).
29
//
30
//-----------------------------------------------------------------------------
31
32
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER
33
34
IMF_EXPORT
35
int
hufCompress
(
36
const
unsigned
short
raw[
/*nRaw*/
],
37
int
nRaw,
38
char
compressed[
/*2 * nRaw + 65536*/
]);
39
40
IMF_EXPORT
41
void
hufUncompress
(
42
const
char
compressed[
/*nCompressed*/
],
43
int
nCompressed,
44
unsigned
short
raw[
/*nRaw*/
],
45
int
nRaw);
46
47
OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_EXIT
48
49
#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:83
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:80
OpenEXR
ImfHuf.h
Generated on Sun Nov 17 2024 03:01:36 for HDK by
1.8.6