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

JPEG 2000 image encoder and decoder common functions. More...

#include "libavutil/attributes.h"
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "jpeg2000.h"

Go to the source code of this file.

Macros

#define SHL(a, n)   ((n) >= 0 ? (a) << (n) : (a) >> -(n))
 

Functions

static int32_t tag_tree_size (uint16_t w, uint16_t h)
 
static Jpeg2000TgtNodeff_jpeg2000_tag_tree_init (int w, int h)
 
static void tag_tree_zero (Jpeg2000TgtNode *t, int w, int h)
 
static int getsigctxno (int flag, int bandno)
 
static int getsgnctxno (int flag, uint8_t *xorbit)
 
void av_cold ff_jpeg2000_init_tier1_luts (void)
 
void ff_jpeg2000_set_significance (Jpeg2000T1Context *t1, int x, int y, int negative)
 
int ff_jpeg2000_init_component (Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *avctx)
 
void ff_jpeg2000_reinit (Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
 
void ff_jpeg2000_cleanup (Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
 

Variables

uint8_t ff_jpeg2000_sigctxno_lut [256][4]
 
uint8_t ff_jpeg2000_sgnctxno_lut [16][16]
 
uint8_t ff_jpeg2000_xorbit_lut [16][16]
 
static const int contribtab [3][3] = { { 0, -1, 1 }, { -1, -1, 0 }, { 1, 0, 1 } }
 
static const int ctxlbltab [3][3] = { { 13, 12, 11 }, { 10, 9, 10 }, { 11, 12, 13 } }
 
static const int xorbittab [3][3] = { { 1, 1, 1 }, { 1, 0, 0 }, { 0, 0, 0 } }
 
static const uint8_t lut_gain [2][4] = { { 0, 0, 0, 0 }, { 0, 1, 1, 2 } }
 

Detailed Description

JPEG 2000 image encoder and decoder common functions.

Definition in file jpeg2000.c.

Macro Definition Documentation

#define SHL (   a,
  n 
)    ((n) >= 0 ? (a) << (n) : (a) >> -(n))

Definition at line 35 of file jpeg2000.c.

Function Documentation

static int32_t tag_tree_size ( uint16_t  w,
uint16_t  h 
)
static

Definition at line 40 of file jpeg2000.c.

Referenced by ff_jpeg2000_tag_tree_init(), and tag_tree_zero().

static Jpeg2000TgtNode* ff_jpeg2000_tag_tree_init ( int  w,
int  h 
)
static

Definition at line 52 of file jpeg2000.c.

Referenced by ff_jpeg2000_init_component().

static void tag_tree_zero ( Jpeg2000TgtNode t,
int  w,
int  h 
)
static

Definition at line 83 of file jpeg2000.c.

Referenced by ff_jpeg2000_reinit().

static int getsigctxno ( int  flag,
int  bandno 
)
static

Definition at line 95 of file jpeg2000.c.

Referenced by ff_jpeg2000_init_tier1_luts().

static int getsgnctxno ( int  flag,
uint8_t xorbit 
)
static

Definition at line 144 of file jpeg2000.c.

Referenced by ff_jpeg2000_init_tier1_luts().

void av_cold ff_jpeg2000_init_tier1_luts ( void  )

Definition at line 157 of file jpeg2000.c.

Referenced by j2kenc_init(), and jpeg2000_init_static_data().

void ff_jpeg2000_set_significance ( Jpeg2000T1Context t1,
int  x,
int  y,
int  negative 
)

Definition at line 169 of file jpeg2000.c.

Referenced by decode_clnpass(), decode_sigpass(), encode_clnpass(), and encode_sigpass().

int ff_jpeg2000_init_component ( Jpeg2000Component comp,
Jpeg2000CodingStyle codsty,
Jpeg2000QuantStyle qntsty,
int  cbps,
int  dx,
int  dy,
AVCodecContext avctx 
)

Definition at line 194 of file jpeg2000.c.

Referenced by init_tile(), and init_tiles().

void ff_jpeg2000_reinit ( Jpeg2000Component comp,
Jpeg2000CodingStyle codsty 
)

Definition at line 480 of file jpeg2000.c.

Referenced by reinit().

void ff_jpeg2000_cleanup ( Jpeg2000Component comp,
Jpeg2000CodingStyle codsty 
)

Definition at line 501 of file jpeg2000.c.

Referenced by cleanup(), and jpeg2000_dec_cleanup().

Variable Documentation

uint8_t ff_jpeg2000_sigctxno_lut[256][4]

Definition at line 93 of file jpeg2000.c.

Referenced by ff_jpeg2000_getsigctxno(), and ff_jpeg2000_init_tier1_luts().

uint8_t ff_jpeg2000_sgnctxno_lut[16][16]

Definition at line 138 of file jpeg2000.c.

Referenced by ff_jpeg2000_getsgnctxno(), and ff_jpeg2000_init_tier1_luts().

uint8_t ff_jpeg2000_xorbit_lut[16][16]

Definition at line 138 of file jpeg2000.c.

Referenced by ff_jpeg2000_getsgnctxno(), and ff_jpeg2000_init_tier1_luts().

const int contribtab[3][3] = { { 0, -1, 1 }, { -1, -1, 0 }, { 1, 0, 1 } }
static

Definition at line 140 of file jpeg2000.c.

Referenced by getsgnctxno().

const int ctxlbltab[3][3] = { { 13, 12, 11 }, { 10, 9, 10 }, { 11, 12, 13 } }
static

Definition at line 141 of file jpeg2000.c.

Referenced by getsgnctxno().

const int xorbittab[3][3] = { { 1, 1, 1 }, { 1, 0, 0 }, { 0, 0, 0 } }
static

Definition at line 142 of file jpeg2000.c.

Referenced by getsgnctxno().

const uint8_t lut_gain[2][4] = { { 0, 0, 0, 0 }, { 0, 1, 1, 2 } }
static

Definition at line 192 of file jpeg2000.c.