szlib.h 1.19 KB
Newer Older
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
1
#ifndef SZLIB_H
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
2
#define SZLIB_H 1
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
3

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
4
#include "libaec.h"
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
5

6 7 8 9 10 11 12 13
#define SZ_ALLOW_K13_OPTION_MASK         1
#define SZ_CHIP_OPTION_MASK              2
#define SZ_EC_OPTION_MASK                4
#define SZ_LSB_OPTION_MASK               8
#define SZ_MSB_OPTION_MASK              16
#define SZ_NN_OPTION_MASK               32
#define SZ_RAW_OPTION_MASK             128

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
14
#define SZ_OK AEC_OK
15 16
#define SZ_OUTBUFF_FULL 2

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
17
#define SZ_NO_ENCODER_ERROR -1
18
#define SZ_PARAM_ERROR AEC_CONF_ERROR
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
19
#define SZ_MEM_ERROR AEC_MEM_ERROR
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
20

21 22 23 24
#define SZ_MAX_PIXELS_PER_BLOCK 32
#define SZ_MAX_BLOCKS_PER_SCANLINE 128
#define SZ_MAX_PIXELS_PER_SCANLINE                              \
    (SZ_MAX_BLOCKS_PER_SCANLINE) * (SZ_MAX_PIXELS_PER_BLOCK)
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
25 26 27 28 29 30 31 32 33

typedef struct SZ_com_t_s
{
    int options_mask;
    int bits_per_pixel;
    int pixels_per_block;
    int pixels_per_scanline;
} SZ_com_t;

34 35 36 37 38 39 40 41 42 43
LIBAEC_DLL_EXPORTED int SZ_BufftoBuffCompress(
    void *dest, size_t *destLen,
    const void *source, size_t sourceLen,
    SZ_com_t *param);
LIBAEC_DLL_EXPORTED int SZ_BufftoBuffDecompress(
    void *dest, size_t *destLen,
    const void *source, size_t sourceLen,
    SZ_com_t *param);

LIBAEC_DLL_EXPORTED int SZ_encoder_enabled(void);
44

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
45
#endif /* SZLIB_H */