63 #define J2K_MAX_CBLKW 64 64 #define J2K_MAX_CBLKH 64 68 #define J2K_T1_SIG_N 0x0001 69 #define J2K_T1_SIG_E 0x0002 70 #define J2K_T1_SIG_W 0x0004 71 #define J2K_T1_SIG_S 0x0008 72 #define J2K_T1_SIG_NE 0x0010 73 #define J2K_T1_SIG_NW 0x0020 74 #define J2K_T1_SIG_SE 0x0040 75 #define J2K_T1_SIG_SW 0x0080 76 #define J2K_T1_SIG_NB (J2K_T1_SIG_N | J2K_T1_SIG_E | J2K_T1_SIG_S | J2K_T1_SIG_W \ 77 |J2K_T1_SIG_NE | J2K_T1_SIG_NW | J2K_T1_SIG_SE | J2K_T1_SIG_SW) 79 #define J2K_T1_SGN_N 0x0100 80 #define J2K_T1_SGN_S 0x0200 81 #define J2K_T1_SGN_W 0x0400 82 #define J2K_T1_SGN_E 0x0800 84 #define J2K_T1_VIS 0x1000 85 #define J2K_T1_SIG 0x2000 86 #define J2K_T1_REF 0x4000 88 #define J2K_T1_SGN 0x8000 91 #define J2K_CBLK_BYPASS 0x01 // Selective arithmetic coding bypass 92 #define J2K_CBLK_RESET 0x02 // Reset context probabilities 93 #define J2K_CBLK_TERMALL 0x04 // Terminate after each coding pass 94 #define J2K_CBLK_VSC 0x08 // Vertical stripe causal context formation 95 #define J2K_CBLK_PREDTERM 0x10 // Predictable termination 96 #define J2K_CBLK_SEGSYM 0x20 // Segmentation symbols present 99 #define J2K_CSTY_PREC 0x01 // Precincts defined in coding style 100 #define J2K_CSTY_SOP 0x02 // SOP marker present 101 #define J2K_CSTY_EPH 0x04 // EPH marker present 130 uint16_t mant[32 * 3];
153 uint16_t xi0, xi1, yi0,
yi1;
159 uint16_t coord[2][2];
169 uint16_t coord[2][2];
179 uint16_t coord[2][2];
186 void ff_j2k_printv(
int *
tab,
int l);
193 return (a + (1 << b) - 1)>>
b;
198 return (a + b - 1) /
b;
218 static const uint8_t refctxno_lut[2][2] = {{14, 15}, {16, 16}};
219 return refctxno_lut[(flag>>14)&1][(flag & 255) != 0];
static int ff_j2k_getsgnctxno(int flag, int *xorbit)
uint8_t ff_j2k_xorbit_lut[16][16]
uint16_t num_precincts_y
number of precincts in x/y direction
static int ff_j2k_ceildivpow2(int a, int b)
uint32_t stepsize
quantization stepsize (* 2^13)
uint8_t cblk_style
codeblock coding style
struct J2kTgtNode * parent
output residual component w
uint16_t yi1
codeblock indexes ([xi0, xi1))
uint8_t transform
DWT type.
packet length, main header
J2kTgtNode * ff_j2k_tag_tree_init(int w, int h)
packed packet headers, main header
struct J2kTgtNode J2kTgtNode
uint8_t ff_j2k_sgnctxno_lut[16][16]
uint8_t mct
multiple component transformation
packed packet headers, tile-part header
packet length, tile-part header
uint8_t ff_j2k_nbctxno_lut[256][4]
static int ff_j2k_getnbctxno(int flag, int bandno, int vert_causal_ctx_csty_symbol)
uint8_t nreslevels
number of resolution levels
void ff_j2k_init_tier1_luts(void)
static int ff_j2k_ceildiv(int a, int b)
Discrete wavelet transform.
void ff_j2k_set_significant(J2kT1Context *t1, int x, int y, int negative)
void ff_j2k_cleanup(J2kComponent *comp, J2kCodingStyle *codsty)
uint8_t ninclpasses
number coding of passes included in codestream
uint8_t nguardbits
number of guard bits
uint8_t nlayers
number of layers
static const struct twinvq_data tab
uint8_t quantsty
quantization style
static void comp(unsigned char *dst, int dst_stride, unsigned char *src, int src_stride, int add)
static int ff_j2k_getrefctxno(int flag)
void ff_j2k_reinit(J2kComponent *comp, J2kCodingStyle *codsty)
int ff_j2k_init_component(J2kComponent *comp, J2kCodingStyle *codsty, J2kQuantStyle *qntsty, int cbps, int dx, int dy)