FFmpeg
Data Structures | Macros | Functions | Variables
elsdec.c File Reference
#include <math.h>
#include <stdint.h>
#include "libavutil/common.h"
#include "libavutil/intreadwrite.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

◆ ELS_JOTS_PER_BYTE

#define ELS_JOTS_PER_BYTE   36

Definition at line 37 of file elsdec.c.

◆ ELS_MAX

#define ELS_MAX   (1 << 24)

Definition at line 38 of file elsdec.c.

◆ RUNG_SPACE

#define RUNG_SPACE   (64 * sizeof(ElsRungNode))

Definition at line 39 of file elsdec.c.

Function Documentation

◆ ff_els_decoder_init()

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

Definition at line 246 of file elsdec.c.

Referenced by epic_jb_decode_tile().

◆ ff_els_decoder_uninit()

void ff_els_decoder_uninit ( ElsUnsignedRung rung)

Definition at line 271 of file elsdec.c.

Referenced by epic_jb_decode_tile().

◆ els_import_byte()

static int els_import_byte ( ElsDecCtx ctx)
static

Definition at line 276 of file elsdec.c.

Referenced by ff_els_decode_bit().

◆ ff_els_decode_bit()

int ff_els_decode_bit ( ElsDecCtx ctx,
uint8_t *  rung 
)

◆ ff_els_decode_unsigned()

unsigned ff_els_decode_unsigned ( ElsDecCtx ctx,
ElsUnsignedRung ur 
)

Variable Documentation

◆ Ladder

const struct Ladder Ladder[174]
static

◆ els_exp_tab

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 224 of file elsdec.c.

Referenced by ff_els_decode_bit(), and ff_els_decoder_init().