biaridecod.c File Reference

Binary arithmetic decoder routines. More...

#include "global.h"
#include "memalloc.h"
#include "biaridecod.h"

Include dependency graph for biaridecod.c:

Go to the source code of this file.

Defines

#define B_BITS   10
#define HALF   0x01FE
#define QUARTER   0x0100

Functions

DecodingEnvironmentPtr arideco_create_decoding_environment ()
void arideco_delete_decoding_environment (DecodingEnvironmentPtr dep)
void arideco_done_decoding (DecodingEnvironmentPtr dep)
unsigned int getbyte (DecodingEnvironmentPtr dep)
unsigned int getword (DecodingEnvironmentPtr dep)
void arideco_start_decoding (DecodingEnvironmentPtr dep, unsigned char *code_buffer, int firstbyte, int *code_len)
int arideco_bits_read (DecodingEnvironmentPtr dep)
unsigned int biari_decode_symbol (DecodingEnvironmentPtr dep, BiContextTypePtr bi_ct)
unsigned int biari_decode_symbol_eq_prob (DecodingEnvironmentPtr dep)
unsigned int biari_decode_final (DecodingEnvironmentPtr dep)
void biari_init_context (int qp, BiContextTypePtr ctx, const char *ini)


Detailed Description

Binary arithmetic decoder routines.

This modified implementation of the M Coder is based on JVT-U084 with the choice of M_BITS = 16.

Date:
21. Oct 2000
Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file biaridecod.c.


Function Documentation

int arideco_bits_read ( DecodingEnvironmentPtr  dep  ) 

arideco_bits_read

Definition at line 149 of file biaridecod.c.

Referenced by readSyntaxElement_CABAC().

DecodingEnvironmentPtr arideco_create_decoding_environment (  ) 

Allocates memory for the DecodingEnvironment struct.

Returns:
DecodingContextPtr allocates memory

Definition at line 46 of file biaridecod.c.

References no_mem_exit().

Here is the call graph for this function:

void arideco_delete_decoding_environment ( DecodingEnvironmentPtr  dep  ) 

Frees memory of the DecodingEnvironment struct.

Definition at line 62 of file biaridecod.c.

References error(), errortext, and ET_SIZE.

Here is the call graph for this function:

void arideco_done_decoding ( DecodingEnvironmentPtr  dep  ) 

finalize arithetic decoding():

Definition at line 79 of file biaridecod.c.

void arideco_start_decoding ( DecodingEnvironmentPtr  dep,
unsigned char *  code_buffer,
int  firstbyte,
int *  code_len 
)

Initializes the DecodingEnvironment for the arithmetic coder.

Definition at line 123 of file biaridecod.c.

References getbyte(), and getword().

Referenced by init_decoding_engine_IPCM(), and read_new_slice().

Here is the call graph for this function:

unsigned int biari_decode_final ( DecodingEnvironmentPtr  dep  ) 

biari_decode_symbol_final():

Returns:
the decoded symbol

Definition at line 263 of file biaridecod.c.

References getword().

Referenced by cabac_startcode_follows(), and readMB_typeInfo_CABAC().

Here is the call graph for this function:

unsigned int biari_decode_symbol ( DecodingEnvironmentPtr  dep,
BiContextTypePtr  bi_ct 
)

unsigned int biari_decode_symbol_eq_prob ( DecodingEnvironmentPtr  dep  ) 

biari_decode_symbol_eq_prob():

Returns:
the decoded symbol

Definition at line 230 of file biaridecod.c.

References getword().

Referenced by exp_golomb_decode_eq_prob(), read_significant_coefficients(), and readMVD_CABAC().

Here is the call graph for this function:

void biari_init_context ( int  qp,
BiContextTypePtr  ctx,
const char *  ini 
)

Initializes a given context with some pre-defined probability state.

Definition at line 302 of file biaridecod.c.

unsigned int getbyte ( DecodingEnvironmentPtr  dep  ) 

read one byte from the bitstream

Definition at line 93 of file biaridecod.c.

Referenced by arideco_start_decoding().

unsigned int getword ( DecodingEnvironmentPtr  dep  ) 

read two bytes from the bitstream

Definition at line 107 of file biaridecod.c.

Referenced by arideco_start_decoding(), biari_decode_final(), biari_decode_symbol(), and biari_decode_symbol_eq_prob().


Documentation generated with DoxyGen