context_ini.c File Reference

CABAC context initializations. More...

#include <math.h>
#include "global.h"
#include "ctx_tables.h"
#include "biariencode.h"
#include "memalloc.h"

Include dependency graph for context_ini.c:

Go to the source code of this file.

Defines

#define CONTEXT_INI_C
#define DEFAULT_CTX_MODEL   0
#define RELIABLE_COUNT   32.0
#define FRAME_TYPES   4
#define FIXED   0
#define BIARI_CTX_INIT2(qp, ii, jj, ctx, tab)
#define ADD_XRATE2(p_Img, ii, jj, ctx, tab)
#define ADD_XRATE1(p_Img, jj, ctx, tab)

Functions

void create_context_memory (ImageParameters *p_Img, InputParameters *p_Inp)
void free_context_memory (ImageParameters *p_Img)
static void binary_context_init1 (int qp, int jj, BiContextType *ctx, const char table[][2])
static void binary_context_init2 (int qp, int ii, int jj, BiContextType ctx[][11], const char table[][11][2])
void SetCtxModelNumber (Slice *currSlice)
void init_contexts (Slice *currSlice)
double XRate (ImageParameters *p_Img, BiContextTypePtr ctx, const char *model)
void GetCtxModelNumber (Slice *currSlice, int *mnumber, MotionInfoContexts *mc, TextureInfoContexts *tc)
void store_contexts (Slice *currSlice)
void update_field_frame_contexts (ImageParameters *p_Img, int field)

Variables

static const double probabilities [64]


Detailed Description

CABAC context initializations.

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

Definition in file context_ini.c.


Define Documentation

#define ADD_XRATE1 ( p_Img,
jj,
ctx,
tab   ) 

Value:

{ \
  for (j=0; j<jj; j++) \
  { \
    xr += XRate (p_Img, &(ctx[j]), &(tab[j][0])); \
  } \
}

Definition at line 243 of file context_ini.c.

#define ADD_XRATE2 ( p_Img,
ii,
jj,
ctx,
tab   ) 

Value:

{ \
  for (i=0; i<ii; i++) \
  for (j=0; j<jj; j++) \
  { \
    xr += XRate (p_Img, &(ctx[i][j]), &(tab[i][j][0])); \
  } \
}

Definition at line 234 of file context_ini.c.

#define BIARI_CTX_INIT2 ( qp,
ii,
jj,
ctx,
tab   ) 

Value:

{ \
  for (i=0; i<ii; i++) \
  for (j=0; j<jj; j++) \
  { \
    biari_init_context (qp, &(ctx[i][j]), &(tab[i][j][0])); \
  } \
}

Definition at line 75 of file context_ini.c.


Variable Documentation

const double probabilities[64] [static]

Initial value:

{
  0.500000, 0.474609, 0.450507, 0.427629,    0.405912, 0.385299, 0.365732, 0.347159,
  0.329530, 0.312795, 0.296911, 0.281833,    0.267520, 0.253935, 0.241039, 0.228799,
  0.217180, 0.206151, 0.195682, 0.185744,    0.176312, 0.167358, 0.158859, 0.150792,
  0.143134, 0.135866, 0.128966, 0.122417,    0.116200, 0.110299, 0.104698, 0.099381,
  0.094334, 0.089543, 0.084996, 0.080680,    0.076583, 0.072694, 0.069002, 0.065498,
  0.062172, 0.059014, 0.056018, 0.053173,    0.050473, 0.047909, 0.045476, 0.043167,
  0.040975, 0.038894, 0.036919, 0.035044,    0.033264, 0.031575, 0.029972, 0.028450,
  0.027005, 0.025633, 0.024332, 0.023096,    0.021923, 0.020810, 0.019753, 0.018750
}

Definition at line 32 of file context_ini.c.


Documentation generated with DoxyGen