#include <stdlib.h>
#include <stdio.h>
#include "arith.h"
Go to the source code of this file.
Functions | |
int | l2 (unsigned long x) |
arith_t | arith_init (struct buff *b) |
int | ajuster (arith_t state, int coder) |
int | coder (int i, distrib_t d, arith_t state) |
int | coder_uniforme (unsigned long i, unsigned long n, arith_t state) |
int | chercher (unsigned long valeur, unsigned long *sprob, int a, int b) |
int | decoder (distrib_t d, int *lettre, arith_t state) |
unsigned long | decoder_uniforme (unsigned long n, unsigned long *lettre, arith_t state) |
int ajuster | ( | arith_t | state, | |
int | coder | |||
) |
Definition at line 82 of file arith.c.
References code_arith::buffer, bwrite(), bwrite_bit(), bwrite_bits(), code_arith::compteur, l2(), code_arith::max, code_arith::min, and PREC_INTER.
Referenced by coder(), coder_uniforme(), decoder(), and decoder_uniforme().
Definition at line 69 of file arith.c.
References code_arith::buffer, code_arith::compteur, code_arith::max, code_arith::min, and PREC_INTER.
Referenced by dicho_b2cw(), and dicho_cw2b().
int chercher | ( | unsigned long | valeur, | |
unsigned long * | sprob, | |||
int | a, | |||
int | b | |||
) |
Definition at line 137 of file arith.c.
References ajuster(), code_arith::buffer, bwrite_lock(), code_arith::compteur, distrib_get_proba, distrib_t::max, code_arith::max, code_arith::min, PREC_INTER, and PREC_PROBA.
Referenced by dicho_rec().
int coder_uniforme | ( | unsigned long | i, | |
unsigned long | n, | |||
arith_t | state | |||
) |
Definition at line 176 of file arith.c.
References ajuster(), code_arith::buffer, bwrite_lock(), code_arith::compteur, code_arith::max, code_arith::min, and PREC_INTER.
Referenced by dicho().
Definition at line 223 of file arith.c.
References ajuster(), blook(), bread_lock(), bstep(), code_arith::buffer, chercher(), code_arith::compteur, distrib_get_proba, distrib_t::max, code_arith::max, distrib_t::min, code_arith::min, PREC_INTER, PREC_PROBA, and distrib_t::prob.
Referenced by dichoinv_rec().
unsigned long decoder_uniforme | ( | unsigned long | n, | |
unsigned long * | lettre, | |||
arith_t | state | |||
) |
Definition at line 289 of file arith.c.
References ajuster(), blook(), bread_lock(), bstep(), code_arith::buffer, code_arith::compteur, code_arith::max, code_arith::min, and PREC_INTER.
Referenced by dichoinv().
int l2 | ( | unsigned long | x | ) |