| Schroedinger Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
SchroArith;
SchroArithContext;
SchroArith * schro_arith_new (void);
void schro_arith_free (SchroArith *arith);
void schro_arith_decode_init (SchroArith *arith,
SchroBuffer *buffer);
void schro_arith_encode_init (SchroArith *arith,
SchroBuffer *buffer);
void schro_arith_flush (SchroArith *arith);
int schro_arith_decode_bit (SchroArith *arith,
unsigned int context);
void schro_arith_decode_flush (SchroArith *arith);
int schro_arith_decode_sint (SchroArith *arith,
unsigned int cont_context,
unsigned int value_context,
unsigned int sign_context);
int schro_arith_decode_uint (SchroArith *arith,
unsigned int cont_context,
unsigned int value_context);
void schro_arith_encode_bit (SchroArith *arith,
int context,
int value);
void schro_arith_encode_sint (SchroArith *arith,
int cont_context,
int value_context,
int sign_context,
int value);
void schro_arith_encode_uint (SchroArith *arith,
int cont_context,
int value_context,
int value);
void schro_arith_estimate_bit (SchroArith *arith,
int i,
int value);
void schro_arith_estimate_init (SchroArith *arith);
void schro_arith_estimate_sint (SchroArith *arith,
int cont_context,
int value_context,
int sign_context,
int value);
void schro_arith_estimate_uint (SchroArith *arith,
int cont_context,
int value_context,
int value);
typedef struct {
SchroBuffer *buffer;
uint8_t *dataptr;
uintptr_t offset;
uint32_t range[2];
uint32_t code;
uint32_t range_size;
int cntr;
int carry;
uint16_t probabilities[SCHRO_CTX_LAST];
uint16_t lut[512];
SchroArithContext contexts[SCHRO_CTX_LAST];
} SchroArith;
typedef struct {
unsigned int next;
int stat_range;
int n_bits;
int n_symbols;
int ones;
} SchroArithContext;
void schro_arith_decode_init (SchroArith *arith, SchroBuffer *buffer);
|
|
|
void schro_arith_encode_init (SchroArith *arith, SchroBuffer *buffer);
|
|
|
int schro_arith_decode_bit (SchroArith *arith, unsigned int context);
|
|
|
|
Returns : |
int schro_arith_decode_sint (SchroArith *arith, unsigned int cont_context, unsigned int value_context, unsigned int sign_context);
|
|
|
|
|
|
|
|
Returns : |
int schro_arith_decode_uint (SchroArith *arith, unsigned int cont_context, unsigned int value_context);
|
|
|
|
|
|
Returns : |
void schro_arith_encode_bit (SchroArith *arith, int context, int value);
|
|
|
|
|
void schro_arith_encode_sint (SchroArith *arith, int cont_context, int value_context, int sign_context, int value);
|
|
|
|
|
|
|
|
|
void schro_arith_encode_uint (SchroArith *arith, int cont_context, int value_context, int value);
|
|
|
|
|
|
|
void schro_arith_estimate_bit (SchroArith *arith, int i, int value);
|
|
|
|
|
void schro_arith_estimate_sint (SchroArith *arith, int cont_context, int value_context, int sign_context, int value);
|
|
|
|
|
|
|
|
|
void schro_arith_estimate_uint (SchroArith *arith, int cont_context, int value_context, int value);
|
|
|
|
|
|
|