23 #ifndef AVCODEC_JPEG2000_H 24 #define AVCODEC_JPEG2000_H 67 #define JPEG2000_MAX_CBLKW 64 68 #define JPEG2000_MAX_CBLKH 64 71 #define JPEG2000_MAX_DECLEVELS 32 72 #define JPEG2000_MAX_RESLEVELS (JPEG2000_MAX_DECLEVELS + 1) 76 #define JPEG2000_T1_SIG_N 0x0001 77 #define JPEG2000_T1_SIG_E 0x0002 78 #define JPEG2000_T1_SIG_W 0x0004 79 #define JPEG2000_T1_SIG_S 0x0008 80 #define JPEG2000_T1_SIG_NE 0x0010 81 #define JPEG2000_T1_SIG_NW 0x0020 82 #define JPEG2000_T1_SIG_SE 0x0040 83 #define JPEG2000_T1_SIG_SW 0x0080 84 #define JPEG2000_T1_SIG_NB (JPEG2000_T1_SIG_N | JPEG2000_T1_SIG_E | \ 85 JPEG2000_T1_SIG_S | JPEG2000_T1_SIG_W | \ 86 JPEG2000_T1_SIG_NE | JPEG2000_T1_SIG_NW | \ 87 JPEG2000_T1_SIG_SE | JPEG2000_T1_SIG_SW) 89 #define JPEG2000_T1_SGN_N 0x0100 90 #define JPEG2000_T1_SGN_S 0x0200 91 #define JPEG2000_T1_SGN_W 0x0400 92 #define JPEG2000_T1_SGN_E 0x0800 94 #define JPEG2000_T1_VIS 0x1000 95 #define JPEG2000_T1_SIG 0x2000 96 #define JPEG2000_T1_REF 0x4000 98 #define JPEG2000_T1_SGN 0x8000 101 #define JPEG2000_CBLK_BYPASS 0x01 // Selective arithmetic coding bypass 102 #define JPEG2000_CBLK_RESET 0x02 // Reset context probabilities 103 #define JPEG2000_CBLK_TERMALL 0x04 // Terminate after each coding pass 104 #define JPEG2000_CBLK_VSC 0x08 // Vertical stripe causal context formation 105 #define JPEG2000_CBLK_PREDTERM 0x10 // Predictable termination 106 #define JPEG2000_CBLK_SEGSYM 0x20 // Segmentation symbols present 109 #define JPEG2000_CSTY_PREC 0x01 // Precincts defined in coding style 110 #define JPEG2000_CSTY_SOP 0x02 // SOP marker present 111 #define JPEG2000_CSTY_EPH 0x04 // EPH marker present 114 #define JPEG2000_PGOD_LRCP 0x00 // Layer-resolution level-component-position progression 115 #define JPEG2000_PGOD_RLCP 0x01 // Resolution level-layer-component-position progression 116 #define JPEG2000_PGOD_RPCL 0x02 // Resolution level-position-component-layer progression 117 #define JPEG2000_PGOD_PCRL 0x03 // Position-component-resolution level-layer progression 118 #define JPEG2000_PGOD_CPRL 0x04 // Component-position-resolution level-layer progression 163 uint16_t coord[2][2];
172 uint16_t coord[2][2];
176 uint16_t coord[2][2];
185 uint16_t coord[2][2];
196 uint16_t coord[2][2];
197 uint16_t coord_o[2][2];
203 return (a + (1 << b) - 1) >>
b;
208 return (a + b - 1) /
b;
219 int x,
int y,
int negative);
236 return refctxno_lut[(flag >> 14) & 1][(flag & 255) != 0];
252 int cbps,
int dx,
int dy,
Discrete wavelet transform.
int flags[JPEG2000_MAX_CBLKW+2][JPEG2000_MAX_CBLKH+2]
Jpeg2000TgtNode * cblkincl
#define JPEG2000_MAX_CBLKH
void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
uint16_t nb_codeblocks_height
Jpeg2000TgtNode * zerobits
void ff_jpeg2000_set_significance(Jpeg2000T1Context *t1, int x, int y, int negative)
int data[JPEG2000_MAX_CBLKW][JPEG2000_MAX_CBLKH]
int ff_jpeg2000_init_component(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty, Jpeg2000QuantStyle *qntsty, int cbps, int dx, int dy, AVCodecContext *ctx)
static const uint8_t refctxno_lut[2][2]
struct Jpeg2000TgtNode * parent
#define JPEG2000_MAX_RESLEVELS
uint8_t ff_jpeg2000_sigctxno_lut[256][4]
static int ff_jpeg2000_getsigctxno(int flag, int bandno)
#define JPEG2000_MAX_DECLEVELS
static int ff_jpeg2000_ceildivpow2(int a, int b)
Libavcodec external API header.
uint8_t nreslevels2decode
main external API structure.
uint16_t nb_codeblocks_width
void ff_jpeg2000_init_tier1_luts(void)
Jpeg2000ResLevel * reslevel
static int ff_jpeg2000_ceildiv(int a, int b)
uint8_t ff_jpeg2000_xorbit_lut[16][16]
static void comp(unsigned char *dst, int dst_stride, unsigned char *src, int src_stride, int add)
static int ff_jpeg2000_getrefctxno(int flag)
#define JPEG2000_MAX_CBLKW
uint8_t ff_jpeg2000_sgnctxno_lut[16][16]
static int ff_jpeg2000_getsgnctxno(int flag, int *xorbit)