![]() |
![]() |
![]() |
Schroedinger Reference Manual | ![]() |
---|---|---|---|---|
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); void schro_arith_init_contexts (SchroArith *arith); void schro_arith_context_encode_bit (SchroArith *arith, int context, int value); void schro_arith_context_encode_uint (SchroArith *arith, int cont_context, int value_context, int value); void schro_arith_context_encode_sint (SchroArith *arith, int cont_context, int value_context, int sign_context, int value); int schro_arith_context_decode_bit (SchroArith *arith, int context); int schro_arith_context_decode_uint (SchroArith *arith, int cont_context, int value_context); int schro_arith_context_decode_sint (SchroArith *arith, int cont_context, int value_context, int sign_context);
typedef struct { uint32_t range[2]; uint32_t code; int cntr; uint8_t *dataptr; int offset; int carry; SchroArithContext contexts[SCHRO_CTX_LAST]; SchroBuffer *buffer; } SchroArith;
typedef struct { uint16_t count[2]; int next; int n; uint16_t probability; } SchroArithContext;
void schro_arith_decode_init (SchroArith *arith, SchroBuffer *buffer);
|
|
|
void schro_arith_encode_init (SchroArith *arith, SchroBuffer *buffer);
|
|
|
void schro_arith_context_encode_bit (SchroArith *arith, int context, int value);
|
|
|
|
|
void schro_arith_context_encode_uint (SchroArith *arith, int cont_context, int value_context, int value);
|
|
|
|
|
|
|
void schro_arith_context_encode_sint (SchroArith *arith, int cont_context, int value_context, int sign_context, int value);
|
|
|
|
|
|
|
|
|
int schro_arith_context_decode_bit (SchroArith *arith, int context);
|
|
|
|
Returns : |
int schro_arith_context_decode_uint (SchroArith *arith, int cont_context, int value_context);
|
|
|
|
|
|
Returns : |
int schro_arith_context_decode_sint (SchroArith *arith, int cont_context, int value_context, int sign_context);
|
|
|
|
|
|
|
|
Returns : |