OpenJPEG 1.5.1
raw.h File Reference

Implementation of operations for raw encoding (RAW) More...

Go to the source code of this file.

Data Structures

struct  opj_raw
 RAW encoding operations. More...
 

Typedefs

typedef struct opj_raw opj_raw_t
 RAW encoding operations.
 

Functions

Exported functions
opj_raw_traw_create (void)
 Create a new RAW handle.
 
void raw_destroy (opj_raw_t *raw)
 Destroy a previously created RAW handle.
 
int raw_numbytes (opj_raw_t *raw)
 Return the number of bytes written/read since initialisation.
 
void raw_init_dec (opj_raw_t *raw, unsigned char *bp, int len)
 Initialize the decoder.
 
int raw_decode (opj_raw_t *raw)
 Decode a symbol using raw-decoder.
 

Detailed Description

Implementation of operations for raw encoding (RAW)

The functions in RAW.C have for goal to realize the operation of raw encoding linked with the corresponding mode switch.

Typedef Documentation

◆ opj_raw_t

typedef struct opj_raw opj_raw_t

RAW encoding operations.

Function Documentation

◆ raw_create()

opj_raw_t * raw_create ( void )

Create a new RAW handle.

Returns
Returns a new RAW handle if successful, returns NULL otherwise

References opj_malloc.

Referenced by t1_create().

◆ raw_decode()

int raw_decode ( opj_raw_t * raw)

Decode a symbol using raw-decoder.

Cfr p.506 TAUBMAN

Parameters
rawRAW handle
Returns
Returns the decoded symbol (0 or 1)

References opj_raw::c, opj_raw::ct, opj_raw::len, opj_raw::lenmax, and opj_raw::start.

Referenced by t1_dec_refpass_step_raw(), and t1_dec_sigpass_step_raw().

◆ raw_destroy()

void raw_destroy ( opj_raw_t * raw)

Destroy a previously created RAW handle.

Parameters
rawRAW handle to destroy

References opj_free.

Referenced by t1_destroy().

◆ raw_init_dec()

void raw_init_dec ( opj_raw_t * raw,
unsigned char * bp,
int len )

Initialize the decoder.

Parameters
rawRAW handle
bpPointer to the start of the buffer from which the bytes will be read
lenLength of the input buffer

References opj_raw::c, opj_raw::ct, opj_raw::len, opj_raw::lenmax, and opj_raw::start.

Referenced by t1_decode_cblk().

◆ raw_numbytes()

int raw_numbytes ( opj_raw_t * raw)

Return the number of bytes written/read since initialisation.

Parameters
rawRAW handle to destroy
Returns
Returns the number of bytes already encoded

References opj_raw::bp, and opj_raw::start.