FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
elsdec.c File Reference

Entropy Logarithmic-Scale binary arithmetic decoder. More...

#include <math.h>
#include <stdint.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "elsdec.h"

Go to the source code of this file.

Data Structures

struct  Ladder
 

Macros

#define ELS_JOTS_PER_BYTE   36
 
#define ELS_MAX   (1 << 24)
 
#define RUNG_SPACE   (64 * sizeof(ElsRungNode))
 

Functions

void ff_els_decoder_init (ElsDecCtx *ctx, const uint8_t *in, size_t data_size)
 
void ff_els_decoder_uninit (ElsUnsignedRung *rung)
 
static int els_import_byte (ElsDecCtx *ctx)
 
int ff_els_decode_bit (ElsDecCtx *ctx, uint8_t *rung)
 
unsigned ff_els_decode_unsigned (ElsDecCtx *ctx, ElsUnsignedRung *ur)
 

Variables

static const struct Ladder Ladder [174]
 
static const uint32_t els_exp_tab [ELS_JOTS_PER_BYTE *4+1]
 

Detailed Description

Entropy Logarithmic-Scale binary arithmetic decoder.

Definition in file elsdec.c.

Macro Definition Documentation

#define ELS_JOTS_PER_BYTE   36

Definition at line 38 of file elsdec.c.

Referenced by els_import_byte(), ff_els_decode_bit(), and ff_els_decoder_init().

#define ELS_MAX   (1 << 24)

Definition at line 39 of file elsdec.c.

Referenced by ff_els_decoder_init().

#define RUNG_SPACE   (64 * sizeof(ElsRungNode))

Definition at line 40 of file elsdec.c.

Referenced by ff_els_decode_unsigned().

Function Documentation

void ff_els_decoder_init ( ElsDecCtx ctx,
const uint8_t in,
size_t  data_size 
)

Definition at line 247 of file elsdec.c.

Referenced by epic_jb_decode_tile().

void ff_els_decoder_uninit ( ElsUnsignedRung rung)

Definition at line 272 of file elsdec.c.

Referenced by epic_jb_decode_tile().

static int els_import_byte ( ElsDecCtx ctx)
static

Definition at line 277 of file elsdec.c.

Referenced by ff_els_decode_bit().

int ff_els_decode_bit ( ElsDecCtx ctx,
uint8_t rung 
)
unsigned ff_els_decode_unsigned ( ElsDecCtx ctx,
ElsUnsignedRung ur 
)

Variable Documentation

const struct Ladder Ladder[174]
static
const uint32_t els_exp_tab[ELS_JOTS_PER_BYTE *4+1]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, 1, 1, 1,
1, 2, 2, 2, 3, 4, 4, 5,
6, 7, 8, 10, 11, 13, 16, 18,
21, 25, 29, 34, 40, 47, 54, 64,
74, 87, 101, 118, 138, 161, 188, 219,
256, 298, 348, 406, 474, 552, 645, 752,
877, 1024, 1194, 1393, 1625, 1896, 2211, 2580,
3010, 3511, 4096, 4778, 5573, 6501, 7584, 8847,
10321, 12040, 14045, 16384, 19112, 22295, 26007, 30339,
35391, 41285, 48160, 56180, 65536, 76288, 89088, 103936,
121344, 141312, 165120, 192512, 224512, 262144, 305664, 356608,
416000, 485376, 566016, 660480, 770560, 898816, 1048576, 1223168,
1426688, 1664256, 1941504, 2264832, 2642176, 3082240, 3595520, 4194304,
4892672, 5707520, 6657792, 7766784, 9060096, 10568960, 12328960, 14382080,
16777216,
}

Definition at line 225 of file elsdec.c.

Referenced by ff_els_decode_bit(), and ff_els_decoder_init().