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

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

#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "j2k.h"

Go to the source code of this file.

Macros

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

Functions

static int tag_tree_size (int w, int h)
 
Jpeg2000TgtNodeff_j2k_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 ff_j2k_set_significant (Jpeg2000T1Context *t1, int x, int y, int negative)
 
int ff_j2k_init_component (Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *avctx)
 
void ff_j2k_reinit (Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
 
void ff_j2k_cleanup (Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
 

Variables

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.

Author
Kamil Nowosad

Definition in file j2k.c.

Macro Definition Documentation

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

Definition at line 35 of file j2k.c.

Referenced by ff_j2k_init_component().

Function Documentation

static int tag_tree_size ( int  w,
int  h 
)
static

Definition at line 40 of file j2k.c.

Referenced by ff_j2k_tag_tree_init(), and tag_tree_zero().

Jpeg2000TgtNode* ff_j2k_tag_tree_init ( int  w,
int  h 
)

Definition at line 51 of file j2k.c.

Referenced by ff_j2k_init_component().

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

Definition at line 82 of file j2k.c.

Referenced by ff_j2k_reinit().

static int getsigctxno ( int  flag,
int  bandno 
)
static

Definition at line 92 of file j2k.c.

static int getsgnctxno ( int  flag,
uint8_t xorbit 
)
static

Definition at line 140 of file j2k.c.

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

Definition at line 153 of file j2k.c.

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

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

Definition at line 178 of file j2k.c.

Referenced by init_tile(), and init_tiles().

void ff_j2k_reinit ( Jpeg2000Component comp,
Jpeg2000CodingStyle codsty 
)

Definition at line 444 of file j2k.c.

Referenced by reinit().

void ff_j2k_cleanup ( Jpeg2000Component comp,
Jpeg2000CodingStyle codsty 
)

Definition at line 465 of file j2k.c.

Referenced by cleanup(), and jpeg2000_dec_cleanup().

Variable Documentation

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

Definition at line 136 of file j2k.c.

Referenced by getsgnctxno().

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

Definition at line 137 of file j2k.c.

Referenced by getsgnctxno().

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

Definition at line 138 of file j2k.c.

Referenced by getsgnctxno().

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

Definition at line 176 of file j2k.c.

Referenced by ff_j2k_init_component().